瀏覽代碼

fix 修改查询条件

Administrator 3 年之前
父節點
當前提交
85766dc7b3

+ 3 - 0
boman-web-core/src/main/java/com/boman/web/core/domain/VaccineInfoOperation.java

@@ -236,6 +236,9 @@ public class VaccineInfoOperation extends BaseEntity {
     /** 暂缓接种附件 */
     /** 暂缓接种附件 */
     private String otherUrl;
     private String otherUrl;
 
 
+    /**
+     * 应续未续
+     */
     private String shouldSlow;
     private String shouldSlow;
 
 
     /**
     /**

+ 30 - 10
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -93,7 +93,6 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
         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(vaccineName) || StringUtils.isNotBlank(jici) || vaccinationTime != null || StringUtils.isNotBlank(vaccinationPlace)) {
             VaccineInfoUser vaccineInfoUser = new VaccineInfoUser();
             VaccineInfoUser vaccineInfoUser = new VaccineInfoUser();
-            vaccineInfoUser.setVaccineName(vaccineName);
             vaccineInfoUser.setJici(jici);
             vaccineInfoUser.setJici(jici);
             vaccineInfoUser.setVaccinationTime(vaccinationTime);
             vaccineInfoUser.setVaccinationTime(vaccinationTime);
             vaccineInfoUser.setVaccinationPlace(vaccinationPlace);
             vaccineInfoUser.setVaccinationPlace(vaccinationPlace);
@@ -120,19 +119,30 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
                 //户籍地
                 //户籍地
                 String domicile = infoOperation.getDomicile();
                 String domicile = infoOperation.getDomicile();
                 StringBuilder sbDomicile = new StringBuilder();
                 StringBuilder sbDomicile = new StringBuilder();
-                sbDomicile.append(province).append(city).append(region).append(domicile);
+                sbDomicile.append(province).append(city).append(region);
+                if (StringUtils.isNotBlank(domicile)){
+                    sbDomicile.append(domicile);
+                }
                 infoOperation.setDomicileSelect(sbDomicile.toString());
                 infoOperation.setDomicileSelect(sbDomicile.toString());
                 //现居地
                 //现居地
                 String nowIn = infoOperation.getNowIn();
                 String nowIn = infoOperation.getNowIn();
                 StringBuilder sbNowIn = new StringBuilder();
                 StringBuilder sbNowIn = new StringBuilder();
-                sbNowIn.append(province).append(city).append(region).append(nowIn);
+                sbNowIn.append(province).append(city).append(region);
+                if (StringUtils.isNotBlank(nowIn)){
+                    sbNowIn.append(nowIn);
+                }
                 infoOperation.setNowInSelect(sbNowIn.toString());
                 infoOperation.setNowInSelect(sbNowIn.toString());
-                //最后一次的接种时间
-                Date vaccinationTimeLast = infoOperation.getVaccinationTime();
-                //接种的疫苗名称
-                String vaccineNameLast = infoOperation.getVaccineName();
-                Date date = vaccinationTimeNext(vaccinationTimeLast, vaccineNameLast);
-                infoOperation.setVaccinationTimeNext(date);
+                String progress = infoOperation.getProgress();
+                if (StringUtils.isBlank(progress) || "否".equals(progress)){
+                    //最后一次的接种时间
+                    Date vaccinationTimeLast = infoOperation.getVaccinationTime();
+                    //接种的疫苗名称
+                    String vaccineNameLast = infoOperation.getVaccineName();
+                    if (StringUtils.isNotBlank(vaccineNameLast)){
+                        Date date = vaccinationTimeNext(vaccinationTimeLast, vaccineNameLast);
+                        infoOperation.setVaccinationTimeNext(date);
+                    }
+                }
             }
             }
         }
         }
 
 
@@ -141,7 +151,7 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
 
 
     private Date vaccinationTimeNext(Date vaccinationTime, String vaccineNameLast) {
     private Date vaccinationTimeNext(Date vaccinationTime, String vaccineNameLast) {
         Date date = new Date();
         Date date = new Date();
-        if ("科兴中维".equals(vaccineNameLast)) {
+        if ("北京科兴中维".equals(vaccineNameLast)) {
             date = DateUtils.addDayOfDate(vaccinationTime, 14);
             date = DateUtils.addDayOfDate(vaccinationTime, 14);
         }else if ("北京生物".equals(vaccineNameLast)){
         }else if ("北京生物".equals(vaccineNameLast)){
             date = DateUtils.addDayOfDate(vaccinationTime, 21);
             date = DateUtils.addDayOfDate(vaccinationTime, 21);
@@ -149,6 +159,16 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
             date = DateUtils.addDayOfDate(vaccinationTime, 28);
             date = DateUtils.addDayOfDate(vaccinationTime, 28);
         }else if ("安徽智飞".equals(vaccineNameLast)){
         }else if ("安徽智飞".equals(vaccineNameLast)){
             date = DateUtils.addDayOfDate(vaccinationTime, 28);
             date = DateUtils.addDayOfDate(vaccinationTime, 28);
+        }else if ("兰州生物".equals(vaccineNameLast)){
+            date = DateUtils.addDayOfDate(vaccinationTime, 21);
+        }else if ("成都生物".equals(vaccineNameLast)){
+            date = DateUtils.addDayOfDate(vaccinationTime, 21);
+        }else if ("科兴大连".equals(vaccineNameLast)){
+            date = DateUtils.addDayOfDate(vaccinationTime, 21);
+        }else if ("长春生物".equals(vaccineNameLast)){
+            date = DateUtils.addDayOfDate(vaccinationTime, 14);
+        }else {
+            date = vaccinationTime;
         }
         }
         return date;
         return date;
     }
     }

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

@@ -105,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="crowdClassification != null  and crowdClassification != ''"> and vi.crowd_classification = #{crowdClassification}</if>
             <if test="crowdClassification != null  and crowdClassification != ''"> and vi.crowd_classification = #{crowdClassification}</if>
             <if test="manufacturer != null  and manufacturer != ''"> and vi.manufacturer = #{manufacturer}</if>
             <if test="manufacturer != null  and manufacturer != ''"> and vi.manufacturer = #{manufacturer}</if>
             <if test="nowIn != null  and nowIn != ''"> and vi.now_in = #{nowIn}</if>
             <if test="nowIn != null  and nowIn != ''"> and vi.now_in = #{nowIn}</if>
+            <if test="shouldSlow != null  and shouldSlow != ''"> and vi.should_slow = #{shouldSlow}</if>
             <if test="idCardS != null  and idCardS.size() > 0">
             <if test="idCardS != null  and idCardS.size() > 0">
              and vi.id_card in
              and vi.id_card in
             <foreach item="idCard" collection="idCardS" open="(" separator="," close=")">
             <foreach item="idCard" collection="idCardS" open="(" separator="," close=")">

+ 31 - 5
boman-web-core/src/main/resources/mapper/VaccineInfoOperationMapper.xml

@@ -38,13 +38,18 @@
         <result property="isDel" column="is_del"/>
         <result property="isDel" column="is_del"/>
         <result property="operationType" column="operation_type"/>
         <result property="operationType" column="operation_type"/>
         <result property="vaccineInfoId" column="vaccine_info_id"/>
         <result property="vaccineInfoId" column="vaccine_info_id"/>
-        <result property="code"    column="code"    />
-        <result property="birthday"    column="birthday"    />
-        <result property="workUnit"    column="work_unit"    />
+        <result property="manufacturer" column="manufacturer"/>
         <result property="crowdClassification"    column="crowd_classification" />
         <result property="crowdClassification"    column="crowd_classification" />
-        <result property="manufacturer"    column="manufacturer"    />
+        <result property="workUnit"    column="work_unit"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="code"    column="code"    />
         <result property="nowIn"    column="now_in" />
         <result property="nowIn"    column="now_in" />
         <result property="url"    column="url" />
         <result property="url"    column="url" />
+        <result property="suspendUrl"    column="suspend_url" />
+        <result property="otherUrl"    column="other_url" />
+        <result property="age"    column="age" />
+        <result property="vaccineTimeNext"    column="vaccine_time_next" />
+        <result property="shouldSlow"    column="should_slow" />
     </resultMap>
     </resultMap>
 
 
     <sql id="selectVaccineInfoOperationVo">
     <sql id="selectVaccineInfoOperationVo">
@@ -53,7 +58,8 @@
                vaccine_name, jici, vaccination_time, vaccination_place, contraindication,
                vaccine_name, jici, vaccination_time, vaccination_place, contraindication,
                suspend, should_be, other, progress, remark, status,
                suspend, should_be, other, progress, remark, status,
                create_by, create_time, update_by, update_time, is_del, operation_type,
                create_by, create_time, update_by, update_time, is_del, operation_type,
-               vaccine_info_id,code,birthday,work_unit,crowd_classification,manufacturer, now_in, url
+               vaccine_info_id,code,birthday,work_unit,crowd_classification,manufacturer, now_in, url,suspend_url,other_url,age,
+               vaccine_time_next,should_slow
         from vaccine_info_operation
         from vaccine_info_operation
     </sql>
     </sql>
 
 
@@ -95,6 +101,11 @@
             <if test="manufacturer != null  and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
             <if test="manufacturer != null  and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
             <if test="nowIn != null  and nowIn != ''"> and now_in = #{nowIn}</if>
             <if test="nowIn != null  and nowIn != ''"> and now_in = #{nowIn}</if>
             <if test="url != null  and url != ''"> and url = #{url}</if>
             <if test="url != null  and url != ''"> and url = #{url}</if>
+            <if test="suspendUrl != null  and suspendUrl != ''"> and suspend_url = #{suspendUrl}</if>
+            <if test="otherUrl != null  and otherUrl != ''"> and other_url = #{otherUrl}</if>
+            <if test="age != null  and age != ''"> and age = #{age}</if>
+            <if test="vaccineTimeNext != null  and vaccineTimeNext != ''"> and vaccine_time_next = #{vaccineTimeNext}</if>
+            <if test="shouldSlow != null  and shouldSlow != ''"> and should_slow = #{shouldSlow}</if>
         </where>
         </where>
     </select>
     </select>
 
 
@@ -145,6 +156,11 @@
             <if test="manufacturer != null and manufacturer != ''">manufacturer,</if>
             <if test="manufacturer != null and manufacturer != ''">manufacturer,</if>
             <if test="nowIn != null and nowIn != ''">now_in,</if>
             <if test="nowIn != null and nowIn != ''">now_in,</if>
             <if test="url != null and url != ''">url,</if>
             <if test="url != null and url != ''">url,</if>
+            <if test="suspendUrl != null and suspendUrl != ''">suspend_url,</if>
+            <if test="otherUrl != null and otherUrl != ''">other_url,</if>
+            <if test="age != null and age != ''">age,</if>
+            <if test="vaccineTimeNext != null and vaccineTimeNext != ''">vaccine_time_next,</if>
+            <if test="shouldSlow != null and shouldSlow != ''">should_slow,</if>
             create_time
             create_time
         </trim>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -186,6 +202,11 @@
             <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
             <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
             <if test="nowIn != null and nowIn != ''">#{nowIn},</if>
             <if test="nowIn != null and nowIn != ''">#{nowIn},</if>
             <if test="url != null and url != ''">#{url},</if>
             <if test="url != null and url != ''">#{url},</if>
+            <if test="suspendUrl != null and suspendUrl != ''">#{suspendUrl},</if>
+            <if test="otherUrl != null and otherUrl != ''">#{url},</if>
+            <if test="age != null and age != ''">#{age},</if>
+            <if test="vaccineTimeNext != null and vaccineTimeNext != ''">#{vaccine_time_next},</if>
+            <if test="shouldSlow != null and shouldSlow != ''">#{shouldSlow},</if>
             sysdate()
             sysdate()
         </trim>
         </trim>
     </insert>
     </insert>
@@ -229,6 +250,11 @@
             <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if>
             <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if>
             <if test="nowIn != null and nowIn != ''">now_in = #{nowIn},</if>
             <if test="nowIn != null and nowIn != ''">now_in = #{nowIn},</if>
             <if test="url != null and url != ''">url = #{url},</if>
             <if test="url != null and url != ''">url = #{url},</if>
+            <if test="suspendUrl != null and suspendUrl != ''">suspend_url = #{suspendUrl},</if>
+            <if test="otherUrl != null and otherUrl != ''">other_url = #{otherUrl},</if>
+            <if test="age != null and age != ''">age = #{age},</if>
+            <if test="vaccineTimeNext != null and vaccineTimeNext != ''">vaccine_time_next = #{vaccineTimeNext},</if>
+            <if test="shouldSlow != null and shouldSlow != ''">should_slow = #{shouldSlow},</if>
             update_by = sysdate()
             update_by = sysdate()
         </trim>
         </trim>
         where id = #{id}
         where id = #{id}

+ 1 - 2
boman-web-core/src/main/resources/mapper/VaccineInfoUserMapper.xml

@@ -30,9 +30,8 @@
         SELECT DISTINCT id_card FROM vaccine_info_user
         SELECT DISTINCT id_card FROM vaccine_info_user
         <where>
         <where>
             is_del = 'N'
             is_del = 'N'
-            <if test="vaccineName != null  and vaccineName != ''"> and vaccine_name like concat('%', #{vaccineName}, '%')</if>
             <if test="jici != null  and jici != ''"> and jici = #{jici}</if>
             <if test="jici != null  and jici != ''"> and jici = #{jici}</if>
-            <if test="vaccinationTime != null "> and DATE_FORMAT(vaccination_time,'yyyy-MM-dd') = DATE_FORMAT(#{vaccinationTime},'yyyy-MM-dd')</if>
+            <if test="vaccinationTime != null "> and DATE_FORMAT(vaccination_time,'%Y-%m-%d') = DATE_FORMAT(#{vaccinationTime},'%Y-%m-%d')</if>
             <if test="vaccinationPlace != null  and vaccinationPlace != ''"> and vaccination_place = #{vaccinationPlace}</if>
             <if test="vaccinationPlace != null  and vaccinationPlace != ''"> and vaccination_place = #{vaccinationPlace}</if>
         </where>
         </where>
     </select>
     </select>