|
|
|
<?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.glxp.api.dao.collect.IoCollectOrderMapper">
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.req.collect.CollectOrderRequest"
|
|
|
|
resultType="com.glxp.api.res.collect.IoCollectOrderResponse">
|
|
|
|
SELECT
|
|
|
|
ico.billNo,ico.busType,ico.fromType,ico.fromTypeDesc,ico.fromCorp,ico.billTime,ico.orderCirType,
|
|
|
|
ico.createTime,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
|
|
|
|
FROM io_collect_order ico
|
|
|
|
left join sys_workplace_document on ico.busType = sys_workplace_document.documentTypeCode
|
|
|
|
left join basic_corp bc on ico.fromCorp = bc.erpId
|
|
|
|
left join sys_workplace sw on ico.workPlaceCode = sw.workplaceId
|
|
|
|
<where>
|
|
|
|
<if test="billNo != '' and billNo != null">
|
|
|
|
AND billNo LIKE concat('%', #{billNo}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="workplaceName != '' and workplaceName != null">
|
|
|
|
AND workplaceName LIKE concat('%', #{workplaceName}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="busType != null and busType != ''">
|
|
|
|
AND busType = #{busType}
|
|
|
|
</if>
|
|
|
|
<if test="fromType != null and fromType != ''">
|
|
|
|
AND sys_workplace_document.fromType LIKE concat('%', #{fromType}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="fromCorp != '' and fromCorp != null">
|
|
|
|
AND fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="collectCode != null and collectCode != ''">
|
|
|
|
AND collectCode = #{collectCode}
|
|
|
|
</if>
|
|
|
|
<if test="busType != null and busType != ''">
|
|
|
|
AND busType = #{busType}
|
|
|
|
</if>
|
|
|
|
<if test="tagStatus != null">
|
|
|
|
AND tagStatus = #{tagStatus}
|
|
|
|
</if>
|
|
|
|
<if test="workPlaceCode != null ">
|
|
|
|
AND ico.workPlaceCode = #{workPlaceCode}
|
|
|
|
</if>
|
|
|
|
<if test="unionKey != null ">
|
|
|
|
AND
|
|
|
|
(
|
|
|
|
ico.unionKey like concat('%', #{billNo}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{fromCorp}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{fromCorpName}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark1}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark2}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark3}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark4}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark5}, '%')
|
|
|
|
or ico.unionKey like concat('%', #{backupOrderRemark6}, '%'))
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="tagStatusList != null and tagStatusList.size() > 0">
|
|
|
|
and tagStatus in
|
|
|
|
<foreach collection="tagStatusList" item="item" index="index" separator="," open="(" close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
order by collectTime desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="clearOrder">
|
|
|
|
-- 清除拆零队列
|
|
|
|
TRUNCATE io_split_code;
|
|
|
|
TRUNCATE io_split_code_detail;
|
|
|
|
TRUNCATE io_split_fifo_code;
|
|
|
|
|
|
|
|
|
|
|
|
-- 清除拆零,原始单据等
|
|
|
|
TRUNCATE io_collect_order;
|
|
|
|
TRUNCATE io_collect_order_biz;
|
|
|
|
TRUNCATE io_collect_order_code_auto;
|
|
|
|
TRUNCATE io_collect_order_code_man
|
|
|
|
</select>
|
|
|
|
</mapper>
|