LIVE_YE 2 жил өмнө
parent
commit
4550ce0e0d

+ 11 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/info/UserInfoController.java

@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.domain.UserInfoOne;
 import com.ruoyi.system.service.IUserInfoService;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -49,9 +50,18 @@ public class UserInfoController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 单个人员信息对比查询
+     */
+    @GetMapping("/oneDateList")
+    public TableDataInfo oneDateList(UserInfoOne userInfoOne) throws Exception {
+        startPage();
+        List<UserInfoOne> list = userInfoService.oneDateList(userInfoOne);
+        return getDataTable(list);
+    }
 
     /**
-     * 查询导入人员信息列表
+     * 单个人员信息对比
      */
     @GetMapping("/oneDate")
     public AjaxResult oneDate(UserInfo userInfo) throws Exception {

+ 36 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -126,6 +126,42 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)));
     }
 
+
+    /**
+     * 计算两个时间差(小时)
+     * sendDate 结束时间
+     * snowDate 开始时间
+     *
+     */
+    public static Long getDateHour(String sendDate, String snowDate) {
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
+        try {
+            Date nowDate = simpleDateFormat.parse(snowDate);
+            Date endDate = simpleDateFormat.parse(sendDate);
+
+            long nd = 1000 * 24 * 60 * 60;
+            long nh = 1000 * 60 * 60;
+            long nm = 1000 * 60;
+            // long ns = 1000;
+            // 获得两个时间的毫秒时间差异
+            long diff = endDate.getTime() - nowDate.getTime();
+            // 计算差多少天
+            long day = diff / nd;
+            // 计算差多少小时
+            long hour = diff % nd / nh;
+
+            Long hours = day*24+hour;
+
+            return hours;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return null;
+
+    }
+
+
     /**
      * 计算两个时间差
      */

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UserInfo.java

@@ -55,6 +55,10 @@ public class UserInfo extends BaseEntity
     @Excel(name = "核酸结果时间")
     private String nucleicResultsTime;
 
+    /** 核酸结果 */
+    @Excel(name = "核酸结果")
+    private String nucleicResults;
+
     /** 职业类别 */
     @Excel(name = "职业类别")
     private String jobStyle;
@@ -88,6 +92,10 @@ public class UserInfo extends BaseEntity
     @Excel(name = "比对结束时间")
     private String endTime;
 
+    public String getNucleicResults() {
+        return nucleicResults;
+    }
+
     public String getDetectionResult() {
         return detectionResult;
     }
@@ -265,6 +273,10 @@ public class UserInfo extends BaseEntity
         this.detectionProgress = detectionProgress;
     }
 
+    public void setNucleicResults(String nucleicResults) {
+        this.nucleicResults = nucleicResults;
+    }
+
     @Override
     public String toString() {
         return "UserInfo{" +
@@ -279,6 +291,7 @@ public class UserInfo extends BaseEntity
                 ", collectPlace='" + collectPlace + '\'' +
                 ", nucleicCollectTime='" + nucleicCollectTime + '\'' +
                 ", nucleicResultsTime='" + nucleicResultsTime + '\'' +
+                ", nucleicResults='" + nucleicResults + '\'' +
                 ", jobStyle='" + jobStyle + '\'' +
                 ", focusCrowdStyle='" + focusCrowdStyle + '\'' +
                 ", detectionFrequency='" + detectionFrequency + '\'' +

+ 322 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UserInfoOne.java

@@ -0,0 +1,322 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 导入人员信息对象 user_info_one
+ * 
+ * @author ruoyi
+ * @date 2022-08-30
+ */
+public class UserInfoOne extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String name;
+
+    /** 性别 */
+    @Excel(name = "性别")
+    private String gender;
+
+    /** 年龄 */
+    @Excel(name = "年龄")
+    private Integer age;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    private String idCard;
+
+    /** 联系号码 */
+    @Excel(name = "联系号码")
+    private String phoneNum;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private String deptId;
+
+    /** 采集地点 */
+    @Excel(name = "采集地点")
+    private String collectPlace;
+
+    /** 核酸采集时间 */
+    @Excel(name = "核酸采集时间")
+    private String nucleicCollectTime;
+
+    /** 核酸结果时间 */
+    @Excel(name = "核酸结果时间")
+    private String nucleicResultsTime;
+
+    /** 采集结果 */
+    @Excel(name = "采集结果")
+    private String nucleicResults;
+
+    /** 职业类别 */
+    @Excel(name = "职业类别")
+    private String jobStyle;
+
+    /** 重点人群分类 */
+    @Excel(name = "重点人群分类")
+    private String focusCrowdStyle;
+
+    /** 检测频次(汉字拼接后) */
+    @Excel(name = "检测频次(汉字拼接后)")
+    private String detectionFrequency;
+
+    /** 检测频次(次数) */
+    @Excel(name = "检测频次", readConverterExp = "次=数")
+    private String detectionNumber;
+
+    /** 检测频次(时间范围) */
+    @Excel(name = "检测频次", readConverterExp = "时=间范围")
+    private String detectionScope;
+
+    /** 检测进度 */
+    @Excel(name = "检测进度")
+    private String detectionProgress;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 比对开始时间 */
+    @Excel(name = "比对开始时间")
+    private String startTime;
+
+    /** 比对结束时间 */
+    @Excel(name = "比对结束时间")
+    private String endTime;
+
+    /** 比对结果 */
+    @Excel(name = "比对结果")
+    private String detectionResult;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setGender(String gender) 
+    {
+        this.gender = gender;
+    }
+
+    public String getGender() 
+    {
+        return gender;
+    }
+    public void setAge(Integer age) 
+    {
+        this.age = age;
+    }
+
+    public Integer getAge() 
+    {
+        return age;
+    }
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+    public void setPhoneNum(String phoneNum) 
+    {
+        this.phoneNum = phoneNum;
+    }
+
+    public String getPhoneNum() 
+    {
+        return phoneNum;
+    }
+    public void setDeptId(String deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public String getDeptId() 
+    {
+        return deptId;
+    }
+    public void setCollectPlace(String collectPlace) 
+    {
+        this.collectPlace = collectPlace;
+    }
+
+    public String getCollectPlace() 
+    {
+        return collectPlace;
+    }
+    public void setNucleicCollectTime(String nucleicCollectTime) 
+    {
+        this.nucleicCollectTime = nucleicCollectTime;
+    }
+
+    public String getNucleicCollectTime() 
+    {
+        return nucleicCollectTime;
+    }
+    public void setNucleicResultsTime(String nucleicResultsTime) 
+    {
+        this.nucleicResultsTime = nucleicResultsTime;
+    }
+
+    public String getNucleicResultsTime() 
+    {
+        return nucleicResultsTime;
+    }
+    public void setNucleicResults(String nucleicResults) 
+    {
+        this.nucleicResults = nucleicResults;
+    }
+
+    public String getNucleicResults() 
+    {
+        return nucleicResults;
+    }
+    public void setJobStyle(String jobStyle) 
+    {
+        this.jobStyle = jobStyle;
+    }
+
+    public String getJobStyle() 
+    {
+        return jobStyle;
+    }
+    public void setFocusCrowdStyle(String focusCrowdStyle) 
+    {
+        this.focusCrowdStyle = focusCrowdStyle;
+    }
+
+    public String getFocusCrowdStyle() 
+    {
+        return focusCrowdStyle;
+    }
+    public void setDetectionFrequency(String detectionFrequency) 
+    {
+        this.detectionFrequency = detectionFrequency;
+    }
+
+    public String getDetectionFrequency() 
+    {
+        return detectionFrequency;
+    }
+    public void setDetectionNumber(String detectionNumber) 
+    {
+        this.detectionNumber = detectionNumber;
+    }
+
+    public String getDetectionNumber() 
+    {
+        return detectionNumber;
+    }
+    public void setDetectionScope(String detectionScope) 
+    {
+        this.detectionScope = detectionScope;
+    }
+
+    public String getDetectionScope() 
+    {
+        return detectionScope;
+    }
+    public void setDetectionProgress(String detectionProgress) 
+    {
+        this.detectionProgress = detectionProgress;
+    }
+
+    public String getDetectionProgress() 
+    {
+        return detectionProgress;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setStartTime(String startTime) 
+    {
+        this.startTime = startTime;
+    }
+
+    public String getStartTime() 
+    {
+        return startTime;
+    }
+    public void setEndTime(String endTime) 
+    {
+        this.endTime = endTime;
+    }
+
+    public String getEndTime() 
+    {
+        return endTime;
+    }
+    public void setDetectionResult(String detectionResult) 
+    {
+        this.detectionResult = detectionResult;
+    }
+
+    public String getDetectionResult() 
+    {
+        return detectionResult;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("gender", getGender())
+            .append("age", getAge())
+            .append("idCard", getIdCard())
+            .append("phoneNum", getPhoneNum())
+            .append("deptId", getDeptId())
+            .append("collectPlace", getCollectPlace())
+            .append("nucleicCollectTime", getNucleicCollectTime())
+            .append("nucleicResultsTime", getNucleicResultsTime())
+            .append("nucleicResults", getNucleicResults())
+            .append("jobStyle", getJobStyle())
+            .append("focusCrowdStyle", getFocusCrowdStyle())
+            .append("detectionFrequency", getDetectionFrequency())
+            .append("detectionNumber", getDetectionNumber())
+            .append("detectionScope", getDetectionScope())
+            .append("detectionProgress", getDetectionProgress())
+            .append("deptName", getDeptName())
+            .append("startTime", getStartTime())
+            .append("endTime", getEndTime())
+            .append("detectionResult", getDetectionResult())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UserNucleicTime.java

@@ -54,6 +54,13 @@ public class UserNucleicTime extends BaseEntity
     @Excel(name = "部门id")
     private String deptId;
 
+    /** 数据来源 */
+    private String dateSource;
+
+    public String getDateSource() {
+        return dateSource;
+    }
+
     public String getDeptId() {
         return deptId;
     }
@@ -157,6 +164,10 @@ public class UserNucleicTime extends BaseEntity
         this.phoneNum = phoneNum;
     }
 
+    public void setDateSource(String dateSource) {
+        this.dateSource = dateSource;
+    }
+
     @Override
     public String toString() {
         return "UserNucleicTime{" +
@@ -172,6 +183,7 @@ public class UserNucleicTime extends BaseEntity
                 ", name='" + name + '\'' +
                 ", phoneNum='" + phoneNum + '\'' +
                 ", deptId='" + deptId + '\'' +
+                ", dateSource='" + dateSource + '\'' +
                 '}';
     }
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserInfoMapper.java

@@ -65,4 +65,6 @@ public interface UserInfoMapper
     List<OdsQssHsjcxx> thirdNucleicAcid(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("idCardList")List<String> idCardList);
 
     void insertUserInfoList(@Param("userList")List<UserInfo> userList);
+
+    void insertUserInfoOne(UserInfo userInfo);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserInfoOneMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.UserInfoOne;
+
+/**
+ * 导入人员信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-08-30
+ */
+public interface UserInfoOneMapper 
+{
+    /**
+     * 查询导入人员信息
+     * 
+     * @param id 导入人员信息主键
+     * @return 导入人员信息
+     */
+    public UserInfoOne selectUserInfoOneById(Long id);
+
+    /**
+     * 查询导入人员信息列表
+     * 
+     * @param userInfoOne 导入人员信息
+     * @return 导入人员信息集合
+     */
+    public List<UserInfoOne> selectUserInfoOneList(UserInfoOne userInfoOne);
+
+    /**
+     * 新增导入人员信息
+     * 
+     * @param userInfoOne 导入人员信息
+     * @return 结果
+     */
+    public int insertUserInfoOne(UserInfoOne userInfoOne);
+
+    /**
+     * 修改导入人员信息
+     * 
+     * @param userInfoOne 导入人员信息
+     * @return 结果
+     */
+    public int updateUserInfoOne(UserInfoOne userInfoOne);
+
+    /**
+     * 删除导入人员信息
+     * 
+     * @param id 导入人员信息主键
+     * @return 结果
+     */
+    public int deleteUserInfoOneById(Long id);
+
+    /**
+     * 批量删除导入人员信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteUserInfoOneByIds(Long[] ids);
+}

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IUserInfoService.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.domain.UserInfoOne;
 
 /**
  * 导入人员信息Service接口
@@ -65,4 +66,6 @@ public interface IUserInfoService
     String importUser(List<UserInfo> userList, String jobStyle, String focusCrowdStyle, String detectionNumber, String detectionScope, String startTime, String endTime, SysUser user) throws Exception;
 
     AjaxResult oneDate(UserInfo userInfo) throws Exception;
+
+    List<UserInfoOne> oneDateList(UserInfoOne userInfoOne);
 }

+ 93 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java

@@ -15,9 +15,11 @@ import com.ruoyi.common.utils.http.HttpClientUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
 import com.ruoyi.system.domain.OdsQssHsjcxx;
 import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.domain.UserInfoOne;
 import com.ruoyi.system.domain.UserNucleicTime;
 import com.ruoyi.system.mapper.SysDictTypeMapper;
 import com.ruoyi.system.mapper.UserInfoMapper;
+import com.ruoyi.system.mapper.UserInfoOneMapper;
 import com.ruoyi.system.mapper.UserNucleicTimeMapper;
 import com.ruoyi.system.service.IUserInfoService;
 import com.ruoyi.system.service.OdsQssHsjcxxService;
@@ -48,6 +50,8 @@ public class UserInfoServiceImpl implements IUserInfoService {
     private OdsQssHsjcxxService qdsQssHsjcxxService;
     @Autowired
     private UserNucleicTimeMapper userNucleicTimeMapper;
+    @Autowired
+    private UserInfoOneMapper userInfoOneMapper;
 
     /**
      * 查询导入人员信息
@@ -150,7 +154,11 @@ public class UserInfoServiceImpl implements IUserInfoService {
             if (userInfo == null) {
                 return "表格格式错误,请按照表格模板格式上传人员名单";
             }
-
+            if (userInfo.getIdCard().indexOf('x') != -1) { //判断是不是有X
+                //如果有X,就改成统一的大写X
+                userInfo.setIdCard(userInfo.getIdCard().replace("x", "X"));
+            }
+            userInfo.setIdCard((userInfo.getIdCard()).replaceAll("\\s*|\r|\n|\t",""));
             if (userInfo.getIdCard().length() != 18) {
                 sb.append(userInfo.getName()).append(",");
             }
@@ -180,6 +188,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
         List<UserNucleicTime> UserNucleicTimeList = new ArrayList<>();
 
         int index = 0;
+        int count = 0;
         for (UserInfo userInfo : userList) {
 
             System.out.println("我在循环");
@@ -190,6 +199,9 @@ public class UserInfoServiceImpl implements IUserInfoService {
             StringBuilder nucleicCollectTime = new StringBuilder();
             //核酸结果时间
             StringBuilder nucleicResultsTime = new StringBuilder();
+            //核酸结果
+            StringBuilder nucleicResults = new StringBuilder();
+
 
             userInfo.setJobStyle(jobStyle);
             userInfo.setFocusCrowdStyle(focusCrowdStyle);
@@ -204,13 +216,26 @@ public class UserInfoServiceImpl implements IUserInfoService {
             Boolean bl = true;
 
             index = 0;
+            count = 0;
             if (OdsQssHsjcxxMapSorted.size() > 0) {
                 //身份证号码
                 String idCard = userInfo.getIdCard();
                 List<OdsQssHsjcxx> odsQssHsjcxxes = OdsQssHsjcxxMapSorted.get(idCard);
                 if (odsQssHsjcxxes != null && odsQssHsjcxxes.size() > 0) {
+                    //String time = null;
+
                     for (OdsQssHsjcxx odsQssHsjcxx : odsQssHsjcxxes) {
 
+                        /*if(StringUtils.isEmpty(time)){
+                            time = odsQssHsjcxx.getCjsj();
+                            index++;
+                        }else{
+                            Long hours = DateUtils.getDateHour(odsQssHsjcxx.getCjsj(),time);
+                            if(hours>=24){
+                                index++;
+                            }
+                        }*/
+
                         if (StringUtils.isNotEmpty(collectPlace.toString())) {
                             collectPlace.append("<br>");
                         }
@@ -225,6 +250,20 @@ public class UserInfoServiceImpl implements IUserInfoService {
                             nucleicResultsTime.append("<br>");
                         }
                         nucleicResultsTime.append(odsQssHsjcxx.getJgcjss());
+
+                        if (StringUtils.isNotEmpty(nucleicResults.toString())) {
+                            nucleicResults.append("<br>");
+                        }
+                        if(StringUtils.isEmpty(odsQssHsjcxx.getJcjg())){
+                            nucleicResults.append(odsQssHsjcxx.getJcjg());
+                        }else if("0".equals(odsQssHsjcxx.getJcjg())){
+                            nucleicResults.append("阴性");
+                        }else if("1".equals(odsQssHsjcxx.getJcjg())){
+                            nucleicResults.append("阳性");
+                        }else{
+                            nucleicResults.append(odsQssHsjcxx.getJcjg());
+                        }
+
                     }
                     index = odsQssHsjcxxes.size();
                 }
@@ -236,6 +275,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
             userInfo.setCollectPlace(collectPlace.toString());
             userInfo.setNucleicCollectTime(nucleicCollectTime.toString());
             userInfo.setNucleicResultsTime(nucleicResultsTime.toString());
+            userInfo.setNucleicResults(nucleicResults.toString());
             userInfo.setDetectionProgress(index + "/" + detectionNumber);
 
 
@@ -263,6 +303,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
                         userNucleicTime.setPhoneNum(userInfo.getPhoneNum());
                         userNucleicTime.setDeptId(user.getDeptId().toString());
                         UserNucleicTimeList.add(userNucleicTime);
+                        userNucleicTime.setDateSource("批量导入");
                     }
                 }
             }
