zhonghui %!s(int64=3) %!d(string=hai) anos
pai
achega
4b1afe4fcb

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

@@ -178,8 +178,10 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
                 }
                 //剂次可能是 "加强针"
                 String jici = vaccineInfoUser.getJici();
-                if (isNumeric(jici) && isNumeric(jiCi) && Integer.parseInt(jici) >Integer.parseInt(jiCi)){
-                    jiCi = vaccineInfoUser.getJici();
+                if (isNumeric(jici) && isNumeric(jiCi)){
+                    if(Integer.parseInt(jici) >Integer.parseInt(jiCi)) {
+                        jiCi = vaccineInfoUser.getJici();
+                    }
                 }else if (!isNumeric(jici)){
                     jiCi = vaccineInfoUser.getJici();
                 }
@@ -210,7 +212,10 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
      * @param str
      * @return
      */
-    public boolean isNumeric(String str){
+    public static boolean isNumeric(String str){
+        if(StringUtils.isEmpty(str)) {
+            return false;
+        }
         Pattern pattern = Pattern.compile("[0-9]*");
         Matcher isNum = pattern.matcher(str);
         if( !isNum.matches() ){

+ 1 - 11
boman-web-core/src/main/resources/mapper/VaccineInfoOperationMapper.xml

@@ -26,8 +26,6 @@
         <result property="vaccinationPlace" column="vaccination_place"/>
         <result property="contraindication" column="contraindication"/>
         <result property="suspend" column="suspend"/>
-        <result property="death" column="death"/>
-        <result property="lostInMissing" column="lost_in_missing"/>
         <result property="shouldBe" column="should_be"/>
         <result property="other" column="other"/>
         <result property="progress" column="progress"/>
@@ -53,7 +51,7 @@
         select id, village_towns, village, villager_group, house_type, domicile, province, city,
                region, user_name, gender, id_card, phone_num, key_industries, is_vaccination,
                vaccine_name, jici, vaccination_time, vaccination_place, contraindication,
-               suspend, death, lost_in_missing, 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,
                vaccine_info_id,code,birthday,work_unit,crowd_classification,manufacturer, now_in, url
         from vaccine_info_operation
@@ -83,8 +81,6 @@
             <if test="vaccinationPlace != null  and vaccinationPlace != ''">and vaccination_place =#{vaccinationPlace}</if>
             <if test="contraindication != null  and contraindication != ''">and contraindication = #{contraindication}</if>
             <if test="suspend != null  and suspend != ''">and suspend = #{suspend}</if>
-            <if test="death != null  and death != ''">and death = #{death}</if>
-            <if test="lostInMissing != null  and lostInMissing != ''">and lost_in_missing = #{lostInMissing}</if>
             <if test="shouldBe != null  and shouldBe != ''">and should_be = #{shouldBe}</if>
             <if test="other != null  and other != ''">and other = #{other}</if>
             <if test="progress != null  and progress != ''">and progress = #{progress}</if>
@@ -131,8 +127,6 @@
             <if test="vaccinationPlace != null">vaccination_place,</if>
             <if test="contraindication != null">contraindication,</if>
             <if test="suspend != null">suspend,</if>
-            <if test="death != null">death,</if>
-            <if test="lostInMissing != null">lost_in_missing,</if>
             <if test="shouldBe != null">should_be,</if>
             <if test="other != null">other,</if>
             <if test="progress != null">progress,</if>
@@ -174,8 +168,6 @@
             <if test="vaccinationPlace != null">#{vaccinationPlace},</if>
             <if test="contraindication != null">#{contraindication},</if>
             <if test="suspend != null">#{suspend},</if>
-            <if test="death != null">#{death},</if>
-            <if test="lostInMissing != null">#{lostInMissing},</if>
             <if test="shouldBe != null">#{shouldBe},</if>
             <if test="other != null">#{other},</if>
             <if test="progress != null">#{progress},</if>
@@ -221,8 +213,6 @@
             <if test="vaccinationPlace != null">vaccination_place = #{vaccinationPlace},</if>
             <if test="contraindication != null">contraindication = #{contraindication},</if>
             <if test="suspend != null">suspend = #{suspend},</if>
-            <if test="death != null">death = #{death},</if>
-            <if test="lostInMissing != null">lost_in_missing = #{lostInMissing},</if>
             <if test="shouldBe != null">should_be = #{shouldBe},</if>
             <if test="other != null">other = #{other},</if>
             <if test="progress != null">progress = #{progress},</if>