|
@@ -20,6 +20,7 @@ import com.rshy.project.hy.server.ItfwServer;
|
|
|
import com.rshy.project.hy.server.VIIDServer;
|
|
|
import com.rshy.project.hy.server.YituFaceServer;
|
|
|
import com.rshy.project.hy.server.dto.*;
|
|
|
+import com.rshy.project.hy.server.param.RshyCommonParam;
|
|
|
import com.rshy.project.hy.server.param.RshyParam;
|
|
|
import com.rshy.project.hy.server.param.RshyQuickParam;
|
|
|
import com.rshy.project.hy.server.vo.RetrievaResultVO;
|
|
@@ -79,7 +80,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
@Override
|
|
|
@Async("hstTaskExecutor")
|
|
|
public Future<RshyVo> getRshyInfo(RshyParam rshyParam) {
|
|
|
- // timeout 转成毫秒 这里考虑到网络传输延时等原因,减去300ms
|
|
|
+ // timeout 转成毫秒 这里考虑到网络传输延时等原因,减去500ms
|
|
|
rshyParam.setTimeout((int) TimeUnit.MILLISECONDS.convert(rshyParam.getTimeout(), TimeUnit.SECONDS));
|
|
|
int jkmTimeout = rshyParam.getTimeout() - 500;
|
|
|
RshyVo rshyVo = new RshyVo();
|
|
@@ -395,6 +396,68 @@ public class RshyJkManagerImpl implements RshyJkManager {
|
|
|
return rshyVo;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public RshyVo getCommonRshy(RshyCommonParam rshyCommonParam) {
|
|
|
+ int timeout = rshyCommonParam.getTimeout() * 1000 - 100;
|
|
|
+ RshyVo rshyVo = new RshyVo();
|
|
|
+ PctgkryDTO gkryDTO = new PctgkryDTO();
|
|
|
+ ResultDTO resultDTO = new ResultDTO();
|
|
|
+ resultDTO.setPctgkryDTO(gkryDTO);
|
|
|
+
|
|
|
+ rshyVo.setSfzh(rshyCommonParam.getSfzh());
|
|
|
+ rshyVo.setXm(rshyCommonParam.getXm());
|
|
|
+
|
|
|
+ List<Runnable> taskList = new ArrayList<Runnable>() {
|
|
|
+ {
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctdfkDTO(itfwServer.getPctdfk(rshyCommonParam.getSfzh(), "", timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctjsryDTO(itfwServer.getPctjsry(rshyCommonParam.getSfzh(), timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctztDTO(itfwServer.getPctzt(rshyCommonParam.getSfzh(), timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctzfbaDTO(itfwServer.getPctzfba(rshyCommonParam.getSfzh(), timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctqkryDTO(itfwServer.getPctqkry(rshyCommonParam.getSfzh(), timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctxdryDTO(itfwServer.getPctxdry(rshyCommonParam.getSfzh(), "", timeout)));
|
|
|
+ add(() -> resultDTO.getPctgkryDTO().setPctzdryDTO(itfwServer.getPctzdry(rshyCommonParam.getSfzh(), timeout)));
|
|
|
+ add(() -> resultDTO.setPctrchlDTO(itfwServer.getPctrchl(rshyCommonParam.getSfzh(), null, timeout)));
|
|
|
+ add(() -> resultDTO.setPctzdrydkResultDTO(itfwServer.getPctzdrydk(rshyCommonParam.getSfzh(), rshyCommonParam.getTimeout())));
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ try {
|
|
|
+ log.info("{}个任务, 用时 {}毫秒", taskList.size(), startTaskAllInOnce(taskList, timeout + 100));
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ log.error("异常信息:{}", e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("IT服务平台接口调用完成");
|
|
|
+
|
|
|
+ //人车核录核查结果
|
|
|
+ String hcjg = resultDTO.getPctrchlDTO() == null ? "" : resultDTO.getPctrchlDTO().getHcjg();
|
|
|
+
|
|
|
+ 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 (!ObjectUtils.allFieldIsNULL(resultDTO.getPctgkryDTO()) || StrUtil.containsAnyIgnoreCase(hcjg, RchljgEnum.IN_DOUBT.getDesc())) {
|
|
|
+ //七大类管控人员和人车核录接口返回存疑人员
|
|
|
+ rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(kind(resultDTO)).setWarning(warning(resultDTO));
|
|
|
+ } else if (resultDTO.getPctzdrydkResultDTO() != null && resultDTO.getPctzdrydkResultDTO().getTotal() > 0) {
|
|
|
+ //杭州市重点人员底库查询接口
|
|
|
+ rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(resultDTO.getPctzdrydkResultDTO().getData().get(0).getRyflList()[0]);
|
|
|
+ } else {
|
|
|
+ //正常通过
|
|
|
+ rshyVo.setPassStatus(PassStatusEnum.NORMAL_TRAFFIC);
|
|
|
+ }
|
|
|
+
|
|
|
+ return rshyVo;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 依图接口
|
|
|
*
|