|
@@ -61,7 +61,9 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
@Async("hstTaskExecutor")
|
|
|
public Future<RshyVo> getRshyInfo(RshyParam rshyParam) {
|
|
|
// timeout 转成毫秒
|
|
|
- rshyParam.setTimeout(rshyParam.getTimeout() * 1000 - 800);
|
|
|
+ rshyParam.setTimeout(rshyParam.getTimeout() * 1000);
|
|
|
+ //健康码最多只能用timeout入参-2秒,不然其他的接口不够
|
|
|
+ int jkmTimeout = rshyParam.getTimeout() - 2000;
|
|
|
RshyVo rshyVo = new RshyVo();
|
|
|
PctgkryDTO gkryDTO = new PctgkryDTO();
|
|
|
ResultDTO resultDTO = new ResultDTO();
|
|
@@ -72,21 +74,21 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
if (StringUtils.isNotBlank(rshyParam.getBarCode()) || StringUtils.isNotBlank(rshyParam.getSfzh())) {
|
|
|
try {
|
|
|
//查询健康码信息
|
|
|
- jkmInfo = itfwServer.getPctjkm(rshyParam.getBarCode(), rshyParam.getSfzh(), rshyParam.getTimeout());
|
|
|
+ jkmInfo = itfwServer.getPctjkm(rshyParam.getBarCode(), rshyParam.getSfzh(), jkmTimeout);
|
|
|
} catch (Exception e) {
|
|
|
log.error("查询健康码信息异常:{}", e.getMessage());
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
if (jkmInfo == null) {
|
|
|
- return new AsyncResult<>(rshyVo.setPassStatus(PassStatusEnum.NO_CODE).setSfzh(rshyParam.getSfzh()).setXm(rshyParam.getXm())
|
|
|
+ return new AsyncResult<>(rshyVo.setPassStatus(PassStatusEnum.NO_CODE).setSfzh(rshyParam.getSfzh()).setXm(rshyParam.getXm()).setWarning(PassStatusEnum.NO_CODE.getDesc())
|
|
|
.setNucleic_acid(new NucleicAcidDTO().setStatus(NucleicAcidEnum.NO_DATA.getCode()).setResults(NucleicAcidEnum.NO_DATA.getDesc())));
|
|
|
}
|
|
|
|
|
|
rshyParam.setSfzh(jkmInfo.getId_num());
|
|
|
rshyVo.setSfzh(jkmInfo.getId_num()).setXm(jkmInfo.getUser_name()).setHealthCode(jkmInfo.getColor_code_label()).setPhone(jkmInfo.getPn());
|
|
|
|
|
|
- rshyParam.setTimeout((int) (rshyParam.getTimeout() - DateUtil.between(beginDate, DateTime.now(), DateUnit.MS)));
|
|
|
+ rshyParam.setTimeout(rshyParam.getTimeout() - (int) DateUtil.between(beginDate, DateTime.now(), DateUnit.MS) - 1000);
|
|
|
|
|
|
AtomicReference<RshyVo> quickRshyVo = new AtomicReference<>(new RshyVo());
|
|
|
List<Runnable> taskList = new ArrayList<Runnable>() {
|
|
@@ -169,7 +171,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
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());
|
|
|
+ rshyVo.setPassStatus(PassStatusEnum.YELLOW_CODE).setKind("健康码" + PassStatusEnum.YELLOW_CODE.getDesc()).setWarning(PassStatusEnum.YELLOW_CODE.getDesc());
|
|
|
} else if (resultDTO.getPctgkryDTO().getPctztDTO() != null || StrUtil.containsAnyIgnoreCase(hcjg, "抓捕") || StrUtil.containsAnyIgnoreCase(hcjg, "拦截")) {
|
|
|
//在逃 或者 人车核录接口返回 抓捕或者拦截
|
|
|
rshyVo.setPassStatus(PassStatusEnum.NO_PASSING).setKind(kind(resultDTO)).setWarning(warning(resultDTO));//.setWarning("在逃人员:" + resultDTO.getPctgkryDTO().getPctztDTO().getJyaq()).setKind(resultDTO.getPctgkryDTO().getPctztDTO().getZtrylxmc());
|