@@ -288,6 +329,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
             return AjaxResult.error("请将参数填写完整后查询");
         }
 
+        SysUser user = SecurityUtils.getLoginUser().getUser();
 
         String startTime = userInfo.getStartTime();
         String endTime = userInfo.getEndTime();
@@ -322,6 +364,8 @@ public class UserInfoServiceImpl implements IUserInfoService {
         StringBuilder nucleicCollectTime = new StringBuilder();
         //核酸结果时间
         StringBuilder nucleicResultsTime = new StringBuilder();
+        //核酸结果
+        StringBuilder nucleicResults = new StringBuilder();
 
         //判断结果是否合格,默认合格
         Boolean bl = true;
@@ -347,15 +391,30 @@ public class UserInfoServiceImpl implements IUserInfoService {
                 }
                 nucleicResultsTime.append(odsQssHsjcxx.getJgcjss());
 
+                if (StringUtils.isNotEmpty(nucleicResults.toString())) {
+                    nucleicResults.append("<br>");
+                }
+                if(StringUtils.isEmpty(odsQssHsjcxx.getJcjg())){
+                    nucleicResults.append(odsQssHsjcxx.getJcjg());
+                }else if("0".equals(odsQssHsjcxx.getJcjg())){
+                    nucleicResults.append("阴性");
+                }else if("1".equals(odsQssHsjcxx.getJcjg())){
+                    nucleicResults.append("阳性");
+                }else{
+                    nucleicResults.append(odsQssHsjcxx.getJcjg());
+                }
+
                 index++;
             }
         }
         if (index < Integer.parseInt(detectionNumber)) {
             bl = false;
         }
