现场管理业务名称

dev_no_inv
yewj 9 months ago
parent dfcf62f1a8
commit c530e04750

@ -125,7 +125,7 @@ public class IoFifoDesOrderController extends BaseController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
if (addInvDesDetaiRequest.getOutCount() == null && addInvDesDetaiRequest.getRemark() == null){ if (addInvDesDetaiRequest.getOutCount() == null && addInvDesDetaiRequest.getRemark() == null) {
return ResultVOUtils.error("请输入损耗数量"); return ResultVOUtils.error("请输入损耗数量");
} }
Boolean save = splitDesOrderService.destroyOut(addInvDesDetaiRequest); Boolean save = splitDesOrderService.destroyOut(addInvDesDetaiRequest);

@ -280,6 +280,9 @@ public class IoOrderResponse {
*/ */
private String splitBusType; private String splitBusType;
private String splitBusTypeName;
public String getFromName() { public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName)) if (StrUtil.isNotEmpty(fromCorpName))

@ -3,48 +3,49 @@
<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.*,
bus.name AS billTypeName, bus.name AS billTypeName,
ad.name AS deptName, ad.name AS deptName,
aw.name AS invName, aw.name AS invName,
au.employeeName AS createUserName, au.employeeName AS createUserName,
au2.employeeName AS updateUserName, au2.employeeName AS updateUserName,
au3.employeeName AS reviewUserName, au3.employeeName AS reviewUserName,
au4.employeeName AS checkUserName, au4.employeeName AS checkUserName,
ad2.name AS fromDeptName, ad2.name AS fromDeptName,
aw2.name AS fromInvName, aw2.name AS fromInvName,
bc1.name AS fromCorpName, bc1.name AS fromCorpName,
bc2.name AS customerName, bc2.name AS customerName,
sw.workplaceName AS workPlaceName sw.workplaceName AS workPlaceName,
FROM swd.busName AS splitBusTypeName
io_order io FROM
LEFT JOIN io_order io
basic_bussiness_type bus ON bus.action = io.action LEFT JOIN
LEFT JOIN basic_bussiness_type bus ON bus.action = io.action
auth_dept ad ON ad.code = io.deptCode LEFT JOIN
LEFT JOIN auth_dept ad ON ad.code = io.deptCode
auth_warehouse aw ON aw.code = io.invCode LEFT JOIN
LEFT JOIN auth_warehouse aw ON aw.code = io.invCode
auth_user au ON au.id = io.createUser LEFT JOIN
LEFT JOIN auth_user au ON au.id = io.createUser
auth_user au2 ON au2.id = io.updateUser LEFT JOIN
LEFT JOIN auth_user au2 ON au2.id = io.updateUser
auth_user au3 ON au3.id = io.reviewUser LEFT JOIN
LEFT JOIN auth_user au3 ON au3.id = io.reviewUser
auth_user au4 ON au4.id = io.checkUser LEFT JOIN
LEFT JOIN auth_user au4 ON au4.id = io.checkUser
auth_dept ad2 ON ad2.code = io.fromDeptCode LEFT JOIN
LEFT JOIN auth_dept ad2 ON ad2.code = io.fromDeptCode
auth_warehouse aw2 ON aw2.code = io.fromInvCode LEFT JOIN
LEFT JOIN auth_warehouse aw2 ON aw2.code = io.fromInvCode
basic_corp bc1 ON bc1.erpId = io.fromCorp LEFT JOIN
LEFT JOIN basic_corp bc1 ON bc1.erpId = io.fromCorp
basic_corp bc2 ON bc2.erpId = io.customerId LEFT JOIN
LEFT JOIN basic_corp bc2 ON bc2.erpId = io.customerId
io_order_invoice ioi ON ioi.orderIdFk = io.billNo LEFT JOIN
LEFT JOIN io_order_invoice ioi ON ioi.orderIdFk = io.billNo
sys_workplace sw ON sw.workplaceId = io.workPlaceCode LEFT JOIN
LEFT JOIN sys_workplace sw ON sw.workplaceId = io.workPlaceCode
sys_workplace_document swd ON swd.documentTypeCode = io.splitBusType LEFT JOIN
sys_workplace_document swd ON swd.documentTypeCode = io.splitBusType
<if test="uploadKey != null and uploadKey != ''"> <if test="uploadKey != null and uploadKey != ''">
INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId
@ -56,13 +57,13 @@
<if test="productType != null and productType != ''"> <if test="productType != null and productType != ''">
AND io.productType = #{productType} AND io.productType = #{productType}
</if> </if>
<!-- <if test="keyWords != null and keyWords != ''">--> <!-- <if test="keyWords != null and keyWords != ''">-->
<!-- AND (aw.name like concat('%', #{keyWords}, '%') or bc.name like concat('%', #{keyWords}, '%'))--> <!-- AND (aw.name like concat('%', #{keyWords}, '%') or bc.name like concat('%', #{keyWords}, '%'))-->
<!-- </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 io.action = #{action} AND io.action = #{action}
@ -90,9 +91,9 @@
</if> </if>
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
AND ( AND (
bc.name like concat('%', #{keyWord}, '%') bc.name like concat('%', #{keyWord}, '%')
or io.remark like concat('%', #{keyWord}, '%') or io.remark like concat('%', #{keyWord}, '%')
or io.fromInvCode like concat('%', #{keyWord}, '%')) or io.fromInvCode like concat('%', #{keyWord}, '%'))
</if> </if>
<if test="deptCode != null and deptCode != ''"> <if test="deptCode != null and deptCode != ''">
AND io.deptCode = #{deptCode} AND io.deptCode = #{deptCode}
@ -118,11 +119,11 @@
</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(io.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and AND date_format(io.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="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''"> <if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''">
AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and
date_format(#{endAduditTime}, '%Y-%m-%d') date_format(#{endAduditTime}, '%Y-%m-%d')
</if> </if>
<if test="actions != null and actions.size() != 0"> <if test="actions != null and actions.size() != 0">
AND io.`action` in AND io.`action` in
@ -139,7 +140,7 @@
</if> </if>
<if test="unionRemark != null and unionRemark != ''"> <if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%') AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%')) or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if> </if>
<if test="statuses != null and statuses.size() != 0"> <if test="statuses != null and statuses.size() != 0">
AND io.status in AND io.status in
@ -214,12 +215,12 @@
<if test="invoiceActions1 == null and invoiceActions2 != null"> <if test="invoiceActions1 == null and invoiceActions2 != null">
and ( and (
io.`action` in io.`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 io.status = 7 and io.status = 7
) )
</if> </if>
<if test="invoiceActions1 != null and invoiceActions2 != null"> <if test="invoiceActions1 != null and invoiceActions2 != null">
@ -228,13 +229,13 @@
#{item} #{item}
</foreach> </foreach>
and io.status = 10) and io.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 io.status = 7) and io.status = 7)
) )
</if> </if>
</if> </if>
GROUP BY io.billNo GROUP BY io.billNo
@ -252,27 +253,27 @@
<select id="getfilterList" resultType="com.glxp.api.res.inout.IoOrderResponse"> <select id="getfilterList" 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,
(SELECT count(*) (SELECT count(*)
FROM io_order_detail_code FROM io_order_detail_code
WHERE io_order_detail_code.orderIdFk = io.billNo WHERE io_order_detail_code.orderIdFk = io.billNo
and io_order_detail_code.regStatus = 1 and io_order_detail_code.regStatus = 1
) AS allCout, ) AS allCout,
(SELECT count(*) (SELECT count(*)
FROM io_order_detail_code FROM io_order_detail_code
WHERE io_order_detail_code.orderIdFk = io.billNo WHERE io_order_detail_code.orderIdFk = io.billNo
and io_order_detail_code.regStatus = 0 and io_order_detail_code.regStatus = 0
) As partCount ) As partCount
from io_order as io from io_order as io
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
@ -280,7 +281,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}
@ -314,11 +315,11 @@
</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="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''"> <if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''">
AND date_format(auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and AND date_format(auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and
date_format(#{endAduditTime}, '%Y-%m-%d') date_format(#{endAduditTime}, '%Y-%m-%d')
</if> </if>
<if test="actions != null and actions.size() != 0"> <if test="actions != null and actions.size() != 0">
AND `action` in AND `action` in
@ -370,12 +371,12 @@
<if test="invoiceActions1 == null and invoiceActions2 != null"> <if test="invoiceActions1 == null and invoiceActions2 != null">
and ( and (
`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 or status = 10) and (status = 7 or status = 10)
) )
</if> </if>
<if test="invoiceActions1 != null and invoiceActions2 != null"> <if test="invoiceActions1 != null and invoiceActions2 != null">
@ -384,13 +385,13 @@
#{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 or status = 10)) and (status = 7 or status = 10))
) )
</if> </if>
</if> </if>
</where> </where>
@ -443,14 +444,14 @@
</if> </if>
<if test="unionRemark != null and unionRemark != ''"> <if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%') AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%')) or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if> </if>
<if test="busType != null"> <if test="busType != null">
AND busType = #{busType} AND busType = #{busType}
</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[
@ -470,7 +471,7 @@
FROM basic_bussiness_type FROM basic_bussiness_type
WHERE supplementOrderType IS NOT NULL WHERE supplementOrderType IS NOT NULL
and supplementOrderType and supplementOrderType
!= '') != '')
</select> </select>
<select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult"> <select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult">
@ -481,20 +482,20 @@
<select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse"> <select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse">
select io.*, select io.*,
ioul.result, ioul.result,
(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
left join io_order_upload_log ioul on io.billNo = ioul.billNo left join io_order_upload_log ioul on io.billNo = ioul.billNo
<where> <where>
io.dealStatus = 3 io.dealStatus = 3
<if test="billType != null and billType != ''"> <if test="billType != null and billType != ''">
@ -514,7 +515,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')
@ -541,10 +542,10 @@
<select id="selectWaitSubmitOrder" resultType="java.lang.String"> <select id="selectWaitSubmitOrder" resultType="java.lang.String">
select t.billNo select t.billNo
from io_order t from io_order t
left join thr_system_bus_api t1 on t.action = t1.code left join thr_system_bus_api t1 on t.action = t1.code
<where> <where>
t.status = 7 t.status = 7
and exportStatus = 0 and exportStatus = 0
<if test="thirdSys != null and thirdSys != ''"> <if test="thirdSys != null and thirdSys != ''">
AND t1.thirdSys = #{thirdSys} AND t1.thirdSys = #{thirdSys}
</if> </if>
@ -570,7 +571,7 @@
<select id="selectOrderIdList" resultType="java.lang.String"> <select id="selectOrderIdList" resultType="java.lang.String">
SELECT billNo SELECT billNo
FROM io_order FROM io_order
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
WHERE basic_bussiness_type.inStock = 1 WHERE basic_bussiness_type.inStock = 1
and io_order.`status` = 7 and io_order.`status` = 7
AND date_format(io_order.updateTime, '%Y-%m-%d') = date_format(#{data}, '%Y-%m-%d') AND date_format(io_order.updateTime, '%Y-%m-%d') = date_format(#{data}, '%Y-%m-%d')
@ -579,12 +580,13 @@
<select id="selectOrderfirstAndLastIdList" resultType="java.lang.String"> <select id="selectOrderfirstAndLastIdList" resultType="java.lang.String">
SELECT billNo SELECT billNo
FROM io_order FROM io_order
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
<where> <where>
basic_bussiness_type.inStock = 1 basic_bussiness_type.inStock = 1
and io_order.`status` = 7 and io_order.`status` = 7
AND date_format(io_order.updateTime, '%Y-%m-%d') between date_format(#{firstData}, '%Y-%m-%d') and date_format(#{lastData}, '%Y-%m-%d') AND date_format(io_order.updateTime, '%Y-%m-%d') between date_format(#{firstData}, '%Y-%m-%d') and
date_format(#{lastData}, '%Y-%m-%d')
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND io_order.invCode = #{invCode} AND io_order.invCode = #{invCode}
@ -595,16 +597,16 @@
<!-- LEFT JOIN io_order_detail_code dc ON io.billNo = dc.orderIdFk--> <!-- LEFT JOIN io_order_detail_code dc ON io.billNo = dc.orderIdFk-->
<select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse"> <select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse">
SELECT io.*, SELECT io.*,
bus.NAME AS billTypeName, bus.NAME AS billTypeName,
ad.NAME AS deptName, ad.NAME AS deptName,
aw.NAME AS invName, aw.NAME AS invName,
bc.NAME AS fromCorpName bc.NAME AS fromCorpName
FROM io_order io FROM io_order io
LEFT JOIN basic_bussiness_type bus ON io.action = bus.action LEFT JOIN basic_bussiness_type bus ON io.action = bus.action
LEFT JOIN auth_dept ad ON io.deptCode = ad.CODE LEFT JOIN auth_dept ad ON io.deptCode = ad.CODE
LEFT JOIN auth_warehouse aw ON io.invCode = aw.CODE LEFT JOIN auth_warehouse aw ON io.invCode = aw.CODE
LEFT JOIN basic_corp bc ON io.fromCorp = bc.erpId LEFT JOIN basic_corp bc ON io.fromCorp = bc.erpId
left join io_order_invoice on io_order_invoice.orderIdFk = io.billNo left join io_order_invoice on io_order_invoice.orderIdFk = io.billNo
<where> <where>
<if test="confirmStatus != null and confirmStatus != ''"> <if test="confirmStatus != null and confirmStatus != ''">
AND io.checkStatus = #{confirmStatus} AND io.checkStatus = #{confirmStatus}
@ -614,7 +616,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 io.action = #{action} AND io.action = #{action}
@ -624,7 +626,7 @@
</if> </if>
<if test="unionRemark != null and unionRemark != ''"> <if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%') AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%')) or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if> </if>
<if test="billNo != null and billNo != ''"> <if test="billNo != null and billNo != ''">
AND io.billNo like concat('%', #{billNo}, '%') AND io.billNo like concat('%', #{billNo}, '%')
@ -658,10 +660,12 @@
AND io.relKey like concat('%', #{relKey}, '%') AND io.relKey like concat('%', #{relKey}, '%')
</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(io.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') AND date_format(io.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d')
</if> </if>
<if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''"> <if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''">
AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and date_format(#{endAduditTime}, '%Y-%m-%d') AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and
date_format(#{endAduditTime}, '%Y-%m-%d')
</if> </if>
<if test="actions != null and actions.size() != 0"> <if test="actions != null and actions.size() != 0">
AND io.`action` in AND io.`action` in
@ -713,12 +717,12 @@
<if test="invoiceActions1 == null and invoiceActions2 != null"> <if test="invoiceActions1 == null and invoiceActions2 != null">
and ( and (
io.`action` in io.`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 io.status = 7 and io.status = 7
) )
</if> </if>
<if test="invoiceActions1 != null and invoiceActions2 != null"> <if test="invoiceActions1 != null and invoiceActions2 != null">
@ -727,13 +731,13 @@
#{item} #{item}
</foreach> </foreach>
and io.status = 10) and io.status = 10)
or ( or (
io.`action` in io.`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 io.status = 7) and io.status = 7)
) )
</if> </if>
</if> </if>
</where> </where>

Loading…
Cancel
Save