|  |  | @ -283,4 +283,87 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <select id="filterProductList" resultType="com.glxp.api.res.inv.InvProductResponse" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             parameterType="com.glxp.api.req.inv.FilterInvProductRequest"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         select ip.id, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.nameCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bp.cpmctymc, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.relIdFk, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bp.ggxh, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.batchNo, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.productionDate, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.expireDate, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bp.ylqxzcrbarmc, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bp.zczbhhzbapzbh, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         sum(ip.inCount) as inCount, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         sum(ip.outCount) as outCount, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         sum(ip.reCount)as reCount, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.customerId, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         basic_corp.name     supName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.supId, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         auth_dept.name      deptName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         auth_warehouse.name invName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.deptCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ip.invCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         from inv_product ip | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         inner join basic_udirel on ip.relIdFk = basic_udirel.id | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         inner join basic_products bp on basic_udirel.uuid = bp.uuid | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         left join basic_corp on ip.supId = basic_corp.erpId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         left join auth_dept on auth_dept.code = ip.deptCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         left join auth_warehouse on auth_warehouse.code = ip.invCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             bp.diType = 1 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="cpmctymc != null and cpmctymc != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND bp.cpmctymc like concat('%', #{cpmctymc}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="nameCode != null and nameCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.nameCode like concat('%', #{nameCode}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="relIdFk != null and relIdFk != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.relIdFk = #{relIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="ggxh != null and ggxh != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND bp.ggxh like concat('%', #{ggxh}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="batchNo != null and batchNo != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.batchNo like concat('%', #{batchNo}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="productionDate != null and productionDate != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.productionDate = #{productionDate} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="expireDate != null and expireDate != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.expireDate = #{expireDate} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="customerId != null and customerId != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.customerId = #{customerId} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="supId != null and supId != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.supId = #{supId} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="deptCode != null and deptCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.deptCode = #{deptCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="invCode != null and invCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.invCode = #{invCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="invCodes != null and invCodes.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND ip.invCode in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         group by ip.relIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         order by ip.updateTime desc | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | </mapper> |  |  |  | </mapper> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |