|  |  | @ -5,13 +5,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterThrOrder" parameterType="com.glxp.sale.admin.req.thrsys.FilterThrOrderRequest" |  |  |  |     <select id="filterThrOrder" parameterType="com.glxp.sale.admin.req.thrsys.FilterThrOrderRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity"> |  |  |  |             resultType="com.glxp.sale.admin.entity.thrsys.ThrOrderEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * FROM thr_order |  |  |  |         SELECT thr_order.*,basic_bustype_origin.name billTypeName FROM thr_order | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         left join basic_bustype_origin on thr_order.billType = basic_bustype_origin.action | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="billNo != '' and billNo != null"> |  |  |  |             <if test="billNo != '' and billNo != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND billNo = #{billNo} |  |  |  |                 AND billNo = #{billNo} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="id != '' and id !=null"> |  |  |  |             <if test="id != '' and id !=null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND id = #{id} |  |  |  |                 AND thr_order.id = #{id} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="billAction != '' and billAction !=null"> |  |  |  |             <if test="billAction != '' and billAction !=null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND billType = #{billAction} |  |  |  |                 AND billType = #{billAction} | 
			
		
	
	
		
		
			
				
					|  |  | @ -38,17 +39,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="endDate!=null and endDate!=''"> |  |  |  |             <if test="endDate!=null and endDate!=''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <![CDATA[  and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d')    ]]> |  |  |  |                 <![CDATA[  and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d')    ]]> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="editStatus != '' and editStatus != null"> |  |  |  |             <if test="editStatus!= null"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 AND editStatus = #{editStatus} |  |  |  |                 AND editStatus = #{editStatus} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <!--            <if test="editStatus == '' or editStatus == null">--> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <!--                and `editStatus`  <![CDATA[ <> ]]> 1--> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <!--            </if>--> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="lastUpdateTime!=null and lastUpdateTime!=''"> |  |  |  |             <if test="lastUpdateTime!=null and lastUpdateTime!=''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <![CDATA[   and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>=  DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')   ]]> |  |  |  |                 <![CDATA[   and DATE_FORMAT(thr_order.updateTime, '%Y-%m-%d %H:%i:%S')>=  DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')   ]]> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |         ORDER BY updateTime DESC |  |  |  |         ORDER BY thr_order.updateTime DESC | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -57,7 +55,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         INTO thr_order |  |  |  |         INTO thr_order | 
			
		
	
		
		
			
				
					
					|  |  |  |                 (id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, |  |  |  |                 (id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, |  |  |  |                  startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  remark3,locStorageCode,editStatus) |  |  |  |                  remark3,locStorageCode,editStatus,invWarehouseCode) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         values ( |  |  |  |         values ( | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{id}, |  |  |  |         #{id}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{billNo}, |  |  |  |         #{billNo}, | 
			
		
	
	
		
		
			
				
					|  |  | @ -82,7 +80,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark2}, |  |  |  |         #{remark2}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark3}, |  |  |  |         #{remark3}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{locStorageCode}, |  |  |  |         #{locStorageCode}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{editStatus} |  |  |  |         #{editStatus}, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         #{invWarehouseCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -90,7 +89,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         replace INTO thr_order |  |  |  |         replace INTO thr_order | 
			
		
	
		
		
			
				
					
					|  |  |  |         (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, |  |  |  |         (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, | 
			
		
	
		
		
			
				
					
					|  |  |  |         startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, |  |  |  |         startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, | 
			
		
	
		
		
			
				
					
					|  |  |  |         remark3,locStorageCode,editStatus) |  |  |  |         remark3,locStorageCode,editStatus,invWarehouseCode) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         values |  |  |  |         values | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         <foreach collection="thrOrderEntities" item="item" index="index" |  |  |  |         <foreach collection="thrOrderEntities" item="item" index="index" | 
			
		
	
	
		
		
			
				
					|  |  | @ -104,7 +103,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk}, |  |  |  |             #{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk}, | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser}, |  |  |  |             #{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser}, | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1}, |  |  |  |             #{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1}, | 
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus}) |  |  |  |             #{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus},#{item.invWarehouseCode}, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             ) | 
			
		
	
		
		
			
				
					
					|  |  |  |         </foreach> |  |  |  |         </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -145,7 +145,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="remark3 != null">remark3=#{remark3},</if> |  |  |  |             <if test="remark3 != null">remark3=#{remark3},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if> |  |  |  |             <if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="editStatus != null">editStatus=#{editStatus},</if> |  |  |  |             <if test="editStatus != null">editStatus=#{editStatus},</if> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |             <if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         </trim> |  |  |  |         </trim> | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </update> |  |  |  |     </update> | 
			
		
	
	
		
		
			
				
					|  |  | @ -155,7 +155,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         INTO thr_order |  |  |  |         INTO thr_order | 
			
		
	
		
		
			
				
					
					|  |  |  |                 (id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, |  |  |  |                 (id,billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, |  |  |  |                  startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  remark3) |  |  |  |                  remark3,invWarehouseCode) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         values ( |  |  |  |         values ( | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{id}, |  |  |  |         #{id}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{billNo}, |  |  |  |         #{billNo}, | 
			
		
	
	
		
		
			
				
					|  |  | @ -177,7 +177,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark}, |  |  |  |         #{remark}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark1}, |  |  |  |         #{remark1}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark2}, |  |  |  |         #{remark2}, | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{remark3} |  |  |  |         #{remark3}, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         #{invWarehouseCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | </mapper> |  |  |  | </mapper> |