Explorar o código

核酸,来宜接口

LIVE_YE %!s(int64=3) %!d(string=hai) anos
pai
achega
8874e7f879

+ 1 - 0
boman-api/boman-domain/src/main/java/com/boman/domain/Czrk.java

@@ -316,4 +316,5 @@ public class Czrk extends BaseEntity{
 
     private String hzName;
     private String hzIdCard;
+
 }

+ 36 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/BirthRecordsController.java

@@ -0,0 +1,36 @@
+package com.boman.web.core.controller;
+
+import com.boman.common.core.web.controller.BaseController;
+import com.boman.domain.TableDataInfo;
+import com.boman.domain.ThirdPartInfo;
+import com.boman.web.core.domain.BirthRecords;
+import com.boman.web.core.service.birth.BirthRecordsService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/birthRecords")
+public class BirthRecordsController extends BaseController {
+
+    @Resource
+    BirthRecordsService service;
+
+
+    /**
+     * 查询新生儿人口导入信息
+     *
+     */
+    @GetMapping("/listDie")
+    public TableDataInfo listDie(BirthRecords birthRecords) {
+        List<BirthRecords> list = service.listDie(birthRecords);
+        return getDataTable(list);
+    }
+
+
+
+}

+ 65 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/CzrkController.java

@@ -262,4 +262,69 @@ public class CzrkController extends BaseController {
         return getDataTable(list);
     }
 
+    /***
+     * 删除导入的死亡人员(修改数据状态,逻辑删除)
+     * @param idCard
+     * @return AjaxResult
+     */
+    @GetMapping("/delecteDie")
+    public AjaxResult delecteDie(String idCard) {
+        return czrkService.delecteDie(idCard);
+    }
+
+    /***
+     * 批量删除导入的死亡人员
+     */
+    /*@GetMapping("/delecteDieList")
+    public AjaxResult delecteDieList(List<String> idCardList) {
+        return czrkService.delecteDie(idCard);
+    }*/
+
+    /**
+     * 匹配新生儿父亲或母亲信息
+     * @param id 新生儿信息id
+     * @param idCard 新生儿父亲或母亲身份证号码
+     * @return
+     */
+    @GetMapping("/findXsInfo")
+    public AjaxResult findXsInfo(String id,String idCard) {
+        return czrkService.findXsInfo(id,idCard);
+    }
+
+    /***
+     * 新增新生儿信息
+     */
+    @PostMapping("/addBabyCzrk")
+    public AjaxResult addBabyCzrk(@RequestBody Czrk czrk) {
+        return czrkService.addBabyCzrk(czrk);
+    }
+
+    /***
+     *  潜山核酸数据
+     * @param xzqh 区划
+     * @param djsjqs 开始时间
+     * @param djsjjs 结束时间
+     * @param name 姓名
+     * @param sfzhm 身份证号
+     * @return
+     */
+    @GetMapping("/nucleicAcid")
+    public AjaxResult nucleicAcid(String xzqh,String djsjqs, String djsjjs, String name, String sfzhm) {
+        return czrkService.nucleicAcid(xzqh,djsjqs,djsjjs,name,sfzhm);
+    }
+
+    /***
+     * 潜山来宜人员数据
+     * @param rc
+     * @param djsjqs
+     * @param djsjjs
+     * @param name
+     * @param sfzhm
+     * @return
+     */
+    @GetMapping("/toQianshan")
+    public AjaxResult toQianshan(String rc,String djsjqs, String djsjjs, String name, String sfzhm) {
+        return czrkService.toQianshan(rc,djsjqs,djsjjs,name,sfzhm);
+    }
+
 }

+ 5 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/TaskController.java

@@ -39,4 +39,9 @@ public class TaskController {
         taskService.execute();
     }
 
+    @GetMapping("/getNewborn")
+    private void getNewborn() {
+        //taskService.getNewborn();
+    }
+
 }

+ 58 - 0
boman-web-core/src/main/java/com/boman/web/core/domain/BirthRecords.java

@@ -0,0 +1,58 @@
+package com.boman.web.core.domain;
+
+
+import com.boman.domain.BaseEntity;
+import lombok.*;
+import org.springframework.data.annotation.Id;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
+public class BirthRecords extends BaseEntity {
+
+
+  private long id;
+  private String createBy;
+  private java.sql.Timestamp createTime;
+  private String updateBy;
+  private java.sql.Timestamp updateTime;
+  private String isDel;
+  private String remark;
+  private String csrq;
+  private String csyxzmbh;
+  private String fqmz;
+  private String csyxzmbb;
+  private String xsexbdm;
+  private String sfgwrs;
+  private String sfycsqx;
+  private String csjkzk;
+  private String cstz;
+  private String sfzjhm;
+  private String sfzjlx;
+  private String fqgj;
+  private String csdxz;
+  private String ycfjkzk;
+  private String mqmz;
+  private String xsexb;
+  private String fmfs;
+  private String mqsfzjlx;
+  private String mqxm;
+  private String mz;
+  private String cssc;
+  private String xsexm;
+  private String fqxm;
+  private String fqsfzjlx;
+  private String cstc;
+  private String csdxzqh;
+  private String mqgj;
+  private String csyxzmqfrq;
+  private String csyxzmqfjg;
+  private String fqsfzjhm;
+  private String csyljg;
+  private String mqsfzjhm;
+  private String csyz;
+  private long status;
+
+}

