Browse Source

核酸异常流程

FanQun 2 years ago
parent
commit
8e142bf03d

+ 30 - 22
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -99,7 +99,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
             }
         };
 
-        if (barCodes == null || PassStatusEnum.GREEN_CODE.getDesc().equals(barCodes.getCOLOR_CODE_LABEL())) {
+        if (rshyParam.getScreenLocked() == 0 && (barCodes == null || PassStatusEnum.GREEN_CODE.getDesc().equals(barCodes.getCOLOR_CODE_LABEL()))) {
             taskList.add(() -> resultDTO.setPctdfkDTO(itfwServer.getPctdfk(rshyParam.getSfzh(), "", rshyParam.getTimeout())));
             taskList.add(() -> resultDTO.setPctjsryDTO(itfwServer.getPctjsry(rshyParam.getSfzh(), rshyParam.getTimeout())));
             taskList.add(() -> resultDTO.setPctztDTO(itfwServer.getPctzt(rshyParam.getSfzh(), rshyParam.getTimeout())));
@@ -121,9 +121,13 @@ public class RshyJkManagerImpl implements RshyJkManager {
         });
 
         log.info("IT服务平台接口调用完成");
-        rshyVo.setXm(rshyParam.getXm()).setSfzh(rshyParam.getSfzh()).setTimes(times(rshyParam.getSfzh())).setVaccine(CollectionUtil.isEmpty(resultDTO.getPctymDataDTOS()) ? null : resultDTO.getPctymDataDTOS().size()).setTravel_card(0);
+        rshyVo.setXm(rshyParam.getXm()).setSfzh(rshyParam.getSfzh()).setTimes(times(rshyParam.getSfzh()));
+        //疫苗
+        rshyVo.setVaccine(CollectionUtil.isEmpty(resultDTO.getPctymDataDTOS()) ? null : resultDTO.getPctymDataDTOS().size());
         //核酸报告
         rshyVo.setNucleic_acid(nucleicAcid(resultDTO.getPcthsResultDTO()));
+        //行程卡(暂时没接口,默认0)
+        rshyVo.setTravel_card(0);
         rshyVo.setXb(SexEnum.codeOf(IdcardUtil.getGenderByIdCard(rshyParam.getSfzh())).getDesc());
         Date date = DateUtil.parse(IdcardUtil.getBirthByIdCard(rshyParam.getSfzh()));
         rshyVo.setBirthday(DateUtil.format(date, "yyyy-M-d"));
@@ -134,27 +138,31 @@ public class RshyJkManagerImpl implements RshyJkManager {
             hcjg = pctrchlDTO.getHcjg();
         }
 
-        if (resultDTO.getPersonIdentifyDTO() != null && !rshyParam.getSfzh().equals(resultDTO.getPersonIdentifyDTO().getIdNumber())) {
-            rshyVo.setPass(PassStatusEnum.NO_MATCHED.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.NO_MATCHED.getTts()).setDisplayMsg(PassStatusEnum.NO_MATCHED.getDesc()).setWarning(PassStatusEnum.NO_MATCHED.getDesc()).setKind(PassStatusEnum.NO_MATCHED.getDesc());
-        } else if (barCodes != null && PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
-            rshyVo.setPass(PassStatusEnum.RED_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.RED_CODE.getTts()).setDisplayMsg(PassStatusEnum.RED_CODE.getDesc()).setWarning(PassStatusEnum.RED_CODE.getDesc()).setKind("健康码" + PassStatusEnum.RED_CODE.getDesc());
-        } else if (barCodes != null && PassStatusEnum.YELLOW_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
-            rshyVo.setPass(PassStatusEnum.YELLOW_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.YELLOW_CODE.getTts()).setDisplayMsg(PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc()).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc());
-        } else if (resultDTO.getPctztDTO() != null || StrUtil.containsAnyIgnoreCase(hcjg, "抓捕")) {
-            rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setTts(PassStatusEnum.NO_PASSING.getTts()).setDisplayMsg(PassStatusEnum.NO_PASSING.getDesc()).setWarning("在逃人员:" + resultDTO.getPctztDTO().getJyaq()).setKind(resultDTO.getPctztDTO().getZtrylxmc());
-        } else if (ObjectUtils.allFieldIsNULL(resultDTO) || StrUtil.containsAnyIgnoreCase(hcjg, "通过")) {
-            rshyVo.setPass(PassStatusEnum.NORMAL_TRAFFIC.getCode()).setDisplayMsg(PassStatusEnum.NORMAL_TRAFFIC.getDesc()).setTts(PassStatusEnum.NORMAL_TRAFFIC.getTts());
-        } else if (quickRshyVo.get() != null && StrUtil.isNotEmpty(quickRshyVo.get().getSfzh())) {
-            //快速通行
-            rshyVo = quickRshyVo.get();
-        } else {
-            rshyVo.setPass(PassStatusEnum.RIGHT_WAY.getCode()).setKind(kind(resultDTO)).setWarning(warning(resultDTO)).setDisplayMsg(PassStatusEnum.RIGHT_WAY.getDesc()).setTts(PassStatusEnum.RIGHT_WAY.getTts());
-        }
+        if (rshyVo.getNucleic_acid().getStatus() == 0) {
+            rshyVo.setPass(PassStatusEnum.NO_COMPLIANCE.getCode()).setTts(PassStatusEnum.NO_COMPLIANCE.getTts()).setDisplayMsg(PassStatusEnum.NO_COMPLIANCE.getDesc());
+        }else {
 
-        if (rshyVo.getHealthCode() != null) {
-            rshyVo.setTts(rshyVo.getHealthCode());
-        }
+            if (resultDTO.getPersonIdentifyDTO() != null && !rshyParam.getSfzh().equals(resultDTO.getPersonIdentifyDTO().getIdNumber())) {
+                rshyVo.setPass(PassStatusEnum.NO_MATCHED.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.NO_MATCHED.getTts()).setDisplayMsg(PassStatusEnum.NO_MATCHED.getDesc()).setWarning(PassStatusEnum.NO_MATCHED.getDesc()).setKind(PassStatusEnum.NO_MATCHED.getDesc());
+            } else if (barCodes != null && PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
+                rshyVo.setPass(PassStatusEnum.RED_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.RED_CODE.getTts()).setDisplayMsg(PassStatusEnum.RED_CODE.getDesc()).setWarning(PassStatusEnum.RED_CODE.getDesc()).setKind("健康码" + PassStatusEnum.RED_CODE.getDesc());
+            } else if (barCodes != null && PassStatusEnum.YELLOW_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
+                rshyVo.setPass(PassStatusEnum.YELLOW_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.YELLOW_CODE.getTts()).setDisplayMsg(PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc()).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc());
+            } else if (resultDTO.getPctztDTO() != null || StrUtil.containsAnyIgnoreCase(hcjg, "抓捕")) {
+                rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setTts(PassStatusEnum.NO_PASSING.getTts()).setDisplayMsg(PassStatusEnum.NO_PASSING.getDesc()).setWarning("在逃人员:" + resultDTO.getPctztDTO().getJyaq()).setKind(resultDTO.getPctztDTO().getZtrylxmc());
+            } else if (ObjectUtils.allFieldIsNULL(resultDTO) || StrUtil.containsAnyIgnoreCase(hcjg, "通过")) {
+                rshyVo.setPass(PassStatusEnum.NORMAL_TRAFFIC.getCode()).setDisplayMsg(PassStatusEnum.NORMAL_TRAFFIC.getDesc()).setTts(PassStatusEnum.NORMAL_TRAFFIC.getTts());
+            } else if (quickRshyVo.get() != null && StrUtil.isNotEmpty(quickRshyVo.get().getSfzh())) {
+                //快速通行
+                rshyVo = quickRshyVo.get();
+            } else {
+                rshyVo.setPass(PassStatusEnum.RIGHT_WAY.getCode()).setKind(kind(resultDTO)).setWarning(warning(resultDTO)).setDisplayMsg(PassStatusEnum.RIGHT_WAY.getDesc()).setTts(PassStatusEnum.RIGHT_WAY.getTts());
+            }
 
