Przeglądaj źródła

add:核酸、疫苗数据信息

lileilei 2 lat temu
rodzic
commit
b03ad27d6f
23 zmienionych plików z 607 dodań i 37 usunięć
  1. 19 0
      src/main/java/com/rshy/project/hy/config/properties/PcthsHeaderProperties.java
  2. 24 0
      src/main/java/com/rshy/project/hy/config/properties/PcthsProperties.java
  3. 19 0
      src/main/java/com/rshy/project/hy/config/properties/PctymHeaderProperties.java
  4. 23 0
      src/main/java/com/rshy/project/hy/config/properties/PctymProperties.java
  5. 75 36
      src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java
  6. 13 0
      src/main/java/com/rshy/project/hy/model/constant/ItfwConstant.java
  7. 23 0
      src/main/java/com/rshy/project/hy/model/dto/NucleicAcidDTO.java
  8. 20 0
      src/main/java/com/rshy/project/hy/model/enums/NucleicAcidEnum.java
  9. 2 1
      src/main/java/com/rshy/project/hy/model/enums/PassStatusEnum.java
  10. 126 0
      src/main/java/com/rshy/project/hy/server/ItfwServer.java
  11. 15 0
      src/main/java/com/rshy/project/hy/server/dto/PcthsDTO.java
  12. 22 0
      src/main/java/com/rshy/project/hy/server/dto/PcthsQueryDTO.java
  13. 38 0
      src/main/java/com/rshy/project/hy/server/dto/PcthsResultDTO.java
  14. 18 0
      src/main/java/com/rshy/project/hy/server/dto/PctymBodyDTO.java
  15. 15 0
      src/main/java/com/rshy/project/hy/server/dto/PctymDTO.java
  16. 47 0
      src/main/java/com/rshy/project/hy/server/dto/PctymDataDTO.java
  17. 6 0
      src/main/java/com/rshy/project/hy/server/dto/ResultDTO.java
  18. 18 0
      src/main/java/com/rshy/project/hy/server/vo/PcthsVO.java
  19. 20 0
      src/main/java/com/rshy/project/hy/server/vo/PctymVO.java
  20. 10 0
      src/main/java/com/rshy/project/hy/server/vo/RshyVo.java
  21. 18 0
      src/main/resources/application-dev.yml
  22. 18 0
      src/main/resources/application-local.yml
  23. 18 0
      src/main/resources/application-prod.yml

+ 19 - 0
src/main/java/com/rshy/project/hy/config/properties/PcthsHeaderProperties.java

@@ -0,0 +1,19 @@
+package com.rshy.project.hy.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/23 22:22
+ * @description:
+ */
+@Configuration
+@Data
+@ConfigurationProperties(prefix = "itfw.pcths.header")
+public class PcthsHeaderProperties {
+    private String APP_KEY;
+
+    private String APP_SECRET;
+}

+ 24 - 0
src/main/java/com/rshy/project/hy/config/properties/PcthsProperties.java

@@ -0,0 +1,24 @@
+package com.rshy.project.hy.config.properties;
+
+import com.rshy.project.hy.server.dto.PcthsQueryDTO;
+import com.rshy.project.hy.server.dto.QueryDTO;
+import com.rshy.project.hy.server.param.AgentApiParam;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/23 22:19
+ * @description: 核酸接口配置
+ */
+@Data
+@Accessors(chain = true)
+@Configuration
+@ConfigurationProperties(prefix = "itfw.pcths")
+public class PcthsProperties extends AgentApiParam {
+    private PcthsHeaderProperties header;
+
+    private PcthsQueryDTO query;
+}

+ 19 - 0
src/main/java/com/rshy/project/hy/config/properties/PctymHeaderProperties.java

@@ -0,0 +1,19 @@
+package com.rshy.project.hy.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/23 22:22
+ * @description:
+ */
+@Configuration
+@Data
+@ConfigurationProperties(prefix = "itfw.pctym.header")
+public class PctymHeaderProperties {
+    private String APP_KEY;
+
+    private String APP_SECRET;
+}

