Browse Source

根据新的文档的pass更新tts信息

FanQun 2 years ago
parent
commit
85f0c3f7ca

+ 6 - 5
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -89,9 +89,10 @@ public class RshyJkManagerImpl implements RshyJkManager {
             } else if (PassStatusEnum.YELLOW_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
                 rshyVo.setPass(PassStatusEnum.YELLOW_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.YELLOW_CODE.getDesc()).setDisplayMsg(PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc()).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc());
                 return rshyVo;
-            } else {
-                rshyVo.setTts(barCodes.getCOLOR_CODE_LABEL());
             }
+            /*else {
+                rshyVo.setTts(barCodes.getCOLOR_CODE_LABEL());
+            }*/
             rshyParam.setTimeout((int) (rshyParam.getTimeout() - DateUtil.between(beginDate, DateTime.now(), DateUnit.MS)));
         }
 
@@ -132,11 +133,11 @@ public class RshyJkManagerImpl implements RshyJkManager {
         }
 
         if (resultDTO.getPctztDTO() != null || StrUtil.containsAnyIgnoreCase(hcjg, "抓捕")) {
-            rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setTts(PassStatusEnum.NO_PASSING.getDesc()).setDisplayMsg(PassStatusEnum.NO_PASSING.getDesc()).setWarning(new StringBuilder().append("在逃人员:").append(resultDTO.getPctztDTO().getJyaq()).toString()).setKind(resultDTO.getPctztDTO().getZtrylxmc());
+            rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setTts(PassStatusEnum.NO_PASSING.getTts()).setDisplayMsg(PassStatusEnum.NO_PASSING.getDesc()).setWarning(new StringBuilder().append("在逃人员:").append(resultDTO.getPctztDTO().getJyaq()).toString()).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.getDesc());
+            rshyVo.setPass(PassStatusEnum.NORMAL_TRAFFIC.getCode()).setDisplayMsg(PassStatusEnum.NORMAL_TRAFFIC.getDesc()).setTts(PassStatusEnum.NORMAL_TRAFFIC.getTts());
         } else {
-            rshyVo.setPass(PassStatusEnum.RIGHT_WAY.getCode()).setKind(kind(resultDTO)).setWarning(warning(resultDTO)).setDisplayMsg(PassStatusEnum.RIGHT_WAY.getDesc()).setTts(PassStatusEnum.RIGHT_WAY.getDesc());
+            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());

+ 6 - 5
src/main/java/com/rshy/project/hy/model/enums/PassStatusEnum.java

@@ -11,13 +11,14 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum PassStatusEnum {
-    NO_PASSING(0, "核验不通过"),
-    RIGHT_WAY(1, "核验通过"),
-    NORMAL_TRAFFIC(2, "核验通过"),
-    RED_CODE(0, "红码"),
-    YELLOW_CODE(1, "黄码");
+    NO_PASSING(0, "核验不通过", "请重刷"),
+    RIGHT_WAY(1, "核验通过", "请稍等"),
+    NORMAL_TRAFFIC(2, "核验通过", "通过"),
+    RED_CODE(3, "红码", "健康码异常"),
+    YELLOW_CODE(3, "黄码", "健康码异常");
 
     private Integer code;
 
     private String desc;
+    private String tts;
 }

+ 5 - 5
src/main/java/com/rshy/project/hy/server/ItfwServer.java

@@ -58,7 +58,7 @@ public class ItfwServer {
      * 基础服务访问
      *
      * @param param
-     * @param timeout 超时时间
+     * @param timeout 超时时间
      * @return
      */
     public String baseAgentApi(AgentApiParam param, Integer timeout) {
@@ -122,7 +122,7 @@ public class ItfwServer {
      * 重点人员服务
      *
      * @param idNumber 身份证号
-     * @param timeout  超时时间
+     * @param timeout  超时时间
      * @return
      */
     public PctzdryDTO getPctzdry(String idNumber, Integer timeout) {
@@ -179,7 +179,7 @@ public class ItfwServer {
      * 人员劣迹服务
      *
      * @param idNumber
-     * @param timeout  超时时间
+     * @param timeout  超时时间
      * @return
      */
     public PctztDTO getPctzt(String idNumber, Integer timeout) {
@@ -237,7 +237,7 @@ public class ItfwServer {
      * 新的执法办案服务
      *
      * @param idNumber
-     * @param timeout  超时时间
+     * @param timeout  超时时间
      * @return
      */
     public PctzfbaDTO getPctzfba(String idNumber, Integer timeout) {
@@ -298,7 +298,7 @@ public class ItfwServer {
      *
      * @param idNumber 身份证号
      * @param ajbh
-     * @param timeout  超时时间
+     * @param timeout  超时时间
      * @return
      */
     public PctdfkDTO getPctdfk(String idNumber, String ajbh, Integer timeout) {