+        userInfo.setDeptId(user.getDeptId().toString());
         userInfo.setCollectPlace(collectPlace.toString());
         userInfo.setNucleicCollectTime(nucleicCollectTime.toString());
         userInfo.setNucleicResultsTime(nucleicResultsTime.toString());
+        userInfo.setNucleicResults(nucleicResults.toString());
         userInfo.setDetectionProgress(index + "/" + detectionNumber);
         if (bl) {
             userInfo.setDetectionResult("正常");
@@ -365,8 +424,41 @@ public class UserInfoServiceImpl implements IUserInfoService {
         List<UserInfo> userList = new ArrayList<>();
 
         userList.add(userInfo);
+
+        List<UserNucleicTime> UserNucleicTimeList = new ArrayList<>();
+        if (OdsQssHsjcxxList != null && OdsQssHsjcxxList.size() > 0) {
+            for (OdsQssHsjcxx odsQssHsjcxx : OdsQssHsjcxxList) {
+                if (userInfo.getIdCard().equals(odsQssHsjcxx.getSfzhm())) {
+                    UserNucleicTime userNucleicTime = new UserNucleicTime();
+                    userNucleicTime.setInfoId(userInfo.getId());
+                    userNucleicTime.setIdCard(odsQssHsjcxx.getSfzhm());
+                    userNucleicTime.setCollectPlace(odsQssHsjcxx.getJcdd());
+                    userNucleicTime.setNucleicCollectTime(odsQssHsjcxx.getCjsj());
+                    userNucleicTime.setNucleicResultsTime(odsQssHsjcxx.getJgcjss());
+                    userNucleicTime.setName(userInfo.getName());
+                    userNucleicTime.setPhoneNum(userInfo.getPhoneNum());
+                    userNucleicTime.setDeptId(user.getDeptId().toString());
+                    userNucleicTime.setDateSource("单人");
+                    UserNucleicTimeList.add(userNucleicTime);
+                }
+            }
+        }
+
+
+        //批量保存
+        userInfoMapper.insertUserInfoOne(userInfo);
+        userNucleicTimeMapper.insertUserNucleicTimeList(UserNucleicTimeList);
+
+
         return AjaxResult.success("操作成功", userList);
     }
 
+    @Override
+    public List<UserInfoOne> oneDateList(UserInfoOne userInfoOne) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        userInfoOne.setDeptId(String.valueOf(user.getDeptId()));
+        return userInfoOneMapper.selectUserInfoOneList(userInfoOne);
+    }
+
 
 }