+ 23 - 0
src/main/java/com/rshy/project/hy/config/properties/PctymProperties.java

@@ -0,0 +1,23 @@
+package com.rshy.project.hy.config.properties;
+
+import com.rshy.project.hy.server.dto.PctymBodyDTO;
+import com.rshy.project.hy.server.param.AgentApiParam;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/23 22:19
+ * @description: 浙江省疫苗注册数据服务接口配置
+ */
+@Data
+@Accessors(chain = true)
+@Configuration
+@ConfigurationProperties(prefix = "itfw.pctym")
+public class PctymProperties extends AgentApiParam {
+    private PctymHeaderProperties header;
+
+    private PctymBodyDTO body;
+}

+ 75 - 36
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -11,16 +11,11 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.rshy.project.hy.manager.RshyJkManager;
 import com.rshy.project.hy.model.constant.ItfwConstant;
-import com.rshy.project.hy.model.enums.HyTypeEnum;
-import com.rshy.project.hy.model.enums.PassStatusEnum;
-import com.rshy.project.hy.model.enums.RepositoryEnum;
-import com.rshy.project.hy.model.enums.SexEnum;
+import com.rshy.project.hy.model.dto.NucleicAcidDTO;
+import com.rshy.project.hy.model.enums.*;
 import com.rshy.project.hy.server.FaceRetrievaServer;
 import com.rshy.project.hy.server.ItfwServer;
-import com.rshy.project.hy.server.dto.PctjkmInfoDTO;
-import com.rshy.project.hy.server.dto.PctrchlDTO;
-import com.rshy.project.hy.server.dto.RepositoryDTO;
-import com.rshy.project.hy.server.dto.ResultDTO;
+import com.rshy.project.hy.server.dto.*;
 import com.rshy.project.hy.server.param.RshyParam;
 import com.rshy.project.hy.server.param.RshyQuickParam;
 import com.rshy.project.hy.server.vo.RetrievaResultVO;
