|
|
@ -3,17 +3,17 @@
|
|
|
|
<mapper namespace="com.glxp.api.dao.inout.IoOrderDao">
|
|
|
|
<mapper namespace="com.glxp.api.dao.inout.IoOrderDao">
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderResponse">
|
|
|
|
<select id="filterList" 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 employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName,
|
|
|
|
(select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName,
|
|
|
|
(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>
|
|
|
|
<if test="id != null and id != ''">
|
|
|
|
<if test="id != null and id != ''">
|
|
|
@ -21,7 +21,7 @@
|
|
|
|
</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
|
|
|
|
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
|
|
|
|
concat('%', #{corpName}, '%')
|
|
|
|
concat('%', #{corpName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="action != null and action != ''">
|
|
|
|
<if test="action != null and action != ''">
|
|
|
|
AND action = #{action}
|
|
|
|
AND action = #{action}
|
|
|
@ -109,12 +109,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
<if test="invoiceActions1 == null and invoiceActions2 != null">
|
|
|
|
<if test="invoiceActions1 == null and invoiceActions2 != null">
|
|
|
|
or (
|
|
|
|
or (
|
|
|
|
`action` in
|
|
|
|
`action` in
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
and status = 7
|
|
|
|
and status = 7
|
|
|
|
))
|
|
|
|
))
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="invoiceActions1 != null and invoiceActions2 != null">
|
|
|
|
<if test="invoiceActions1 != null and invoiceActions2 != null">
|
|
|
@ -123,16 +123,15 @@
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
and status = 10)
|
|
|
|
and status = 10)
|
|
|
|
or (
|
|
|
|
or (
|
|
|
|
`action` in
|
|
|
|
`action` in
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
and status = 7)
|
|
|
|
and status = 7)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by createTime desc
|
|
|
|
order by createTime desc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -179,7 +178,7 @@
|
|
|
|
</if>
|
|
|
|
</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
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
|
|
|
|
date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<![CDATA[
|
|
|
|
<![CDATA[
|
|
|
@ -199,7 +198,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">
|
|
|
@ -210,17 +209,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
<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 employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName,
|
|
|
|
(select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName,
|
|
|
|
(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
|
|
|
@ -241,7 +240,7 @@
|
|
|
|
</if>
|
|
|
|
</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
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
|
|
|
|
date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
date_format(#{endTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null and startTime != '' and (endTime == null or endTime == '')">
|
|
|
|
<if test="startTime != null and startTime != '' and (endTime == null or endTime == '')">
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')
|
|
|
|
AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')
|
|
|
@ -266,6 +265,15 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectWaitSubmitOrder" resultType="java.lang.String">
|
|
|
|
<select id="selectWaitSubmitOrder" resultType="java.lang.String">
|
|
|
|
|
|
|
|
select t.billNo
|
|
|
|
|
|
|
|
from io_order t
|
|
|
|
|
|
|
|
left join thr_system_bus_api t1 on t.action = t1.code
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
t.status = 7
|
|
|
|
|
|
|
|
and exportStatus = 0
|
|
|
|
|
|
|
|
<if test="thirdSys != null and thirdSys != ''">
|
|
|
|
|
|
|
|
AND t1.thirdSys = #{thirdSys}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|