+ 56 - 2
ruoyi-system/src/main/resources/mapper/system/UserInfoMapper.xml

@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="nucleicCollectTime"    column="nucleic_collect_time"    />
         <result property="nucleicResultsTime"    column="nucleic_results_time"    />
+        <result property="nucleicResults"    column="nucleic_results"    />
         <result property="jobStyle"    column="job_style"    />
         <result property="focusCrowdStyle"    column="focus_crowd_style"    />
         <result property="collectPlace"    column="collect_place"    />
@@ -35,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectUserInfoVo">
-        select id, name, gender, age, id_card, phone_num, dept_id, collect_place, nucleic_collect_time, nucleic_results_time,detection_progress, job_style, focus_crowd_style, detection_frequency, detection_number, detection_scope, dept_name, start_time, end_time,detection_result, create_by, create_time, update_by, update_time, remark from user_info
+        select id, name, gender, age, id_card, phone_num, dept_id, collect_place, nucleic_collect_time, nucleic_results_time,nucleic_results,detection_progress, job_style, focus_crowd_style, detection_frequency, detection_number, detection_scope, dept_name, start_time, end_time,detection_result, create_by, create_time, update_by, update_time, remark from user_info
     </sql>
 
     <select id="selectUserInfoList" parameterType="UserInfo" resultMap="UserInfoResult">
@@ -118,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                                collect_place,
                                nucleic_collect_time,
                                nucleic_results_time,
+                               nucleic_results,
                                job_style,
                                focus_crowd_style,
                                detection_frequency,
@@ -140,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{user.collectPlace},
             #{user.nucleicCollectTime},
             #{user.nucleicResultsTime},
+            #{user.nucleicResults},
             #{user.jobStyle},
             #{user.focusCrowdStyle},
             #{user.detectionFrequency},
@@ -154,6 +157,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             sysdate(),sysdate())
         </foreach>
     </insert>
+    <insert id="insertUserInfoOne" parameterType="com.ruoyi.system.domain.UserInfo">
+        insert into user_info_one
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="gender != null">gender,</if>
+            <if test="age != null">age,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="phoneNum != null">phone_num,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="collectPlace != null">collect_place,</if>
+            <if test="nucleicCollectTime != null">nucleic_collect_time,</if>
+            <if test="nucleicResultsTime != null">nucleic_results_time,</if>
+            <if test="nucleicResults != null">focus_crowd_style,</if>
+            <if test="jobStyle != null">job_style,</if>
+            <if test="focusCrowdStyle != null">focus_crowd_style,</if>
+            <if test="detectionFrequency != null">detection_frequency,</if>
+            <if test="detectionNumber != null">detection_number,</if>
+            <if test="detectionScope != null">detection_scope,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+            create_time,update_time
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="age != null">#{age},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="phoneNum != null">#{phoneNum},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="collectPlace != null">#{collectPlace},</if>
+            <if test="nucleicCollectTime != null">#{nucleicCollectTime},</if>
+            <if test="nucleicResultsTime != null">#{nucleicResultsTime},</if>
+            <if test="nucleicResults != null">#{nucleicResults},</if>
+            <if test="jobStyle != null">#{jobStyle},</if>
+            <if test="focusCrowdStyle != null">#{focusCrowdStyle},</if>
+            <if test="detectionFrequency != null">#{detectionFrequency},</if>
+            <if test="detectionNumber != null">#{detectionNumber},</if>
+            <if test="detectionScope != null">#{detectionScope},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+            sysdate(),sysdate()
+        </trim>
+    </insert>
 
     <update id="updateUserInfo" parameterType="UserInfo">
         update user_info
