|  |  | @ -9,72 +9,6 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         where id = #{id} |  |  |  |         where id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="findRegistrationByName" parameterType="java.lang.String" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.entity.purchase.SupProductEntity"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM sup_product |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         where recordProductName = #{recordProductName} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterProducts" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.entity.purchase.SupProductEntity"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT sup_product.* |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM sup_product |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="id != null and id != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.id = #{id} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="productId != null and productId != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.productId = #{productId} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="enterpriseId != null and enterpriseId != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.enterpriseId = #{enterpriseId} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="relIdFk != null and relIdFk != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.relIdFk = #{relIdFk} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="manufactory != null and manufactory != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.manufactory = #{manufactory} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="recordCode != null and recordCode != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.recordCode like concat('%', #{recordCode}, '%') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="recordProductName != null and recordProductName != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.recordProductName like concat('%', #{recordProductName}, '%') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="recordPeopleName != null and recordPeopleName != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.recordPeopleName like concat('%', #{recordPeopleName}, '%') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="manufacturerIdFk != null and manufacturerIdFk != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.manufacturerIdFk = #{manufacturerIdFk} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="customerId != null and customerId != ''"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.customerId = #{customerId} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="auditStatus != null and auditStatus != 20 and auditStatus != 22 and auditStatus != 21"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and sup_product.auditStatus = #{auditStatus} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="auditStatus == 20"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and (sup_product.auditStatus = 0 or sup_product.auditStatus = 5 or |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                      sup_product.auditStatus = 2) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="auditStatus == 21"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and <![CDATA[ sup_product.auditStatus <> 0 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 ]]> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="auditStatus == 22"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <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') |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 ]]> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" |  |  |  |     <select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.res.purchase.SupProductResponse"> |  |  |  |             resultType="com.glxp.api.res.purchase.SupProductResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT sup_product.id, |  |  |  |         SELECT sup_product.id, | 
			
		
	
	
		
		
			
				
					|  |  | @ -325,61 +259,6 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </update> |  |  |  |     </update> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="insertRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         replace |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 INTO sup_product(enterpriseId, recordCode, recordProductName, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  productManageType, recordPeopleName, recordPeopleArea, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  recordPeopleAreaCode, recordPeopleAddress, productType, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  productDirectoryCode, agentName, agentArea, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  agentAreaCode, agentAddress, instructions, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  productAddress, recordText, placeOrigin, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  productionRegion, productionCompanyName, afterSale, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  specification, structure, `scope`, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  other, filePath, remark, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  createTime, updateTime, manufacturerIdFk, customerId, productId |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 , auditStatus, auditComment, sptm, ybbm, measname, hchzsb, relIdFk, manufactory, allowNoBatch, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                  allowNoExpire, allowNoProduct, allowNoSerial) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         values (#{enterpriseId}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordCode}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordProductName}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productManageType}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordPeopleName}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordPeopleArea}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordPeopleAreaCode}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordPeopleAddress}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productType}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productDirectoryCode}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{agentName}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{agentArea}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{agentAreaCode}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{agentAddress}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{instructions}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productAddress}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{recordText}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{placeOrigin}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productionRegion}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productionCompanyName}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{afterSale}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{specification}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{structure}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{scope}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{other}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{filePath}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{remark}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{createTime}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{updateTime}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{manufacturerIdFk}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{customerId}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{productId} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                        , |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{auditStatus}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{auditComment}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{sptm}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{ybbm}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{measname}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{hchzsb}, #{relIdFk}, #{manufactory}, #{allowNoBatch}, #{allowNoExpire}, #{allowNoProduct}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 #{allowNoSerial}) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="findProduct" parameterType="com.glxp.api.entity.purchase.SupProductEntity" |  |  |  |     <select id="findProduct" parameterType="com.glxp.api.entity.purchase.SupProductEntity" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="java.lang.Integer"> |  |  |  |             resultType="java.lang.Integer"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT count(*) |  |  |  |         SELECT count(*) | 
			
		
	
	
		
		
			
				
					|  |  | @ -401,11 +280,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </delete> |  |  |  |     </delete> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <delete id="deleteByEnterpriseId" parameterType="Map"> |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         DELETE |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM sup_product |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE enterpriseId = #{enterpriseId} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </delete> |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     <select id="findByManufactury" parameterType="Map" |  |  |  |     <select id="findByManufactury" parameterType="Map" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.entity.purchase.SupProductEntity"> |  |  |  |             resultType="com.glxp.api.entity.purchase.SupProductEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         select sup_product.* |  |  |  |         select sup_product.* | 
			
		
	
	
		
		
			
				
					|  |  | 
 |