|
|
|
@ -19,7 +19,8 @@
|
|
|
|
AND id = #{id}
|
|
|
|
AND id = #{id}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="corpName != null and corpName != ''">
|
|
|
|
<if test="corpName != null and corpName != ''">
|
|
|
|
AND ( SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode ) like concat('%', #{corpName}, '%')
|
|
|
|
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
|
|
|
|
|
|
|
|
concat('%', #{corpName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="action != null and action != ''">
|
|
|
|
<if test="action != null and action != ''">
|
|
|
|
AND action = #{action}
|
|
|
|
AND action = #{action}
|
|
|
|
@ -42,6 +43,9 @@
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="busType != null">
|
|
|
|
|
|
|
|
AND busType = #{busType}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
@ -116,6 +120,9 @@
|
|
|
|
<if test="syncStatus != null">
|
|
|
|
<if test="syncStatus != null">
|
|
|
|
AND syncStatus = #{syncStatus}
|
|
|
|
AND syncStatus = #{syncStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="busType != null">
|
|
|
|
|
|
|
|
AND busType = #{busType}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
@ -138,7 +145,7 @@
|
|
|
|
FROM basic_bussiness_type
|
|
|
|
FROM basic_bussiness_type
|
|
|
|
WHERE supplementOrderType IS NOT NULL
|
|
|
|
WHERE supplementOrderType IS NOT NULL
|
|
|
|
OR supplementOrderType
|
|
|
|
OR supplementOrderType
|
|
|
|
!= '')
|
|
|
|
!= '')
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult">
|
|
|
|
<select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult">
|
|
|
|
@ -149,16 +156,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse">
|
|
|
|
<select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse">
|
|
|
|
select io.*,
|
|
|
|
select io.*,
|
|
|
|
(select name from basic_bussiness_type bus where bus.action = io.action) billTypeName,
|
|
|
|
(select name from basic_bussiness_type bus where bus.action = io.action) billTypeName,
|
|
|
|
(select name from auth_dept ad where ad.code = io.deptCode) deptName,
|
|
|
|
(select name from auth_dept ad where ad.code = io.deptCode) deptName,
|
|
|
|
(select name from auth_warehouse aw where aw.code = io.invCode) invName,
|
|
|
|
(select name from auth_warehouse aw where aw.code = io.invCode) invName,
|
|
|
|
(select employeeName from auth_user au where au.id = io.createUser) createUserName,
|
|
|
|
(select employeeName from auth_user au where au.id = io.createUser) createUserName,
|
|
|
|
(select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName,
|
|
|
|
(select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName,
|
|
|
|
(select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName,
|
|
|
|
(select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName,
|
|
|
|
(select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName,
|
|
|
|
(select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName,
|
|
|
|
(select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName,
|
|
|
|
(select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName,
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName,
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName,
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.customerId) customerName
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.customerId) customerName
|
|
|
|
from io_order as io
|
|
|
|
from io_order as io
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
io.dealStatus = 3
|
|
|
|
io.dealStatus = 3
|
|
|
|
@ -189,11 +196,16 @@
|
|
|
|
<if test="submitStatus != null and submitStatus != ''">
|
|
|
|
<if test="submitStatus != null and submitStatus != ''">
|
|
|
|
AND exportStatus = #{submitStatus}
|
|
|
|
AND exportStatus = #{submitStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="busType != null">
|
|
|
|
|
|
|
|
AND busType = #{busType}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by io.updateTime desc
|
|
|
|
order by io.updateTime desc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectActionByBillNo" resultType="java.lang.String">
|
|
|
|
<select id="selectActionByBillNo" resultType="java.lang.String">
|
|
|
|
select action from io_order where billNo = #{billNo}
|
|
|
|
select action
|
|
|
|
|
|
|
|
from io_order
|
|
|
|
|
|
|
|
where billNo = #{billNo}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|
|