|  |  | @ -32,79 +32,68 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <select id="getIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO"> | 
			
		
	
		
			
				
					|  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |             a.ic_nat_id icNatId, | 
			
		
	
		
			
				
					|  |  |  |             a.agency_id agencyId, | 
			
		
	
		
			
				
					|  |  |  |             a.user_type userType, | 
			
		
	
		
			
				
					|  |  |  |             b.user_id userId, | 
			
		
	
		
			
				
					|  |  |  |             b.is_resi_user isResiUser, | 
			
		
	
		
			
				
					|  |  |  |             b.`name` `name`, | 
			
		
	
		
			
				
					|  |  |  |             b.mobile mobile, | 
			
		
	
		
			
				
					|  |  |  |             b.id_card idCard, | 
			
		
	
		
			
				
					|  |  |  |             b.nat_time natTime, | 
			
		
	
		
			
				
					|  |  |  |             b.nat_result natResult, | 
			
		
	
		
			
				
					|  |  |  |             b.nat_address natAddress | 
			
		
	
		
			
				
					|  |  |  |         FROM | 
			
		
	
		
			
				
					|  |  |  |             ic_nat_relation a | 
			
		
	
		
			
				
					|  |  |  |         INNER JOIN ic_nat b ON a.IC_NAT_ID = b.ID | 
			
		
	
		
			
				
					|  |  |  |         WHERE | 
			
		
	
		
			
				
					|  |  |  |             a.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND b.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND a.customer_id = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |             a.IC_VACCINE_ID AS vaccineId, | 
			
		
	
		
			
				
					|  |  |  |             a.agency_id, | 
			
		
	
		
			
				
					|  |  |  |             a.user_type, | 
			
		
	
		
			
				
					|  |  |  |             b.`name`, | 
			
		
	
		
			
				
					|  |  |  |             b.mobile, | 
			
		
	
		
			
				
					|  |  |  |             b.id_card, | 
			
		
	
		
			
				
					|  |  |  |             b.INOCULATE_TIME, | 
			
		
	
		
			
				
					|  |  |  |             b.INOCULATE_ADDRESS, | 
			
		
	
		
			
				
					|  |  |  |             b.MANUFACTURER | 
			
		
	
		
			
				
					|  |  |  |         FROM ic_vaccine_relation a | 
			
		
	
		
			
				
					|  |  |  |         INNER JOIN ic_vaccine b ON a.IC_VACCINE_ID = b.ID AND b.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         WHERE a.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |             AND a.customer_id = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |             AND a.pids like concat('%', #{agencyId}, '%') | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != name and "" != name'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.name like concat('%', #{name}, '%') | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != mobile and "" != mobile'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.mobile = #{mobile} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != idCard and "" != idCard'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.id_card = #{idCard} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != startTime and "" != startTime'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.nat_time <![CDATA[ >= ]]> #{startTime} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != endTime and "" != endTime'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.nat_time <![CDATA[ <= ]]> #{endTime} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != isResiUser and "" != isResiUser'> | 
			
		
	
		
			
				
					|  |  |  |             AND b.is_resi_user = #{isResiUser} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY b.nat_time DESC, b.id ASC | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != name and "" != name'> | 
			
		
	
		
			
				
					|  |  |  |                 AND b.name like concat('%', #{name}, '%') | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != mobile and "" != mobile'> | 
			
		
	
		
			
				
					|  |  |  |                 AND b.mobile = #{mobile} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != idCard and "" != idCard'> | 
			
		
	
		
			
				
					|  |  |  |                 AND b.id_card = #{idCard} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != startTime and "" != startTime'> | 
			
		
	
		
			
				
					|  |  |  |                 AND b.INOCULATE_TIME <![CDATA[ >= ]]> #{startTime} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != endTime and "" != endTime'> | 
			
		
	
		
			
				
					|  |  |  |                 AND b.INOCULATE_TIME <![CDATA[ <= ]]> #{endTime} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY b.INOCULATE_TIME DESC, b.id ASC | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <select id="getCustomerIcVaccineList" resultType="com.epmet.dto.result.NatListResultDTO"> | 
			
		
	
		
			
				
					|  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |             id icNatId, | 
			
		
	
		
			
				
					|  |  |  |             user_id userId, | 
			
		
	
		
			
				
					|  |  |  |             id vaccineId, | 
			
		
	
		
			
				
					|  |  |  |             is_resi_user isResiUser, | 
			
		
	
		
			
				
					|  |  |  |             user_type userType, | 
			
		
	
		
			
				
					|  |  |  |             `name` `name`, | 
			
		
	
		
			
				
					|  |  |  |             mobile mobile, | 
			
		
	
		
			
				
					|  |  |  |             id_card idCard, | 
			
		
	
		
			
				
					|  |  |  |             nat_time natTime, | 
			
		
	
		
			
				
					|  |  |  |             nat_result natResult, | 
			
		
	
		
			
				
					|  |  |  |             nat_address natAddress | 
			
		
	
		
			
				
					|  |  |  |         FROM | 
			
		
	
		
			
				
					|  |  |  |             ic_nat | 
			
		
	
		
			
				
					|  |  |  |         WHERE | 
			
		
	
		
			
				
					|  |  |  |             del_flag = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND customer_id = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != name and "" != name'> | 
			
		
	
		
			
				
					|  |  |  |             AND name like concat('%', #{name}, '%') | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != mobile and "" != mobile'> | 
			
		
	
		
			
				
					|  |  |  |             AND mobile = #{mobile} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != idCard and "" != idCard'> | 
			
		
	
		
			
				
					|  |  |  |             AND id_card = #{idCard} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != startTime and "" != startTime'> | 
			
		
	
		
			
				
					|  |  |  |             AND nat_time <![CDATA[ >= ]]> #{startTime} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test='null != endTime and "" != endTime'> | 
			
		
	
		
			
				
					|  |  |  |             AND nat_time <![CDATA[ <= ]]> #{endTime} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY nat_time DESC, id ASC | 
			
		
	
		
			
				
					|  |  |  |             INOCULATE_TIME , | 
			
		
	
		
			
				
					|  |  |  |             INOCULATE_ADDRESS, | 
			
		
	
		
			
				
					|  |  |  |             MANUFACTURER | 
			
		
	
		
			
				
					|  |  |  |         FROM ic_vaccine | 
			
		
	
		
			
				
					|  |  |  |         WHERE del_flag = '0' | 
			
		
	
		
			
				
					|  |  |  |             AND customer_id = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != name and "" != name'> | 
			
		
	
		
			
				
					|  |  |  |                 AND name like concat('%', #{name}, '%') | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != mobile and "" != mobile'> | 
			
		
	
		
			
				
					|  |  |  |                 AND mobile = #{mobile} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != idCard and "" != idCard'> | 
			
		
	
		
			
				
					|  |  |  |                 AND id_card = #{idCard} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != startTime and "" != startTime'> | 
			
		
	
		
			
				
					|  |  |  |                 AND INOCULATE_TIME <![CDATA[ >= ]]> #{startTime} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test='null != endTime and "" != endTime'> | 
			
		
	
		
			
				
					|  |  |  |                 AND INOCULATE_TIME <![CDATA[ <= ]]> #{endTime} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY INOCULATE_TIME DESC, id ASC | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <select id="getNatDTO" resultType="com.epmet.dto.IcNatDTO"> | 
			
		
	
	
		
			
				
					|  |  | 
 |