+ 17 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/BirthRecordsMapper.java

@@ -0,0 +1,17 @@
+package com.boman.web.core.mapper;
+
+import com.boman.web.core.domain.BirthRecords;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface BirthRecordsMapper {
+
+    void insertListBirthRecords(@Param("birthRecordsList")List<BirthRecords> birthRecordsList);
+
+    List<BirthRecords> queryList(BirthRecords birthRecords);
+
+    BirthRecords getBirthRecordsInfo(String id);
+
+    void updataBirthRecordsInfo(String idCard);
+}

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/ThirdPartInfoMapper.java

@@ -14,4 +14,6 @@ public interface ThirdPartInfoMapper {
     void insertThirdPartInfoList(@Param("thirdPartInfoList")List<ThirdPartInfo> thirdPartInfoList);
 
     List<ThirdPartInfo> queryList(ThirdPartInfo thirdPartInfo);
+
+    int delecteDie(String idCard);
 }

+ 32 - 157
boman-web-core/src/main/java/com/boman/web/core/service/TaskService.java

@@ -3,6 +3,7 @@ package com.boman.web.core.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+import com.alibaba.nacos.common.http.HttpUtils;
 import com.boman.common.core.utils.DateUtils;
 import com.boman.common.core.utils.StringUtils;
 import com.boman.common.core.utils.number.NumberUtils;
@@ -16,20 +17,25 @@ import com.boman.domain.SysUser;
 import com.boman.domain.dto.FormDataDto;
 import com.boman.system.api.RemoteDeptService;
 import com.boman.system.api.RemoteUserService;
+import com.boman.web.core.domain.BirthRecords;
 import com.boman.web.core.mapper.CzrkMapper;
 import com.boman.web.core.mapper.GridInfoMapper;
+import com.boman.web.core.service.birth.BirthRecordsService;
 import com.boman.web.core.service.common.ICommonService;
 import com.boman.web.core.service.czrk.CzrkServiceImpl;
 import com.boman.web.core.service.czrk.ICzrkJzdzService;
 import com.boman.web.core.service.ip.IpTimesService;
+import com.boman.web.core.utils.HttpClientUtils;
 import org.apache.commons.lang3.BooleanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.io.IOException;
 import java.sql.Timestamp;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