@@ -196,7 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="thirdNucleicAcid" resultType="com.ruoyi.system.domain.OdsQssHsjcxx">
         select sfzhm,xm,sjhm,cjsj,jgcjss,jcdd,jcjg,sjly
-        from ods_qss_hsjcxx
+        from ods_qss_hsjcxx_all
         where cjsj > #{startTime}  and #{endTime}>=cjsj
         and sfzhm in
         <foreach item="idCard" collection="idCardList" open="(" separator="," close=")">

+ 172 - 0
ruoyi-system/src/main/resources/mapper/system/UserInfoOneMapper.xml

@@ -0,0 +1,172 @@
+<?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.ruoyi.system.mapper.UserInfoOneMapper">
+    
+    <resultMap type="UserInfoOne" id="UserInfoOneResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="gender"    column="gender"    />
+        <result property="age"    column="age"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="phoneNum"    column="phone_num"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="collectPlace"    column="collect_place"    />
+        <result property="nucleicCollectTime"    column="nucleic_collect_time"    />
+        <result property="nucleicResultsTime"    column="nucleic_results_time"    />
+        <result property="nucleicResults"    column="nucleic_results"    />
+        <result property="jobStyle"    column="job_style"    />
+        <result property="focusCrowdStyle"    column="focus_crowd_style"    />
+        <result property="detectionFrequency"    column="detection_frequency"    />
+        <result property="detectionNumber"    column="detection_number"    />
+        <result property="detectionScope"    column="detection_scope"    />
+        <result property="detectionProgress"    column="detection_progress"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="endTime"    column="end_time"    />
+        <result property="detectionResult"    column="detection_result"    />
+        <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="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectUserInfoOneVo">
+        select id, name, gender, age, id_card, phone_num, dept_id, collect_place, nucleic_collect_time, nucleic_results_time, nucleic_results, job_style, focus_crowd_style, detection_frequency, detection_number, detection_scope, detection_progress, dept_name, start_time, end_time, detection_result, create_by, create_time, update_by, update_time, remark from user_info_one
+    </sql>
+
+    <select id="selectUserInfoOneList" parameterType="UserInfoOne" resultMap="UserInfoOneResult">
+        <include refid="selectUserInfoOneVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="gender != null  and gender != ''"> and gender = #{gender}</if>
+            <if test="age != null "> and age = #{age}</if>
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="phoneNum != null  and phoneNum != ''"> and phone_num = #{phoneNum}</if>
+            <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
+            <if test="collectPlace != null  and collectPlace != ''"> and collect_place = #{collectPlace}</if>
+            <if test="nucleicCollectTime != null  and nucleicCollectTime != ''"> and nucleic_collect_time = #{nucleicCollectTime}</if>
+            <if test="nucleicResultsTime != null  and nucleicResultsTime != ''"> and nucleic_results_time = #{nucleicResultsTime}</if>
+            <if test="nucleicResults != null  and nucleicResults != ''"> and nucleic_results = #{nucleicResults}</if>
+            <if test="jobStyle != null  and jobStyle != ''"> and job_style = #{jobStyle}</if>
+            <if test="focusCrowdStyle != null  and focusCrowdStyle != ''"> and focus_crowd_style = #{focusCrowdStyle}</if>
+            <if test="detectionFrequency != null  and detectionFrequency != ''"> and detection_frequency = #{detectionFrequency}</if>
+            <if test="detectionNumber != null  and detectionNumber != ''"> and detection_number = #{detectionNumber}</if>
+            <if test="detectionScope != null  and detectionScope != ''"> and detection_scope = #{detectionScope}</if>
+            <if test="detectionProgress != null  and detectionProgress != ''"> and detection_progress = #{detectionProgress}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
+            <if test="endTime != null  and endTime != ''"> and end_time = #{endTime}</if>
+            <if test="detectionResult != null  and detectionResult != ''"> and detection_result = #{detectionResult}</if>
+        </where>
+        order by create_time desc
+    </select>
+    
+    <select id="selectUserInfoOneById" parameterType="Long" resultMap="UserInfoOneResult">
+        <include refid="selectUserInfoOneVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertUserInfoOne" parameterType="UserInfoOne" useGeneratedKeys="true" keyProperty="id">
+        insert into user_info_one
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="gender != null">gender,</if>
+            <if test="age != null">age,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="phoneNum != null">phone_num,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="collectPlace != null">collect_place,</if>
+            <if test="nucleicCollectTime != null">nucleic_collect_time,</if>
+            <if test="nucleicResultsTime != null">nucleic_results_time,</if>
+            <if test="nucleicResults != null">nucleic_results,</if>
+            <if test="jobStyle != null">job_style,</if>
+            <if test="focusCrowdStyle != null">focus_crowd_style,</if>
+            <if test="detectionFrequency != null">detection_frequency,</if>
+            <if test="detectionNumber != null">detection_number,</if>
+            <if test="detectionScope != null">detection_scope,</if>
+            <if test="detectionProgress != null">detection_progress,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="detectionResult != null">detection_result,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="age != null">#{age},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="phoneNum != null">#{phoneNum},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="collectPlace != null">#{collectPlace},</if>
+            <if test="nucleicCollectTime != null">#{nucleicCollectTime},</if>
+            <if test="nucleicResultsTime != null">#{nucleicResultsTime},</if>
+            <if test="nucleicResults != null">#{nucleicResults},</if>
+            <if test="jobStyle != null">#{jobStyle},</if>
+            <if test="focusCrowdStyle != null">#{focusCrowdStyle},</if>
+            <if test="detectionFrequency != null">#{detectionFrequency},</if>
+            <if test="detectionNumber != null">#{detectionNumber},</if>
+            <if test="detectionScope != null">#{detectionScope},</if>
+            <if test="detectionProgress != null">#{detectionProgress},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="detectionResult != null">#{detectionResult},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateUserInfoOne" parameterType="UserInfoOne">
+        update user_info_one
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="gender != null">gender = #{gender},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="phoneNum != null">phone_num = #{phoneNum},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="collectPlace != null">collect_place = #{collectPlace},</if>
+            <if test="nucleicCollectTime != null">nucleic_collect_time = #{nucleicCollectTime},</if>
+            <if test="nucleicResultsTime != null">nucleic_results_time = #{nucleicResultsTime},</if>
+            <if test="nucleicResults != null">nucleic_results = #{nucleicResults},</if>
+            <if test="jobStyle != null">job_style = #{jobStyle},</if>
+            <if test="focusCrowdStyle != null">focus_crowd_style = #{focusCrowdStyle},</if>
+            <if test="detectionFrequency != null">detection_frequency = #{detectionFrequency},</if>
+            <if test="detectionNumber != null">detection_number = #{detectionNumber},</if>
+            <if test="detectionScope != null">detection_scope = #{detectionScope},</if>
+            <if test="detectionProgress != null">detection_progress = #{detectionProgress},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="detectionResult != null">detection_result = #{detectionResult},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteUserInfoOneById" parameterType="Long">
+        delete from user_info_one where id = #{id}
+    </delete>
+
+    <delete id="deleteUserInfoOneByIds" parameterType="String">
+        delete from user_info_one where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>