|
@@ -24,39 +24,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="collectTime" column="collectTime" />
|
|
|
<result property="confirm" column="confirm" />
|
|
|
<result property="confirmTime" column="confirmTime" />
|
|
|
+ <result property="scid" column="scid" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectOperationLogVo">
|
|
|
- select id, product_no, product_name, product_specifications, product_type, batchNumber, colours, jt, js, status, standby, standby1, standby2, standby3, workshop, recipient, collectTime, confirm, confirmTime from {DBNAME}.operationLog
|
|
|
- </sql>
|
|
|
+ SELECT a.id,
|
|
|
+ a.product_no,
|
|
|
+ a.product_name,
|
|
|
+ a.product_specifications,
|
|
|
+ a.product_type,
|
|
|
+ a.batchNumber,
|
|
|
+ a.colours,
|
|
|
+ c.production_line_name as jt,
|
|
|
+ a.js,
|
|
|
+ a.STATUS,
|
|
|
+ a.standby,
|
|
|
+ a.standby1,
|
|
|
+ a.standby2,
|
|
|
+ a.standby3,
|
|
|
+ a.workshop,
|
|
|
+ a.recipient,
|
|
|
+ a.collectTime,
|
|
|
+ a.confirm,
|
|
|
+ a.confirmTime,
|
|
|
+ b.scname as scid
|
|
|
+ FROM {DBNAME}.operationlog as a
|
|
|
+ LEFT JOIN {DBNAME}.silkcart b ON a.scid = b.id
|
|
|
+ LEFT JOIN {DBNAME}.production_line c ON a.jt = c.id
|
|
|
+ </sql>
|
|
|
|
|
|
<select id="selectOperationLogList" parameterType="com.zkqy.business.domain.OperationLog" resultMap="OperationLogResult">
|
|
|
<include refid="selectOperationLogVo"/>
|
|
|
<where>
|
|
|
- <if test="productNo != null "> and product_no = #{productNo}</if>
|
|
|
- <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
|
- <if test="productSpecifications != null and productSpecifications != ''"> and product_specifications = #{productSpecifications}</if>
|
|
|
- <if test="productType != null and productType != ''"> and product_type = #{productType}</if>
|
|
|
- <if test="batchNumber != null "> and batchNumber = #{batchNumber}</if>
|
|
|
- <if test="colours != null and colours != ''"> and colours = #{colours}</if>
|
|
|
- <if test="jt != null and jt != ''"> and jt = #{jt}</if>
|
|
|
- <if test="js != null and js != ''"> and js = #{js}</if>
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
- <if test="standby != null and standby != ''"> and standby = #{standby}</if>
|
|
|
- <if test="standby1 != null and standby1 != ''"> and standby1 = #{standby1}</if>
|
|
|
- <if test="standby2 != null and standby2 != ''"> and standby2 = #{standby2}</if>
|
|
|
- <if test="standby3 != null and standby3 != ''"> and standby3 = #{standby3}</if>
|
|
|
- <if test="workshop != null and workshop != ''"> and workshop = #{workshop}</if>
|
|
|
- <if test="recipient != null and recipient != ''"> and recipient = #{recipient}</if>
|
|
|
- <if test="collectTime != null and collectTime != ''"> and collectTime = #{collectTime}</if>
|
|
|
- <if test="confirm != null and confirm != ''"> and confirm = #{confirm}</if>
|
|
|
- <if test="confirmTime != null and confirmTime != ''"> and confirmTime = #{confirmTime}</if>
|
|
|
+ <if test="productNo != null "> and a.product_no = #{productNo}</if>
|
|
|
+ <if test="productName != null and productName != ''"> and a.product_name like concat('%', #{productName}, '%')</if>
|
|
|
+ <if test="productSpecifications != null and productSpecifications != ''"> and a.product_specifications = #{productSpecifications}</if>
|
|
|
+ <if test="productType != null and productType != ''"> and a.product_type = #{productType}</if>
|
|
|
+ <if test="batchNumber != null "> and a.batchNumber = #{batchNumber}</if>
|
|
|
+ <if test="colours != null and colours != ''"> and a.colours = #{colours}</if>
|
|
|
+ <if test="jt != null and jt != ''"> and a.jt = #{jt}</if>
|
|
|
+ <if test="js != null and js != ''"> and a.js = #{js}</if>
|
|
|
+ <if test="status != null and status != ''"> and a.status = #{status}</if>
|
|
|
+ <if test="standby != null and standby != ''"> and a.standby = #{standby}</if>
|
|
|
+ <if test="standby1 != null and standby1 != ''"> and a.standby1 = #{standby1}</if>
|
|
|
+ <if test="standby2 != null and standby2 != ''"> and a.standby2 = #{standby2}</if>
|
|
|
+ <if test="standby3 != null and standby3 != ''"> and a.standby3 = #{standby3}</if>
|
|
|
+ <if test="workshop != null and workshop != ''"> and a.workshop = #{workshop}</if>
|
|
|
+ <if test="recipient != null and recipient != ''"> and a.recipient = #{recipient}</if>
|
|
|
+ <if test="collectTime != null and collectTime != ''"> and a.collectTime = #{collectTime}</if>
|
|
|
+ <if test="confirm != null and confirm != ''"> and a.confirm = #{confirm}</if>
|
|
|
+ <if test="confirmTime != null and confirmTime != ''"> and a.confirmTime = #{confirmTime}</if>
|
|
|
+ <if test="scid != null and scid != ''"> and a.scid = #{scid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectOperationLogById" parameterType="Long" resultMap="OperationLogResult">
|
|
|
<include refid="selectOperationLogVo"/>
|
|
|
- where id = #{id}
|
|
|
+ where a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertOperationLog" parameterType="com.zkqy.business.domain.OperationLog">
|
|
@@ -81,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="collectTime != null">collectTime,</if>
|
|
|
<if test="confirm != null">confirm,</if>
|
|
|
<if test="confirmTime != null">confirmTime,</if>
|
|
|
+ <if test="scid != null">scid,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
@@ -102,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="collectTime != null">#{collectTime},</if>
|
|
|
<if test="confirm != null">#{confirm},</if>
|
|
|
<if test="confirmTime != null">#{confirmTime},</if>
|
|
|
+ <if test="scid != null">#{scid},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|