@@ -62,9 +57,10 @@ public class RshyJkManagerImpl implements RshyJkManager {
         log.info("普通核验接口请求参数:{}", JSON.toJSONString(rshyParam));
         RshyVo rshyVo = new RshyVo();
         ResultDTO resultDTO = new ResultDTO();
+        DateTime beginDate = DateTime.now();
+        PctjkmInfoDTO barCodes = null;
+
         if (StringUtils.isNotBlank(rshyParam.getBarCode()) || StringUtils.isNotBlank(rshyParam.getSfzh())) {
-            DateTime beginDate = DateTime.now();
-            PctjkmInfoDTO barCodes = null;
             try {
                 //查询健康码信息
                 barCodes = itfwServer.getPctjkm(rshyParam.getBarCode(), rshyParam.getSfzh(), rshyParam.getTimeout());
@@ -82,31 +78,35 @@ public class RshyJkManagerImpl implements RshyJkManager {
             String codeLabel = barCodes.getCOLOR_CODE_LABEL();
             String phone = barCodes.getPn();
             rshyVo.setXm(rshyParam.getXm()).setSfzh(rshyParam.getSfzh()).setHealthCode(codeLabel).setPhone(phone);
-
-            if (PassStatusEnum.RED_CODE.getDesc().equalsIgnoreCase(barCodes.getCOLOR_CODE_LABEL())) {
-                rshyVo.setPass(PassStatusEnum.RED_CODE.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.RED_CODE.getDesc()).setDisplayMsg(PassStatusEnum.RED_CODE.getDesc()).setWarning(PassStatusEnum.RED_CODE.getDesc()).setKind("健康码" + PassStatusEnum.RED_CODE.getDesc());
-                return rshyVo;
-            } 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());
-            }
-            rshyParam.setTimeout((int) (rshyParam.getTimeout() - DateUtil.between(beginDate, DateTime.now(), DateUnit.MS)));
         }
 
-        List<Runnable> taskList = new ArrayList<Runnable>() {
-            {
-                add(() -> resultDTO.setPctdfkDTO(itfwServer.getPctdfk(rshyParam.getSfzh(), "", rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctjsryDTO(itfwServer.getPctjsry(rshyParam.getSfzh(), rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctztDTO(itfwServer.getPctzt(rshyParam.getSfzh(), rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctzfbaDTO(itfwServer.getPctzfba(rshyParam.getSfzh(), rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctqkryDTO(itfwServer.getPctqkry(rshyParam.getSfzh(), rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctxdryDTO(itfwServer.getPctxdry(rshyParam.getSfzh(), "", rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctzdryDTO(itfwServer.getPctzdry(rshyParam.getSfzh(), rshyParam.getTimeout())));
-                add(() -> resultDTO.setPctrchlDTO(itfwServer.getPctrchl(rshyParam.getSfzh(), rshyParam.getTimeout())));
-            }
-        };
+        rshyParam.setTimeout((int) (rshyParam.getTimeout() - DateUtil.between(beginDate, DateTime.now(), DateUnit.MS)));
+
+        List<Runnable> taskList = null;
+        if(barCodes == null || PassStatusEnum.GREEN_CODE.getDesc().equals(barCodes.getCOLOR_CODE_LABEL())) {
+            taskList = new ArrayList<Runnable>() {
+                {
+                    add(() -> resultDTO.setPctdfkDTO(itfwServer.getPctdfk(rshyParam.getSfzh(), "", rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctjsryDTO(itfwServer.getPctjsry(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctztDTO(itfwServer.getPctzt(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctzfbaDTO(itfwServer.getPctzfba(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctqkryDTO(itfwServer.getPctqkry(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctxdryDTO(itfwServer.getPctxdry(rshyParam.getSfzh(), "", rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctzdryDTO(itfwServer.getPctzdry(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctrchlDTO(itfwServer.getPctrchl(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPctymDataDTOS(itfwServer.getPctym(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPcthsResultDTO(itfwServer.getPcths(rshyParam.getSfzh(), rshyParam.getTimeout())));
+
+                }
+            };
+        }else{
+            taskList = new ArrayList<Runnable>() {
+                {
+                    add(() -> resultDTO.setPctymDataDTOS(itfwServer.getPctym(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                    add(() -> resultDTO.setPcthsResultDTO(itfwServer.getPcths(rshyParam.getSfzh(), rshyParam.getTimeout())));
+                }
+            };
+        }
 
         //异步流并发处理
         taskList.parallelStream().forEach(v -> {
@@ -119,11 +119,13 @@ public class RshyJkManagerImpl implements RshyJkManager {
         });
 
         log.info("IT服务平台接口调用完成");
-        rshyVo.setXm(rshyParam.getXm()).setSfzh(rshyParam.getSfzh()).setTimes(times(rshyParam.getSfzh()));
+        rshyVo.setXm(rshyParam.getXm()).setSfzh(rshyParam.getSfzh()).setTimes(times(rshyParam.getSfzh())).setVaccine(CollectionUtil.isEmpty(resultDTO.getPctymDataDTOS()) ? null : resultDTO.getPctymDataDTOS().size()).setTravel_card(0);
+        //核酸报告
+        rshyVo.setNucleic_acid(nucleicAcid(resultDTO.getPcthsResultDTO()));
         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"));
-
+        rshyVo.setTts(barCodes != null ? barCodes.getCOLOR_CODE_LABEL() : null);
         PctrchlDTO pctrchlDTO = resultDTO.getPctrchlDTO();
         resultDTO.setPctrchlDTO(null);
         String hcjg = "";
@@ -131,13 +133,18 @@ public class RshyJkManagerImpl implements RshyJkManager {
             hcjg = pctrchlDTO.getHcjg();
         }
 
-        if (resultDTO.getPctztDTO() != null || StrUtil.containsAnyIgnoreCase(hcjg, "抓捕")) {
+        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.getDesc()).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.getDesc()).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.getDesc()).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());
         } else {
             rshyVo.setPass(PassStatusEnum.RIGHT_WAY.getCode()).setKind(kind(resultDTO)).setWarning(warning(resultDTO)).setDisplayMsg(PassStatusEnum.RIGHT_WAY.getDesc()).setTts(PassStatusEnum.RIGHT_WAY.getDesc());
         }
+
         if (rshyVo.getHealthCode() != null) {
             rshyVo.setTts(rshyVo.getHealthCode());
         }
@@ -146,6 +153,38 @@ public class RshyJkManagerImpl implements RshyJkManager {
         return rshyVo;
     }
 
+    private NucleicAcidDTO nucleicAcid(PcthsResultDTO pcthsResultDTO){
+        NucleicAcidDTO nucleicAcidDTO = new NucleicAcidDTO();
+        if(pcthsResultDTO == null){
+            nucleicAcidDTO.setStatus(NucleicAcidEnum.NOT_CONFORM.getCode()).setResults("48h内未采集");
+            return nucleicAcidDTO;
+        }
+
+        if(pcthsResultDTO.getSHE_RQSJ() != null){
+            DateTime parse = DateUtil.parse(String.valueOf(Integer.valueOf(pcthsResultDTO.getSHE_RQSJ()) * 1000));
+            long betweenMs = DateUtil.betweenMs(parse, DateUtil.date());
+            //48h防疫规则
+            if(betweenMs > 48 * 60 * 60 * 1000){
+                nucleicAcidDTO.setStatus(NucleicAcidEnum.NOT_CONFORM.getCode()).setResults(new StringBuilder("48小时之外已出结果,结果").append(pcthsResultDTO.getJGU_MC()).toString()).setTime(DateUtil.format(parse, "MM-dd HH:mm"));
+                return nucleicAcidDTO;
+            }
+
+            nucleicAcidDTO.setStatus(NucleicAcidEnum.CONFORM.getCode()).setResults(new StringBuilder("48小时之内已出结果,结果").append(pcthsResultDTO.getJGU_MC()).toString()).setTime(DateUtil.format(parse, "MM-dd HH:mm"));
+            return nucleicAcidDTO;
+        }
+
+        DateTime parse = DateUtil.parse(String.valueOf(Integer.valueOf(pcthsResultDTO.getCJSJ()) * 1000));
+        long betweenMs = DateUtil.betweenMs(parse, DateUtil.date());
+        //48h防疫规则
+        if(betweenMs > 48 * 60 * 60 * 1000){
+            nucleicAcidDTO.setStatus(NucleicAcidEnum.NOT_CONFORM.getCode()).setResults("48小时之外未出结果");
+            return nucleicAcidDTO;
+        }
+
+        nucleicAcidDTO.setStatus(NucleicAcidEnum.CONFORM.getCode()).setResults("48小时之内未出结果");
+        return nucleicAcidDTO;
+    }
+
     @Override
     public RshyVo getQuickRyhyInfo(RshyQuickParam rshyQuickParam) {
         RshyVo rshyVo = new RshyVo();

+ 13 - 0
src/main/java/com/rshy/project/hy/model/constant/ItfwConstant.java

@@ -74,4 +74,17 @@ public class ItfwConstant {
     public static final String PCTRCHL_KEY = "itfw:pctrchl";
 
     public static final String PCTRCHL_STATUS_KEY = "itfw:pctrchl:status";
+
+    /**
+     * 浙江省疫苗注射数据
+     */
+    public static final String PCTYM_KEY = "itfw:pctym";
+
+    public static final String PCTYM_STATUS_KEY = "itfw:pctym:status";
+
+    /**
+     * 核酸接口
+     */
+    public static final String PCTHS_KEY = "itfw:pcths";
+    public static final String PCTHS_STATUS_KEY = "itfw:pcths:status";
 }

+ 23 - 0
src/main/java/com/rshy/project/hy/model/dto/NucleicAcidDTO.java

@@ -0,0 +1,23 @@
+package com.rshy.project.hy.model.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 14:06
+ * @description:
+ */
+@Data
+@Accessors(chain = true)
+public class NucleicAcidDTO {
+    @ApiModelProperty("核酸报告结果描述")
+    private String results;
+
+    @ApiModelProperty("核酸报告时间 格式 MM-dd HH:mm")
+    private String time;
+
+    @ApiModelProperty("状态,是否符合当前防疫政策 1 符合 0 不符合")
+    private Integer status;
+}

+ 20 - 0
src/main/java/com/rshy/project/hy/model/enums/NucleicAcidEnum.java

@@ -0,0 +1,20 @@
+package com.rshy.project.hy.model.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 16:04
+ * @description:
+ */
+@Getter
+@AllArgsConstructor
+public enum NucleicAcidEnum {
+    CONFORM(1, "符合"),
+    NOT_CONFORM(0, "不符合");
+
+    private Integer code;
+
+    private String desc;
+}

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

@@ -15,7 +15,8 @@ public enum PassStatusEnum {
     RIGHT_WAY(1, "核验通过"),
     NORMAL_TRAFFIC(2, "核验通过"),
     RED_CODE(0, "红码"),
-    YELLOW_CODE(1, "黄码");
+    YELLOW_CODE(1, "黄码"),
+    GREEN_CODE(2, "绿码");;
 
     private Integer code;
 

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

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
@@ -52,6 +53,10 @@ public class ItfwServer {
     @Autowired
     private PctrchlProperties pctrchlProperties;
     @Autowired
+    private PctymProperties pctymProperties;
+    @Autowired
+    private PcthsProperties pcthsProperties;
+    @Autowired
     private StringRedisTemplate stringRedisTemplate;
 
     /**
@@ -619,4 +624,125 @@ public class ItfwServer {
         return pctrchlDTO;
     }
 
+    /**
+     * 浙江省疫苗注射数据服务
+     *
+     * @param idNumber
+     * @param timeout
+     */
+    public List<PctymDataDTO> getPctym(String idNumber, Integer timeout) {
+        if (StringUtils.isBlank(idNumber)) {
+            return null;
+        }
+
+        String cacheKey = idNumber + ':' + ItfwConstant.PCTYM_KEY;
+        String cacheValue = stringRedisTemplate.opsForValue().get(cacheKey);
+        if (StrUtil.isNotEmpty(cacheValue)) {
+            log.info("浙江省疫苗注射数据服务走缓存读取,响应内容: {}", cacheValue);
+            return JSON.parseArray(cacheValue, PctymDataDTO.class);
+        }
+
+        String cacheStatusKey = ItfwConstant.PCTYM_STATUS_KEY;
+        String cacheStatusValue = stringRedisTemplate.opsForValue().get(cacheStatusKey);
+        if (StrUtil.isNotEmpty(cacheStatusValue)) {
+            return null;
+        }
+
+        PctymProperties properties = new PctymProperties();
+        BeanUtil.copyProperties(pctymProperties, properties);
+        properties.setBody(new PctymBodyDTO().setIdcardNo(idNumber));
+        log.info("浙江省疫苗注射数据服务请求入参:{}", JSON.toJSONString(properties));
+        String body = null;
+
+        try {
+            body = this.baseAgentApi(properties, timeout);
+        } catch (Exception e) {
+            if (times(cacheStatusKey) > WebConstant.TIMEOUT_TIMES) {
+                stringRedisTemplate.opsForValue().set(cacheStatusKey, cacheStatusKey, WebConstant.STATUS_TIMEOUT, TimeUnit.MINUTES);
+            }
+
+            log.error("浙江省疫苗注射数据服务接口异常:{}", e.getMessage());
+            e.printStackTrace();
+            return null;
+        }
+
+        log.info("浙江省疫苗注射数据服务响应信息:{}", body);
+        Set<String> keys = stringRedisTemplate.keys(cacheStatusKey + "*");
+        stringRedisTemplate.delete(keys);
+
+        if (StrUtil.isEmpty(body) || !StrUtil.containsAnyIgnoreCase(body, "datas")) {
+            return null;
+        }
+        PctymVO pctymVO = JSON.parseObject(body, PctymVO.class);
+        if (null == pctymVO.getDatas() || CollectionUtil.isEmpty(pctymVO.getDatas().getData())) {
+            stringRedisTemplate.opsForValue().set(cacheKey, JSON.toJSONString(null), DateUtil.endOfDay(DateUtil.date()).getTime() - DateUtil.date().getTime(), TimeUnit.MILLISECONDS);
+            return null;
+        }
+
+        List<PctymDataDTO> dtoList = pctymVO.getDatas().getData();
+        stringRedisTemplate.opsForValue().set(cacheKey, JSON.toJSONString(dtoList), DateUtil.endOfDay(DateUtil.date()).getTime() - DateUtil.date().getTime(), TimeUnit.MILLISECONDS);
+        return dtoList;
+    }
+
+
+    /**
+     * 核酸接口数据服务
+     *
+     * @param idNumber
+     * @param timeout
+     */
+    public PcthsResultDTO getPcths(String idNumber, Integer timeout) {
+        if (StringUtils.isBlank(idNumber)) {
+            return null;
+        }
+
+        String cacheKey = idNumber + ':' + ItfwConstant.PCTHS_KEY;
+        String cacheValue = stringRedisTemplate.opsForValue().get(cacheKey);
+        if (StrUtil.isNotEmpty(cacheValue)) {
+            log.info("核酸接口数据服务走缓存读取,响应内容: {}", cacheValue);
+            return JSON.parseObject(cacheValue, PcthsResultDTO.class);
+        }
+
+        String cacheStatusKey = ItfwConstant.PCTHS_STATUS_KEY;
+        String cacheStatusValue = stringRedisTemplate.opsForValue().get(cacheStatusKey);
+        if (StrUtil.isNotEmpty(cacheStatusValue)) {
+            return null;
+        }
+
+        PcthsProperties properties = new PcthsProperties();
+        BeanUtil.copyProperties(pcthsProperties, properties);
+        properties.setQuery(new PcthsQueryDTO().setZjhm(idNumber));
+        log.info("核酸接口数据服务请求入参:{}", JSON.toJSONString(properties));
+        String body = null;
+
+        try {
+            body = this.baseAgentApi(properties, timeout);
+        } catch (Exception e) {
+            if (times(cacheStatusKey) > WebConstant.TIMEOUT_TIMES) {
+                stringRedisTemplate.opsForValue().set(cacheStatusKey, cacheStatusKey, WebConstant.STATUS_TIMEOUT, TimeUnit.MINUTES);
+            }
+
+            log.error("核酸接口数据服务接口异常:{}", e.getMessage());
+            e.printStackTrace();
+            return null;
+        }
+
+        log.info("核酸接口数据服务响应信息:{}", body);
+        Set<String> keys = stringRedisTemplate.keys(cacheStatusKey + "*");
+        stringRedisTemplate.delete(keys);
+
+        if (StrUtil.isEmpty(body) || !StrUtil.containsAnyIgnoreCase(body, "datas")) {
+            return null;
+        }
+        PcthsVO pcthsVO = JSON.parseObject(body, PcthsVO.class);
+        if (CollectionUtil.isEmpty(pcthsVO.getData().getResult())) {
+            stringRedisTemplate.opsForValue().set(cacheKey, JSON.toJSONString(null), DateUtil.endOfDay(DateUtil.date()).getTime() - DateUtil.date().getTime(), TimeUnit.MILLISECONDS);
+            return null;
+        }
+
+        PcthsResultDTO pcthsResultDTO = pcthsVO.getData().getResult().stream().findFirst().get();
+        stringRedisTemplate.opsForValue().set(cacheKey, JSON.toJSONString(pcthsResultDTO), DateUtil.endOfDay(DateUtil.date()).getTime() - DateUtil.date().getTime(), TimeUnit.MILLISECONDS);
+        return pcthsResultDTO;
+    }
+
 }

+ 15 - 0
src/main/java/com/rshy/project/hy/server/dto/PcthsDTO.java

@@ -0,0 +1,15 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 13:13
+ * @description:
+ */
+@Data
+public class PcthsDTO {
+    private List<PcthsResultDTO> result;
+}

+ 22 - 0
src/main/java/com/rshy/project/hy/server/dto/PcthsQueryDTO.java

@@ -0,0 +1,22 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/23 23:07
+ * @description:
+ */
+@Data
+@Accessors(chain = true)
+public class PcthsQueryDTO {
+    /**
+     * 身份证号码
+     */
+    private String zjhm;
+
+    private Integer offSet = 0;
+
+    private Integer rowCount = 10;
+}

+ 38 - 0
src/main/java/com/rshy/project/hy/server/dto/PcthsResultDTO.java

@@ -0,0 +1,38 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 13:14
+ * @description:
+ */
+@Data
+public class PcthsResultDTO {
+    private String FHXTSJWYBSID;
+    private String SHE_RQSJ;
+    private String SJMGJBBM;
+    private String CYZJDM;
+    private String SJCJLYBM;
+    private String SJCJLYXTBZ;
+    private String XWBQBS;
+    private String SJC;
+    private String YL_JJIN_DM;
+    private String YAB_CJSJ;
+    private String YSXTJRZJ;
+    private String CYZJMC;
+    private String XXSC_PDBZ;
+    private String SJCJLYXT;
+    private String ZJHM;
+    private String CJSJ;
+    private String SJCJLYD;
+    private String GXSJ;
+    private String JGU_MC;
+    private String SJKHSBSF;
+    private String JY_YIY_MC;
+    private String GMSFHM;
+    private String XM;
+    private String YWBQBS;
+    private String PIC_ID;
+    private String SJCJLYBM1;
+}

+ 18 - 0
src/main/java/com/rshy/project/hy/server/dto/PctymBodyDTO.java

@@ -0,0 +1,18 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 11:14
+ * @description:
+ */
+@Data
+@Accessors(chain = true)
+public class PctymBodyDTO {
+    /**
+     * 身份证号
+     */
+    private String idcardNo;
+}

+ 15 - 0
src/main/java/com/rshy/project/hy/server/dto/PctymDTO.java

@@ -0,0 +1,15 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 11:23
+ * @description:
+ */
+@Data
+public class PctymDTO {
+    private List<PctymDataDTO> data;
+}

+ 47 - 0
src/main/java/com/rshy/project/hy/server/dto/PctymDataDTO.java

@@ -0,0 +1,47 @@
+package com.rshy.project.hy.server.dto;
+
+import lombok.Data;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 11:34
+ * @description:
+ */
+@Data
+public class PctymDataDTO {
+    private String vaccinationUnit;
+
+    private String vaccinationTypeName;
+
+    private String vaccineProducer;
+
+    private String vacNameCode;
+
+    private String maxInoculationTime;
+
+    private String genderCode;
+
+    private String mobilePhone;
+
+    private String vaccinationType;
+
+    private String residentialAddress;
+
+    private String recipientName;
+
+    private String vaccinationTime;
+
+    private String vaccinationDateTime;
+
+    private String recipientIdNumber;
+
+    private String vaccineBatch;
+
+    private String vacName;
+
+    private String vaccineProducerName;
+
+    private String idTypeCode;
+
+    private String vaccinationUnitName;
+}

+ 6 - 0
src/main/java/com/rshy/project/hy/server/dto/ResultDTO.java

@@ -2,6 +2,8 @@ package com.rshy.project.hy.server.dto;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @author: lileilei
  * @date: 2022/4/24 04:30
@@ -26,4 +28,8 @@ public class ResultDTO {
     private PctztDTO pctztDTO;
 
     private PctrchlDTO pctrchlDTO;
+
+    private List<PctymDataDTO> pctymDataDTOS;
+
+    private PcthsResultDTO pcthsResultDTO;
 }

+ 18 - 0
src/main/java/com/rshy/project/hy/server/vo/PcthsVO.java

@@ -0,0 +1,18 @@
+package com.rshy.project.hy.server.vo;
+
+import com.rshy.project.hy.server.dto.PcthsDTO;
+import lombok.Data;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 13:10
+ * @description:
+ */
+@Data
+public class PcthsVO {
+    private String msg;
+
+    private Integer code;
+
+    private PcthsDTO data;
+}

+ 20 - 0
src/main/java/com/rshy/project/hy/server/vo/PctymVO.java

@@ -0,0 +1,20 @@
+package com.rshy.project.hy.server.vo;
+
+import com.rshy.project.hy.server.dto.PctymDTO;
+import lombok.Data;
+
+/**
+ * @author: lileilei
+ * @date: 2022/4/30 11:28
+ * @description:
+ */
+@Data
+public class PctymVO {
+    private String msg;
+
+    private String code;
+
+    private String data;
+
+    private PctymDTO datas;
+}

+ 10 - 0
src/main/java/com/rshy/project/hy/server/vo/RshyVo.java

@@ -1,5 +1,6 @@
 package com.rshy.project.hy.server.vo;
 
+import com.rshy.project.hy.model.dto.NucleicAcidDTO;
 import com.rshy.project.hy.model.enums.PassStatusEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -67,4 +68,13 @@ public class RshyVo {
     @ApiModelProperty("次数")
     private Integer times;
 
+    @ApiModelProperty("疫苗,多少针")
+    private Integer vaccine;
+
+    @ApiModelProperty("核酸报告")
+    private NucleicAcidDTO nucleic_acid;
+
+    @ApiModelProperty("0 未到过中高风险地区,1 到过中高风险地区")
+    private Integer travel_card;
+
 }

+ 18 - 0
src/main/resources/application-dev.yml

@@ -84,6 +84,24 @@ itfw:
     apiPath: /code014/archivesapi/examine/externalIntelligenceCenterExamine
     apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,03719cc7f2fd49578e7b5ded284fdc7a.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTP
     method: POST_BODY
+  #疫苗注册服务
+  pctym:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pctym
+    apiPath: /1647590773712
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: POST_BODY
+  #核酸服务
+  pcths:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pcths
+    apiPath: /1642499133568
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: GET
 
 #依图人脸检索第三方服务
 face:

+ 18 - 0
src/main/resources/application-local.yml

@@ -80,6 +80,24 @@ itfw:
     apiPath: /code014/archivesapi/examine/externalIntelligenceCenterExamine
     apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,03719cc7f2fd49578e7b5ded284fdc7a.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTP
     method: POST_BODY
+  #疫苗注册服务
+  pctym:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pctym
+    apiPath: /1647590773712
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: POST_BODY
+  #核酸服务
+  pcths:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pcths
+    apiPath: /1642499133568
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: GET
 
 #依图人脸检索第三方服务
 face:

+ 18 - 0
src/main/resources/application-prod.yml

@@ -84,6 +84,24 @@ itfw:
     apiPath: /code014/archivesapi/examine/externalIntelligenceCenterExamine
     apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,03719cc7f2fd49578e7b5ded284fdc7a.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTP
     method: POST_BODY
+  #疫苗注册服务
+  pctym:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pctym
+    apiPath: /1647590773712
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: POST_BODY
+  #核酸服务
+  pcths:
+    header:
+      APP_KEY: 1618208939768204
+      APP_SECRET: 9d98c9d9d14d4d298f4408c0338c1af5
+    appCode: pcths
+    apiPath: /1642499133568
+    apiConfig: 1618208939768204,9d98c9d9d14d4d298f4408c0338c1af5,5cf7f9ec93964f8a86e1a819dbb54c5b.apigateway.cn-deqing-zjzfy01-zjga01.hzs.zj,HTTPS
+    method: GET
 
 #依图人脸检索第三方服务
 face: