|
@@ -1,715 +0,0 @@
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
-<mapper namespace="com.steerinfo.dil.mapper.TmstruckReceiptResultMapper">
|
|
|
|
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckReceiptResult">
|
|
|
|
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
|
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
|
|
|
|
- <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
|
|
|
|
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
|
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
|
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
|
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
|
- <result column="STATUS" jdbcType="DECIMAL" property="status" />
|
|
|
|
- <result column="RESULT_EMPTY_CONTAINER_PHOTO" jdbcType="BLOB" property="resultEmptyContainerPhoto" />
|
|
|
|
- <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="BLOB" property="resultSignedNotePhoto" />
|
|
|
|
- <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="BLOB" property="resultReceiveNotePhoto" />
|
|
|
|
- </resultMap>
|
|
|
|
- <sql id="columns">
|
|
|
|
- RESULT_ID, RESULT_TOTAL_ID, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO,
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO
|
|
|
|
- </sql>
|
|
|
|
- <sql id="columns_alias">
|
|
|
|
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
|
- t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_EMPTY_CONTAINER_PHOTO,
|
|
|
|
- t.RESULT_SIGNED_NOTE_PHOTO, t.RESULT_RECEIVE_NOTE_PHOTO
|
|
|
|
- </sql>
|
|
|
|
- <sql id="select">
|
|
|
|
- SELECT <include refid="columns"/> FROM TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- </sql>
|
|
|
|
- <sql id="select_alias">
|
|
|
|
- SELECT <include refid="columns_alias"/> FROM TMSTRUCK_RECEIPT_RESULT t
|
|
|
|
- </sql>
|
|
|
|
- <sql id="where">
|
|
|
|
- <where>
|
|
|
|
- <if test="resultId != null">
|
|
|
|
- and RESULT_ID = #{resultId}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- and WAREHOUSE_ID = #{warehouseId}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
- and INSERT_USERNAME = #{insertUsername}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
- and UPDATE_USERNAME = #{updateUsername}
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- and STATUS = #{status}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- </sql>
|
|
|
|
- <sql id="whereLike">
|
|
|
|
- <where>
|
|
|
|
- <if test="resultId != null">
|
|
|
|
- and RESULT_ID = #{resultId}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- and WAREHOUSE_ID = #{warehouseId}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
- and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- and STATUS = #{status}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- </sql>
|
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
|
- delete from TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
|
- </delete>
|
|
|
|
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
- delete from TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- where 1!=1
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- or RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- or WAREHOUSE_ID = #{warehouseId}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null and insertUsername != ''">
|
|
|
|
- or INSERT_USERNAME = #{insertUsername}
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
- or UPDATE_USERNAME = #{updateUsername}
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
|
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- or STATUS = #{status}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- or RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- or RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- or RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
|
|
|
|
- </if>
|
|
|
|
- </delete>
|
|
|
|
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
|
|
|
|
- insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, WAREHOUSE_ID,
|
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS,
|
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO,
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO)
|
|
|
|
- values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{warehouseId,jdbcType=DECIMAL},
|
|
|
|
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL},
|
|
|
|
- #{resultEmptyContainerPhoto,jdbcType=BLOB}, #{resultSignedNotePhoto,jdbcType=BLOB},
|
|
|
|
- #{resultReceiveNotePhoto,jdbcType=BLOB})
|
|
|
|
- </insert>
|
|
|
|
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
|
|
|
|
- insert into TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
- <if test="resultId != null">
|
|
|
|
- RESULT_ID,
|
|
|
|
- </if>
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- RESULT_TOTAL_ID,
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- WAREHOUSE_ID,
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- INSERT_USERNAME,
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- INSERT_TIME,
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null">
|
|
|
|
- UPDATE_USERNAME,
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- UPDATE_TIME,
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null">
|
|
|
|
- INSERT_UPDATE_REMARK,
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- STATUS,
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO,
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- RESULT_SIGNED_NOTE_PHOTO,
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO,
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
- <if test="resultId != null">
|
|
|
|
- #{resultId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- #{warehouseId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null">
|
|
|
|
- #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null">
|
|
|
|
- #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- #{status,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- #{resultEmptyContainerPhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- #{resultSignedNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- #{resultReceiveNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- </insert>
|
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
|
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
- WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
|
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
- STATUS = #{status,jdbcType=DECIMAL},
|
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
|
|
|
|
- RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB}
|
|
|
|
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
|
- </update>
|
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
|
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- <set>
|
|
|
|
- <if test="resultTotalId != null">
|
|
|
|
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null">
|
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null">
|
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- STATUS = #{status,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- </set>
|
|
|
|
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
|
- </update>
|
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
|
- <include refid="select"/>
|
|
|
|
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
|
- </select>
|
|
|
|
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
- <include refid="select"/>
|
|
|
|
- <include refid="where"/>
|
|
|
|
- </select>
|
|
|
|
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
- <include refid="select"/>
|
|
|
|
- <include refid="whereLike"/>
|
|
|
|
- </select>
|
|
|
|
- <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
- insert into TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- (RESULT_ID,
|
|
|
|
- RESULT_TOTAL_ID, WAREHOUSE_ID, INSERT_USERNAME,
|
|
|
|
- INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
- STATUS, RESULT_EMPTY_CONTAINER_PHOTO,
|
|
|
|
- RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO
|
|
|
|
- )
|
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
- select
|
|
|
|
- #{item.resultId,jdbcType=DECIMAL},
|
|
|
|
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.warehouseId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
|
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
- #{item.status,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=BLOB},
|
|
|
|
- #{item.resultSignedNotePhoto,jdbcType=BLOB}, #{item.resultReceiveNotePhoto,jdbcType=BLOB}
|
|
|
|
- from dual
|
|
|
|
- </foreach> )
|
|
|
|
- </insert>
|
|
|
|
- <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- set
|
|
|
|
- RESULT_ID=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,RESULT_TOTAL_ID=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,WAREHOUSE_ID=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,INSERT_USERNAME=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
|
- </foreach>
|
|
|
|
- ,INSERT_TIME=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
|
- </foreach>
|
|
|
|
- ,UPDATE_USERNAME=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
|
- </foreach>
|
|
|
|
- ,UPDATE_TIME=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
- </foreach>
|
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
- </foreach>
|
|
|
|
- ,STATUS=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,RESULT_EMPTY_CONTAINER_PHOTO=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyContainerPhoto,jdbcType=BLOB}
|
|
|
|
- </foreach>
|
|
|
|
- ,RESULT_SIGNED_NOTE_PHOTO=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSignedNotePhoto,jdbcType=BLOB}
|
|
|
|
- </foreach>
|
|
|
|
- ,RESULT_RECEIVE_NOTE_PHOTO=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultReceiveNotePhoto,jdbcType=BLOB}
|
|
|
|
- </foreach>
|
|
|
|
- where RESULT_ID in
|
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
- #{item.resultId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- </update>
|
|
|
|
- <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
- delete from TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- where RESULT_ID in
|
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
- #{id}
|
|
|
|
- </foreach>
|
|
|
|
- </delete>
|
|
|
|
- <!-- 友情提示!!!-->
|
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
- <!-- 获取最大ID值 -->
|
|
|
|
-
|
|
|
|
-<!-- 通过总实绩ID 查询签收实绩ID -->
|
|
|
|
- <select id="getIdByTotalResultId" parameterType="int" resultType="int">
|
|
|
|
- select TRR.RESULT_ID from TMSTRUCK_RECEIPT_RESULT TRR where TRR.RESULT_TOTAL_ID = #{totalResultId}
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
-<!--通过总实绩Id 更新 状态码 为 1 已签收-->
|
|
|
|
- <update id="updateByTotalResultId" parameterType="java.util.Map">
|
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
|
- <set>
|
|
|
|
- <if test="warehouseId != null">
|
|
|
|
- WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateUsername != null">
|
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUpdateRemark != null">
|
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null">
|
|
|
|
- STATUS = #{status,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
|
- RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB},
|
|
|
|
- </if>
|
|
|
|
- </set>
|
|
|
|
- where RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <!-- 通过签收时间排序 -->
|
|
|
|
- <sql id="orderBy">
|
|
|
|
- <if test="orderField != null and orderField != ''">
|
|
|
|
- order by "${orderField}"
|
|
|
|
- <if test="orderType != null and orderType != ''">
|
|
|
|
- ${orderType}
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="orderField == null ">
|
|
|
|
- order by "insertTime" desc
|
|
|
|
- </if>
|
|
|
|
- </sql>
|
|
|
|
-
|
|
|
|
-<!-- 查询所有签收实绩 -->
|
|
|
|
- <select id="getCGReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
|
- select
|
|
|
|
- *
|
|
|
|
- from (
|
|
|
|
- select
|
|
|
|
- OO.ORDER_ID "orderId",
|
|
|
|
- TRR.RESULT_ID "resultId",
|
|
|
|
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
|
- RM.MATERIAL_NAME "materialName",
|
|
|
|
- OO.ORDER_NUMBER "orderNumber",
|
|
|
|
- RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
|
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
|
- TUR.UNLOAD_STATUS "unloadStatus",
|
|
|
|
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
|
|
|
|
- RW.WAREHOUSE_NAME "warehouseName",
|
|
|
|
- TRR.INSERT_USERNAME "insertUsername",
|
|
|
|
- TRR.INSERT_TIME "insertTime"
|
|
|
|
- from TMSTRUCK_RECEIPT_RESULT TRR
|
|
|
|
- left join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
- on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join OMSTRUCK_ORDER OO
|
|
|
|
- on OO.ORDER_ID = TTR.ORDER_ID
|
|
|
|
- left join AMS_PURCHASE_ORDER APO
|
|
|
|
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
|
|
|
|
- left join DIL_BATCH DB
|
|
|
|
- on DB.BATCH_ID = APO.BATCH_ID
|
|
|
|
- left join RMS_CAPACITY RC
|
|
|
|
- on RC.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
|
- left join TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
|
- on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join TMSTRUCK_UNLOAD_RESULT TUR
|
|
|
|
- on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
|
- on OOM.ORDER_ID = OO.ORDER_ID
|
|
|
|
- left join RMS_MATERIAL RM
|
|
|
|
- on OOM.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
|
- left join RMS_WAREHOUSE RW
|
|
|
|
- on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
|
|
|
|
- where TRR.STATUS = 1 and OO.ORDER_TYPE = #{orderTypee}
|
|
|
|
- )
|
|
|
|
- <where>
|
|
|
|
- <if test="purchaseOrderNo != null">
|
|
|
|
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
|
- "purchaseOrderNo" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="materialName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "materialName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="orderNumber != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="capacityNumber != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultForeignShipName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultForeignShipName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="unloadStatus != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
|
|
|
|
- "unloadStatus" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultNetWeight != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
|
|
|
|
- "insertUsername" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- <include refid="orderBy"></include>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
-<!-- 查询内转钢材到异地库收货实绩-->
|
|
|
|
- <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
|
-
|
|
|
|
- SELECT *
|
|
|
|
- FROM (
|
|
|
|
- SELECT TRR.RESULT_ID "resultId",
|
|
|
|
- OO.ORDER_NUMBER "orderNumber",
|
|
|
|
- RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
|
- RW.WAREHOUSE_NAME "warehouseName",
|
|
|
|
- TRR.INSERT_TIME "insertTime",
|
|
|
|
- TRR.INSERT_USERNAME "insertUsername"
|
|
|
|
- FROM TMSTRUCK_RECEIPT_RESULT TRR
|
|
|
|
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
- ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- LEFT JOIN OMSTRUCK_ORDER OO
|
|
|
|
- ON OO.ORDER_ID = TTR.ORDER_ID
|
|
|
|
- LEFT JOIN RMS_WAREHOUSE RW
|
|
|
|
- ON RW.WAREHOUSE_ID = TRR.WAREHOUSE_ID
|
|
|
|
- LEFT JOIN RMS_CAPACITY RC
|
|
|
|
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
|
- WHERE OO.ORDER_TYPE = 4 AND TRR.STATUS = 1
|
|
|
|
- )
|
|
|
|
- <where>
|
|
|
|
- <if test="orderNumber != null">
|
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="capacityNumber != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="warehouseName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
|
|
|
|
- "insertTime" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
|
|
|
|
- "insertUsername" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- <include refid="orderBy"></include>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getInwardReceipt" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
|
-
|
|
|
|
- select *
|
|
|
|
- from (
|
|
|
|
- select TRR.RESULT_ID "resultId",
|
|
|
|
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
|
- RM.MATERIAL_NAME "materialName",
|
|
|
|
- OO.ORDER_NUMBER "orderNumber",
|
|
|
|
- RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
|
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
|
- TUR.UNLOAD_STATUS "unloadStatus",
|
|
|
|
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
|
|
|
|
- tqr.result_issampling "issampling",
|
|
|
|
- TRR.INSERT_USERNAME "insertUsername",
|
|
|
|
- TRR.INSERT_TIME "insertTime",
|
|
|
|
- RW.WAREHOUSE_NAME "warehouseName"
|
|
|
|
- from TMSTRUCK_RECEIPT_RESULT TRR
|
|
|
|
- left join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
- on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join OMSTRUCK_ORDER OO
|
|
|
|
- on OO.ORDER_ID = TTR.ORDER_ID
|
|
|
|
- left join AMS_PURCHASE_ORDER APO
|
|
|
|
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
|
|
|
|
- left join DIL_BATCH DB
|
|
|
|
- on DB.BATCH_ID = APO.BATCH_ID
|
|
|
|
- left join RMS_CAPACITY RC
|
|
|
|
- on RC.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
|
- left join TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
|
- on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join TMSTRUCK_UNLOAD_RESULT TUR
|
|
|
|
- on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
- left join OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
|
- on OOM.ORDER_ID = OO.ORDER_ID
|
|
|
|
- left join RMS_MATERIAL RM
|
|
|
|
- on OOM.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
|
- left join tmstruck_quality_result tqr
|
|
|
|
- on tqr.total_result_id = ttr.result_total_id
|
|
|
|
- left join RMS_WAREHOUSE RW
|
|
|
|
- on TUR.RESULT_UNLOAD_PLACE_ID = RW.WAREHOUSE_ID
|
|
|
|
- where TRR.STATUS = 1
|
|
|
|
- and OO.ORDER_TYPE = #{orderTypee}
|
|
|
|
- )
|
|
|
|
- <where>
|
|
|
|
- <if test="materialName != null">
|
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "materialName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="purchaseOrderNo != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
|
- "purchaseOrderNo" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="orderNumber != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="capacityNumber != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultForeignShipName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultForeignShipName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="unloadStatus != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
|
|
|
|
- "unloadStatus" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultNetWeight != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="issampling != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="issampling" item="item" open="(" separator="or" close=")">
|
|
|
|
- "issampling" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="insertUsername != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
|
|
|
|
- "insertUsername" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="insertTime != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
|
|
|
|
- "insertTime" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- <include refid="orderBy"></include>
|
|
|
|
- </select>
|
|
|
|
-</mapper>
|
|
|