|  |  | @ -2,22 +2,47 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
			
		
	
		
		
			
				
					
					|  |  |  | <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, |  |  |  |                bus.name         AS billTypeName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_dept ad where ad.code = io.deptCode)              deptName, |  |  |  |                ad.name          AS deptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_warehouse aw where aw.code = io.invCode)          invName, |  |  |  |                aw.name          AS invName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au where au.id = io.createUser)      createUserName, |  |  |  |                au.employeeName  AS createUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au2 where au2.id = io.updateUser)    updateUserName, |  |  |  |                au2.employeeName AS updateUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au3 where au3.id = io.reviewUser)    reviewUserName, |  |  |  |                au3.employeeName AS reviewUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au4 where au4.id = io.checkUser)     checkUserName, |  |  |  |                au4.employeeName AS checkUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_dept ad2 where ad2.code = io.fromDeptCode)        fromDeptName, |  |  |  |                ad2.name         AS fromDeptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode)    fromInvName, |  |  |  |                aw2.name         AS fromInvName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from basic_corp bc where bc.erpId = io.fromCorp)            fromCorpName, |  |  |  |                bc1.name         AS fromCorpName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from basic_corp bc where bc.erpId = io.customerId)          customerName |  |  |  |                bc2.name         AS customerName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 from io_order as io |  |  |  |                sw.workplaceName AS workPlaceName | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 left join auth_warehouse aw on aw.code = io.fromInvCode |  |  |  |                 FROM | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 left join basic_corp bc on bc.erpId = io.fromCorp |  |  |  |                 io_order io | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 left join io_order_invoice ioi on ioi.orderIdFk = io.billNo |  |  |  |                 LEFT JOIN | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 basic_bussiness_type bus ON bus.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 ON au.id = io.createUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 auth_user au2 ON au2.id = io.updateUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 auth_user au3 ON au3.id = io.reviewUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 auth_user au4 ON au4.id = io.checkUser | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 auth_dept ad2 ON ad2.code = io.fromDeptCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 auth_warehouse aw2 ON aw2.code = io.fromInvCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 basic_corp bc1 ON bc1.erpId = io.fromCorp | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 basic_corp bc2 ON bc2.erpId = io.customerId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 io_order_invoice ioi ON ioi.orderIdFk = io.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LEFT JOIN | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 sys_workplace sw ON sw.workplaceId = io.workPlaceCode | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         <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 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |