|
|
@ -3,19 +3,35 @@
|
|
|
|
<mapper namespace="com.glxp.api.dao.collect.IoCollectOrderMapper">
|
|
|
|
<mapper namespace="com.glxp.api.dao.collect.IoCollectOrderMapper">
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.req.collect.CollectOrderRequest"
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.req.collect.CollectOrderRequest"
|
|
|
|
resultType="com.glxp.api.res.collect.IoCollectOrderResponse">
|
|
|
|
resultType="com.glxp.api.res.collect.IoCollectOrderResponse">
|
|
|
|
SELECT
|
|
|
|
SELECT ico.billNo,
|
|
|
|
ico.billNo,ico.busType,ico.fromType,ico.fromTypeDesc,ico.fromCorp,ico.billTime,ico.orderCirType,
|
|
|
|
ico.busType,
|
|
|
|
ico.createTime,ico.workPlaceCode,ico.remark,ico.createUser,ico.updateTime,ico.updateUser,ico.tagStatus,ico.splitStatus,ico.splitMsg
|
|
|
|
ico.fromType,
|
|
|
|
,ico.tagMsg,
|
|
|
|
ico.fromTypeDesc,
|
|
|
|
sys_workplace_document.busName busTypeName,
|
|
|
|
ico.fromCorp,
|
|
|
|
bc.name fromCorpName,
|
|
|
|
ico.billTime,
|
|
|
|
sw.workplaceId workPlaceCode,
|
|
|
|
ico.orderCirType,
|
|
|
|
sw.workplaceName,ico.id,ico.orderTime,
|
|
|
|
ico.createTime,
|
|
|
|
row_number() over ( order by ico.orderTime desc ) as orderSequence
|
|
|
|
ico.workPlaceCode,
|
|
|
|
|
|
|
|
ico.remark,
|
|
|
|
|
|
|
|
ico.createUser,
|
|
|
|
|
|
|
|
ico.updateTime,
|
|
|
|
|
|
|
|
ico.updateUser,
|
|
|
|
|
|
|
|
ico.tagStatus,
|
|
|
|
|
|
|
|
ico.splitStatus,
|
|
|
|
|
|
|
|
ico.splitMsg
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
ico.tagMsg,
|
|
|
|
|
|
|
|
sys_workplace_document.busName busTypeName,
|
|
|
|
|
|
|
|
bc.name fromCorpName,
|
|
|
|
|
|
|
|
sw.workplaceId workPlaceCode,
|
|
|
|
|
|
|
|
sw.workplaceName,
|
|
|
|
|
|
|
|
ico.id,
|
|
|
|
|
|
|
|
ico.orderTime,
|
|
|
|
|
|
|
|
row_number() over ( order by ico.orderTime desc ) as orderSequence
|
|
|
|
FROM io_collect_order ico
|
|
|
|
FROM io_collect_order ico
|
|
|
|
left join sys_workplace_document on ico.busType = sys_workplace_document.documentTypeCode
|
|
|
|
left join sys_workplace_document on ico.busType = sys_workplace_document.documentTypeCode
|
|
|
|
left join basic_corp bc on ico.fromCorp = bc.erpId
|
|
|
|
left join basic_corp bc on ico.fromCorp = bc.erpId
|
|
|
|
left join sys_workplace sw on ico.workPlaceCode = sw.workplaceId
|
|
|
|
left join sys_workplace sw on ico.workPlaceCode = sw.workplaceId
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="billNo != '' and billNo != null">
|
|
|
|
<if test="billNo != '' and billNo != null">
|
|
|
|
AND billNo LIKE concat('%', #{billNo}, '%')
|
|
|
|
AND billNo LIKE concat('%', #{billNo}, '%')
|
|
|
@ -26,9 +42,6 @@
|
|
|
|
<if test="busType != null and busType != ''">
|
|
|
|
<if test="busType != null and busType != ''">
|
|
|
|
AND busType = #{busType}
|
|
|
|
AND busType = #{busType}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="fromType != null and fromType != ''">
|
|
|
|
|
|
|
|
AND sys_workplace_document.fromType LIKE concat('%', #{fromType}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="fromCorp != '' and fromCorp != null">
|
|
|
|
<if test="fromCorp != '' and fromCorp != null">
|
|
|
|
AND fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
AND fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -41,24 +54,23 @@
|
|
|
|
<if test="tagStatus != null">
|
|
|
|
<if test="tagStatus != null">
|
|
|
|
AND tagStatus = #{tagStatus}
|
|
|
|
AND tagStatus = #{tagStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="workPlaceCode != null ">
|
|
|
|
<if test="workPlaceCode != null">
|
|
|
|
AND ico.workPlaceCode = #{workPlaceCode}
|
|
|
|
AND ico.workPlaceCode = #{workPlaceCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="chargeUser != null ">
|
|
|
|
<if test="chargeUser != null">
|
|
|
|
AND sw.chargeUser = #{chargeUser}
|
|
|
|
AND sw.chargeUser = #{chargeUser}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionKey != null ">
|
|
|
|
<if test="unionKey != null">
|
|
|
|
AND
|
|
|
|
AND (
|
|
|
|
(
|
|
|
|
ico.billNo like concat('%', #{unionKey}, '%')
|
|
|
|
ico.unionKey like concat('%', #{billNo}, '%')
|
|
|
|
or ico.fromCorp like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{fromCorp}, '%')
|
|
|
|
or ico.fromCorpName like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{fromCorpName}, '%')
|
|
|
|
or ico.backupOrderRemark1 like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark1}, '%')
|
|
|
|
or ico.backupOrderRemark2 like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark2}, '%')
|
|
|
|
or ico.backupOrderRemark3 like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark3}, '%')
|
|
|
|
or ico.backupOrderRemark4 like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark4}, '%')
|
|
|
|
or ico.backupOrderRemark5 like concat('%', #{unionKey}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark5}, '%')
|
|
|
|
or ico.backupOrderRemark6 like concat('%', #{unionKey}, '%'))
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark6}, '%'))
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -75,16 +87,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="clearOrder">
|
|
|
|
<select id="clearOrder">
|
|
|
|
-- 清除拆零队列
|
|
|
|
-- 清除拆零队列
|
|
|
|
TRUNCATE io_split_code;
|
|
|
|
TRUNCATE io_split_code;
|
|
|
|
TRUNCATE io_split_code_detail;
|
|
|
|
TRUNCATE io_split_code_detail;
|
|
|
|
TRUNCATE io_split_fifo_code;
|
|
|
|
TRUNCATE io_split_fifo_code;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 清除拆零,原始单据等
|
|
|
|
-- 清除拆零,原始单据等
|
|
|
|
TRUNCATE io_collect_order;
|
|
|
|
TRUNCATE io_collect_code;
|
|
|
|
TRUNCATE io_collect_order_biz;
|
|
|
|
TRUNCATE io_collect_order;
|
|
|
|
TRUNCATE io_collect_order_code_auto;
|
|
|
|
TRUNCATE io_collect_order_biz;
|
|
|
|
TRUNCATE io_collect_order_code_man
|
|
|
|
TRUNCATE io_collect_order_code_auto;
|
|
|
|
|
|
|
|
TRUNCATE io_collect_order_code_man
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateInvAlert" parameterType="map">
|
|
|
|
<update id="updateInvAlert" parameterType="map">
|
|
|
@ -92,5 +105,4 @@
|
|
|
|
SET invAlert = #{invAlert}
|
|
|
|
SET invAlert = #{invAlert}
|
|
|
|
WHERE id = #{id}
|
|
|
|
WHERE id = #{id}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|