|  |  |  | @ -38,49 +38,50 @@ | 
			
		
	
		
			
				
					|  |  |  |  |     </sql> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectDrugsByNameCodes" resultType="int"> | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT count(1) | 
			
		
	
		
			
				
					|  |  |  |  |         FROM third_ali_drug | 
			
		
	
		
			
				
					|  |  |  |  |         WHERE nameCode = #{nameCode} | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT count(1) FROM third_ali_drug WHERE nameCode =  #{nameCode} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <!-- 自定义saveOrUpdateBatch方法 --> | 
			
		
	
		
			
				
					|  |  |  |  |     <insert id="saveOrUpdateBatch" parameterType="com.glxp.api.entity.thrsys.ThirdAliDrug"> | 
			
		
	
		
			
				
					|  |  |  |  |         replace INTO third_ali_drug (`type`, manufacturer, cpmctymc, form, formSpec, bzgg, spmc, nameCode, packRatio, | 
			
		
	
		
			
				
					|  |  |  |  |                                      packLevel, createTime, updateTime, erpId, approvalNum) | 
			
		
	
		
			
				
					|  |  |  |  |         packLevel, createTime, updateTime, erpId, approvalNum) | 
			
		
	
		
			
				
					|  |  |  |  |         VALUES | 
			
		
	
		
			
				
					|  |  |  |  |         <foreach collection="list" item="item" separator="," index="index"> | 
			
		
	
		
			
				
					|  |  |  |  |             (#{item.type}, #{item.manufacturer}, #{item.cpmctymc}, #{item.form}, #{item.formSpec}, #{item.bzgg}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.spmc}, #{item.nameCode}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.packRatio}, #{item.packLevel}, #{item.createTime}, #{item.updateTime}, #{item.erpId}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.approvalNum}) | 
			
		
	
		
			
				
					|  |  |  |  |             #{item.spmc}, #{item.nameCode}, | 
			
		
	
		
			
				
					|  |  |  |  |             #{item.packRatio}, #{item.packLevel}, #{item.createTime}, #{item.updateTime}, #{item.erpId}, | 
			
		
	
		
			
				
					|  |  |  |  |             #{item.approvalNum}) | 
			
		
	
		
			
				
					|  |  |  |  |         </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterList" parameterType="com.glxp.api.req.thrsys.ThirdAliDrugRequest" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.entity.thrsys.ThirdAliDrug"> | 
			
		
	
		
			
				
					|  |  |  |  |         select id, | 
			
		
	
		
			
				
					|  |  |  |  |                `type`, | 
			
		
	
		
			
				
					|  |  |  |  |                manufacturer, | 
			
		
	
		
			
				
					|  |  |  |  |                cpmctymc, | 
			
		
	
		
			
				
					|  |  |  |  |                form, | 
			
		
	
		
			
				
					|  |  |  |  |                formSpec, | 
			
		
	
		
			
				
					|  |  |  |  |                bzgg, | 
			
		
	
		
			
				
					|  |  |  |  |                spmc, | 
			
		
	
		
			
				
					|  |  |  |  |                nameCode, | 
			
		
	
		
			
				
					|  |  |  |  |                packRatio, | 
			
		
	
		
			
				
					|  |  |  |  |                packLevel, | 
			
		
	
		
			
				
					|  |  |  |  |                createTime, | 
			
		
	
		
			
				
					|  |  |  |  |                erpId, | 
			
		
	
		
			
				
					|  |  |  |  |                updateTime | 
			
		
	
		
			
				
					|  |  |  |  |         from third_ali_drug | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="cpmctymc != '' and cpmctymc != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND cpmctymc LIKE concat('%', #{cpmctymc}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="nameCode != '' and nameCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND nameCode LIKE concat('%', #{nameCode}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       <select id="filterList" parameterType="com.glxp.api.req.thrsys.ThirdAliDrugRequest" resultType="com.glxp.api.entity.thrsys.ThirdAliDrug"> | 
			
		
	
		
			
				
					|  |  |  |  |     select | 
			
		
	
		
			
				
					|  |  |  |  |         id, | 
			
		
	
		
			
				
					|  |  |  |  |         `type`, | 
			
		
	
		
			
				
					|  |  |  |  |         manufacturer, | 
			
		
	
		
			
				
					|  |  |  |  |         cpmctymc, | 
			
		
	
		
			
				
					|  |  |  |  |         form, | 
			
		
	
		
			
				
					|  |  |  |  |         formSpec, | 
			
		
	
		
			
				
					|  |  |  |  |         bzgg, | 
			
		
	
		
			
				
					|  |  |  |  |         spmc, | 
			
		
	
		
			
				
					|  |  |  |  |         nameCode, | 
			
		
	
		
			
				
					|  |  |  |  |         packRatio, | 
			
		
	
		
			
				
					|  |  |  |  |         packLevel, | 
			
		
	
		
			
				
					|  |  |  |  |         createTime, | 
			
		
	
		
			
				
					|  |  |  |  |         erpId, | 
			
		
	
		
			
				
					|  |  |  |  |         updateTime, | 
			
		
	
		
			
				
					|  |  |  |  |     approvalNum | 
			
		
	
		
			
				
					|  |  |  |  |     from third_ali_drug | 
			
		
	
		
			
				
					|  |  |  |  |     <where> | 
			
		
	
		
			
				
					|  |  |  |  |       <if test="cpmctymc != '' and cpmctymc != null"> | 
			
		
	
		
			
				
					|  |  |  |  |         AND cpmctymc LIKE concat('%', #{cpmctymc}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |       </if> | 
			
		
	
		
			
				
					|  |  |  |  |       <if test="nameCode != '' and nameCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |         AND nameCode LIKE concat('%', #{nameCode}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |       </if> | 
			
		
	
		
			
				
					|  |  |  |  |     </where> | 
			
		
	
		
			
				
					|  |  |  |  |   </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </mapper> |