|
@@ -1,573 +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.route.mapper.TmstruckReceiptResultMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.steerinfo.route.model.TmstruckReceiptResult">
|
|
|
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
|
|
|
- <result column="RESULT_EMPTY_CONTAINER_PHOTO" jdbcType="VARCHAR" property="resultEmptyContainerPhoto" />
|
|
|
- <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="VARCHAR" property="resultSignedNotePhoto" />
|
|
|
- <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="VARCHAR" property="resultReceiveNotePhoto" />
|
|
|
- <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="RESULT_ARRIVAL_ADDRESS" jdbcType="VARCHAR" property="resultArrivalAddress" />
|
|
|
- </resultMap>
|
|
|
- <sql id="columns">
|
|
|
- RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO,
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, RESULT_ARRIVAL_ADDRESS
|
|
|
- </sql>
|
|
|
- <sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_EMPTY_CONTAINER_PHOTO, t.RESULT_SIGNED_NOTE_PHOTO,
|
|
|
- t.RESULT_RECEIVE_NOTE_PHOTO, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.RESULT_ARRIVAL_ADDRESS
|
|
|
- </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="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
|
|
|
- and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
|
|
|
- </if>
|
|
|
- <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
|
|
|
- and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
|
|
|
- </if>
|
|
|
- <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
|
|
|
- and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
|
|
|
- </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="resultArrivalAddress != null and resultArrivalAddress != ''">
|
|
|
- and RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
|
|
|
- </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="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
|
|
|
- and RESULT_EMPTY_CONTAINER_PHOTO LIKE '%${resultEmptyContainerPhoto}%'
|
|
|
- </if>
|
|
|
- <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
|
|
|
- and RESULT_SIGNED_NOTE_PHOTO LIKE '%${resultSignedNotePhoto}%'
|
|
|
- </if>
|
|
|
- <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
|
|
|
- and RESULT_RECEIVE_NOTE_PHOTO LIKE '%${resultReceiveNotePhoto}%'
|
|
|
- </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="resultArrivalAddress != null and resultArrivalAddress != ''">
|
|
|
- and RESULT_ARRIVAL_ADDRESS LIKE '%${resultArrivalAddress}%'
|
|
|
- </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="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
|
|
|
- or RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
|
|
|
- </if>
|
|
|
- <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
|
|
|
- or RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
|
|
|
- </if>
|
|
|
- <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
|
|
|
- or RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
|
|
|
- </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="resultArrivalAddress != null and resultArrivalAddress != ''">
|
|
|
- or RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
|
|
|
- insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
|
|
|
- RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
|
|
|
- WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME,
|
|
|
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- RESULT_ARRIVAL_ADDRESS)
|
|
|
- values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
|
|
|
- #{resultSignedNotePhoto,jdbcType=VARCHAR}, #{resultReceiveNotePhoto,jdbcType=VARCHAR},
|
|
|
- #{warehouseId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{resultArrivalAddress,jdbcType=VARCHAR})
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" parameterType="com.steerinfo.route.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="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>
|
|
|
- <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="resultArrivalAddress != null">
|
|
|
- RESULT_ARRIVAL_ADDRESS,
|
|
|
- </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="resultEmptyContainerPhoto != null">
|
|
|
- #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
- #{resultSignedNotePhoto,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
- #{resultReceiveNotePhoto,jdbcType=VARCHAR},
|
|
|
- </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="resultArrivalAddress != null">
|
|
|
- #{resultArrivalAddress,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
|
|
|
- RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
|
|
|
- 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},
|
|
|
- RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR}
|
|
|
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
- <set>
|
|
|
- <if test="resultTotalId != null">
|
|
|
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="resultEmptyContainerPhoto != null">
|
|
|
- RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="resultSignedNotePhoto != null">
|
|
|
- RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="resultReceiveNotePhoto != null">
|
|
|
- RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
|
|
|
- </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="resultArrivalAddress != null">
|
|
|
- RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR},
|
|
|
- </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, RESULT_EMPTY_CONTAINER_PHOTO,
|
|
|
- RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
|
|
|
- WAREHOUSE_ID, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- RESULT_ARRIVAL_ADDRESS)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.resultId,jdbcType=DECIMAL},
|
|
|
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR},
|
|
|
- #{item.resultSignedNotePhoto,jdbcType=VARCHAR}, #{item.resultReceiveNotePhoto,jdbcType=VARCHAR},
|
|
|
- #{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.resultArrivalAddress,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
- </insert>
|
|
|
- <update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update TMSTRUCK_RECEIPT_RESULT
|
|
|
- set
|
|
|
- RESULT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_TOTAL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_EMPTY_CONTAINER_PHOTO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,RESULT_SIGNED_NOTE_PHOTO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSignedNotePhoto,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,RESULT_RECEIVE_NOTE_PHOTO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultReceiveNotePhoto,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,WAREHOUSE_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,RESULT_ARRIVAL_ADDRESS=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultArrivalAddress,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where RESULT_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.resultId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
- <delete id="batchDelete" parameterType="java.util.List">
|
|
|
- delete from TMSTRUCK_RECEIPT_RESULT
|
|
|
- where RESULT_ID in
|
|
|
- <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
- <!-- 友情提示!!!-->
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
- <select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
|
- select max(RESULT_ID) from TMSTRUCK_RECEIPT_RESULT
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getReceiptResultInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
|
|
|
- select * from(
|
|
|
- select distinct a_s_order.SALE_NUMBER "saleNumber",
|
|
|
- o_torder.ORDER_NUMBER "orderNumber",
|
|
|
- r_material.MATERIAL_NAME "materialName",
|
|
|
- r_material.MATERIAL_MODEL "materialModel",
|
|
|
- r_capacity.CAPACITY_NUMBER "capacityNumber",
|
|
|
- r_shipper.SHIPPER_NAME "shipperName",
|
|
|
- r_consignee.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
|
|
|
- t_receipt.RESULT_ARRIVAL_ADDRESS "resultReceiptAddress",
|
|
|
- receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
|
|
|
- t_receipt.RESULT_EMPTY_CONTAINER_PHOTO "resultEmptyContainerPhoto",
|
|
|
- t_arrival.RESULT_FULL_CONTAINER_PHOTO "resultFullContainerPhoto",
|
|
|
- t_receipt.RESULT_SIGNED_NOTE_PHOTO "resultSignedNotePhoto",
|
|
|
- t_receipt.RESULT_RECEIVE_NOTE_PHOTO "resultReceiveNotePhoto",
|
|
|
- t_receiptchild.OTHER_PHOTO1 "otherPhoto1",
|
|
|
- t_receiptchild.OTHER_PHOTO2 "otherPhoto2",
|
|
|
- t_receiptchild.OTHER_PHOTO3 "otherPhoto3",
|
|
|
- t_receipt.INSERT_TIME "receiptTime",
|
|
|
- r_carrier.CARRIER_NAME "carrierName",
|
|
|
- r_gatepost.GATEPOST_NAME "gatepostName"
|
|
|
- from TMSTRUCK_RECEIPT_RESULT t_receipt
|
|
|
- left join TMSTRUCK_TOTAL_RESULT t_total
|
|
|
- on t_receipt.RESULT_TOTAL_ID=t_total.RESULT_TOTAL_ID
|
|
|
- left join OMSTRUCK_ORDER o_torder
|
|
|
- on t_total.ORDER_ID=o_torder.ORDER_ID
|
|
|
- left join RMS_CAPACITY r_capacity
|
|
|
- on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
|
|
|
- left join RMS_DRIVER_CAPACITY r_d_capacity
|
|
|
- on r_capacity.CAPACITY_ID=r_d_capacity.CAPACITY_ID
|
|
|
- left join RMS_CARRIER r_carrier
|
|
|
- on o_torder.CARRIER_ID=r_carrier.CARRIER_ID
|
|
|
- left join RMS_CAR_DRIVER r_driver
|
|
|
- on r_d_capacity.DRIVER_ID=r_driver.DRIVER_ID
|
|
|
- left join AMS_SALE_ORDER_MATERIAL sale_material
|
|
|
- on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
|
|
|
- left join RMS_RECEIVE_ADDRESS receive_address
|
|
|
- on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
|
|
|
- left join RMS_MATERIAL r_material
|
|
|
- on sale_material.MATERIAL_ID=r_material.MATERIAL_ID
|
|
|
- left join AMS_SALE_ORDER a_s_order
|
|
|
- on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
|
|
|
- left join RMS_SHIPPER r_shipper
|
|
|
- on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
|
|
|
- left join RMS_CONSIGNEE r_consignee
|
|
|
- on a_s_order.CONSIGNEE_ID=r_consignee.CONSIGNEE_ID
|
|
|
- left join TMSTRUCK_RECEIPT_RESULT_CHILD t_receiptchild
|
|
|
- on t_receipt.RESULT_ID=t_receiptchild.RECEIPT_RESULT_ID
|
|
|
- left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
|
|
|
- on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
|
|
|
- LEFT JOIN RMS_GATEPOST r_gatepost
|
|
|
- ON t_leave.GATEPOST_ID = r_gatepost.GATEPOST_ID
|
|
|
- left join TMSTRUCK_ARRIVAL_RESULT t_arrival
|
|
|
- on t_total.RESULT_TOTAL_ID=t_arrival.RESULT_TOTAL_ID
|
|
|
- order by t_receipt.INSERT_TIME desc)
|
|
|
- <where>
|
|
|
- <if test="productClassification != null and productClassification != '其他' and productClassification != '螺纹钢'">
|
|
|
- and "materialName" like '%${productClassification}%'
|
|
|
- </if>
|
|
|
- <if test="productClassification != null and '螺纹钢' == productClassification">
|
|
|
- and ("materialName" like '%螺纹钢%' or "materialName" like '%盘螺%'
|
|
|
- or "materialName" like '%盘圆%' or "materialName" like '%非定尺材%')
|
|
|
- </if>
|
|
|
- <if test="productClassification != null and '其他' == productClassification">
|
|
|
- and "materialName" not like '%带钢%' and "materialName" not like '%微粉%'
|
|
|
- and "materialName" not like '%螺纹钢%' and "materialName" not like '%非定尺材%' and "materialName" not like '%钢坯%'
|
|
|
- and "materialName" not like '%盘螺%' and "materialName" not like '%盘圆%'
|
|
|
- </if>
|
|
|
- <if test="carrierName1 != null">
|
|
|
- and "carrierName" like '%${carrierName1}%'
|
|
|
- </if>
|
|
|
- <if test="gatepostName1 !=null">
|
|
|
- and "gatepostName" like '%${gatepostName1}%'
|
|
|
- </if>
|
|
|
- <if test="capacityNumber1 != null">
|
|
|
- and "capacityNumber" like '%${capacityNumber1}%'
|
|
|
- </if>
|
|
|
- <if test="consigneeCompanyName1 != null">
|
|
|
- and "consigneeCompanyName" like '%${consigneeCompanyName1}%'
|
|
|
- </if>
|
|
|
- <if test="startTime != null">
|
|
|
- and "receiptTime" >= to_date('${startTime}','yyyy-mm-dd')
|
|
|
- </if>
|
|
|
- <if test="endTime != null">
|
|
|
- and "receiptTime" <= to_date('${endTime}','yyyy-mm-dd')
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="saleNumber != null">
|
|
|
- and
|
|
|
- <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "saleNumber" 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="materialName != null">
|
|
|
- and
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
- "materialName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="materialModel != null">
|
|
|
- and
|
|
|
- <foreach collection="materialModel" item="item" open="(" separator="or" close=")">
|
|
|
- "materialModel" 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="shipperName != null">
|
|
|
- and
|
|
|
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
|
|
|
- "shipperName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeCompanyName != null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
|
|
|
- "consigneeCompanyName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultReceiptAddress != null">
|
|
|
- and
|
|
|
- <foreach collection="resultReceiptAddress" item="item" open="(" separator="or" close=")">
|
|
|
- "resultReceiptAddress" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="addressDeliveryAddress != null">
|
|
|
- and
|
|
|
- <foreach collection="addressDeliveryAddress" item="item" open="(" separator="or" close=")">
|
|
|
- "addressDeliveryAddress" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="receiptTime != null">
|
|
|
- and
|
|
|
- <foreach collection="receiptTime" item="item" open="(" separator="or" close=")">
|
|
|
- "receiptTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="carrierName != null">
|
|
|
- and
|
|
|
- <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
- "carrierName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="gatepostName != null">
|
|
|
- and
|
|
|
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
|
|
|
- "gatepostName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- <include refid="orderBy"></include>
|
|
|
- </select>
|
|
|
-
|
|
|
- <sql id="orderBy">
|
|
|
- <if test="orderField != null and orderField != ''">
|
|
|
- order by "${orderField}"
|
|
|
- <if test="orderType != null and orderType != ''">
|
|
|
- ${orderType}
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- </sql>
|
|
|
-</mapper>
|