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