|  |  | @ -5,8 +5,10 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterInvProductDetail" parameterType="com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest" |  |  |  |     <select id="filterInvProductDetail" parameterType="com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> |  |  |  |             resultType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * FROM inv_product_detail |  |  |  |         SELECT * | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         FROM inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             delFlag = false | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="productIdFk != '' and productIdFk != null"> |  |  |  |             <if test="productIdFk != '' and productIdFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND productIdFk = #{productIdFk} |  |  |  |                 AND productIdFk = #{productIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | @ -51,14 +53,18 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="invWarehouseCode != '' and invWarehouseCode != null"> |  |  |  |             <if test="invWarehouseCode != '' and invWarehouseCode != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND invWarehouseCode = #{invWarehouseCode} |  |  |  |                 AND invWarehouseCode = #{invWarehouseCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="orderIdFk != null and orderIdFk != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND orderIdFk = #{orderIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterJoinInvProduct" parameterType="com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest" |  |  |  |     <select id="filterJoinInvProduct" parameterType="com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse"> |  |  |  |             resultType="com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT inv_product_detail.* ,io_order.fromCorp,io_order.fromCorpId FROM inv_product_detail |  |  |  |         SELECT inv_product_detail.* ,io_order.fromCorp,io_order.fromCorpId FROM inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |         inner join io_order on inv_product_detail.orderIdFk = io_order.id |  |  |  |         inner join io_order on inv_product_detail.orderIdFk = io_order.id | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             inv_product_detail.delFlag = false | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="productIdFk != '' and productIdFk != null"> |  |  |  |             <if test="productIdFk != '' and productIdFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND productIdFk = #{productIdFk} |  |  |  |                 AND productIdFk = #{productIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | @ -105,42 +111,41 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND invWarehouseCode = #{invWarehouseCode} |  |  |  |                 AND invWarehouseCode = #{invWarehouseCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="insertInvProductDetail" keyProperty="id" |  |  |  |     <insert id="insertInvProductDetail" keyProperty="id" | 
			
		
	
		
		
			
				
					
					|  |  |  |             parameterType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> |  |  |  |             parameterType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         insert INTO inv_product_detail |  |  |  |         insert INTO inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |                 (code, productIdFk, orderIdFk, customerId, mainAction, `action`, `count`, updateTime, |  |  |  |                 (code, productIdFk, orderIdFk, customerId, mainAction, `action`, `count`, updateTime, | 
			
		
	
		
		
			
				
					
					|  |  |  |          purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId, originCode, invStorageCode, |  |  |  |                  purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId, originCode, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          invWarehouseCode) |  |  |  |                  invStorageCode, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                  invWarehouseCode, delFlag) | 
			
		
	
		
		
			
				
					
					|  |  |  |         values (#{code}, |  |  |  |         values (#{code}, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productIdFk}, #{orderIdFk}, |  |  |  |                 #{productIdFk}, #{orderIdFk}, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{customerId}, #{mainAction}, #{action}, #{count}, #{updateTime}, |  |  |  |                 #{customerId}, #{mainAction}, #{action}, #{count}, #{updateTime}, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{purchaseType}, #{batchNo}, #{productionDate}, #{expireDate}, #{unitFk}, #{stockIdFk}, #{supId}, |  |  |  |                 #{purchaseType}, #{batchNo}, #{productionDate}, #{expireDate}, #{unitFk}, #{stockIdFk}, #{supId}, | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{originCode}, #{invStorageCode}, #{invWarehouseCode}) |  |  |  |                 #{originCode}, #{invStorageCode}, #{invWarehouseCode}, #{delFlag}) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="insertInvProductDetails" keyProperty="id" |  |  |  |     <insert id="insertInvProductDetails" keyProperty="id" | 
			
		
	
		
		
			
				
					
					|  |  |  |             parameterType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> |  |  |  |             parameterType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         insert INTO inv_product_detail |  |  |  |         insert INTO inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |                 (code, productIdFk, orderIdFk, customerId, mainAction, `action`, `count`, updateTime, |  |  |  |                 (code, productIdFk, orderIdFk, customerId, mainAction, `action`, `count`, updateTime, | 
			
		
	
		
		
			
				
					
					|  |  |  |         purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId,originCode, invStorageCode, |  |  |  |                  purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId, originCode, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         invWarehouseCode) |  |  |  |                  invStorageCode, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                  invWarehouseCode, delFlag) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 values |  |  |  |                 values | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         <foreach collection="invProductDetailEntitys" item="item" index="index" |  |  |  |         <foreach collection="invProductDetailEntitys" item="item" index="index" | 
			
		
	
		
		
			
				
					
					|  |  |  |                  separator=","> |  |  |  |                  separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |             ( |  |  |  |             (#{item.code}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.code}, |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |              #{item.productIdFk}, #{item.orderIdFk}, |  |  |  |              #{item.productIdFk}, #{item.orderIdFk}, | 
			
		
	
		
		
			
				
					
					|  |  |  |              #{item.customerId}, #{item.mainAction}, #{item.action}, #{item.count}, #{item.updateTime}, |  |  |  |              #{item.customerId}, #{item.mainAction}, #{item.action}, #{item.count}, #{item.updateTime}, | 
			
		
	
		
		
			
				
					
					|  |  |  |              #{item.purchaseType}, #{item.batchNo}, #{item.productionDate}, #{item.expireDate}, |  |  |  |              #{item.purchaseType}, #{item.batchNo}, #{item.productionDate}, #{item.expireDate}, | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.unitFk},#{item.stockIdFk} |  |  |  |              #{item.unitFk}, #{item.stockIdFk}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             ,#{item.supId},#{item.originCode},#{item.invStorageCode},#{item.invWarehouseCode} |  |  |  |              #{item.supId}, #{item.originCode}, #{item.invStorageCode}, #{item.invWarehouseCode}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             ) |  |  |  |              #{item.delFlag}) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         </foreach> |  |  |  |         </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -190,6 +195,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="originCode != null">originCode=#{originCode},</if> |  |  |  |             <if test="originCode != null">originCode=#{originCode},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if> |  |  |  |             <if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> |  |  |  |             <if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="delFlag != null">delFlag=#{delFlag},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </trim> |  |  |  |         </trim> | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </update> |  |  |  |     </update> | 
			
		
	
	
		
		
			
				
					|  |  | @ -197,6 +203,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="java.lang.Integer"> |  |  |  |             resultType="java.lang.Integer"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT count(0) FROM inv_product_detail |  |  |  |         SELECT count(0) FROM inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             delFlag = false | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="productIdFk != '' and productIdFk != null"> |  |  |  |             <if test="productIdFk != '' and productIdFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND productIdFk = #{productIdFk} |  |  |  |                 AND productIdFk = #{productIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | @ -246,6 +253,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> |  |  |  |             resultType="com.glxp.sale.admin.entity.inventory.InvProductDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * FROM inv_product_detail |  |  |  |         SELECT * FROM inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             delFlag = false | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="productIdFk != '' and productIdFk != null"> |  |  |  |             <if test="productIdFk != '' and productIdFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND productIdFk = #{productIdFk} |  |  |  |                 AND productIdFk = #{productIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | @ -283,4 +291,11 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         limit 1 |  |  |  |         limit 1 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <update id="updateDelFlag"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         update inv_product_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         set delFlag = #{delFlag} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         where orderIdFk = #{orderIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     </update> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | </mapper> |  |  |  | </mapper> |