|  |  |  | @ -208,28 +208,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         </choose> | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <delete id="deleteInvProductDetail"> | 
			
		
	
		
			
				
					|  |  |  |  |         delete | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_product | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="relId != null and relId != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND relIdFk = #{relId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="batchNo != null and batchNo != '' and batchNo != 'empty'"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND batchNo = #{batchNo} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="batchNo == 'empty'"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND batchNo is null | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="supId != null and supId != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND supId = #{supId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invCode != null and invCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND invCode = #{invCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </delete> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectPlaceDetailList" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         select pd.id, | 
			
		
	
		
			
				
					|  |  |  |  | <!--               pd.code,--> | 
			
		
	
	
		
			
				
					|  |  |  | @ -312,16 +290,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         group by pd.invSpaceCode | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <update id="batchBindSpace"> | 
			
		
	
		
			
				
					|  |  |  |  |         update inv_product | 
			
		
	
		
			
				
					|  |  |  |  |         set invSpaceCode = #{invSpaceCode} | 
			
		
	
		
			
				
					|  |  |  |  |                 where id in | 
			
		
	
		
			
				
					|  |  |  |  |         <foreach collection="ids" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
			
				
					|  |  |  |  |             #{item} | 
			
		
	
		
			
				
					|  |  |  |  |         </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectByInvAndCode" resultType="com.glxp.api.vo.basic.InvProductNewVo"> | 
			
		
	
		
			
				
					|  |  |  |  |         select * | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_product | 
			
		
	
	
		
			
				
					|  |  |  | @ -331,65 +299,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         limit 1 | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectSupIdByCode" resultType="java.lang.String"> | 
			
		
	
		
			
				
					|  |  |  |  |         select supId | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_product_detail | 
			
		
	
		
			
				
					|  |  |  |  |         where code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectCountOrderCodes" resultType="java.lang.String"> | 
			
		
	
		
			
				
					|  |  |  |  |         select distinct code | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_product_detail | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invCode != null and invCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND invCode = #{invCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invSpaceCode != null and invSpaceCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND invSpaceCode = #{invSpaceCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="relId != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND relIdFk = #{relId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="batchNo != null and batchNo != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND batchNo = #{batchNo} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="getInvProductInfo" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         select ipd.code, | 
			
		
	
		
			
				
					|  |  |  |  |                ipd.relId, | 
			
		
	
		
			
				
					|  |  |  |  |                ipd.batchNo, | 
			
		
	
		
			
				
					|  |  |  |  |                ipd.serialNo, | 
			
		
	
		
			
				
					|  |  |  |  |                ipd.invSpaceCode, | 
			
		
	
		
			
				
					|  |  |  |  |                ipd.invCode, | 
			
		
	
		
			
				
					|  |  |  |  |                bp.cpmctymc                                                     productName, | 
			
		
	
		
			
				
					|  |  |  |  |                bp.ggxh, | 
			
		
	
		
			
				
					|  |  |  |  |                bp.measname, | 
			
		
	
		
			
				
					|  |  |  |  |                bp.zczbhhzbapzbh, | 
			
		
	
		
			
				
					|  |  |  |  |                bp.manufactory, | 
			
		
	
		
			
				
					|  |  |  |  |                (select name from auth_space s where s.code = ipd.invSpaceCode) invSpaceName, | 
			
		
	
		
			
				
					|  |  |  |  |                (select name from basic_corp bc where bc.erpId = ipd.supId)     supName | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_product_detail ipd | 
			
		
	
		
			
				
					|  |  |  |  |                      left join basic_udirel bu on bu.id = ipd.relId | 
			
		
	
		
			
				
					|  |  |  |  |                      left join basic_products bp on bp.uuid = bu.uuid | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invCode != null and invCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND ipd.invCode = #{invCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invSpaceCode != null and invSpaceCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND ipd.invSpaceCode = #{invSpaceCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != null and code != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND ipd.code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="orderId != null and orderId != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND ipd.orderId = #{orderId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |         group by ipd.id | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="getInvPlaceOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         select odr.orderIdFk                                                     billNo, | 
			
		
	
		
			
				
					|  |  |  |  |                (select name from basic_bussiness_type where action = o.action) billTypeName, | 
			
		
	
	
		
			
				
					|  |  |  | 
 |