|
|
|
@ -5,13 +5,14 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterThrOrder" parameterType="com.glxp.sale.admin.req.thrsys.FilterThrOrderRequest"
|
|
|
|
|
resultType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity">
|
|
|
|
|
SELECT * FROM thr_order
|
|
|
|
|
SELECT thr_order.*,basic_bustype_origin.name billTypeName FROM thr_order
|
|
|
|
|
left join basic_bustype_origin on thr_order.billType = basic_bustype_origin.action
|
|
|
|
|
<where>
|
|
|
|
|
<if test="billNo != '' and billNo != null">
|
|
|
|
|
AND billNo = #{billNo}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="id != '' and id !=null">
|
|
|
|
|
AND id = #{id}
|
|
|
|
|
AND thr_order.id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="billAction != '' and billAction !=null">
|
|
|
|
|
AND billType = #{billAction}
|
|
|
|
@ -38,17 +39,14 @@
|
|
|
|
|
<if test="endDate!=null and endDate!=''">
|
|
|
|
|
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="editStatus != '' and editStatus != null">
|
|
|
|
|
<if test="editStatus!= null">
|
|
|
|
|
AND editStatus = #{editStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="editStatus == '' or editStatus == null">-->
|
|
|
|
|
<!-- and `editStatus` <![CDATA[ <> ]]> 1-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
|
|
|
|
|
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
|
<![CDATA[ and DATE_FORMAT(thr_order.updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY updateTime DESC
|
|
|
|
|
ORDER BY thr_order.updateTime DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -57,7 +55,7 @@
|
|
|
|
|
INTO thr_order
|
|
|
|
|
(id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk,
|
|
|
|
|
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
|
|
|
|
|
remark3,locStorageCode,editStatus)
|
|
|
|
|
remark3,locStorageCode,editStatus,invWarehouseCode)
|
|
|
|
|
values (
|
|
|
|
|
#{id},
|
|
|
|
|
#{billNo},
|
|
|
|
@ -82,7 +80,8 @@
|
|
|
|
|
#{remark2},
|
|
|
|
|
#{remark3},
|
|
|
|
|
#{locStorageCode},
|
|
|
|
|
#{editStatus}
|
|
|
|
|
#{editStatus},
|
|
|
|
|
#{invWarehouseCode}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -90,7 +89,7 @@
|
|
|
|
|
replace INTO thr_order
|
|
|
|
|
(billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk,
|
|
|
|
|
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
|
|
|
|
|
remark3,locStorageCode,editStatus)
|
|
|
|
|
remark3,locStorageCode,editStatus,invWarehouseCode)
|
|
|
|
|
values
|
|
|
|
|
|
|
|
|
|
<foreach collection="thrOrderEntities" item="item" index="index"
|
|
|
|
@ -104,7 +103,8 @@
|
|
|
|
|
#{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk},
|
|
|
|
|
#{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser},
|
|
|
|
|
#{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1},
|
|
|
|
|
#{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus})
|
|
|
|
|
#{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus},#{item.invWarehouseCode},
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -145,7 +145,7 @@
|
|
|
|
|
<if test="remark3 != null">remark3=#{remark3},</if>
|
|
|
|
|
<if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if>
|
|
|
|
|
<if test="editStatus != null">editStatus=#{editStatus},</if>
|
|
|
|
|
|
|
|
|
|
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</update>
|
|
|
|
@ -155,7 +155,7 @@
|
|
|
|
|
INTO thr_order
|
|
|
|
|
(id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType,
|
|
|
|
|
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
|
|
|
|
|
remark3)
|
|
|
|
|
remark3,invWarehouseCode)
|
|
|
|
|
values (
|
|
|
|
|
#{id},
|
|
|
|
|
#{billNo},
|
|
|
|
@ -177,7 +177,8 @@
|
|
|
|
|
#{remark},
|
|
|
|
|
#{remark1},
|
|
|
|
|
#{remark2},
|
|
|
|
|
#{remark3}
|
|
|
|
|
#{remark3},
|
|
|
|
|
#{invWarehouseCode}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|