|
@@ -1,674 +1,725 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.jisco.dynamicweight.dynamicworkdata.mapper.DynamicWorkDataMapper">
|
|
<mapper namespace="com.jisco.dynamicweight.dynamicworkdata.mapper.DynamicWorkDataMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
- <id column="DATA_NO" jdbcType="VARCHAR" property="dataNo" />
|
|
|
|
|
- <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode" />
|
|
|
|
|
- <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName" />
|
|
|
|
|
- <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode" />
|
|
|
|
|
- <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
|
|
|
|
|
- <result column="WEIGHT" jdbcType="DECIMAL" property="weight" />
|
|
|
|
|
- <result column="START_TIME" jdbcType="TIMESTAMP" property="startTime" />
|
|
|
|
|
- <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime" />
|
|
|
|
|
- <result column="RECEIVER" jdbcType="VARCHAR" property="receiver" />
|
|
|
|
|
- <result column="RECEIVER_CODE" jdbcType="VARCHAR" property="receiverCode" />
|
|
|
|
|
- <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
|
|
|
|
|
- <result column="SENDER" jdbcType="VARCHAR" property="sender" />
|
|
|
|
|
- <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode" />
|
|
|
|
|
- <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
|
|
|
|
|
- <result column="MEMO" jdbcType="VARCHAR" property="memo" />
|
|
|
|
|
- <result column="EXPIRE_FLAG" jdbcType="VARCHAR" property="expireFlag" />
|
|
|
|
|
- <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
|
|
|
|
|
- <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
|
|
|
|
|
- <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
|
|
|
|
|
- <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
- <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
|
|
|
|
|
- <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
|
|
|
|
|
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
- </resultMap>
|
|
|
|
|
- <sql id="columns">
|
|
|
|
|
- DATA_NO, STATION_CODE, STATION_NAME, MATERIAL_CODE, MATERIAL_NAME, WEIGHT, START_TIME,
|
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
+ <id column="DATA_NO" jdbcType="VARCHAR" property="dataNo"/>
|
|
|
|
|
+ <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
|
|
|
|
|
+ <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
|
|
|
|
|
+ <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode"/>
|
|
|
|
|
+ <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
|
|
|
|
|
+ <result column="WEIGHT" jdbcType="DECIMAL" property="weight"/>
|
|
|
|
|
+ <result column="START_TIME" jdbcType="TIMESTAMP" property="startTime"/>
|
|
|
|
|
+ <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime"/>
|
|
|
|
|
+ <result column="RECEIVER" jdbcType="VARCHAR" property="receiver"/>
|
|
|
|
|
+ <result column="RECEIVER_CODE" jdbcType="VARCHAR" property="receiverCode"/>
|
|
|
|
|
+ <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType"/>
|
|
|
|
|
+ <result column="SENDER" jdbcType="VARCHAR" property="sender"/>
|
|
|
|
|
+ <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode"/>
|
|
|
|
|
+ <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType"/>
|
|
|
|
|
+ <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
|
|
|
|
|
+ <result column="EXPIRE_FLAG" jdbcType="VARCHAR" property="expireFlag"/>
|
|
|
|
|
+ <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag"/>
|
|
|
|
|
+ <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo"/>
|
|
|
|
|
+ <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName"/>
|
|
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
|
|
+ <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo"/>
|
|
|
|
|
+ <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName"/>
|
|
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="columns">
|
|
|
|
|
+ DATA_NO
|
|
|
|
|
+ , STATION_CODE, STATION_NAME, MATERIAL_CODE, MATERIAL_NAME, WEIGHT, START_TIME,
|
|
|
END_TIME, RECEIVER, RECEIVER_CODE, RECEIVER_TYPE, SENDER, SENDER_CODE, SENDER_TYPE,
|
|
END_TIME, RECEIVER, RECEIVER_CODE, RECEIVER_TYPE, SENDER, SENDER_CODE, SENDER_TYPE,
|
|
|
MEMO, EXPIRE_FLAG, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
MEMO, EXPIRE_FLAG, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
|
UPDATE_MAN_NAME, UPDATE_TIME
|
|
UPDATE_MAN_NAME, UPDATE_TIME
|
|
|
- </sql>
|
|
|
|
|
- <sql id="columns_alias">
|
|
|
|
|
- t.DATA_NO, t.STATION_CODE, t.STATION_NAME, t.MATERIAL_CODE, t.MATERIAL_NAME, t.WEIGHT,
|
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
|
+ t
|
|
|
|
|
+ .
|
|
|
|
|
+ DATA_NO
|
|
|
|
|
+ , t.STATION_CODE, t.STATION_NAME, t.MATERIAL_CODE, t.MATERIAL_NAME, t.WEIGHT,
|
|
|
t.START_TIME, t.END_TIME, t.RECEIVER, t.RECEIVER_CODE, t.RECEIVER_TYPE, t.SENDER,
|
|
t.START_TIME, t.END_TIME, t.RECEIVER, t.RECEIVER_CODE, t.RECEIVER_TYPE, t.SENDER,
|
|
|
t.SENDER_CODE, t.SENDER_TYPE, t.MEMO, t.EXPIRE_FLAG, t.VALID_FLAG, t.CREATE_MAN_NO,
|
|
t.SENDER_CODE, t.SENDER_TYPE, t.MEMO, t.EXPIRE_FLAG, t.VALID_FLAG, t.CREATE_MAN_NO,
|
|
|
t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME
|
|
t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME
|
|
|
- </sql>
|
|
|
|
|
- <sql id="select">
|
|
|
|
|
- SELECT <include refid="columns" /> FROM DYNAMIC_WORK_DATA
|
|
|
|
|
- </sql>
|
|
|
|
|
- <sql id="select_alias">
|
|
|
|
|
- SELECT <include refid="columns_alias" /> FROM DYNAMIC_WORK_DATA t
|
|
|
|
|
- </sql>
|
|
|
|
|
- <sql id="where">
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="dataNo != null and dataNo != ''">
|
|
|
|
|
- and DATA_NO = #{dataNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
- and STATION_CODE = #{stationCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null and stationName != ''">
|
|
|
|
|
- and STATION_NAME = #{stationName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
- and MATERIAL_CODE = #{materialCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null and materialName != ''">
|
|
|
|
|
- and MATERIAL_NAME = #{materialName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- and WEIGHT = #{weight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null and receiver != ''">
|
|
|
|
|
- and RECEIVER = #{receiver}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
- and RECEIVER_CODE = #{receiverCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
- and RECEIVER_TYPE = #{receiverType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null and sender != ''">
|
|
|
|
|
- and SENDER = #{sender}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
- and SENDER_CODE = #{senderCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null and senderType != ''">
|
|
|
|
|
- and SENDER_TYPE = #{senderType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
|
|
- and MEMO = #{memo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
- and EXPIRE_FLAG = #{expireFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
- and VALID_FLAG = #{validFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
- and CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null and createManName != ''">
|
|
|
|
|
- and CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
- and UPDATE_MAN_NO = #{updateManNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
- and UPDATE_MAN_NAME = #{updateManName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- </sql>
|
|
|
|
|
- <sql id="whereLike">
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="dataNo != null and dataNo != ''">
|
|
|
|
|
- and DATA_NO LIKE '%${dataNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
- and STATION_CODE LIKE '%${stationCode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null and stationName != ''">
|
|
|
|
|
- and STATION_NAME LIKE '%${stationName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
- and MATERIAL_CODE LIKE '%${materialCode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null and materialName != ''">
|
|
|
|
|
- and MATERIAL_NAME LIKE '%${materialName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- and WEIGHT = #{weight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null and receiver != ''">
|
|
|
|
|
- and RECEIVER LIKE '%${receiver}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
- and RECEIVER_CODE LIKE '%${receiverCode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
- and RECEIVER_TYPE LIKE '%${receiverType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null and sender != ''">
|
|
|
|
|
- and SENDER LIKE '%${sender}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
- and SENDER_CODE LIKE '%${senderCode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null and senderType != ''">
|
|
|
|
|
- and SENDER_TYPE LIKE '%${senderType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
|
|
- and MEMO LIKE '%${memo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
- and EXPIRE_FLAG LIKE '%${expireFlag}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
- and VALID_FLAG LIKE '%${validFlag}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
- and CREATE_MAN_NO LIKE '%${createManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null and createManName != ''">
|
|
|
|
|
- and CREATE_MAN_NAME LIKE '%${createManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
- and UPDATE_MAN_NO LIKE '%${updateManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
- and UPDATE_MAN_NAME LIKE '%${updateManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- </sql>
|
|
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
- delete from DYNAMIC_WORK_DATA
|
|
|
|
|
- where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </delete>
|
|
|
|
|
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
|
- delete from DYNAMIC_WORK_DATA
|
|
|
|
|
- where 1!=1
|
|
|
|
|
- <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
- or STATION_CODE = #{stationCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null and stationName != ''">
|
|
|
|
|
- or STATION_NAME = #{stationName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
- or MATERIAL_CODE = #{materialCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null and materialName != ''">
|
|
|
|
|
- or MATERIAL_NAME = #{materialName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- or WEIGHT = #{weight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null and receiver != ''">
|
|
|
|
|
- or RECEIVER = #{receiver}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
- or RECEIVER_CODE = #{receiverCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
- or RECEIVER_TYPE = #{receiverType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null and sender != ''">
|
|
|
|
|
- or SENDER = #{sender}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
- or SENDER_CODE = #{senderCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null and senderType != ''">
|
|
|
|
|
- or SENDER_TYPE = #{senderType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
|
|
- or MEMO = #{memo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
- or EXPIRE_FLAG = #{expireFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
- or VALID_FLAG = #{validFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
- or CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null and createManName != ''">
|
|
|
|
|
- or CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
- or UPDATE_MAN_NO = #{updateManNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
- or UPDATE_MAN_NAME = #{updateManName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
|
|
- </if>
|
|
|
|
|
- </delete>
|
|
|
|
|
- <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
- insert into DYNAMIC_WORK_DATA (DATA_NO, STATION_CODE, STATION_NAME,
|
|
|
|
|
- MATERIAL_CODE, MATERIAL_NAME, WEIGHT,
|
|
|
|
|
- START_TIME, END_TIME, RECEIVER,
|
|
|
|
|
- RECEIVER_CODE, RECEIVER_TYPE, SENDER,
|
|
|
|
|
- SENDER_CODE, SENDER_TYPE, MEMO,
|
|
|
|
|
- EXPIRE_FLAG, VALID_FLAG, CREATE_MAN_NO,
|
|
|
|
|
- CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
|
|
|
- UPDATE_MAN_NAME, UPDATE_TIME)
|
|
|
|
|
- values (#{dataNo,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
- #{materialCode,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL},
|
|
|
|
|
- #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
- #{receiverCode,jdbcType=VARCHAR}, #{receiverType,jdbcType=VARCHAR}, #{sender,jdbcType=VARCHAR},
|
|
|
|
|
- #{senderCode,jdbcType=VARCHAR}, #{senderType,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR},
|
|
|
|
|
- #{expireFlag,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
- #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
- #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
|
|
- </insert>
|
|
|
|
|
- <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
- insert into DYNAMIC_WORK_DATA
|
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
- <if test="dataNo != null">
|
|
|
|
|
- DATA_NO,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationCode != null">
|
|
|
|
|
- STATION_CODE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null">
|
|
|
|
|
- STATION_NAME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null">
|
|
|
|
|
- MATERIAL_CODE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null">
|
|
|
|
|
- MATERIAL_NAME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- WEIGHT,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- START_TIME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- END_TIME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null">
|
|
|
|
|
- RECEIVER,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null">
|
|
|
|
|
- RECEIVER_CODE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null">
|
|
|
|
|
- RECEIVER_TYPE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null">
|
|
|
|
|
- SENDER,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null">
|
|
|
|
|
- SENDER_CODE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null">
|
|
|
|
|
- SENDER_TYPE,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null">
|
|
|
|
|
- MEMO,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null">
|
|
|
|
|
- EXPIRE_FLAG,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null">
|
|
|
|
|
- VALID_FLAG,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null">
|
|
|
|
|
- CREATE_MAN_NO,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null">
|
|
|
|
|
- CREATE_MAN_NAME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- CREATE_TIME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null">
|
|
|
|
|
- UPDATE_MAN_NO,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null">
|
|
|
|
|
- UPDATE_MAN_NAME,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- UPDATE_TIME,
|
|
|
|
|
- </if>
|
|
|
|
|
- </trim>
|
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
- <if test="dataNo != null">
|
|
|
|
|
- #{dataNo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationCode != null">
|
|
|
|
|
- #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null">
|
|
|
|
|
- #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null">
|
|
|
|
|
- #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null">
|
|
|
|
|
- #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- #{weight,jdbcType=DECIMAL},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null">
|
|
|
|
|
- #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null">
|
|
|
|
|
- #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null">
|
|
|
|
|
- #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null">
|
|
|
|
|
- #{sender,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null">
|
|
|
|
|
- #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null">
|
|
|
|
|
- #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null">
|
|
|
|
|
- #{memo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null">
|
|
|
|
|
- #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null">
|
|
|
|
|
- #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null">
|
|
|
|
|
- #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null">
|
|
|
|
|
- #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null">
|
|
|
|
|
- #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null">
|
|
|
|
|
- #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- </trim>
|
|
|
|
|
- </insert>
|
|
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
- update DYNAMIC_WORK_DATA
|
|
|
|
|
- set STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
- STATION_NAME = #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
- MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
- MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
- WEIGHT = #{weight,jdbcType=DECIMAL},
|
|
|
|
|
- START_TIME = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- END_TIME = #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- RECEIVER = #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
- RECEIVER_CODE = #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
- RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
- SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
|
|
- SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
- SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
- MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
|
|
- EXPIRE_FLAG = #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
- VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
- CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
- CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
- UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </update>
|
|
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
- update DYNAMIC_WORK_DATA
|
|
|
|
|
- <set>
|
|
|
|
|
- <if test="stationCode != null">
|
|
|
|
|
- STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="stationName != null">
|
|
|
|
|
- STATION_NAME = #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialCode != null">
|
|
|
|
|
- MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="materialName != null">
|
|
|
|
|
- MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="weight != null">
|
|
|
|
|
- WEIGHT = #{weight,jdbcType=DECIMAL},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null">
|
|
|
|
|
- START_TIME = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="endTime != null">
|
|
|
|
|
- END_TIME = #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiver != null">
|
|
|
|
|
- RECEIVER = #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverCode != null">
|
|
|
|
|
- RECEIVER_CODE = #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverType != null">
|
|
|
|
|
- RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sender != null">
|
|
|
|
|
- SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderCode != null">
|
|
|
|
|
- SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="senderType != null">
|
|
|
|
|
- SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null">
|
|
|
|
|
- MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="expireFlag != null">
|
|
|
|
|
- EXPIRE_FLAG = #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="validFlag != null">
|
|
|
|
|
- VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManNo != null">
|
|
|
|
|
- CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null">
|
|
|
|
|
- CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createTime != null">
|
|
|
|
|
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null">
|
|
|
|
|
- UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null">
|
|
|
|
|
- UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- </if>
|
|
|
|
|
- </set>
|
|
|
|
|
- where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </update>
|
|
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select" />
|
|
|
|
|
- where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </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 DYNAMIC_WORK_DATA
|
|
|
|
|
- (DATA_NO,
|
|
|
|
|
- STATION_CODE, STATION_NAME, MATERIAL_CODE,
|
|
|
|
|
- MATERIAL_NAME, WEIGHT, START_TIME,
|
|
|
|
|
- END_TIME, RECEIVER, RECEIVER_CODE,
|
|
|
|
|
- RECEIVER_TYPE, SENDER, SENDER_CODE,
|
|
|
|
|
- SENDER_TYPE, MEMO, EXPIRE_FLAG,
|
|
|
|
|
- VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
|
|
- CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
|
|
- UPDATE_TIME)
|
|
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
|
- select
|
|
|
|
|
- #{item.dataNo,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.stationCode,jdbcType=VARCHAR}, #{item.stationName,jdbcType=VARCHAR}, #{item.materialCode,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.materialName,jdbcType=VARCHAR}, #{item.weight,jdbcType=DECIMAL}, #{item.startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- #{item.endTime,jdbcType=TIMESTAMP}, #{item.receiver,jdbcType=VARCHAR}, #{item.receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.receiverType,jdbcType=VARCHAR}, #{item.sender,jdbcType=VARCHAR}, #{item.senderCode,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.senderType,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
|
|
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP} from dual
|
|
|
|
|
- </foreach> )
|
|
|
|
|
- </insert>
|
|
|
|
|
- <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
|
- update DYNAMIC_WORK_DATA
|
|
|
|
|
- set
|
|
|
|
|
- DATA_NO=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,STATION_CODE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.stationCode,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,STATION_NAME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.stationName,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,MATERIAL_CODE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.materialCode,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,MATERIAL_NAME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,WEIGHT=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,START_TIME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,END_TIME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,RECEIVER=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiver,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,RECEIVER_CODE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiverCode,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,RECEIVER_TYPE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiverType,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,SENDER=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.sender,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,SENDER_CODE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.senderCode,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,SENDER_TYPE=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,MEMO=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,EXPIRE_FLAG=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.expireFlag,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,VALID_FLAG=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,CREATE_MAN_NO=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,CREATE_MAN_NAME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,CREATE_TIME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,UPDATE_MAN_NO=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,UPDATE_MAN_NAME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- ,UPDATE_TIME=
|
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- where DATA_NO in
|
|
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
|
- #{item.dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </update>
|
|
|
|
|
- <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
|
- delete from DYNAMIC_WORK_DATA
|
|
|
|
|
- where DATA_NO in
|
|
|
|
|
- <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
|
|
- #{id}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </delete>
|
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="columns"/>
|
|
|
|
|
+ FROM DYNAMIC_WORK_DATA
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="columns_alias"/>
|
|
|
|
|
+ FROM DYNAMIC_WORK_DATA t
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="where">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="dataNo != null and dataNo != ''">
|
|
|
|
|
+ and DATA_NO = #{dataNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
+ and STATION_CODE = #{stationCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null and stationName != ''">
|
|
|
|
|
+ and STATION_NAME = #{stationName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
+ and MATERIAL_CODE = #{materialCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
|
|
+ and MATERIAL_NAME = #{materialName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ and WEIGHT = #{weight}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null and receiver != ''">
|
|
|
|
|
+ and RECEIVER = #{receiver}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
+ and RECEIVER_CODE = #{receiverCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
+ and RECEIVER_TYPE = #{receiverType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
|
|
+ and SENDER = #{sender}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
+ and SENDER_CODE = #{senderCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null and senderType != ''">
|
|
|
|
|
+ and SENDER_TYPE = #{senderType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
|
|
+ and MEMO = #{memo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
+ and EXPIRE_FLAG = #{expireFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
+ and VALID_FLAG = #{validFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ and CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
+ and UPDATE_MAN_NO = #{updateManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
+ and UPDATE_MAN_NAME = #{updateManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="dataNo != null and dataNo != ''">
|
|
|
|
|
+ and DATA_NO LIKE '%${dataNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
+ and STATION_CODE LIKE '%${stationCode}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null and stationName != ''">
|
|
|
|
|
+ and STATION_NAME LIKE '%${stationName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
+ and MATERIAL_CODE LIKE '%${materialCode}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
|
|
+ and MATERIAL_NAME LIKE '%${materialName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ and WEIGHT = #{weight}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime1 != null">
|
|
|
|
|
+ and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') >= #{endTime1}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime2 != null">
|
|
|
|
|
+ and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') <= #{endTime2}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null and receiver != ''">
|
|
|
|
|
+ and RECEIVER LIKE '%${receiver}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
+ and RECEIVER_CODE LIKE '%${receiverCode}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
+ and RECEIVER_TYPE LIKE '%${receiverType}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
|
|
+ and SENDER LIKE '%${sender}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
+ and SENDER_CODE LIKE '%${senderCode}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null and senderType != ''">
|
|
|
|
|
+ and SENDER_TYPE LIKE '%${senderType}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
|
|
+ and MEMO LIKE '%${memo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
+ and EXPIRE_FLAG LIKE '%${expireFlag}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
+ and VALID_FLAG LIKE '%${validFlag}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ and CREATE_MAN_NO LIKE '%${createManNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and CREATE_MAN_NAME LIKE '%${createManName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
+ and UPDATE_MAN_NO LIKE '%${updateManNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
+ and UPDATE_MAN_NAME LIKE '%${updateManName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
+ delete
|
|
|
|
|
+ from DYNAMIC_WORK_DATA
|
|
|
|
|
+ where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
|
+ delete from DYNAMIC_WORK_DATA
|
|
|
|
|
+ where 1!=1
|
|
|
|
|
+ <if test="stationCode != null and stationCode != ''">
|
|
|
|
|
+ or STATION_CODE = #{stationCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null and stationName != ''">
|
|
|
|
|
+ or STATION_NAME = #{stationName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null and materialCode != ''">
|
|
|
|
|
+ or MATERIAL_CODE = #{materialCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
|
|
+ or MATERIAL_NAME = #{materialName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ or WEIGHT = #{weight}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null and receiver != ''">
|
|
|
|
|
+ or RECEIVER = #{receiver}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null and receiverCode != ''">
|
|
|
|
|
+ or RECEIVER_CODE = #{receiverCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null and receiverType != ''">
|
|
|
|
|
+ or RECEIVER_TYPE = #{receiverType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
|
|
+ or SENDER = #{sender}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null and senderCode != ''">
|
|
|
|
|
+ or SENDER_CODE = #{senderCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null and senderType != ''">
|
|
|
|
|
+ or SENDER_TYPE = #{senderType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
|
|
+ or MEMO = #{memo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null and expireFlag != ''">
|
|
|
|
|
+ or EXPIRE_FLAG = #{expireFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
+ or VALID_FLAG = #{validFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ or CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ or CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
+ or UPDATE_MAN_NO = #{updateManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
+ or UPDATE_MAN_NAME = #{updateManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
+ insert into DYNAMIC_WORK_DATA (DATA_NO, STATION_CODE, STATION_NAME,
|
|
|
|
|
+ MATERIAL_CODE, MATERIAL_NAME, WEIGHT,
|
|
|
|
|
+ START_TIME, END_TIME, RECEIVER,
|
|
|
|
|
+ RECEIVER_CODE, RECEIVER_TYPE, SENDER,
|
|
|
|
|
+ SENDER_CODE, SENDER_TYPE, MEMO,
|
|
|
|
|
+ EXPIRE_FLAG, VALID_FLAG, CREATE_MAN_NO,
|
|
|
|
|
+ CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
|
|
|
+ UPDATE_MAN_NAME, UPDATE_TIME)
|
|
|
|
|
+ values (#{dataNo,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{materialCode,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL},
|
|
|
|
|
+ #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
+ #{receiverCode,jdbcType=VARCHAR}, #{receiverType,jdbcType=VARCHAR}, #{sender,jdbcType=VARCHAR},
|
|
|
|
|
+ #{senderCode,jdbcType=VARCHAR}, #{senderType,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{expireFlag,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
+ insert into DYNAMIC_WORK_DATA
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="dataNo != null">
|
|
|
|
|
+ DATA_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationCode != null">
|
|
|
|
|
+ STATION_CODE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null">
|
|
|
|
|
+ STATION_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null">
|
|
|
|
|
+ MATERIAL_CODE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null">
|
|
|
|
|
+ MATERIAL_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ WEIGHT,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ START_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ END_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null">
|
|
|
|
|
+ RECEIVER,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null">
|
|
|
|
|
+ RECEIVER_CODE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null">
|
|
|
|
|
+ RECEIVER_TYPE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null">
|
|
|
|
|
+ SENDER,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null">
|
|
|
|
|
+ SENDER_CODE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null">
|
|
|
|
|
+ SENDER_TYPE,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null">
|
|
|
|
|
+ MEMO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null">
|
|
|
|
|
+ EXPIRE_FLAG,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null">
|
|
|
|
|
+ VALID_FLAG,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ CREATE_MAN_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ CREATE_MAN_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null">
|
|
|
|
|
+ UPDATE_MAN_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null">
|
|
|
|
|
+ UPDATE_MAN_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ UPDATE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="dataNo != null">
|
|
|
|
|
+ #{dataNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationCode != null">
|
|
|
|
|
+ #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null">
|
|
|
|
|
+ #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null">
|
|
|
|
|
+ #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null">
|
|
|
|
|
+ #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ #{weight,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null">
|
|
|
|
|
+ #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null">
|
|
|
|
|
+ #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null">
|
|
|
|
|
+ #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null">
|
|
|
|
|
+ #{sender,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null">
|
|
|
|
|
+ #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null">
|
|
|
|
|
+ #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null">
|
|
|
|
|
+ #{memo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null">
|
|
|
|
|
+ #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null">
|
|
|
|
|
+ #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null">
|
|
|
|
|
+ #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null">
|
|
|
|
|
+ #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
+ update DYNAMIC_WORK_DATA
|
|
|
|
|
+ set STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
+ STATION_NAME = #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
+ MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
+ MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
+ WEIGHT = #{weight,jdbcType=DECIMAL},
|
|
|
|
|
+ START_TIME = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ END_TIME = #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ RECEIVER = #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
+ RECEIVER_CODE = #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
+ RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
+ SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
|
|
+ SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
+ SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
+ MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
|
|
+ EXPIRE_FLAG = #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective"
|
|
|
|
|
+ parameterType="com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData">
|
|
|
|
|
+ update DYNAMIC_WORK_DATA
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="stationCode != null">
|
|
|
|
|
+ STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName != null">
|
|
|
|
|
+ STATION_NAME = #{stationName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialCode != null">
|
|
|
|
|
+ MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="materialName != null">
|
|
|
|
|
+ MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="weight != null">
|
|
|
|
|
+ WEIGHT = #{weight,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ START_TIME = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ END_TIME = #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiver != null">
|
|
|
|
|
+ RECEIVER = #{receiver,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverCode != null">
|
|
|
|
|
+ RECEIVER_CODE = #{receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receiverType != null">
|
|
|
|
|
+ RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sender != null">
|
|
|
|
|
+ SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderCode != null">
|
|
|
|
|
+ SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="senderType != null">
|
|
|
|
|
+ SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="memo != null">
|
|
|
|
|
+ MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expireFlag != null">
|
|
|
|
|
+ EXPIRE_FLAG = #{expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validFlag != null">
|
|
|
|
|
+ VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManNo != null">
|
|
|
|
|
+ UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateManName != null">
|
|
|
|
|
+ UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </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 DYNAMIC_WORK_DATA
|
|
|
|
|
+ (DATA_NO,
|
|
|
|
|
+ STATION_CODE, STATION_NAME, MATERIAL_CODE,
|
|
|
|
|
+ MATERIAL_NAME, WEIGHT, START_TIME,
|
|
|
|
|
+ END_TIME, RECEIVER, RECEIVER_CODE,
|
|
|
|
|
+ RECEIVER_TYPE, SENDER, SENDER_CODE,
|
|
|
|
|
+ SENDER_TYPE, MEMO, EXPIRE_FLAG,
|
|
|
|
|
+ VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
|
|
+ CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
|
|
+ UPDATE_TIME)
|
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
|
+ select
|
|
|
|
|
+ #{item.dataNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.stationCode,jdbcType=VARCHAR}, #{item.stationName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.materialCode,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.materialName,jdbcType=VARCHAR}, #{item.weight,jdbcType=DECIMAL}, #{item.startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.endTime,jdbcType=TIMESTAMP}, #{item.receiver,jdbcType=VARCHAR}, #{item.receiverCode,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.receiverType,jdbcType=VARCHAR}, #{item.sender,jdbcType=VARCHAR}, #{item.senderCode,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.senderType,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.expireFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.updateManName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP} from dual
|
|
|
|
|
+ </foreach> )
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
|
+ update DYNAMIC_WORK_DATA
|
|
|
|
|
+ set
|
|
|
|
|
+ DATA_NO=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,STATION_CODE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.stationCode,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,STATION_NAME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.stationName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,MATERIAL_CODE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.materialCode,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,MATERIAL_NAME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,WEIGHT=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,START_TIME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,END_TIME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,RECEIVER=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiver,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,RECEIVER_CODE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiverCode,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,RECEIVER_TYPE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.receiverType,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,SENDER=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.sender,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,SENDER_CODE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.senderCode,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,SENDER_TYPE=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,MEMO=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,EXPIRE_FLAG=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.expireFlag,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,VALID_FLAG=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_MAN_NO=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_MAN_NAME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_TIME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,UPDATE_MAN_NO=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,UPDATE_MAN_NAME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,UPDATE_TIME=
|
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ where DATA_NO in
|
|
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
|
+ #{item.dataNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
|
+ delete from DYNAMIC_WORK_DATA
|
|
|
|
|
+ where DATA_NO in
|
|
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
<!-- 友情提示!!!-->
|
|
<!-- 友情提示!!!-->
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
+ <!-- 计算(M1+M1B)去1#-4#焦炉总量-->
|
|
|
|
|
+ <select id="getTotalWeightOfM1AndM1BTo1_4" resultType="java.math.BigDecimal">
|
|
|
|
|
+ SELECT sum(WEIGHT)
|
|
|
|
|
+ FROM "DYNAMIC_WORK_DATA"
|
|
|
|
|
+ where STATION_NAME in ('M1', 'M1B')
|
|
|
|
|
+ and RECEIVER = #{receiver}
|
|
|
|
|
+ and END_TIME BETWEEN #{startTime} and #{endTime}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <!-- 计算3煤塔总量-->
|
|
|
|
|
+ <select id="getTotalWeightOf3MT" resultType="java.math.BigDecimal">
|
|
|
|
|
+ SELECT sum(WEIGHT)
|
|
|
|
|
+ FROM "DYNAMIC_WORK_DATA"
|
|
|
|
|
+ where MATERIAL_NAME = #{material}
|
|
|
|
|
+ and END_TIME BETWEEN #{startTime} and #{endTime}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <!-- 查询(M1M1B)去1#-4#焦炉按物料分组后的重量-->
|
|
|
|
|
+ <select id="getTotalWeightOfM1AndM1BTo1_4GroupByMaterial"
|
|
|
|
|
+ resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT MATERIAL_NAME,
|
|
|
|
|
+ sum(WEIGHT) as WEIGHT,
|
|
|
|
|
+ max(RECEIVER) as RECEIVER,
|
|
|
|
|
+ max(SENDER) as SENDER
|
|
|
|
|
+ FROM "DYNAMIC_WORK_DATA"
|
|
|
|
|
+ WHERE STATION_NAME IN ('M1', 'M1B')
|
|
|
|
|
+ AND RECEIVER = '1-4#焦炉'
|
|
|
|
|
+ AND END_TIME BETWEEN #{startTime}
|
|
|
|
|
+ and #{endTime}
|
|
|
|
|
+ GROUP BY MATERIAL_NAME
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <!-- 重新获取动态秤称重数据-->
|
|
|
|
|
+ <select id="recalc" statementType="CALLABLE">
|
|
|
|
|
+ {call GENERATEUPDATA()}
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|