+            if (rshyVo.getHealthCode() != null) {
+                rshyVo.setTts(rshyVo.getHealthCode());
+            }
+        }
         log.info("普通核验响应内容:{}", JSON.toJSONString(rshyVo));
         return rshyVo;
     }
@@ -175,7 +183,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
                 return nucleicAcidDTO;
             }
 
-            nucleicAcidDTO.setStatus(NucleicAcidEnum.CONFORM.getCode()).setResults(new StringBuilder("48小时之内已出结果,结果").append(pcthsResultDTO.getJGU_MC()).toString()).setTime(DateUtil.format(parse, "MM-dd HH:mm"));
+            nucleicAcidDTO.setStatus(NucleicAcidEnum.CONFORM.getCode()).setResults(new StringBuilder("采样48h内 结果").append(pcthsResultDTO.getJGU_MC()).toString()).setTime(DateUtil.format(parse, "MM-dd HH:mm"));
             return nucleicAcidDTO;
         }
 

+ 2 - 1
src/main/java/com/rshy/project/hy/model/enums/PassStatusEnum.java

@@ -17,7 +17,8 @@ public enum PassStatusEnum {
     RED_CODE(3, "红码", "健康码异常"),
     YELLOW_CODE(3, "黄码", "健康码异常"),
     NO_MATCHED(3, "人证不符", "健康码异常"),
-    GREEN_CODE(2, "绿码", "通过");;
+    GREEN_CODE(2, "绿码", "通过"),
+    NO_COMPLIANCE(3,"核酸未采集","核酸48小时未采集");
 
     private Integer code;
 

+ 1 - 1
src/main/java/com/rshy/project/hy/server/FaceRetrievaServer.java

@@ -177,7 +177,7 @@ public class FaceRetrievaServer {
      * 人脸库检索
      *
      * @param photo base64图片
-     * @param timeout 
+     * @param timeout 
      */
     public RetrievaResultVO retrieval(String photo, Integer timeout) {
         RetrievaResultVO login = this.login(timeout);