Browse Source

增加 临时布控表

FanQun 2 years ago
parent
commit
3f730c5918

+ 13 - 0
src/main/java/com/rshy/project/hy/manager/impl/RshyJkManagerImpl.java

@@ -12,8 +12,10 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.rshy.project.hy.manager.RshyJkManager;
+import com.rshy.project.hy.mapper.ExecuteControlMapper;
 import com.rshy.project.hy.model.constant.ItfwConstant;
 import com.rshy.project.hy.model.dto.NucleicAcidDTO;
+import com.rshy.project.hy.model.entity.ExecuteControl;
 import com.rshy.project.hy.model.entity.Identity;
 import com.rshy.project.hy.model.enums.*;
 import com.rshy.project.hy.server.ItfwServer;
@@ -77,6 +79,9 @@ public class RshyJkManagerImpl implements RshyJkManager {
     @Resource
     private Environment environment;
 
+    @Resource
+    private ExecuteControlMapper controlMapper;
+
     @Override
     @Async("hstTaskExecutor")
     public Future<RshyVo> getRshyInfo(RshyParam rshyParam) {
@@ -172,6 +177,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
             taskList.add(() -> resultDTO.getPctgkryDTO().setPctzdryDTO(itfwServer.getPctzdry(rshyParam.getSfzh(), rshyParam.getTimeout())));
             taskList.add(() -> resultDTO.setPctrchlDTO(itfwServer.getPctrchl(rshyParam.getSfzh(), rshyParam.getLoginInfo(), rshyParam.getTimeout())));
             taskList.add(() -> resultDTO.setPctzdrydkResultDTO(itfwServer.getPctzdrydk(rshyParam.getSfzh(), rshyParam.getTimeout())));
+            taskList.add(() -> resultDTO.setExecuteControl(controlMapper.selectOne(new LambdaQueryWrapper<ExecuteControl>().eq(ExecuteControl::getIdNum, rshyParam.getSfzh()))));
         }
 
 
@@ -259,6 +265,9 @@ public class RshyJkManagerImpl implements RshyJkManager {
         } else if (resultDTO.getPctzdrydkResultDTO() != null && resultDTO.getPctzdrydkResultDTO().getTotal() > 0) {
             //杭州市重点人员底库查询接口
             rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(resultDTO.getPctzdrydkResultDTO().getData().get(0).getRyflList()[0]);
+        } else if (resultDTO.getExecuteControl() != null) {
+            //临控人员
+            rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(resultDTO.getExecuteControl().getCategory()).setWarning(resultDTO.getExecuteControl().getCategory());
         } else if (quickRshyVo.get() != null && StrUtil.isNotEmpty(quickRshyVo.get().getSfzh())) {
             //依图接口
             rshyVo.copySomeValues(quickRshyVo.get());
@@ -418,6 +427,7 @@ public class RshyJkManagerImpl implements RshyJkManager {
                 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())));
+                add(() -> resultDTO.setExecuteControl(controlMapper.selectOne(new LambdaQueryWrapper<ExecuteControl>().eq(ExecuteControl::getIdNum, rshyCommonParam.getSfzh()))));
             }
         };
 
@@ -450,6 +460,9 @@ public class RshyJkManagerImpl implements RshyJkManager {
         } else if (resultDTO.getPctzdrydkResultDTO() != null && resultDTO.getPctzdrydkResultDTO().getTotal() > 0) {
             //杭州市重点人员底库查询接口
             rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(resultDTO.getPctzdrydkResultDTO().getData().get(0).getRyflList()[0]);
+        } else if (resultDTO.getExecuteControl() != null) {
+            //临控人员
+            rshyVo.setPassStatus(PassStatusEnum.RIGHT_WAY).setKind(resultDTO.getExecuteControl().getCategory()).setWarning(resultDTO.getExecuteControl().getCategory());
         } else {
             //正常通过
             rshyVo.setPassStatus(PassStatusEnum.NORMAL_TRAFFIC);

+ 14 - 0
src/main/java/com/rshy/project/hy/mapper/ExecuteControlMapper.java

@@ -0,0 +1,14 @@
+package com.rshy.project.hy.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rshy.project.hy.model.entity.ExecuteControl;
+
+/**
+ * <p>
+ * 临时布控 Mapper 接口
+ * </p>
+ */
+public interface ExecuteControlMapper extends BaseMapper<ExecuteControl> {
+
+}

+ 46 - 0
src/main/java/com/rshy/project/hy/model/entity/ExecuteControl.java

@@ -0,0 +1,46 @@
+package com.rshy.project.hy.model.entity;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author fanqun
+ * @since 2022-06-21
+ */
+@Data
+@Accessors(chain = true)
+public class ExecuteControl implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 身份证号码
+     */
+    private String idNum;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 案件类别
+     */
+    private String category;
+
+
+    @Override
+    public String toString() {
+        return "ExecuteControl{" +
+                "idNum=" + idNum +
+                ", name=" + name +
+                ", category=" + category +
+                "}";
+    }
+}

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

@@ -1,5 +1,6 @@
 package com.rshy.project.hy.server.dto;
 
+import com.rshy.project.hy.model.entity.ExecuteControl;
 import lombok.Data;
 
 import java.util.List;
@@ -45,4 +46,7 @@ public class ResultDTO {
     private PctzdrydkResultDTO pctzdrydkResultDTO;
 
     private PctsfzResultDTO.SfzResult pctsfzResult;
+
+    //临时布控
+    private ExecuteControl executeControl;
 }

+ 2 - 2
src/main/java/com/rshy/project/hy/server/param/RshyCommonParam.java

@@ -8,14 +8,14 @@ import lombok.experimental.Accessors;
 
 /**
  * 常规盘查核验请求参数
- *
+ * <p>
  * Created by fanqun on 2022/6/20.
  */
 @Data
 @Accessors(chain = true)
 @ApiModel("常规盘查核验请求参数")
 public class RshyCommonParam {
-    @ApiModelProperty("身份证号")
+    @ApiModelProperty(value = "身份证号", required = true)
     private String sfzh;
 
     @ApiModelProperty("姓名")