Browse Source

fix 修改查询条件

Administrator 3 years ago
parent
commit
25650e4437

+ 1 - 3
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -91,10 +91,8 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
         //接种地点
         //接种地点
         String vaccinationPlace = vaccineInfoOperation.getVaccinationPlace();
         String vaccinationPlace = vaccineInfoOperation.getVaccinationPlace();
         List<String> idCardS = new ArrayList<>();
         List<String> idCardS = new ArrayList<>();
-        if (StringUtils.isNotBlank(vaccineName) || StringUtils.isNotBlank(jici) || vaccinationTime != null || StringUtils.isNotBlank(vaccinationPlace)) {
+        if ( StringUtils.isNotBlank(vaccinationPlace)) {
             VaccineInfoUser vaccineInfoUser = new VaccineInfoUser();
             VaccineInfoUser vaccineInfoUser = new VaccineInfoUser();
-            vaccineInfoUser.setJici(jici);
-            vaccineInfoUser.setVaccinationTime(vaccinationTime);
             vaccineInfoUser.setVaccinationPlace(vaccinationPlace);
             vaccineInfoUser.setVaccinationPlace(vaccinationPlace);
             idCardS = vaccineInfoUserMapper.selectIdCardList(vaccineInfoUser);
             idCardS = vaccineInfoUserMapper.selectIdCardList(vaccineInfoUser);
             vaccineInfoOperation.setIdCardS(idCardS);
             vaccineInfoOperation.setIdCardS(idCardS);

+ 3 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -85,6 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="domicile != null  and domicile != ''"> and vi.domicile = #{domicile}</if>
             <if test="domicile != null  and domicile != ''"> and vi.domicile = #{domicile}</if>
             <if test="province != null  and province != ''"> and vi.province = #{province}</if>
             <if test="province != null  and province != ''"> and vi.province = #{province}</if>
             <if test="city != null  and city != ''"> and vi.city = #{city}</if>
             <if test="city != null  and city != ''"> and vi.city = #{city}</if>
+            <if test="jici != null  and jici != ''"> and vi.jici &lt;= #{jici}</if>
+            <if test="vaccineName != null  and vaccineName != ''"> and vi.vaccine_name like concat('%', #{vaccineName}, '%')</if>
+            <if test="vaccinationTime != null "> and DATE_FORMAT(vi.vaccination_time,'%Y-%m-%d') = DATE_FORMAT(#{vaccinationTime},'%Y-%m-%d')</if>
             <if test="region != null  and region != ''"> and vi.region = #{region}</if>
             <if test="region != null  and region != ''"> and vi.region = #{region}</if>
             <if test="userName != null  and userName != ''"> and vi.user_name like concat('%', #{userName}, '%')</if>
             <if test="userName != null  and userName != ''"> and vi.user_name like concat('%', #{userName}, '%')</if>
             <if test="gender != null  and gender != ''"> and vi.gender = #{gender}</if>
             <if test="gender != null  and gender != ''"> and vi.gender = #{gender}</if>