|  |  | @ -254,29 +254,47 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="getfilterList" resultType="com.glxp.api.res.inout.IoOrderResponse"> |  |  |  |     <select id="getfilterList" resultType="com.glxp.api.res.inout.IoOrderResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         select io.*, |  |  |  |         SELECT | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, |  |  |  |             io.*, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_dept ad where ad.code = io.deptCode) deptName, |  |  |  |             bbt.name AS billTypeName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_warehouse aw where aw.code = io.invCode) invName, |  |  |  |             ad.name AS deptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au where au.id = io.createUser) createUserName, |  |  |  |             aw.name AS invName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, |  |  |  |             au_create.employeeName AS createUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, |  |  |  |             au_update.employeeName AS updateUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, |  |  |  |             au_review.employeeName AS reviewUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName, |  |  |  |             au_check.employeeName AS checkUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName, |  |  |  |             ad_from.name AS fromDeptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName, |  |  |  |             aw_from.name AS fromInvName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_corp bc where bc.erpId = io.customerId) customerName, |  |  |  |             bc_from.name AS fromCorpName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (SELECT count(*) |  |  |  |             bc_customer.name AS customerName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         FROM io_order_detail_code |  |  |  |             SUM(CASE WHEN iodc.regStatus = 1 THEN 1 ELSE 0 END) AS allCount, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE io_order_detail_code.orderIdFk = io.billNo |  |  |  |             SUM(CASE WHEN iodc.regStatus = 0 THEN 1 ELSE 0 END) AS partCount | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         and io_order_detail_code.regStatus = 1 |  |  |  |         FROM | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ) AS allCout, |  |  |  |             io_order io | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (SELECT count(*) |  |  |  |         LEFT JOIN | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         FROM io_order_detail_code |  |  |  |             basic_bussiness_type bbt ON bbt.action = io.action | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE io_order_detail_code.orderIdFk = io.billNo |  |  |  |         LEFT JOIN | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         and io_order_detail_code.regStatus = 0 |  |  |  |             auth_dept ad ON ad.code = io.deptCode | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ) As partCount |  |  |  |         LEFT JOIN | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         from io_order as io |  |  |  |             auth_warehouse aw ON aw.code = io.invCode | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_create ON au_create.id = io.createUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_update ON au_update.id = io.updateUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_review ON au_review.id = io.reviewUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_check ON au_check.id = io.checkUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_dept ad_from ON ad_from.code = io.fromDeptCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_warehouse aw_from ON aw_from.code = io.fromInvCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             basic_corp bc_from ON bc_from.erpId = io.fromCorp | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             basic_corp bc_customer ON bc_customer.erpId = io.customerId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             io_order_detail_code iodc ON iodc.orderIdFk = io.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="billNo != null and billNo != ''"> |  |  |  |             <if test="billNo != null and billNo != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND billNo like concat(#{billNo}, '%') |  |  |  |                 AND billNo like concat(#{billNo}, '%') | 
			
		
	
	
		
		
			
				
					|  |  | @ -397,6 +415,10 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 </if> |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         GROUP BY  io.billNo, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     bbt.name, ad.name, aw.name, au_create.employeeName, au_update.employeeName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     au_review.employeeName, au_check.employeeName, ad_from.name, aw_from.name, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     bc_from.name, bc_customer.name | 
			
		
	
		
		
			
				
					
					|  |  |  |         <choose> |  |  |  |         <choose> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')"> |  |  |  |             <when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 order by ${orderBy} ${sort} |  |  |  |                 order by ${orderBy} ${sort} | 
			
		
	
	
		
		
			
				
					|  |  | @ -467,14 +489,16 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="selectSupplementOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity"> |  |  |  |     <select id="selectSupplementOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * |  |  |  |         SELECT io.* | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         FROM io_order |  |  |  |         FROM io_order io | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE (supplementNo IS NULL OR supplementNo = '') |  |  |  |         WHERE (io.supplementNo IS NULL OR io.supplementNo = '') | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           AND `action` IN (SELECT `action` |  |  |  |           AND EXISTS( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                            FROM basic_bussiness_type |  |  |  |                 SELECT 1 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                            WHERE supplementOrderType IS NOT NULL |  |  |  |                 FROM basic_bussiness_type bbt | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                              and supplementOrderType |  |  |  |                 WHERE bbt.action = io.action | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                != '') |  |  |  |                   AND bbt.supplementOrderType IS NOT NULL | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   AND bbt.supplementOrderType != '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     ) | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult"> |  |  |  |     <select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult"> | 
			
		
	
	
		
		
			
				
					|  |  | @ -484,21 +508,46 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse"> |  |  |  |     <select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         select io.*, |  |  |  |         SELECT | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ioul.result, |  |  |  |             io.*, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, |  |  |  |             ioul.result, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_dept ad where ad.code = io.deptCode) deptName, |  |  |  |             bbt.name AS billTypeName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_warehouse aw where aw.code = io.invCode) invName, |  |  |  |             ad.name AS deptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au where au.id = io.createUser) createUserName, |  |  |  |             aw.name AS invName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, |  |  |  |             au_create.employeeName AS createUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, |  |  |  |             au_update.employeeName AS updateUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, |  |  |  |             au_review.employeeName AS reviewUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName, |  |  |  |             au_check.employeeName AS checkUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName, |  |  |  |             ad_from.name AS fromDeptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName, |  |  |  |             aw_from.name AS fromInvName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         (select name from basic_corp bc where bc.erpId = io.customerId) customerName |  |  |  |             bc_from.name AS fromCorpName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         from io_order as io |  |  |  |             bc_customer.name AS customerName | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         left join io_order_upload_log ioul on io.billNo = ioul.billNo |  |  |  |         FROM | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             io_order io | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             io_order_upload_log ioul ON io.billNo = ioul.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             basic_bussiness_type bbt ON bbt.action = io.action | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_dept ad ON ad.code = io.deptCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_warehouse aw ON aw.code = io.invCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_create ON au_create.id = io.createUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_update ON au_update.id = io.updateUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_review ON au_review.id = io.reviewUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_user au_check ON au_check.id = io.checkUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_dept ad_from ON ad_from.code = io.fromDeptCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             auth_warehouse aw_from ON aw_from.code = io.fromInvCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             basic_corp bc_from ON bc_from.erpId = io.fromCorp | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             basic_corp bc_customer ON bc_customer.erpId = io.customerId | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             io.dealStatus = 3 |  |  |  |             io.dealStatus = 3 | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="billNo != null and billNo != ''"> |  |  |  |             <if test="billNo != null and billNo != ''"> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |