|
@@ -85,7 +85,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
|
|
|
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())) {
|
|
|
+ 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())));
|
|
@@ -98,15 +98,17 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
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())));
|
|
|
- add(() -> resultDTO.setPersonIdentifyDTO(viidServer.personIdentify(rshyParam.getPhoto(), rshyParam.getTimeout())));
|
|
|
+ if (StrUtil.isNotBlank(rshyParam.getPhoto()))
|
|
|
+ add(() -> resultDTO.setPersonIdentifyDTO(viidServer.personIdentify(rshyParam.getPhoto(), rshyParam.getTimeout())));
|
|
|
}
|
|
|
};
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
taskList = new ArrayList<Runnable>() {
|
|
|
{
|
|
|
add(() -> resultDTO.setPctymDataDTOS(itfwServer.getPctym(rshyParam.getSfzh(), rshyParam.getTimeout())));
|
|
|
add(() -> resultDTO.setPcthsResultDTO(itfwServer.getPcths(rshyParam.getSfzh(), rshyParam.getTimeout())));
|
|
|
- add(() -> resultDTO.setPersonIdentifyDTO(viidServer.personIdentify(rshyParam.getPhoto(), rshyParam.getTimeout())));
|
|
|
+ if (StrUtil.isNotBlank(rshyParam.getPhoto()))
|
|
|
+ add(() -> resultDTO.setPersonIdentifyDTO(viidServer.personIdentify(rshyParam.getPhoto(), rshyParam.getTimeout())));
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -135,14 +137,14 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
hcjg = pctrchlDTO.getHcjg();
|
|
|
}
|
|
|
|
|
|
- if(resultDTO.getPersonIdentifyDTO() != null && !rshyParam.getSfzh().equals(resultDTO.getPersonIdentifyDTO().getIdNumber())){
|
|
|
- rshyVo.setPass(PassStatusEnum.NO_PASSING.getCode()).setTimes(times(rshyParam.getSfzh())).setTts(PassStatusEnum.NO_PASSING.getTts()).setDisplayMsg(PassStatusEnum.NO_PASSING.getDesc()).setWarning(PassStatusEnum.NO_PASSING.getDesc()).setKind("人证不一致");
|
|
|
+ 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(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("在逃人员:" + 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 {
|
|
@@ -157,18 +159,18 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
return rshyVo;
|
|
|
}
|
|
|
|
|
|
- private NucleicAcidDTO nucleicAcid(PcthsResultDTO pcthsResultDTO){
|
|
|
+ private NucleicAcidDTO nucleicAcid(PcthsResultDTO pcthsResultDTO) {
|
|
|
NucleicAcidDTO nucleicAcidDTO = new NucleicAcidDTO();
|
|
|
- if(pcthsResultDTO == null){
|
|
|
+ if (pcthsResultDTO == null) {
|
|
|
nucleicAcidDTO.setStatus(NucleicAcidEnum.NOT_CONFORM.getCode()).setResults("48h内未采集");
|
|
|
return nucleicAcidDTO;
|
|
|
}
|
|
|
|
|
|
- if(pcthsResultDTO.getSHE_RQSJ() != null){
|
|
|
+ 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){
|
|
|
+ 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;
|
|
|
}
|
|
@@ -180,7 +182,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
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){
|
|
|
+ if (betweenMs > 48 * 60 * 60 * 1000) {
|
|
|
nucleicAcidDTO.setStatus(NucleicAcidEnum.NOT_CONFORM.getCode()).setResults("48小时之外未出结果");
|
|
|
return nucleicAcidDTO;
|
|
|
}
|