@@ -72,6 +78,9 @@ public class TaskService {
     @Resource
     private RemoteUserService remoteUserService;
 
+    @Resource
+    private BirthRecordsService birthRecordsService;
+
     @Resource
     private ICommonService commonService;
     private static final String tableName= "attendance_table";
@@ -530,163 +539,6 @@ public class TaskService {
 //        result.put("hjbfb", hjbfb);
     }
 
-    /*private void townSts(JSONObject result, SysDept sysDept, boolean percent) {
-        String startTime = DateUtils.getTodayStartStr();
-        String endTime = DateUtils.getTodayEndStr();
-        Timestamp s = Timestamp.valueOf(startTime);
-        Timestamp e = Timestamp.valueOf(endTime);
-
-
-        // 乡镇以下的所有部门
-        List<SysDept> depts = remoteDeptService.listChildrenDepts(deptId);
-        List<SysDept> cunDepts = new ArrayList<>(16);
-        for (SysDept dept : depts) {
-            if (isEmpty(dept.getParentId())) continue;
-            if (deptId.equals(dept.getParentId())) {
-                cunDepts.add(dept);
-            }
-        }
-        result.put("cun", isEmpty(cunDepts) ? 0 : cunDepts.size());
-
-        List<SysDept> zuDept = new ArrayList<>(16);
-        for (SysDept cunDept : cunDepts) {
-            for (SysDept dept : depts) {
-                if (cunDept.getId().equals(dept.getParentId())) {
-                    zuDept.add(dept);
-                }
-            }
-        }
-
-        result.put("zu", isEmpty(zuDept) ? 0 : zuDept.size());
-
-        *//** **//*
-        int zrs = 0; // 总人数
-        if (BooleanUtils.isTrue(percent)) {
-            zrs = czrkMapper.countAll();
-        }
-
-        List<Long> deptIdList = map(depts, SysDept::getAreaId);
-        //查询当前乡镇下的户籍总人数
-        List<Czrk> czrkList = czrkMapper.selectCzrkListByDeptId(deptIdList);
-        if(czrkList==null){
-            czrkList = new ArrayList<>();
-        }
-        //该镇户籍人口总数
-        int hjzrs = czrkList.size();
-
-        //该镇 户籍人口今日新增
-        int hjxz = 0;
-        //该镇 户籍人口今日减少
-        int hjjs = 0;
-
-        //循环所有人判断当前总人数,该镇 户籍人口今日新增,该镇 户籍人口今日减少
-        for (Czrk czrk : czrkList) {
-            if("Y".equals(czrk.getIsDel())){
-                hjzrs--;
-            }
-            //判断是否是在今天操作的人员信息
-            if(s.before(czrk.getCreateTime()) && czrk.getCreateTime().before(e)){
-                if("Y".equals(czrk.getIsDel())){
-                    hjjs++;
-                }else{
-                    hjxz++;
-                }
-            }
-        }
-        result.put("hjzrs", czrkList.size());
-        result.put("hjxz", hjxz);
-        result.put("hjjs", hjjs);
-        result.put("hjbfb", NumberUtils.percent(hjzrs, zrs));
-
-        *//*List<Long> deptIdList = map(depts, SysDept::getId);
-        int hjzrs = czrkMapper.countHj1(deptIdList); // 该镇户籍人口总数
-        result.put("hjzrs", hjzrs);
-        int hjxz = czrkMapper.countByHjXz1(startTime, endTime, deptIdList); // 该镇 户籍人口今日新增
-        result.put("hjxz", hjxz);
-        int hjjs = czrkMapper.countByHjJs1(startTime, endTime, deptIdList); // 该镇 户籍人口今日减少
-        result.put("hjjs", hjjs);
-        result.put("hjbfb", NumberUtils.percent(hjzrs, zrs));*//*
-
-
-        List<CzrkJzdz> czrkJzdzList = czrkJzdzService.selectCzrkJzdzListByDeptId(deptIdList);
-        if(czrkJzdzList==null){
-            czrkJzdzList = new ArrayList<>();
-        }
-        //该镇户籍人口总数
-        int czzrs = czrkJzdzList.size();
-
-        //该镇 户籍人口今日新增
-        int czxz = 0;
-        //该镇 户籍人口今日减少
-        int czjs = 0;
-
-        //循环所有人判断当前总人数,该镇 户籍人口今日新增,该镇 户籍人口今日减少
-        for (CzrkJzdz czrkJzdz : czrkJzdzList) {
-            if("Y".equals(czrkJzdz.getStatus())){
-                czzrs--;
-            }
-            //判断是否是在今天操作的人员信息
-            if(s.before(czrkJzdz.getCreateTime()) && czrkJzdz.getCreateTime().before(e)){
-                if("Y".equals(czrkJzdz.getStatus())){
-                    czjs++;
-                }else{
-                    czxz++;
-                }
-            }
-        }
-        result.put("czzrs", czzrs);
-        result.put("czxz", czxz);
-        result.put("czjs", czjs);
-        result.put("czbfb", NumberUtils.percent(czzrs, zrs));
-
-        *//*int czzrs = czrkMapper.countCz1(deptIdList);  // 该镇常住人口总数
-        result.put("czzrs", czzrs);
-        int czxz = czrkMapper.countByCzXz1(startTime, endTime, deptIdList); // 该镇 常住人口今日新增
-        int czjs = czrkMapper.countByCzJs1(startTime, endTime, deptIdList); // 该镇 常住人口今日减少
-        result.put("czxz", czxz);
-        result.put("czjs", czjs);
-        result.put("czbfb", NumberUtils.percent(czzrs, zrs));*//*
-
-        result.put("zhen", deptName);
-        *//** **//*
-
-
-        // 常住人口信息
-//        int type = 4; // 乡镇
-//        int czzrs = czrkMapper.countCzrk(type, areaId); // 常住人口
-//        result.put("czzrs", czzrs);
-//
-//        int zrs = 0;
-//        // 常住人口占总人口的百分比
-//        if (BooleanUtils.isTrue(percent)) {
-//             // 查全部
-//            zrs = czrkMapper.countCzrk(type, areaId);
-//            String czbfb = NumberUtils.percent(czzrs, zrs);
-//            result.put("czbfb", czbfb);
-//        }
-//
-////        type = 4;
-//        int czxz = czrkMapper.countByCzXz(startTime, endTime, type, areaId);
-//        int czjs = czrkMapper.countByCzJs(startTime, endTime, type, areaId);
-//        result.put("czxz", czxz);
-//        result.put("czjs", czjs);
-//
-//        result.put("zhen", deptName);
-//
-//        // 户籍人口信息
-//        int hjxz = czrkMapper.countByHjXz(startTime, endTime, type, areaId); // 新增
-//        int hjjs = czrkMapper.countByHjJs(startTime, endTime, type, areaId);// 减少
-//        result.put("hjxz", hjxz);
-//        result.put("hjjs", hjjs);
-//
-//        // 户籍总人数
-//        int hjzrs = czrkMapper.countHj(startTime, endTime, type, areaId);
-////                int hjzrs= isEmpty(hjzrsList) ? 0 : hjzrsList.size();
-//        result.put("hjzrs", hjzrs);
-//        String hjbfb = NumberUtils.percent(hjzrs, zrs);
-//        result.put("hjbfb", hjbfb);
-    }*/
-
     private void setIntoRedis(String key, Object result) {
         redisService.setCacheObject(key, result, 1L, TimeUnit.DAYS);
     }
@@ -694,4 +546,27 @@ public class TaskService {
     private String packRedisKey(String deptId) {
         return STS_CZRK_ + deptId + ":" + DateUtils.getDate();
     }
+
+    public void getNewborn(){
+        Map<String, String> paramMap = new HashMap<>();
+        paramMap.put("client_id","acdf50bd13be4901b64c62b1fee862c0");
+        paramMap.put("client_secret","a3650d67fc034b2d8ea259182b3d99f3");
+        String http = "http://172.27.189.244:9090/oauth/tocken";
+        try {
+            String data = HttpClientUtils.doGet(http,paramMap);
+
+            List<BirthRecords> birthRecordsList = JSONObject.parseArray(data,BirthRecords.class);
+            for (BirthRecords birthRecords : birthRecordsList) {
+                birthRecords.setIsDel("N");
+                birthRecords.setCreateBy("系统");
+                birthRecords.setUpdateBy("系统");
+                birthRecords.setStatus(1);
+            }
+            //批量保存
+            birthRecordsService.insertListBirthRecords(birthRecordsList);
+            System.out.println(data);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
 }

+ 12 - 0
boman-web-core/src/main/java/com/boman/web/core/service/birth/BirthRecordsService.java

@@ -0,0 +1,12 @@
+package com.boman.web.core.service.birth;
+
+import com.boman.web.core.domain.BirthRecords;
+
+import java.util.List;
+
+public interface BirthRecordsService {
+
+    void insertListBirthRecords(List<BirthRecords> birthRecordsList);
+
+    List<BirthRecords> listDie(BirthRecords birthRecords);
+}

+ 62 - 0
boman-web-core/src/main/java/com/boman/web/core/service/birth/BirthRecordsServiceImpl.java

@@ -0,0 +1,62 @@
+package com.boman.web.core.service.birth;
+
+import com.alibaba.fastjson.JSON;
+import com.boman.common.core.utils.DateUtils;
+import com.boman.common.core.utils.StringUtils;
+import com.boman.common.core.utils.sql.SqlUtil;
+import com.boman.common.core.web.page.PageDomain;
+import com.boman.common.core.web.page.TableSupport;
+import com.boman.domain.SysUser;
+import com.boman.domain.ThirdPartInfo;
+import com.boman.web.core.domain.BirthRecords;
+import com.boman.web.core.mapper.BirthRecordsMapper;
+import com.boman.web.core.service.czrk.CzrkServiceImpl;
+import com.boman.web.core.utils.AuthUtils;
+import com.github.pagehelper.PageHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+import static com.boman.web.core.utils.CzrkUtils.setQueryRoleDie;
+
+
+@Service
+@Slf4j
+public class BirthRecordsServiceImpl implements BirthRecordsService {
+
+    @Resource
+    BirthRecordsMapper birthRecordsMapper;
+
+
+    @Override
+    public void insertListBirthRecords(List<BirthRecords> birthRecordsList) {
+        birthRecordsMapper.insertListBirthRecords(birthRecordsList);
+    }
+
+    @Override
+    public List<BirthRecords> listDie(BirthRecords birthRecords) {
+        SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
+        log.info("{}于{}查询新生儿人员列表,查询条件:{}"
+                , sysUser.getUserName(), DateUtils.dateTimeNow(), JSON.toJSONString(birthRecords));
+        //设置权限
+        //setQueryRoleDie(thirdPartInfo, sysUser);
+        long startTimeSql = System.currentTimeMillis();
+        startPage();
+        List<BirthRecords> birthRecordsList = birthRecordsMapper.queryList(birthRecords);
+        long endTimeSql = System.currentTimeMillis() - startTimeSql;
+        log.info("执行新生儿人员sql语句时间:" + endTimeSql + "ms");
+        return birthRecordsList;
+    }
+
+    private void startPage() {
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+            PageHelper.startPage(pageNum, pageSize, orderBy);
+        }
+    }
+}

+ 151 - 7
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -22,13 +22,11 @@ import com.boman.domain.utils.ThreadPoolService;
 import com.boman.system.api.RemoteDeptService;
 import com.boman.system.api.RemoteDictDataService;
 import com.boman.system.api.model.LoginUser;
+import com.boman.web.core.domain.BirthRecords;
 import com.boman.web.core.domain.ConfirmInfoUser;
 import com.boman.web.core.domain.GridInfo;
 import com.boman.web.core.domain.JsonRequest;
-import com.boman.web.core.mapper.CzrkChangeMapper;
-import com.boman.web.core.mapper.CzrkMapper;
-import com.boman.web.core.mapper.GridInfoMapper;
-import com.boman.web.core.mapper.ThirdPartInfoMapper;
+import com.boman.web.core.mapper.*;
 import com.boman.web.core.service.ip.IpTimesService;
 import com.boman.web.core.utils.*;
 import com.github.pagehelper.PageHelper;
@@ -42,10 +40,13 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import javax.annotation.Resource;
+import java.io.IOException;
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
 import static com.boman.common.core.utils.StringUtils.isNotEmpty;
 import static com.boman.common.core.utils.fieldTranslator.IdCardUtils.getSex;
 import static com.boman.common.core.utils.obj.ObjectUtils.*;
@@ -90,6 +91,8 @@ public class CzrkServiceImpl implements ICzrkService {
 
     @Resource
     private RemoteDictDataService remoteDictDataService;
+    @Resource
+    BirthRecordsMapper birthRecordsMapper;
 
     /**
      * 2022/3/24修复人员认领接口列表,逻辑:所有人都能看到所有没有确认,没有认领的人员
@@ -1082,12 +1085,32 @@ public class CzrkServiceImpl implements ICzrkService {
         setQueryRole(czrk,sysUser,Czrk.HJ);
         setAgeScope(czrk);
         List<Czrk> czrkList = czrkMapper.getAllCzrk(czrk);
-        CzrkUtils.packAddr(czrkList);
-        if(czrkList==null || czrkList.size()<=0){
+
+        List<Czrk> czrkListp = czrkList.stream().sorted(
+                //以户籍号排序
+                Comparator.comparing(Czrk::getCode, Comparator.reverseOrder())
+                        //户主排序
+                        .thenComparing(Czrk::getHouseType, Comparator.reverseOrder())
+
+        ).collect(Collectors.toList());
+
+
+       /* List<TestInfo> sortList = testInfos.stream().sorted(
+                // 以上月评分排序,评分高的在前
+                Comparator.comparing(TestInfo::getLastScore, Comparator.reverseOrder())
+                        // 以在司时长排序,时间长的在前
+                        .thenComparing(TestInfo::getOnJobMonth, Comparator.reverseOrder())
+                        // 以评分排序,评分高的在前
+                        .thenComparing(TestInfo::getScore, Comparator.reverseOrder())).collect(Collectors.toList());
+        sortList.forEach(System.out::println);*/
+
+
+        CzrkUtils.packAddr(czrkListp);
+        if(czrkListp==null || czrkListp.size()<=0){
             throw new BaseException("请下载属于本乡镇数据");
         }
         //packAddr(czrkList);
-        return czrkList;
+        return czrkListp;
     }
 
     @Override
@@ -1216,6 +1239,127 @@ public class CzrkServiceImpl implements ICzrkService {
         return thirdPartInfoList;
     }
 
+    @Override
+    public AjaxResult delecteDie(String idCard) {
+        int i = thirdPartInfoMapper.delecteDie(idCard);
+        return i>0?AjaxResult.success("删除成功"):AjaxResult.error("删除失败");
+    }
+
+    @Override
+    public AjaxResult findXsInfo(String id, String idCard) {
+        Czrk czrk = new Czrk();
+        czrk.setIdCard(idCard);
+        Czrk hjInfo = czrkMapper.findHjInfo(czrk);
+        if (hjInfo == null) {
+            return AjaxResult.error("新生儿父亲或母亲不在人员信息库,请先添加父亲或母亲信息。");
+        }
+        //根据id查询新生儿信息
+        BirthRecords birthRecords = birthRecordsMapper.getBirthRecordsInfo(id);
+        hjInfo.setUserName(birthRecords.getXsexm());
+        hjInfo.setIdCard(birthRecords.getSfzjhm());
+        hjInfo.setHouseType("否");
+        hjInfo.setYhzgx("");
+        hjInfo.setWorkUnit("");
+        //根据身份证提取出生日和性别,年龄
+        String sex = getSex(birthRecords.getSfzjhm());
+        Integer age = getAge(birthRecords.getSfzjhm());
+        String birthday = IdCardUtils.getBirthday(idCard);
+        hjInfo.setAge(age);
+        hjInfo.setGender(sex);
+        hjInfo.setBirthday(birthday);
+
+        return AjaxResult.success("成功",hjInfo);
+    }
+
+    @Override
+    public AjaxResult addBabyCzrk(Czrk czrk) {
+        AjaxResult ajaxResult = insertCzrk(czrk);
+        if((int)ajaxResult.get("code") == 200 ){
+            //修改新生儿表状态(身份证号)
+            birthRecordsMapper.updataBirthRecordsInfo(czrk.getIdCard());
+        }
+        return ajaxResult;
+    }
+
+    @Override
+    public AjaxResult nucleicAcid(String xzqh, String djsjqs, String djsjjs, String name, String sfzhm) {
+
+        Map<String, String> paramMap = new HashMap<>();
+        String http = null;
+        //当区划为空的时候根据姓名,身份证查询
+        if(StringUtils.isNotEmpty(xzqh)){
+            //潜山核酸数据(区划 时间段)
+            paramMap.put("client_id","acdf50bd13be4901b64c62b1fee862c0");
+            paramMap.put("access_token","220f50ea48614caebae0fadcecb84a1e");
+            paramMap.put("xzqh",xzqh);
+            paramMap.put("djsjqs",djsjqs);
+            paramMap.put("djsjjs",djsjjs);
+
+            http = "http://172.27.189.244:9090/service/api/rkk/qshssjcx";
+        }else{
+            //潜山核酸数据(姓名 身份证 时间段)
+            paramMap.put("client_id","acdf50bd13be4901b64c62b1fee862c0");
+            paramMap.put("access_token","6c3434eeb63f4e7f83a6dd7c3e6db99e");
+            paramMap.put("name",name);
+            paramMap.put("sfzhm",sfzhm);
+            paramMap.put("djsjqs",djsjqs);
+            paramMap.put("djsjjs",djsjjs);
+
+            http = "http://172.27.189.244:9090/service/api/rkk/qshssj";
+        }
+
+        try {
+            if(StringUtils.isEmpty(http)){
+                return AjaxResult.error("参数错误");
+            }
+            String data = HttpClientUtils.doGet(http,paramMap);
+            JSONObject json = JSON.parseObject(data);
+            return AjaxResult.success("数据返回成功",json);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return AjaxResult.error("数据返回失败");
+        }
+    }
+
+    @Override
+    public AjaxResult toQianshan(String rc, String djsjqs, String djsjjs, String name, String sfzhm) {
+        Map<String, String> paramMap = new HashMap<>();
+        String http = null;
+        //当区划为空的时候根据姓名,身份证查询
+        if(StringUtils.isNotEmpty(rc)){
+            //潜山来宜人员数据(区划 时间段)
+            paramMap.put("client_id","acdf50bd13be4901b64c62b1fee862c0");
+            paramMap.put("access_token","ac2a4c29d0054d98a5fcaf54becfd60d");
+            paramMap.put("xzqh",rc);
+            paramMap.put("djsjqs",djsjqs);
+            paramMap.put("djsjjs",djsjjs);
+
+            http = "http://172.27.189.244:9090/service/api/rkk/qslyrysj";
+        }else{
+            //潜山来宜人员数据(姓名 身份证 时间段)
+            paramMap.put("client_id","acdf50bd13be4901b64c62b1fee862c0");
+            paramMap.put("access_token","59e548b8bdaa42c2b9a3e3e65831181e");
+            paramMap.put("name",name);
+            paramMap.put("sfzhm",sfzhm);
+            paramMap.put("djsjqs",djsjqs);
+            paramMap.put("djsjjs",djsjjs);
+
+            http = "http://172.27.189.244:9090/service/api/rkk/qslyrysjcx";
+        }
+
+        try {
+            if(StringUtils.isEmpty(http)){
+                return AjaxResult.error("参数错误");
+            }
+            String data = HttpClientUtils.doGet(http,paramMap);
+            JSONObject json = JSON.parseObject(data);
+            return AjaxResult.success("数据返回成功",json);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return AjaxResult.error("数据返回失败");
+        }
+    }
+
     @Override
     public Czrk getById(Long id) {
         if (isEmpty(id)) {

+ 10 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/ICzrkService.java

@@ -146,4 +146,14 @@ public interface ICzrkService {
     String importUser(List<ThirdPartInfo> thirdPartInfoList,String source);
 
     List<ThirdPartInfo> listDie(ThirdPartInfo thirdPartInfo);
+
+    AjaxResult delecteDie(String idCard);
+
+    AjaxResult findXsInfo(String id, String idCard);
+
+    AjaxResult addBabyCzrk(Czrk czrk);
+
+    AjaxResult nucleicAcid(String xzqh, String djsjqs, String djsjjs, String name, String sfzhm);
+
+    AjaxResult toQianshan(String rc, String djsjqs, String djsjjs, String name, String sfzhm);
 }

+ 112 - 0
boman-web-core/src/main/java/com/boman/web/core/utils/HttpClientUtils.java

@@ -0,0 +1,112 @@
+package com.boman.web.core.utils;
+
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class HttpClientUtils {
+
+    final static int TIMEOUT = 1000;
+    final static int TIMEOUT_MSEC = 5 * 1000;
+
+    public static String doPost(String url, Map<String, String> paramMap) throws IOException {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = "";
+        try {
+            // 创建Http Post请求
+            HttpPost httpPost = new HttpPost(url);
+            // 创建参数列表
+            if (paramMap != null) {
+                List<NameValuePair> paramList = new ArrayList<>();
+                for (Map.Entry<String, String> param : paramMap.entrySet()) {
+                    paramList.add(new BasicNameValuePair(param.getKey(), param.getValue()));
+                }
+                // 模拟表单
+                UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
+                httpPost.setEntity(entity);
+            }
+
+            httpPost.setConfig(builderRequestConfig());
+
+            // 执行http请求
+            response = httpClient.execute(httpPost);
+
+            resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
+        } catch (Exception e) {
+            throw e;
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                throw e;
+            }
+        }
+
+        return resultString;
+    }
+
+    public static String doGet(String url, Map<String, String> paramMap) throws IOException {
+        url += "?appid=" + paramMap.get("appid") + "&secret=" + paramMap.get("secret") + "&js_code=" + paramMap.get("js_code") + "&grant_type=" + paramMap.get("grant_type");
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = "";
+        try {
+            // 创建Http Post请求
+            HttpGet httpGet = new HttpGet(url);
+            // 执行http请求
+            response = httpClient.execute(httpGet);
+            resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
+        } catch (Exception e) {
+            throw e;
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                throw e;
+            }
+        }
+        return resultString;
+    }
+
+    public static String doGet1(String url) throws IOException {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = "";
+        try {
+            // 创建Http Post请求
+            HttpGet httpGet = new HttpGet(url);
+            // 执行http请求
+            response = httpClient.execute(httpGet);
+            resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
+        } catch (Exception e) {
+            throw e;
+        } finally {
+            assert response != null;
+            response.close();
+        }
+        return resultString;
+    }
+
+    private static RequestConfig builderRequestConfig() {
+        return RequestConfig.custom()
+                .setConnectTimeout(TIMEOUT_MSEC)
+                .setConnectionRequestTimeout(TIMEOUT_MSEC)
+                .setSocketTimeout(TIMEOUT_MSEC).build();
+    }
+}

+ 185 - 0
boman-web-core/src/main/resources/mapper/BirthRecordsMapper.xml

@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.boman.web.core.mapper.BirthRecordsMapper">
+
+    <resultMap type="com.boman.web.core.domain.BirthRecords" id="BirthRecordsResult">
+        <result property="id"    column="id"    />
+        <result property="csrq"    column="csrq"    />
+        <result property="csyxzmbh"    column="csyxzmbh"    />
+        <result property="fqmz"    column="fqmz"    />
+        <result property="csyxzmbb"    column="csyxzmbb"    />
+        <result property="xsexbdm"    column="xsexbdm"    />
+        <result property="sfgwrs"    column="sfgwrs"    />
+        <result property="sfycsqx"    column="sfycsqx"    />
+        <result property="csjkzk"    column="csjkzk"    />
+        <result property="cstz"    column="cstz"    />
+        <result property="sfzjhm"    column="sfzjhm"    />
+        <result property="sfzjlx"    column="sfzjlx"    />
+        <result property="fqgj"    column="fqgj"    />
+        <result property="csdxz"    column="csdxz"    />
+        <result property="ycfjkzk"    column="ycfjkzk"    />
+        <result property="mqmz"    column="mqmz"    />
+        <result property="xsexb"    column="xsexb"    />
+        <result property="fmfs"    column="fmfs"    />
+        <result property="mqsfzjlx"    column="mqsfzjlx"    />
+        <result property="mqxm" column="mqxm"/>
+        <result property="mz" column="mz"/>
+        <result property="cssc" column="cssc"/>
+        <result property="xsexm" column="xsexm"/>
+        <result property="fqxm" column="fqxm"/>
+        <result property="fqsfzjlx" column="fqsfzjlx"/>
+        <result property="cstc" column="cstc"/>
+        <result property="csdxzqh" column="csdxzqh"/>
+        <result property="mqgj" column="mqgj"/>
+        <result property="csyxzmqfrq" column="csyxzmqfrq"/>
+        <result property="csyxzmqfjg" column="csyxzmqfjg"/>
+        <result property="fqsfzjhm" column="fqsfzjhm"/>
+        <result property="csyljg" column="csyljg"/>
+        <result property="mqsfzjhm" column="mqsfzjhm"/>
+        <result property="csyz" column="csyz"/>
+        <result property="status"    column="status"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+    <insert id="insertListBirthRecords" useGeneratedKeys="true" keyProperty="id">
+        insert into birth_records(create_by,
+        update_by,
+        is_del,
+        remark,
+        csrq,
+        csyxzmbh,
+        fqmz,
+        csyxzmbb,
+        xsexbdm,
+        sfgwrs,
+        sfycsqx,
+        csjkzk,
+        cstz,
+        sfzjhm,
+        sfzjlx,
+        fqgj,
+        csdxz,
+        ycfjkzk,
+        mqmz,
+        xsexb,
+        fmfs,
+        mqsfzjlx,
+        mqxm,
+        mz,
+        cssc,
+        xsexm,
+        fqxm,
+        fqsfzjlx,
+        cstc,
+        csdxzqh,
+        mqgj,
+        csyxzmqfrq,
+        csyxzmqfjg,fqsfzjhm,csyljg,mqsfzjhm,csyz,status,create_time,update_time)
+        values
+        <foreach item="birthRecords" index="index" collection="birthRecordsList" separator=",">
+            (#{birthRecords.createBy},
+            #{birthRecords.updateBy},
+            #{birthRecords.isDel},
+            #{birthRecords.remark},
+            #{birthRecords.csrq},
+            #{birthRecords.csyxzmbh},
+            #{birthRecords.fqmz},
+            #{birthRecords.csyxzmbb},
+            #{birthRecords.xsexbdm},
+            #{birthRecords.sfgwrs},
+            #{birthRecords.sfycsqx},
+            #{birthRecords.csjkzk},
+            #{birthRecords.cstz},
+            #{birthRecords.sfzjhm},
+            #{birthRecords.sfzjlx},
+            #{birthRecords.fqgj},
+            #{birthRecords.csdxz},
+            #{birthRecords.ycfjkzk},
+            #{birthRecords.mqmz},
+            #{birthRecords.xsexb},
+            #{birthRecords.fmfs},
+            #{birthRecords.mqsfzjlx},
+            #{birthRecords.mqxm},
+            #{birthRecords.mz},
+            #{birthRecords.cssc},
+            #{birthRecords.xsexm},
+            #{birthRecords.fqxm},
+            #{birthRecords.fqsfzjlx},
+            #{birthRecords.cstc},
+            #{birthRecords.csdxzqh},
+            #{birthRecords.mqgj},
+            #{birthRecords.csyxzmqfrq},
+            #{birthRecords.csyxzmqfjg},
+            #{birthRecords.fqsfzjhm},
+            #{birthRecords.csyljg},
+            #{birthRecords.mqsfzjhm},
+            #{birthRecords.csyz},
+            #{birthRecords.status},
+            sysdate(),sysdate())
+        </foreach>
+    </insert>
+    <update id="updataBirthRecordsInfo">
+        update birth_records set status='2' where sfzjhm = #{idCard}
+    </update>
+    <select id="queryList" resultMap="BirthRecordsResult">
+        select id, create_by,update_by,is_del,remark,csrq,
+        csyxzmbh,fqmz,csyxzmbb,xsexbdm,sfgwrs,sfycsqx,csjkzk,cstz,sfzjhm,sfzjlx,
+        fqgj,csdxz,ycfjkzk,mqmz,xsexb,fmfs,mqsfzjlx,mqxm,mz,cssc,xsexm,fqxm,fqsfzjlx,cstc,csdxzqh,mqgj,
+        csyxzmqfrq,csyxzmqfjg,fqsfzjhm,csyljg,mqsfzjhm,csyz,status,create_time,update_time
+        from birth_records
+        <where>
+            is_del = 'N'
+            <if test="mqxm != null  and mqxm != ''">
+                and mqxm like concat(#{mqxm}, '%')
+            </if>
+            <if test="csrq != null  and csrq != ''">and csrq = #{csrq}</if>
+            <if test="csyxzmbh != null and csyxzmbh != '' ">and csyxzmbh = #{csyxzmbh}</if>
+            <if test="fqmz != null  and fqmz != ''">and fqmz = #{fqmz}</if>
+            <if test="csyxzmbb != null  and csyxzmbb != ''">and csyxzmbb = #{csyxzmbb}</if>
+            <if test="xsexbdm != null  and xsexbdm != ''">and xsexbdm = #{xsexbdm}</if>
+            <if test="sfgwrs != null  and sfgwrs != ''">and sfgwrs = #{sfgwrs}</if>
+            <if test="sfycsqx != null  and sfycsqx != ''">and sfycsqx = #{sfycsqx}</if>
+            <if test="csjkzk != null  and csjkzk != ''">and csjkzk = #{csjkzk}</if>
+            <if test="sfzjhm != null  and sfzjhm != ''">and sfzjhm = #{sfzjhm}</if>
+            <if test="fqgj != null  and fqgj != ''">and fqgj = #{fqgj}</if>
+
+            <if test="csdxz != null  and csdxz != ''">and csdxz = #{csdxz}</if>
+            <if test="mqmz != null  and mqmz != ''">and mqmz = #{mqmz}</if>
+            <if test="xsexb != null  and xsexb != ''">and xsexb = #{xsexb}</if>
+
+
+            <if test="mz != null  and mz != ''">and mz = #{mz}</if>
+            <if test="xsexm != null  and xsexm != ''">
+                and xsexm like concat(#{xsexm}, '%')
+            </if>
+            <if test="fqxm != null  and fqxm != ''">
+                and fqxm like concat(#{fqxm}, '%')
+            </if>
+            <if test="csdxzqh != null  and csdxzqh != ''">and csdxzqh = #{csdxzqh}</if>
+            <if test="mqgj != null  and mqgj != ''">and mqgj = #{mqgj}</if>
+            <if test="csyxzmqfrq != null  and csyxzmqfrq != ''">and csyxzmqfrq = #{csyxzmqfrq}</if>
+            <if test="csyxzmqfjg != null  and csyxzmqfjg != ''">and csyxzmqfjg = #{csyxzmqfjg}</if>
+            <if test="fqsfzjhm != null  and fqsfzjhm != ''">and fqsfzjhm = #{fqsfzjhm}</if>
+            <if test="mqsfzjhm != null  and mqsfzjhm != ''">and mqsfzjhm = #{mqsfzjhm}</if>
+            <if test="status != null  and status != ''">and status = #{status}</if>
+        </where>
+        order by status, create_time DESC
+
+
+    </select>
+    <select id="getBirthRecordsInfo" resultMap="BirthRecordsResult">
+        select id, create_by,update_by,is_del,remark,csrq,
+               csyxzmbh,fqmz,csyxzmbb,xsexbdm,sfgwrs,sfycsqx,csjkzk,cstz,sfzjhm,sfzjlx,
+               fqgj,csdxz,ycfjkzk,mqmz,xsexb,fmfs,mqsfzjlx,mqxm,mz,cssc,xsexm,fqxm,fqsfzjlx,cstc,csdxzqh,mqgj,
+               csyxzmqfrq,csyxzmqfjg,fqsfzjhm,csyljg,mqsfzjhm,csyz,status,create_time,update_time
+        from birth_records
+        where id = #{id}
+    </select>
+
+</mapper>

+ 4 - 0
boman-web-core/src/main/resources/mapper/ThirdPartInfoMapper.xml

@@ -120,6 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </insert>
 
+    <update id="delecteDie" parameterType="java.lang.String">
+        update third_part_info set is_del='Y' where id_card = #{idCard}
+    </update>
+
     <select id="queryList" resultMap="ThirdPartInfoResult">
         select id, cremation_certificate, cremation_time, user_name, id_card, age, gender, nation, township, village_group,
                home_phone, is_deposit, is_cold_storage,cause_of_death,status,