|  |  | @ -33,21 +33,18 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND supId = #{supId} |  |  |  |                 AND supId = #{supId} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="joinQueryList" parameterType="com.glxp.api.req.purchase.PurOrderDetailRequest" |  |  |  |     <select id="joinQueryList" parameterType="com.glxp.api.req.purchase.PurOrderDetailRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.res.purchase.PurOrderDetailResponse"> |  |  |  |             resultType="com.glxp.api.res.purchase.PurOrderDetailResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     SELECT |  |  |  |         SELECT pur_order_detail.*, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     pur_order_detail.*, |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                basic_products.ggxh     spec, |  |  |  |                basic_products.ggxh     spec, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.nameCode nameCode, |  |  |  |                basic_products.nameCode nameCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.measname, |  |  |  |                basic_products.measname, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.manufactory, |  |  |  |                basic_products.manufactory, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.ylqxzcrbarmc, |  |  |  |                basic_products.ylqxzcrbarmc, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_corp.`name`       supName |  |  |  |                basic_corp.`name`       supName | 
			
		
	
		
		
			
				
					
					|  |  |  |     FROM |  |  |  |         FROM pur_order_detail | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     pur_order_detail |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                      left JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id |  |  |  |                      left JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id | 
			
		
	
		
		
			
				
					
					|  |  |  |                      left JOIN basic_products ON basic_udirel.uuid = basic_products.uuid |  |  |  |                      left JOIN basic_products ON basic_udirel.uuid = basic_products.uuid | 
			
		
	
		
		
			
				
					
					|  |  |  |                      left JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId |  |  |  |                      left JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId | 
			
		
	
	
		
		
			
				
					|  |  | @ -63,22 +60,18 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND supId = #{supId} |  |  |  |                 AND supId = #{supId} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <delete id="deleteByIds" parameterType="java.util.List"> |  |  |  |     <delete id="deleteByIds" parameterType="java.util.List"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     DELETE FROM pur_order_detail WHERE id in |  |  |  |         DELETE | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         FROM pur_order_detail WHERE id in | 
			
		
	
		
		
			
				
					
					|  |  |  |         <foreach collection="ids" item="item" open="(" separator="," close=")"> |  |  |  |         <foreach collection="ids" item="item" open="(" separator="," close=")"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item} |  |  |  |             #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |         </foreach> |  |  |  |         </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </delete> |  |  |  |     </delete> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <delete id="deleteByOrderId" parameterType="map"> |  |  |  |     <delete id="deleteByOrderId" parameterType="map"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         DELETE |  |  |  |         DELETE | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM pur_order_detail |  |  |  |         FROM pur_order_detail | 
			
		
	
	
		
		
			
				
					|  |  | @ -88,39 +81,51 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     <update id="update" parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity"> |  |  |  |     <update id="update" parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         UPDATE pur_order_detail |  |  |  |         UPDATE pur_order_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |         <trim prefix="set" suffixOverrides=","> |  |  |  |         <trim prefix="set" suffixOverrides=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if> |  |  |  |             <if test="orderIdFk != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="productId != null">productId=#{productId},</if> |  |  |  |                 orderIdFk=#{orderIdFk}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="productName != null">productName=#{productName},</if> |  |  |  |             </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="count != null">`count`=#{count},</if> |  |  |  |             <if test="productId != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="supId != null">supId=#{supId},</if> |  |  |  |                 productId=#{productId}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       <if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if> |  |  |  |             </if> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="productName != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 productName=#{productName}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="count != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 `count`=#{count}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="supId != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 supId=#{supId}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="zczbhhzbapzbh != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 zczbhhzbapzbh=#{zczbhhzbapzbh}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="price != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 price=#{price}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </trim> |  |  |  |         </trim> | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </update> |  |  |  |     </update> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   <insert id="insertPurOrderDetailEntity" keyProperty="id"  parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity"> |  |  |  |     <insert id="insertPurOrderDetailEntity" keyProperty="id" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         REPLACE INTO pur_order_detail |  |  |  |         REPLACE INTO pur_order_detail | 
			
		
	
		
		
			
				
					
					|  |  |  |     ( orderIdFk,productId,productName,count,supId,zczbhhzbapzbh) values |  |  |  |                 (orderIdFk, productId, productName, count, supId, zczbhhzbapzbh, price) values | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         <foreach collection="datas" item="item" index="index" separator=","> |  |  |  |         <foreach collection="datas" item="item" index="index" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |       ( |  |  |  |             (#{item.orderIdFk}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       #{item.orderIdFk}, |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |              #{item.productId}, |  |  |  |              #{item.productId}, | 
			
		
	
		
		
			
				
					
					|  |  |  |              #{item.productName}, |  |  |  |              #{item.productName}, | 
			
		
	
		
		
			
				
					
					|  |  |  |              #{item.count}, |  |  |  |              #{item.count}, | 
			
		
	
		
		
			
				
					
					|  |  |  |              #{item.supId}, |  |  |  |              #{item.supId}, | 
			
		
	
		
		
			
				
					
					|  |  |  |       #{item.zczbhhzbapzbh} |  |  |  |              #{item.zczbhhzbapzbh}, #{item.price}) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         </foreach> |  |  |  |         </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="selectIoOrderDetailBiz" parameterType="long" |  |  |  |     <select id="selectIoOrderDetailBiz" parameterType="long" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.entity.basic.BasicProductsEntity"> |  |  |  |             resultType="com.glxp.api.entity.basic.BasicProductsEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     SELECT |  |  |  |         SELECT b2.* | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     b2.* |  |  |  |         FROM pur_order_detail p1 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     FROM |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     pur_order_detail p1 |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN basic_udirel b1 on b1.id = p1.productId |  |  |  |                      LEFT JOIN basic_udirel b1 on b1.id = p1.productId | 
			
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN basic_products b2 on b1.uuid = b2.uuid |  |  |  |                      LEFT JOIN basic_products b2 on b1.uuid = b2.uuid | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
	
		
		
			
				
					|  |  | @ -132,16 +137,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="selectDetailList" resultType="com.glxp.api.res.purchase.PurOrderDetailResponse"> |  |  |  |     <select id="selectDetailList" resultType="com.glxp.api.res.purchase.PurOrderDetailResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     SELECT |  |  |  |         SELECT pur_order_detail.*, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     pur_order_detail.*, |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                pur_order.billNo, |  |  |  |                pur_order.billNo, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.ggxh spec, |  |  |  |                basic_products.ggxh spec, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.measname, |  |  |  |                basic_products.measname, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.manufactory, |  |  |  |                basic_products.manufactory, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_products.ylqxzcrbarmc, |  |  |  |                basic_products.ylqxzcrbarmc, | 
			
		
	
		
		
			
				
					
					|  |  |  |                basic_corp.`name`   supName |  |  |  |                basic_corp.`name`   supName | 
			
		
	
		
		
			
				
					
					|  |  |  |     FROM |  |  |  |         FROM pur_order_detail | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     pur_order_detail |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                      INNER JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id |  |  |  |                      INNER JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id | 
			
		
	
		
		
			
				
					
					|  |  |  |                      INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid |  |  |  |                      INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid | 
			
		
	
		
		
			
				
					
					|  |  |  |                      INNER JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId |  |  |  |                      INNER JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId | 
			
		
	
	
		
		
			
				
					|  |  | @ -166,10 +169,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND basic_products.manufactory like concat('%', #{manufactory}, '%') |  |  |  |                 AND basic_products.manufactory like concat('%', #{manufactory}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="startDate != null and startDate != ''"> |  |  |  |             <if test="startDate != null and startDate != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d')>= #{startDate}]]> |  |  |  |                 <![CDATA[ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') >= #{startDate} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 ]]> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="endDate != null and endDate != ''"> |  |  |  |             <if test="endDate != null and endDate != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d') <= #{endDate}]]> |  |  |  |                 <![CDATA[ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') <= #{endDate} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 ]]> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             and pur_order.status = 3 |  |  |  |             and pur_order.status = 3 | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |