Sfoglia il codice sorgente

无核酸信息 也比对其他接口

FanQun 2 anni fa
parent
commit
31e1f8be07

+ 13 - 12
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -181,23 +181,24 @@ public class RshyJkManagerImpl implements RshyJkManager {
 //            //行程码到过中高风险地区
 //            rshyVo.setPassStatus(PassStatusEnum.ABNORMAL_TRAVEL_CARD).setKind(PassStatusEnum.ABNORMAL_TRAVEL_CARD.getDesc());
 //        } else
-        if (jkmInfo != null) {
-            if (PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(jkmInfo.getColor_code_label())) {
-                //红码
-                rshyVo.setPass(PassStatusEnum.RED_CODE.getCode()).setTts(PassStatusEnum.RED_CODE.getTts()).setDisplayMsg(PassStatusEnum.RED_CODE.getDesc()).setWarning(PassStatusEnum.RED_CODE.getDesc()).setKind("健康码" + PassStatusEnum.RED_CODE.getDesc());
-            } else if (PassStatusEnum.YELLOW_CODE.getDesc().equalsIgnoreCase(jkmInfo.getColor_code_label())) {
-                //黄码
-                rshyVo.setPassStatus(PassStatusEnum.YELLOW_CODE).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc());
+
+        if (jkmInfo != null && PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(jkmInfo.getColor_code_label())) {
+            //红码
+            rshyVo.setPass(PassStatusEnum.RED_CODE.getCode()).setTts(PassStatusEnum.RED_CODE.getTts()).setDisplayMsg(PassStatusEnum.RED_CODE.getDesc()).setWarning(PassStatusEnum.RED_CODE.getDesc()).setKind("健康码" + PassStatusEnum.RED_CODE.getDesc());
+        } else if (jkmInfo != null && PassStatusEnum.YELLOW_CODE.getDesc().equalsIgnoreCase(jkmInfo.getColor_code_label())) {
+            //黄码
+            rshyVo.setPassStatus(PassStatusEnum.YELLOW_CODE).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc());
+        } else if (StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.CAPTURE.getDesc()) || StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.INTERCEPT.getDesc())) {
+            //人车核录接口返回抓捕或者拦截
+            if (StrUtil.isNotBlank(resultDTO.getPctrchlDTO().getXm())) {
+                rshyVo.setXm(resultDTO.getPctrchlDTO().getXm());
+                rshyVo.setMz(EnumUtil.likeValueOf(Nation.class, resultDTO.getPctrchlDTO().getMz()).getDesc());
             }
+            rshyVo.setPassStatus(PassStatusEnum.NO_PASSING).setKind(kind(resultDTO)).setWarning(warning(resultDTO));
         } else if (resultDTO.getPctgkryDTO().getPctztDTO() != null && resultDTO.getPctgkryDTO().getPctztDTO().getRyztmc().equalsIgnoreCase("在逃")) {
             //在逃接口返回并且ryztmc字段为在逃
             rshyVo.setXm(resultDTO.getPctgkryDTO().getPctztDTO().getXm());
             rshyVo.setPassStatus(PassStatusEnum.NO_PASSING).setKind(kind(resultDTO)).setWarning(warning(resultDTO));
-        } else if (StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.CAPTURE.getDesc()) || StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.INTERCEPT.getDesc())) {
-            //人车核录接口返回抓捕或者拦截
-            if (StrUtil.isNotBlank(resultDTO.getPctrchlDTO().getXm()))
-                rshyVo.setXm(resultDTO.getPctrchlDTO().getXm());
-            rshyVo.setPassStatus(PassStatusEnum.NO_PASSING).setKind(kind(resultDTO)).setWarning(warning(resultDTO));
         } else if (!ObjectUtils.allFieldIsNULL(resultDTO.getPctgkryDTO()) || StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.IN_DOUBT.getDesc())) {
             //七大类管控人员和人车核录接口返回存疑人员
             rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(kind(resultDTO)).setWarning(warning(resultDTO));

+ 35 - 0
src/main/java/com/rshy/project/hy/model/enums/Nation.java

@@ -0,0 +1,35 @@
+package com.rshy.project.hy.model.enums;
+
+import cn.hutool.core.util.EnumUtil;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 民族代码表
+ * <p>
+ * Created by fanqun on 2022/6/8.
+ */
+@Getter
+@AllArgsConstructor
+public enum Nation {
+    HAN("01", "汉族"),
+    MENGGU("02", "蒙古族"),
+    HUI("03", "回族"),
+    ZANG("04", "藏族"),
+    WEIWUER("05", "维吾尔"),
+    MIAO("06", "苗族"),
+    YI("07", "彝族"),
+    ZUANG("08", "壮族"),
+    BUYI("09", "布依族"),
+    CHAOXIAN("10", "朝鲜族"),
+    MAN("11", "满族"),
+    TUJIA("15", "土家族"),
+    DAI("18", "傣族"),
+    JINUO("56", "基诺族");
+    private String code;
+    private String desc;
+
+    public static void main(String[] args) {
+        System.out.println(EnumUtil.likeValueOf(Nation.class, "03").getDesc());
+    }
+}