Преглед на файлове

Merge branch '单-缺陷修正' of sckj/mz-cloud into master

shanwq преди 1 година
родител
ревизия
47835f49a3
променени са 43 файла, в които са добавени 1701 реда и са изтрити 190 реда
  1. 3 3
      ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/domain/ZwywCyrySxxx.java
  2. 3 3
      ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/domain/ZwywYljgSxxx.java
  3. 64 0
      ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/service/impl/ZwywCyrySxxxServiceImpl.java
  4. 61 1
      ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/service/impl/ZwywYljgSxxxServiceImpl.java
  5. 59 59
      ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/domain/ZwywLrJbxx.java
  6. 4 1
      ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/mapper/ZwywLrJbxxMapper.java
  7. 7 0
      ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/IZwywLrJbxxService.java
  8. 173 3
      ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrJbxxServiceImpl.java
  9. 40 0
      ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml
  10. 14 14
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdCwgl.java
  11. 2 2
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdPblncp.java
  12. 2 2
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdPbzncp.java
  13. 13 13
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdSmfw.java
  14. 5 0
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdCwglMapper.java
  15. 7 1
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdPblncpMapper.java
  16. 8 1
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdPbzncpMapper.java
  17. 5 0
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdSmfwMapper.java
  18. 8 7
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdCwglService.java
  19. 8 7
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdPblncpService.java
  20. 8 7
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdPbzncpService.java
  21. 8 7
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdSmfwService.java
  22. 146 3
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdCwglServiceImpl.java
  23. 72 9
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdPblncpServiceImpl.java
  24. 72 10
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdPbzncpServiceImpl.java
  25. 129 3
      ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdSmfwServiceImpl.java
  26. 45 0
      ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/cwglMapper.xml
  27. 21 6
      ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/pblncpMapper.xml
  28. 21 6
      ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/pbzncpMapper.xml
  29. 17 0
      ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/smfwMapper.xml
  30. 23 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywLrJbxxController.java
  31. 20 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdCwglController.java
  32. 21 1
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdPblncpController.java
  33. 21 4
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdPbzncpController.java
  34. 20 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdSmfwController.java
  35. 8 8
      ruoyi-modules/mz-organization-khgl/src/main/java/com/ruoyi/organization/domain/YljgKhJbxx.java
  36. 74 2
      ruoyi-modules/mz-organization-khgl/src/main/java/com/ruoyi/organization/service/impl/YljgKhJbxxServiceImpl.java
  37. 6 6
      ruoyi-modules/mz-organization-yggl/src/main/java/com/ruoyi/organization/domain/YljgYgJbxx.java
  38. 79 0
      ruoyi-modules/mz-organization-yggl/src/main/java/com/ruoyi/organization/service/impl/YljgYgJbxxServiceImpl.java
  39. 81 1
      ruoyi-ui/src/views/business/lrxx/jbxx/index.vue
  40. 80 0
      ruoyi-ui/src/views/business/tsxdxm/cwgl/index.vue
  41. 81 0
      ruoyi-ui/src/views/business/tsxdxm/cwgl/pblncp.vue
  42. 81 0
      ruoyi-ui/src/views/business/tsxdxm/cwgl/pbzncp.vue
  43. 81 0
      ruoyi-ui/src/views/business/tsxdxm/smfw/index.vue

+ 3 - 3
ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/domain/ZwywCyrySxxx.java

@@ -57,7 +57,7 @@ public class ZwywCyrySxxx extends BaseEntity
     private String xm;
 
     /** 数据来源(CH042) */
-    @Excel(name = "数据来源", dictType = "CH042")
+    @Excel(name = "数据来源")
     @ApiModelProperty(value = "数据来源(CH042)", required = true)
     @NotBlank(message = "{数据来源}",groups = AddGroup.class)
     @DictV(type = "CH042",message = "{数据来源}")
@@ -85,14 +85,14 @@ public class ZwywCyrySxxx extends BaseEntity
     private String lxdh;
 
     /** 人员类别(CH044) */
-    @Excel(name = "人员类别", dictType = "CH044")
+    @Excel(name = "人员类别")
     @ApiModelProperty(value = "人员类别(CH044)", required = true)
     @NotBlank(message = "{人员类别}",groups = AddGroup.class)
     @DictV(type = "CH044",message = "{人员类别}")
     private String rylb;
 
     /** 证件类型(C0015) */
-    @Excel(name = "证件类型", dictType = "C0015")
+    @Excel(name = "证件类型")
     @ApiModelProperty(value = "证件类型(C0015)", required = true)
     @NotBlank(message = "{证件类型}",groups = AddGroup.class)
     @DictV(type = "C0015",message = "{证件类型}")

+ 3 - 3
ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/domain/ZwywYljgSxxx.java

@@ -64,7 +64,7 @@ public class ZwywYljgSxxx extends BaseEntity
     private String tyshxydm;
 
     /** 数据来源(CH042) */
-    @Excel(name = "数据来源", dictType = "CH042")
+    @Excel(name = "数据来源")
     @ApiModelProperty(value = "数据来源(CH042)", required = true)
     @NotBlank(message = "{数据来源}",groups = AddGroup.class)
     @DictV(type = "CH042",message = "{数据来源}")
@@ -101,7 +101,7 @@ public class ZwywYljgSxxx extends BaseEntity
     private String frxm;
 
     /** 法定代表人证件类型(C0015) */
-    @Excel(name = "法定代表人证件类型", dictType = "C0015")
+    @Excel(name = "法定代表人证件类型")
     @ApiModelProperty(value = "法定代表人证件类型(C0015)", required = true)
     @NotBlank(message = "{法定代表人证件类型}",groups = AddGroup.class)
     @DictV(type = "C0015",message = "{法定代表人证件类型}")
@@ -139,7 +139,7 @@ public class ZwywYljgSxxx extends BaseEntity
     private String ms;
 
     /** 是否被处罚(CZ035) */
-    @Excel(name = "是否被处罚", dictType = "CZ035")
+    @Excel(name = "是否被处罚")
     @ApiModelProperty(value = "是否被处罚(CZ035)", required = true)
     @NotBlank(message = "{是否被处罚}",groups = AddGroup.class)
     @DictV(type = "CZ035",message = "{是否被处罚}")

+ 64 - 0
ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/service/impl/ZwywCyrySxxxServiceImpl.java

@@ -1,16 +1,22 @@
 package com.ruoyi.business.service.impl;
 
+import com.alibaba.fastjson2.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywCyrySxxx;
 import com.ruoyi.business.mapper.ZwywCyrySxxxMapper;
 import com.ruoyi.business.mapper.ZwywLhcjNrrdMapper;
 import com.ruoyi.business.service.IZwywCyrySxxxService;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.PunishmentsStatus;
 import com.ruoyi.system.api.enums.WorkFlowStatus;
+import com.ruoyi.system.domain.SysDeptJl;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
 import org.activiti.engine.RuntimeService;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -19,6 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * 从业人员失信信息Service业务层处理
@@ -41,6 +50,9 @@ public class ZwywCyrySxxxServiceImpl implements IZwywCyrySxxxService
     @Autowired
     private RuntimeService runtimeService;
 
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
     /**
      * 查询从业人员失信信息
      *
@@ -176,6 +188,58 @@ public class ZwywCyrySxxxServiceImpl implements IZwywCyrySxxxService
             if (z.getZjhm().length()!=18){
                 throw new ServiceException("请检查证件号码是否录入正确");
             }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String xm = z.getXm();
+            Matcher matcher = p.matcher(xm);
+            if (matcher.find()==false){
+                throw new ServiceException("姓名必须含有一个汉字,请检查");
+            }
+
+            // 验证座机号
+            Pattern  p1 = Pattern.compile("\\d{4}+-+\\d{7}");
+            String lxdh = z.getLxdh();
+            Matcher matcher1 = p1.matcher(lxdh);
+
+            Pattern compile = Pattern.compile("^[1]+\\d{10}");
+            String lxdh1 = z.getLxdh();
+            Matcher matcher2 = compile.matcher(lxdh1);
+            if (matcher1.find() == false && matcher2.find()==false) {
+                throw new ServiceException("请检查 人员联系电话 录入是否正确");
+            }
+
+            AjaxResult ch044 = remoteDictDataService.getDictDataByDictType("CH044", SecurityConstants.INNER);
+            List<String> rylb = ch044.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!rylb.contains(z.getRylb())){
+                throw new ServiceException("人员类别不符合条件,请检查");
+            }
+
+            AjaxResult C0015 = remoteDictDataService.getDictDataByDictType("C0015", SecurityConstants.INNER);
+            List<String> zjlx = C0015.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zjlx.contains(z.getZjlx())){
+                throw new ServiceException("证件类型不符合条件,请检查");
+            }
+
+            AjaxResult ch042 = remoteDictDataService.getDictDataByDictType("CH042", SecurityConstants.INNER);
+            List<String> sjly = ch042.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!sjly.contains(z.getSjly())){
+                throw new ServiceException("数据来源不符合条件,请检查");
+            }
+
+            AjaxResult cz035 = remoteDictDataService.getDictDataByDictType("CZ035", SecurityConstants.INNER);
+            List<String> isCf = cz035.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!isCf.contains(z.getIsCf())){
+                throw new ServiceException("是否被处罚不符合条件,请检查");
+            }
+
+            SysDeptJl sysDeptJl = sysDeptJlMapper.selectSysDeptJlByCode(z.getSzxzqh());
+            if (sysDeptJl==null){
+                throw new ServiceException("请输入正确的行政区划代码");
+            }
+
         } );
         // 流特性去掉重复Map
         Long count = list.stream().distinct().count();

+ 61 - 1
ruoyi-modules/mz-business-lhcj/src/main/java/com/ruoyi/business/service/impl/ZwywYljgSxxxServiceImpl.java

@@ -1,16 +1,22 @@
 package com.ruoyi.business.service.impl;
 
+import com.alibaba.fastjson2.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywCyrySxxx;
 import com.ruoyi.business.domain.ZwywYljgSxxx;
 import com.ruoyi.business.mapper.ZwywLhcjNrrdMapper;
 import com.ruoyi.business.mapper.ZwywYljgSxxxMapper;
 import com.ruoyi.business.service.IZwywYljgSxxxService;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.PunishmentsStatus;
 import com.ruoyi.system.api.enums.WorkFlowStatus;
+import com.ruoyi.system.domain.SysDeptJl;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
 import org.activiti.engine.RuntimeService;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -20,6 +26,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * 养老机构失信信息Service业务层处理
@@ -42,6 +51,9 @@ public class ZwywYljgSxxxServiceImpl implements IZwywYljgSxxxService
     @Autowired
     private RuntimeService runtimeService;
 
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
     /**
      * 查询养老机构失信信息
      *
@@ -173,8 +185,56 @@ public class ZwywYljgSxxxServiceImpl implements IZwywYljgSxxxService
                 throw new ServiceException("机构名称,统一社会信用代码,联系电话,法定代表人证件类型,法定代表人公民身份号码,所在行政区划,通信地址,数据来源,失信信息描述,是否被处罚 不能为空,请检查!");
             }
             if (z.getFrzjhm().length()!=18){
-                throw new ServiceException("请检查证件号码是否录入正确");
+                throw new ServiceException("请检查法定代表人公民身份号码是否录入正确");
+            }
+            if (z.getTyshxydm().length()!=18){
+                throw new ServiceException("请统一社会信用代码是否录入正确");
+            }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String xm = z.getFrxm();
+            Matcher matcher = p.matcher(xm);
+            if (matcher.find()==false){
+                throw new ServiceException("法定代表人姓名必须含有一个汉字,请检查");
+            }
+
+            // 验证座机号
+            Pattern p1 = Pattern.compile("\\d{4}+-+\\d{7}");
+            String lxdh = z.getLxdh();
+            Matcher matcher1 = p1.matcher(lxdh);
+
+            Pattern compile = Pattern.compile("^[1]+\\d{10}");
+            String lxdh1 = z.getLxdh();
+            Matcher matcher2 = compile.matcher(lxdh1);
+            if (matcher1.find() == false && matcher2.find()==false) {
+                throw new ServiceException("请检查 联系电话 录入是否正确");
+            }
+
+            AjaxResult C0015 = remoteDictDataService.getDictDataByDictType("C0015", SecurityConstants.INNER);
+            List<String> zjlx = C0015.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zjlx.contains(z.getFrzjlx())){
+                throw new ServiceException("法定代表人证件类型不符合条件,请检查");
+            }
+
+            SysDeptJl sysDeptJl = sysDeptJlMapper.selectSysDeptJlByCode(z.getSzxzqh());
+            if (sysDeptJl==null){
+                throw new ServiceException("请输入正确的行政区划代码");
+            }
+
+            AjaxResult ch042 = remoteDictDataService.getDictDataByDictType("CH042", SecurityConstants.INNER);
+            List<String> sjly = ch042.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!sjly.contains(z.getSjly())){
+                throw new ServiceException("数据来源不符合条件,请检查");
+            }
+
+            AjaxResult cz035 = remoteDictDataService.getDictDataByDictType("CZ035", SecurityConstants.INNER);
+            List<String> isCf = cz035.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!isCf.contains(z.getIsCf())){
+                throw new ServiceException("是否被处罚不符合条件,请检查");
             }
+
         });
         // 流特性去掉重复Map
         Long count = list.stream().distinct().count();

+ 59 - 59
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/domain/ZwywLrJbxx.java

@@ -55,14 +55,14 @@ public class ZwywLrJbxx extends BaseEntity
     private String lrXm;
 
     /** 性别 */
-    @Excel(name = "性别")
+//    @Excel(name = "性别")
     @ApiModelProperty(value = "性别", required = true)
     @NotBlank(message = "{性别}",groups = AddGroup.class)
     @DictV(type = "C0007",message = "{性别}")
     private String lrXb;
 
     /** 出生日期 */
-    @Excel(name = "出生日期")
+//    @Excel(name = "出生日期")
     @ApiModelProperty(value = "出生日期", required = true)
     @NotBlank(message = "{出生日期}",groups = AddGroup.class)
     @DateV(pattern = "yyyyMMdd", message = "{出生日期}")
@@ -110,13 +110,13 @@ public class ZwywLrJbxx extends BaseEntity
     private String lrHjdz;
 
     /** 户籍地址名称 */
-    @Excel(name = "户籍地址名称")
+//    @Excel(name = "户籍地址名称")
     @ApiModelProperty(value = "户籍地址名称")
     @TableField(exist = false)
     private String lrHjdzName;
 
     /** 户籍地址补充信息 */
-    @Excel(name = "户籍地址补充信息")
+//    @Excel(name = "户籍地址补充信息")
     @ApiModelProperty(value = "户籍地址补充信息")
     @Size(max=100, message = "{户籍地址补充信息}")
     private String lrHjbcxx;
@@ -136,49 +136,49 @@ public class ZwywLrJbxx extends BaseEntity
     private String isYz;
 
     /** 现居地址 */
-    @Excel(name = "现居地址")
+//    @Excel(name = "现居地址")
     @ApiModelProperty(value = "现居地址")
     @NotBlank(message = "{现居地址}",groups = AddGroup.class)
     private String lrXjdz;
 
     /** 现居地址名称 */
-    @Excel(name = "现居地址名称")
+//    @Excel(name = "现居地址名称")
     @ApiModelProperty(value = "现居地址名称")
     @TableField(exist = false)
     private String lrXjdzName;
 
     /** 现居地址补充信息 */
-    @Excel(name = "现居地址补充信息")
+//    @Excel(name = "现居地址补充信息")
     @ApiModelProperty(value = "现居地址补充信息")
     @NotBlank(message = "{现居地址补充信息}",groups = AddGroup.class)
     private String lrXjdzBcxx;
 
     /** 常用联系电话 */
-    @Excel(name = "常用联系电话")
+//    @Excel(name = "常用联系电话")
     @ApiModelProperty(value = "常用联系电话")
     private String lrCydh;
 
     /** 婚姻状况 */
-    @Excel(name = "婚姻状况")
+//    @Excel(name = "婚姻状况")
     @ApiModelProperty(value = "婚姻状况")
     @DictV(type = "XZ025",message = "{婚姻状况}")
     private String lrHyzk;
 
     /** 配偶姓名 */
-    @Excel(name = "配偶姓名")
+//    @Excel(name = "配偶姓名")
     @ApiModelProperty(value = "配偶姓名")
     @Size(max = 72, message = "{配偶姓名}")
     @ChineseV(message = "{配偶姓名}")
     private String lrPoxm;
 
     /** 配偶公民身份号码 */
-    @Excel(name = "配偶公民身份号码")
+//    @Excel(name = "配偶公民身份号码")
     @ApiModelProperty(value = "配偶公民身份号码")
     @IdCardV(message = "{配偶公民身份号码}")
     private String lrPoZjmh;
 
     /** 老年人图片 */
-    @Excel(name = "老年人图片")
+//    @Excel(name = "老年人图片")
     @ApiModelProperty(value = "老年人图片")
     @Size(max = 100, message = "{老年人图片}")
     private String lrTx;
@@ -190,287 +190,287 @@ public class ZwywLrJbxx extends BaseEntity
     private String lrSbdz;
 
     /** 监护人姓名 */
-    @Excel(name = "监护人姓名")
+//    @Excel(name = "监护人姓名")
     @ApiModelProperty(value = "监护人姓名")
     @Size(max = 72, message = "{监护人姓名}")
     @ChineseV(message = "{监护人姓名}")
     private String jhrXm;
 
     /** 监护人手机号码 */
-    @Excel(name = "监护人手机号码")
+//    @Excel(name = "监护人手机号码")
     @ApiModelProperty(value = "监护人手机号码")
     @MobileV(message = "{监护人手机号码}")
     private String jhrSjhm;
 
     /** 与监护人关系 */
-    @Excel(name = "与监护人关系")
+//    @Excel(name = "与监护人关系")
     @ApiModelProperty(value = "与监护人关系")
     @DictV(type = "C0032",message = "{与监护人关系}")
     private String jhrGx;
 
     /** 是否失智老人 */
-    @Excel(name = "是否失智老人")
+//    @Excel(name = "是否失智老人")
     @ApiModelProperty(value = "是否失智老人")
     @DictV(type = "CZ035",message = "{是否失智老人}")
     private String isSz;
 
     /** 是否留守 */
-    @Excel(name = "是否留守")
+//    @Excel(name = "是否留守")
     @ApiModelProperty(value = "是否留守")
     @DictV(type = "CZ035",message = "{是否留守}")
     private String isLs;
 
     /** 是否低保 */
-    @Excel(name = "是否低保")
+//    @Excel(name = "是否低保")
     @ApiModelProperty(value = "是否低保")
     @DictV(type = "CZ035",message = "{是否低保}")
     private String isDb;
 
     /** 生活状况 */
-    @Excel(name = "生活状况")
+//    @Excel(name = "生活状况")
     @ApiModelProperty(value = "生活状况")
     @DictV(type = "CZ027", isMuti = true, message = "{生活状况}")
     private String lrJjzk;
 
     /** 是否独居老人 */
-    @Excel(name = "是否独居老人")
+//    @Excel(name = "是否独居老人")
     @ApiModelProperty(value = "是否独居老人")
     @DictV(type = "CZ035",message = "{是否独居老人}")
     private String isDj;
 
     /** 是否孤老 */
-    @Excel(name = "是否孤老")
+//    @Excel(name = "是否孤老")
     @ApiModelProperty(value = "是否孤老")
     @DictV(type = "CZ035",message = "{是否孤老}")
     private String isGl;
 
     /** 是否特困 */
-    @Excel(name = "是否特困")
+//    @Excel(name = "是否特困")
     @ApiModelProperty(value = "是否特困")
     @NotBlank(message = "{是否特困}",groups = AddGroup.class)
     @DictV(type = "CZ035",message = "{是否特困}")
     private String isTk;
 
     /** 是否低收入 */
-    @Excel(name = "是否低收入")
+//    @Excel(name = "是否低收入")
     @ApiModelProperty(value = "是否低收入", required = true)
     @NotBlank(message = "{是否低收入}",groups = AddGroup.class)
     @DictV(type = "CZ035",message = "{是否低收入}")
     private String isDsr;
 
     /** 是否长护险定点机构 */
-    @Excel(name = "是否长护险定点机构")
+//    @Excel(name = "是否长护险定点机构")
     @ApiModelProperty(value = "是否长护险定点机构", required = true)
     @NotBlank(message = "{是否长护险定点机构}",groups = AddGroup.class)
     @DictV(type = "CZ035",message = "{是否长护险定点机构}")
     private String isChx;
 
     /** 是否签约医养结合 */
-    @Excel(name = "是否签约医养结合")
+//    @Excel(name = "是否签约医养结合")
     @ApiModelProperty(value = "是否签约医养结合")
     @DictV(type = "CZ035",message = "{是否签约医养结合}")
     private String isYyjh;
 
     /** 是否失能老人 */
-    @Excel(name = "是否失能老人")
+//    @Excel(name = "是否失能老人")
     @ApiModelProperty(value = "是否失能老人")
     @DictV(type = "CZ035",message = "{是否失能老人}")
     private String isSn;
 
     /** 能力评估等级 */
-    @Excel(name = "能力评估等级")
+//    @Excel(name = "能力评估等级")
     @ApiModelProperty(value = "能力评估等级")
     @DictV(type = "CZ036",message = "{能力评估等级}")
     private String lrStpgdj;
 
     /** 是否参加社保 */
-    @Excel(name = "是否参加社保")
+//    @Excel(name = "是否参加社保")
     @ApiModelProperty(value = "是否参加社保")
     @DictV(type = "CZ035",message = "{是否参加社保}")
     private String isCjsb;
 
     /** 医保类别 */
-    @Excel(name = "医保类别")
+//    @Excel(name = "医保类别")
     @ApiModelProperty(value = "医保类别", required = true)
 //    @NotBlank(message = "{医保类别}")
     @DictV(type = "CH045",message = "{医保类别}")
     private String lrYblb;
 
     /** 健康状况 */
-    @Excel(name = "健康状况")
+//    @Excel(name = "健康状况")
     @ApiModelProperty(value = "健康状况", required = true)
 //    @NotBlank(message = "{健康状况}")
     @DictV(type = "XZ015", isMuti = true, message = "{健康状况}")
     private String lrJkzk;
 
     /** 残疾类型 */
-    @Excel(name = "残疾类型")
+//    @Excel(name = "残疾类型")
     @ApiModelProperty(value = "残疾类型")
     @DictV(type = "C0024", isMuti = true, message = "{残疾类型}")
     private String lrCjlx;
 
     /** 残疾等级 */
-    @Excel(name = "残疾等级")
+//    @Excel(name = "残疾等级")
     @ApiModelProperty(value = "残疾等级")
     @DictV(type = "C0025",message = "{残疾等级}")
     private String lrCjdj;
 
     /** 能力状况 */
-    @Excel(name = "能力状况")
+//    @Excel(name = "能力状况")
     @ApiModelProperty(value = "能力状况")
     @DictV(type = "CH050",message = "{能力状况}")
     private String lrNlzk;
 
     /** 收入来源 */
-    @Excel(name = "收入来源")
+//    @Excel(name = "收入来源")
     @ApiModelProperty(value = "收入来源")
     @DictV(type = "CH054", isMuti = true, message = "{收入来源}")
     private String lrSrly;
 
     /** 其他收入来源 */
-    @Excel(name = "其他收入来源")
+//    @Excel(name = "其他收入来源")
     @ApiModelProperty(value = "其他收入来源")
     @Size(max = 100, message = "{其他收入来源}")
     private String lrSrlyQt;
 
     /** 上年度可支配收入 */
-    @Excel(name = "上年度可支配收入")
+//    @Excel(name = "上年度可支配收入")
     @ApiModelProperty(value = "上年度可支配收入")
     @DictV(type = "XZ014", message = "{上年度可支配收入}")
     private String lrKzpsr;
 
     /** 个人年收入 */
-    @Excel(name = "个人年收入")
+//    @Excel(name = "个人年收入")
     @ApiModelProperty(value = "个人年收入")
     @DictV(type = "XZ014", message = "{个人年收入}")
     private String lrGrnrs;
 
     /** 家庭救助帮扶 */
-    @Excel(name = "家庭救助帮扶")
+//    @Excel(name = "家庭救助帮扶")
     @ApiModelProperty(value = "家庭救助帮扶")
     @DictV(type = "CH058", isMuti = true, message = "{家庭救助帮扶}")
     private String lrJtjzbfqk;
 
     /** 其他帮扶情况 */
-    @Excel(name = "其他帮扶情况")
+//    @Excel(name = "其他帮扶情况")
     @ApiModelProperty(value = "其他帮扶情况")
     @Size(max = 100, message = "{其他帮扶情况}")
     private String lrJtjzbfqkQt;
 
     /** 陪伴居住情况 */
-    @Excel(name = "陪伴居住情况")
+//    @Excel(name = "陪伴居住情况")
     @ApiModelProperty(value = "陪伴居住情况")
     @DictV(type = "CH057",isMuti = true, message = "{陪伴居住情况}")
     private String lrPbjjqk;
 
     /** 其他陪伴居住情况 */
-    @Excel(name = "其他陪伴居住情况")
+//    @Excel(name = "其他陪伴居住情况")
     @ApiModelProperty(value = "其他陪伴居住情况")
     @Size(max = 100, message = "{其他陪伴居住情况}")
     private String lrPbjjqkQt;
 
     /** 日常生活照料人 */
-    @Excel(name = "日常生活照料人")
+//    @Excel(name = "日常生活照料人")
     @ApiModelProperty(value = "日常生活照料人")
     @DictV(type = "CH056", isMuti = true, message = "{日常生活照料人}")
     private String zlrLb;
 
     /** 与其他人员关系 */
-    @Excel(name = "与其他人员关系")
+//    @Excel(name = "与其他人员关系")
     @ApiModelProperty(value = "与其他人员关系")
     @Size(max = 72, message = "{与其他人员关系}")
     private String zlrGx;
 
     /** 主要照料人姓名 */
-    @Excel(name = "主要照料人姓名")
+//    @Excel(name = "主要照料人姓名")
     @ApiModelProperty(value = "主要照料人姓名")
     @Size(max = 72, message = "{主要照料人姓名}")
     @ChineseV(message = "{主要照料人姓名}")
     private String zlrXm;
 
     /** 主要照料人性别(C0007) */
-    @Excel(name = "主要照料人性别", dictType = "C0007")
+//    @Excel(name = "主要照料人性别", dictType = "C0007")
     @ApiModelProperty(value = "主要照料人性别(C0007)")
     @DictV(type = "C0007",message = "{主要照料人性别}")
     private String zlrXb;
 
     /** 主要照料人联系电话 */
-    @Excel(name = "主要照料人联系电话")
+//    @Excel(name = "主要照料人联系电话")
     @ApiModelProperty(value = "主要照料人联系电话")
     private String zlrDh;
 
     /** 关爱服务需求 */
-    @Excel(name = "关爱服务需求")
+//    @Excel(name = "关爱服务需求")
     @ApiModelProperty(value = "关爱服务需求")
     @DictV(type = "CH055", isMuti = true, message = "{关爱服务需求}")
     private String lrGaxq;
 
     /** 其他关爱服务需求 */
-    @Excel(name = "其他关爱服务需求")
+//    @Excel(name = "其他关爱服务需求")
     @ApiModelProperty(value = "其他关爱服务需求")
     @Size(max = 100, message = "{其他关爱服务需求}")
     private String lrGaxqQt;
 
     /** 人员状态(C0034) */
-    @Excel(name = "人员状态", dictType = "C0034")
+//    @Excel(name = "人员状态", dictType = "C0034")
     @ApiModelProperty(value = "人员状态(C0034)", required = true)
     @DictV(type = "C0034",message = "{人员状态}")
     private String ryzt;
 
     /** 残疾证号*/
-    @Excel(name = "残疾证号")
+//    @Excel(name = "残疾证号")
     @ApiModelProperty(value = "残疾证号")
     @Size(max = 20, message = "{残疾证号}")
     private String cjzh;
 
     /** 是否优抚对象(CZ035) */
-    @Excel(name = "是否优抚对象", dictType = "CZ035")
+//    @Excel(name = "是否优抚对象", dictType = "CZ035")
     @ApiModelProperty(value = "是否优抚对象(CZ035)", required = true)
     @DictV(type = "CZ035",message = "{是否优抚对象}")
     private String isYf;
 
     /** 文化程度(C0008) */
-    @Excel(name = "文化程度", dictType = "C0008")
+//    @Excel(name = "文化程度", dictType = "C0008")
     @ApiModelProperty(value = "文化程度(C0008)", required = true)
     @DictV(type = "C0008",message = "{文化程度}")
     private String whcd;
-    
+
 
     /** 银行账号*/
-    @Excel(name = "银行账号")
+//    @Excel(name = "银行账号")
     @ApiModelProperty(value = "银行账号")
     @Size(max = 19, message = "{银行账号}")
     private String yhzh;
 
 
     /** 开户名称*/
-    @Excel(name = "开户名称")
+//    @Excel(name = "开户名称")
     @ApiModelProperty(value = "开户名称")
     @Size(max = 72, message = "{开户名称}")
     private String khmc;
 
     /** 家庭人均收入 */
-    @Excel(name = "家庭人均收入")
+//    @Excel(name = "家庭人均收入")
     @ApiModelProperty(value = "家庭人均收入")
     @Range(min=0,max=10000000000L,message = "{家庭人均收入}")
     @Digits(integer = 10,fraction = 2,message = "{家庭人均收入}")
     private String jtrjsr;
 
     /** 社保卡号*/
-    @Excel(name = "社保卡号")
+//    @Excel(name = "社保卡号")
     @ApiModelProperty(value = "社保卡号")
     @Size(max = 12, message = "{社保卡号}")
     private String sbkh;
 
 
     /** 数据流转状态 */
-    @Excel(name = "数据流转状态")
+//    @Excel(name = "数据流转状态")
     @ApiModelProperty(value = "数据流转状态")
     @DictV(type = "CH051",message = "{数据流转状态}")
     private String lzzt;
 
     /** 上报地址名称 */
-    @Excel(name = "上报地址名称")
+//    @Excel(name = "上报地址名称")
     @ApiModelProperty(value = "上报地址名称")
     @TableField(exist = false)
     private String lrSbdzName;

+ 4 - 1
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/mapper/ZwywLrJbxxMapper.java

@@ -4,8 +4,10 @@ import com.ruoyi.business.domain.ZwywLrJbxx;
 import com.ruoyi.common.datascope.handler.DataColumn;
 import com.ruoyi.common.datascope.handler.DataPermission;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 老人基本信息Mapper接口
@@ -34,7 +36,8 @@ public interface ZwywLrJbxxMapper extends BaseMapperPlus<ZwywLrJbxx> {
     public int updateZwywLrJbxx(ZwywLrJbxx zwywLrJbxx);
     public int updateZwywLrJbxxLzzt(ZwywLrJbxx zwywLrJbxx);
 
+    public  int batchZwywLrJbxx(List<ZwywLrJbxx> zwywLrJbxxList);
 
-
+    List<Map<String,Object>> selectLrjbxxLists();
 
 }

+ 7 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/IZwywLrJbxxService.java

@@ -2,7 +2,11 @@ package com.ruoyi.business.service;
 
 import com.ruoyi.business.domain.ZwywLrJbxx;
 import com.ruoyi.common.datasource.annotation.Slave;
+import com.ruoyi.system.validate.group.AddGroup;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.validation.annotation.Validated;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -60,4 +64,7 @@ public interface IZwywLrJbxxService
      * @return 结果
      */
     public int deleteZwywLrJbxxByIds(String[] ids);
+
+    public String importLrjbxx(List<ZwywLrJbxx> zwywLrJbxxList);
+
 }

+ 173 - 3
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrJbxxServiceImpl.java

@@ -3,27 +3,38 @@ package com.ruoyi.business.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.copier.CopyOptions;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson2.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywLrBhxx;
 import com.ruoyi.business.domain.ZwywLrJbxx;
 import com.ruoyi.business.mapper.ZwywLrBhxxMapper;
 import com.ruoyi.business.mapper.ZwywLrJbxxMapper;
 import com.ruoyi.business.service.IZwywLrJbxxService;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.SysDeptJlStatus;
+import com.ruoyi.system.domain.SysDeptJl;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
+import com.ruoyi.system.validate.group.AddGroup;
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import javax.validation.Valid;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collector;
+import java.util.stream.Collectors;
 
 /**
  * 老人基本信息Service业务层处理
@@ -43,6 +54,9 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService
     @Autowired
     private ZwywLrBhxxMapper zwywLrBhxxMapper;
 
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
     /**
      * 查询老人基本信息
      *
@@ -316,6 +330,7 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService
         return zwywLrJbxxMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+
     public void recursionParent(List<String> qhIds, List<String> qhNames, String parentId) {
         Map<String, Object> map;
         if(parentId.length() > 20 ){
@@ -341,4 +356,159 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService
         }
     }
 
+    @Override
+    public String importLrjbxx(List<ZwywLrJbxx> zwywLrJbxxList) {
+        if (StringUtils.isNull(zwywLrJbxxList) || zwywLrJbxxList.size() == 0){
+            throw new ServiceException("导入数据不能为空");
+        }
+        List<Map<String,Object>> list = new ArrayList<>();
+        zwywLrJbxxList.forEach(z->{
+            if (StringUtils.isNotEmpty(z.getLrXm())){
+                Map<String,Object> map = new HashMap<>();
+                map.put("老人身份证件号码",z.getLrZjhm());
+                map.put("老人姓名",z.getLrXm());
+//                map.put("性别",z.getLrXb());
+//                map.put("出生日期",z.getLrCsrq());
+                map.put("学历",z.getLrXl());
+                map.put("政治面貌",z.getLrZzmm());
+                map.put("民族",z.getLrMz());
+                map.put("国籍",z.getLrGj());
+                map.put("籍贯",z.getLrJg());
+                map.put("户籍地址",z.getLrHjdz());
+                map.put("户籍类别",z.getLrHjlb());
+                map.put("户籍与现居地址一致",z.getIsYz());
+                list.add(map);
+            }else{
+                throw new ServiceException("老人身份证件号码,老人姓名,性别,出生日期,学历,政治面貌,民族,国籍,籍贯,户籍地址,户籍类别,户籍与现居地址一致 不能为空 请检查!");
+            }
+            if (z.getLrZjhm().length()!=18){
+                throw new ServiceException("请检查证件号码是否录入正确");
+            }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String sqrxm = z.getLrXm();
+            Matcher m = p.matcher(sqrxm);
+            if(m.find()==false) {
+                throw new ServiceException("老人姓名 必须含有一个汉字,请检查");
+            }
+            AjaxResult c00081 = remoteDictDataService.getDictDataByDictType("C0008", SecurityConstants.INNER);
+            List<String> data = c00081.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!data.contains(z.getLrXl())){
+                throw new ServiceException("学历不符合条件,请检查");
+            }
+
+            AjaxResult c0013 = remoteDictDataService.getDictDataByDictType("C0013", SecurityConstants.INNER);
+            List<String> zzms = c0013.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zzms.contains(z.getLrZzmm())){
+                throw new ServiceException("政治面貌不符合条件,请检查");
+            }
+
+            AjaxResult xz002 = remoteDictDataService.getDictDataByDictType("XZ002", SecurityConstants.INNER);
+            List<String> gj = xz002.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!gj.contains(z.getLrGj())){
+                throw new ServiceException("国籍不符合条件,请检查");
+            }
+
+            AjaxResult c0031 = remoteDictDataService.getDictDataByDictType("C0031", SecurityConstants.INNER);
+            List<String> hjlb = c0031.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!hjlb.contains(z.getLrHjlb())){
+                throw new ServiceException("户籍类别不符合条件,请检查");
+            }
+
+            AjaxResult cz035 = remoteDictDataService.getDictDataByDictType("CZ035", SecurityConstants.INNER);
+            List<String> isYz = cz035.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!isYz.contains(z.getIsYz())){
+                throw new ServiceException("户籍与现居地址一致不符合条件,请检查");
+            }
+
+            SysDeptJl sysDeptJl = sysDeptJlMapper.selectSysDeptJlByCode(z.getLrHjdz());
+            if (sysDeptJl==null){
+                throw new ServiceException("请输入正确的户籍地址代码");
+            }
+        });
+        // 流特性去掉重复Map
+        Long count = list.stream().distinct().count();
+        boolean isRepeat = count < list.size();
+        if (isRepeat){
+            throw new ServiceException("导入的Excel有重复信息,请检查");
+        }
+        int successNum = 0;
+        int failureNum= 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        List<Map<String,Object>> lists = zwywLrJbxxMapper.selectLrjbxxLists();
+        int index = 0;
+        for (ZwywLrJbxx zwywLrJbxx : zwywLrJbxxList){
+            index++;
+            Map<String,Object> map = new HashMap<>();
+            map.put("lrZjhm",zwywLrJbxx.getLrZjhm());
+            map.put("lrXm",zwywLrJbxx.getLrXm());
+//            map.put("lrXb",zwywLrJbxx.getLrXb());
+//            map.put("lrCsrq",zwywLrJbxx.getLrCsrq());
+            map.put("lrXl",zwywLrJbxx.getLrXl());
+            map.put("lrZzmm",zwywLrJbxx.getLrZzmm());
+            map.put("lrMz",zwywLrJbxx.getLrMz());
+            map.put("lrGj",zwywLrJbxx.getLrGj());
+            map.put("lrJg",zwywLrJbxx.getLrJg());
+            map.put("lrHjdz",zwywLrJbxx.getLrHjdz());
+            map.put("lrHjlb",zwywLrJbxx.getLrHjlb());
+            map.put("isYz",zwywLrJbxx.getIsYz());
+            if (lists.contains(map)){
+                failureNum++;
+                failureMsg.append("<br/>" + failureNum + "<" + "姓名:" + zwywLrJbxx.getLrXm() + "> "+ "证件号码:" + zwywLrJbxx.getLrZjhm() + " 已存在,请修改。");
+            }
+        }
+        List<ZwywLrJbxx> sqInsertList = new ArrayList<>();
+        for (int i =0;i<zwywLrJbxxList.size();i++){
+            //导入
+            ZwywLrJbxx lrJbxx = new ZwywLrJbxx();
+            lrJbxx.setLrZjhm(zwywLrJbxxList.get(i).getLrZjhm());
+            lrJbxx.setLrXm(zwywLrJbxxList.get(i).getLrXm());
+            String ss = zwywLrJbxxList.get(i).getLrZjhm();
+            String year = "";
+            String month = "";
+            String day = "";
+            int gender = 0;
+            if (StringUtils.isNotEmpty(ss)){
+                char c = ss.charAt(ss.length() - 2);
+                gender = Integer.parseInt(String.valueOf(c));
+                year = ss.substring(6).substring(0, 4);
+                month = ss.substring(10).substring(0, 2);
+                day = ss.substring(12).substring(0, 2);
+            }
+            if (gender % 2 ==1){
+                lrJbxx.setLrXb("1");
+            }else {
+                lrJbxx.setLrXb("0");
+            }
+            lrJbxx.setLrCsrq(year+month+day);
+            lrJbxx.setLrXl(zwywLrJbxxList.get(i).getLrXl());
+            lrJbxx.setLrZzmm(zwywLrJbxxList.get(i).getLrZzmm());
+            lrJbxx.setLrMz(zwywLrJbxxList.get(i).getLrMz());
+            lrJbxx.setLrGj(zwywLrJbxxList.get(i).getLrGj());
+            lrJbxx.setLrJg(zwywLrJbxxList.get(i).getLrJg());
+            lrJbxx.setLrHjdz(zwywLrJbxxList.get(i).getLrHjdz());
+            lrJbxx.setLrHjlb(zwywLrJbxxList.get(i).getLrHjlb());
+            lrJbxx.setIsYz(zwywLrJbxxList.get(i).getIsYz());
+            sqInsertList.add(lrJbxx);
+            successNum++;
+            successMsg.append("<br/>"+ successNum + "、老人信息: " + zwywLrJbxxList.get(i).getLrXm() + " 账号导入成功");
+        }
+        if (failureNum > 0){
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        if (sqInsertList.size()>0){
+            zwywLrJbxxMapper.batchZwywLrJbxx(sqInsertList);
+        }
+        return successMsg.toString();
+    }
+
 }

+ 40 - 0
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml

@@ -450,4 +450,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+
+    <insert id="batchZwywLrJbxx">
+        insert into zwyw_lr_jbxx( id,lr_zjhm,lr_xm,lr_xb,lr_csrq,lr_xl,lr_zzmm,lr_mz,lr_gj,lr_jg,lr_hjdz,lr_hjlb,is_yz,create_time_str,
+        create_user_id,create_by,create_user_type,create_unit,create_unit_name,create_area_code) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (
+            (REPLACE( UUID(),"-","")),#{item.lrZjhm},#{item.lrXm},#{item.lrXb},#{item.lrCsrq},
+            #{item.lrXl},#{item.lrZzmm},#{item.lrMz},#{item.lrGj},#{item.lrJg},#{item.lrHjdz},
+            #{item.lrHjlb},#{item.isYz},#{item.createTimeStr},
+            #{item.createUserId},#{item.createBy},#{item.createUserType},#{item.createUnit},
+            #{item.createUnitName},#{item.createAreaCode})
+        </foreach>
+    </insert>
+
+    <select id="selectLrjbxxLists" resultType="java.util.HashMap">
+	SELECT
+		id,
+		lr_zjhm,
+		lr_xm,
+		lr_xb,
+		lr_csrq,
+		lr_xl,
+		lr_zzmm,
+		lr_mz,
+		lr_gj,
+		lr_jg,
+		lr_hjdz,
+		lr_hjlb,
+		is_yz,
+		create_time_str,
+		create_user_id,
+		create_by,
+		create_user_type,
+		create_unit,
+		create_unit_name,
+		create_area_code
+	FROM
+	zwyw_lr_jbxx
+    </select>
+
 </mapper>

+ 14 - 14
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdCwgl.java

@@ -38,12 +38,12 @@ public class ZwywTsxdCwgl extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键标识 */
-    @Excel(name = "主键标识")
+//    @Excel(name = "主键标识")
     @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
 
-    @Excel(name = "行政区划")
+//    @Excel(name = "行政区划")
     @NotBlank(message = "{行政区划}",groups = AddGroup.class)
     @Size(min = 1, max = 12, message = "{行政区划}")
     private String xzqh;
@@ -84,7 +84,7 @@ public class ZwywTsxdCwgl extends BaseEntity
     private String yjkzpsr;
 
     /** 失能情况(XZ067) */
-    @Excel(name = "失能情况", dictType = "XZ067")
+    @Excel(name = "失能情况")
     @ApiModelProperty(value = "失能情况(XZ067)", required = true)
     @NotBlank(message = "{失能情况}",groups = AddGroup.class)
     @DictV(type = "XZ067",message = "{失能情况}")
@@ -141,28 +141,28 @@ public class ZwywTsxdCwgl extends BaseEntity
     private String mzshyj;
 
     /** 评估适老化改造方向 */
-    @Excel(name = "评估适老化改造方向")
+//    @Excel(name = "评估适老化改造方向")
     @ApiModelProperty(value = "评估适老化改造方向", required = true)
     @Size(min = 1, max = 200, message = "{评估适老化改造方向}")
 
     private String pgslhgzfx;
 
     /** 预算经费  */
-    @Excel(name = "预算经费 ")
+//    @Excel(name = "预算经费 ")
     @ApiModelProperty(value = "预算经费 ", required = true)
     @Range(min=0,max=10000000000L,message = "{预算经费 }")
     @Digits(integer = 10,fraction = 2,message = "{预算经费 }")
     private String ysjf;
 
     /** 评估机构名称 */
-    @Excel(name = "评估机构名称")
+//    @Excel(name = "评估机构名称")
     @ApiModelProperty(value = "评估机构名称", required = true)
     @Size(min = 1, max = 100, message = "{评估机构名称}")
 
     private String pgjgmc;
 
     /** 评估人员姓名 */
-    @Excel(name = "评估人员姓名")
+//    @Excel(name = "评估人员姓名")
     @ApiModelProperty(value = "评估人员姓名", required = true)
     @Size(min = 1, max = 100, message = "{评估人员姓名}")
 
@@ -170,34 +170,34 @@ public class ZwywTsxdCwgl extends BaseEntity
     private String pgrxm;
 
     /** 竣工适老化改造方向 500 */
-    @Excel(name = "竣工适老化改造方向 500")
+//    @Excel(name = "竣工适老化改造方向 500")
     @ApiModelProperty(value = "竣工适老化改造方向 500", required = true)
     @Size(min = 1, max = 500, message = "{竣工适老化改造方向 500}")
 
     private String jgslhgzfx;
 
     /** 实际金额 */
-    @Excel(name = "实际金额")
+//    @Excel(name = "实际金额")
     @ApiModelProperty(value = "实际金额", required = true)
     @Range(min=0,max=10000000000L,message = "{实际金额}")
     @Digits(integer = 10,fraction = 2,message = "{实际金额}")
     private String sjje;
 
     /** 老人满意程度(XZ068) */
-    @Excel(name = "老人满意程度", dictType = "XZ068")
+//    @Excel(name = "老人满意程度", dictType = "XZ068")
     @ApiModelProperty(value = "老人满意程度(XZ068)", required = true)
     @DictV(type = "XZ068",message = "{老人满意程度}")
     private String lrmycd;
 
     /** 验收机构名称 */
-    @Excel(name = "验收机构名称")
+//    @Excel(name = "验收机构名称")
     @ApiModelProperty(value = "验收机构名称", required = true)
     @Size(min = 1, max = 100, message = "{验收机构名称}")
 
     private String ysjgmc;
 
     /** 验收人员姓名 */
-    @Excel(name = "验收人员姓名")
+//    @Excel(name = "验收人员姓名")
     @ApiModelProperty(value = "验收人员姓名", required = true)
     @Size(min = 1, max = 100, message = "{验收人员姓名}")
 
@@ -205,13 +205,13 @@ public class ZwywTsxdCwgl extends BaseEntity
     private String ysryxm;
 
     /** 数据更新日期 */
-    @Excel(name = "数据更新日期")
+//    @Excel(name = "数据更新日期")
     @ApiModelProperty(value = "数据更新日期", required = true)
     @DateV(pattern = "yyyyMMdd", message = "{数据更新日期}")
     private String gxrq;
 
     /** 上报状态(XZ033) */
-    @Excel(name = "上报状态", dictType = "XZ033")
+//    @Excel(name = "上报状态")
     @ApiModelProperty(value = "上报状态(XZ033)", required = true)
     @DictV(type = "XZ033",message = "{上报状态}")
     private String sbzt;

+ 2 - 2
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdPblncp.java

@@ -36,7 +36,7 @@ public class ZwywTsxdPblncp extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键标识 */
-    @Excel(name = "主键标识")
+//    @Excel(name = "主键标识")
     @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
@@ -57,7 +57,7 @@ public class ZwywTsxdPblncp extends BaseEntity
     private String sl;
 
     /** 家庭养老床位建设id */
-    @Excel(name = "家庭养老床位建设id")
+//    @Excel(name = "家庭养老床位建设id")
     @ApiModelProperty(value = "家庭养老床位建设id")
     @LogicV(message = "{家庭养老床位建设id}",handler = BusinessCwVH.class,groups = LogicGroup.class)
     private String jtId;

+ 2 - 2
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdPbzncp.java

@@ -36,7 +36,7 @@ public class ZwywTsxdPbzncp extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键标识 */
-    @Excel(name = "主键标识")
+//    @Excel(name = "主键标识")
     @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
@@ -57,7 +57,7 @@ public class ZwywTsxdPbzncp extends BaseEntity
     private String sl;
 
     /** 家庭养老床位建设id */
-    @Excel(name = "家庭养老床位建设id")
+//    @Excel(name = "家庭养老床位建设id")
     @ApiModelProperty(value = "家庭养老床位建设id")
     @LogicV(message = "{家庭养老床位建设id}",handler = BusinessCwVH.class,groups = LogicGroup.class)
     private String jtId;

+ 13 - 13
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/domain/ZwywTsxdSmfw.java

@@ -35,7 +35,7 @@ public class ZwywTsxdSmfw extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键标识 */
-    @Excel(name = "主键标识")
+//    @Excel(name = "主键标识")
     @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
@@ -44,13 +44,13 @@ public class ZwywTsxdSmfw extends BaseEntity
     @TableField(exist = false)
     private String mc;
 
-    @Excel(name = "行政区划")
+//    @Excel(name = "行政区划")
     @NotBlank(message = "{行政区划}",groups = AddGroup.class)
     @Size(min = 1, max = 12, message = "{行政区划}")
     private String xzqh;
 
     /** 项目id */
-    @Excel(name = "项目id")
+//    @Excel(name = "项目id")
     @ApiModelProperty(value = "项目id", required = true)
     @NotBlank(message = "{项目id}",groups = AddGroup.class)
     private String xmId;
@@ -79,7 +79,7 @@ public class ZwywTsxdSmfw extends BaseEntity
     private String yjkzpsr;
 
     /** 失能情况(XZ067) */
-    @Excel(name = "失能情况", dictType = "XZ067")
+    @Excel(name = "失能情况")
     @ApiModelProperty(value = "失能情况(XZ067)", required = true)
     @NotBlank(message = "{失能情况}",groups = AddGroup.class)
     @DictV(type = "XZ067",message = "{失能情况}")
@@ -120,49 +120,49 @@ public class ZwywTsxdSmfw extends BaseEntity
     private String mzspyj;
 
     /** 享受上门服务总次数 */
-    @Excel(name = "享受上门服务总次数")
+//    @Excel(name = "享受上门服务总次数")
     @ApiModelProperty(value = "享受上门服务总次数")
     @Range(min=0,max=10000000000L,message = "{享受上门服务总次数}")
     @NumberV(message = "{享受上门服务总次数}")
     private String xssmfwcs;
 
     /** 服务内容(XZ069) */
-    @Excel(name = "服务内容", dictType = "XZ069")
+//    @Excel(name = "服务内容", dictType = "XZ069")
     @ApiModelProperty(value = "服务内容(XZ069)")
     @DictV(type = "XZ069",isMuti = true,message = "{服务内容}")
     private String fwnr;
 
     /** 服务内容其他 */
-    @Excel(name = "服务内容其他")
+//    @Excel(name = "服务内容其他")
     @ApiModelProperty(value = "服务内容其他")
     @Size(max = 100, message = "{服务内容其他}")
 
     private String fwnrqt;
 
     /** 服务满意度(XZ068) */
-    @Excel(name = "服务满意度", dictType = "XZ068")
+//    @Excel(name = "服务满意度", dictType = "XZ068")
     @ApiModelProperty(value = "服务满意度(XZ068)")
     @DictV(type = "XZ068",message = "{服务满意度}")
     private String fwmyd;
 
     /** 服务机构名称 */
-    @Excel(name = "服务机构名称")
+//    @Excel(name = "服务机构名称")
     @ApiModelProperty(value = "服务机构名称")
     @Size(max = 100, message = "{服务机构名称}")
 
     private String fwjgmc;
 
     /** 数据更新日期 */
-    @Excel(name = "数据更新日期")
+//    @Excel(name = "数据更新日期")
     @ApiModelProperty(value = "数据更新日期", required = true)
-    @NotBlank(message = "{数据更新日期}",groups = AddGroup.class)
+//    @NotBlank(message = "{数据更新日期}",groups = AddGroup.class)
     @DateV(pattern = "yyyyMMdd", message = "{数据更新日期}")
     private String gxrq;
 
     /** 上报状态(XZ033) */
-    @Excel(name = "上报状态", dictType = "XZ033")
+//    @Excel(name = "上报状态", dictType = "XZ033")
     @ApiModelProperty(value = "上报状态(XZ033)", required = true)
-    @NotBlank(message = "{上报状态}",groups = AddGroup.class)
+//    @NotBlank(message = "{上报状态}",groups = AddGroup.class)
     @DictV(type = "XZ033",message = "{上报状态}")
     private String sbzt;
 

+ 5 - 0
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdCwglMapper.java

@@ -6,6 +6,7 @@ import com.ruoyi.common.datascope.handler.DataPermission;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 家庭养老床位建设质量管理信息Mapper接口
@@ -22,4 +23,8 @@ public interface ZwywTsxdCwglMapper extends BaseMapperPlus<ZwywTsxdCwgl> {
     List<ZwywTsxdCwgl> selectZwywTsxdCwglList(ZwywTsxdCwgl zwywTsxdCwgl);
 
     public ZwywTsxdCwgl  selectZwywTsxdCwglById(String id);
+
+    public int batchCwgl(List<ZwywTsxdCwgl> zwywTsxdCwglList);
+
+    List<Map<String,Object>> selectCwglLists();
 }

+ 7 - 1
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdPblncpMapper.java

@@ -3,12 +3,18 @@ package com.ruoyi.business.mapper;
 import com.ruoyi.business.domain.ZwywTsxdPblncp;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 配备老年用品Mapper接口
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
 public interface ZwywTsxdPblncpMapper extends BaseMapperPlus<ZwywTsxdPblncp> {
+    public int batchPblncp(List<ZwywTsxdPblncp> zwywTsxdPblncpList);
+
+    List<Map<String,Object>> selectpblncpLists();
 
 }

+ 8 - 1
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdPbzncpMapper.java

@@ -1,14 +1,21 @@
 package com.ruoyi.business.mapper;
 
+import com.ruoyi.business.domain.ZwywTsxdPblncp;
 import com.ruoyi.business.domain.ZwywTsxdPbzncp;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 配备智能化产品Mapper接口
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
 public interface ZwywTsxdPbzncpMapper extends BaseMapperPlus<ZwywTsxdPbzncp> {
 
+    public int batchPbzncp(List<ZwywTsxdPbzncp> zwywTsxdPbzncpList);
+
+    List<Map<String,Object>> selectPbzncpLists();
 }

+ 5 - 0
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/mapper/ZwywTsxdSmfwMapper.java

@@ -6,6 +6,7 @@ import com.ruoyi.common.datascope.handler.DataPermission;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 居家养老上门服务质量管理Mapper接口
@@ -20,4 +21,8 @@ import java.util.List;
 public interface ZwywTsxdSmfwMapper extends BaseMapperPlus<ZwywTsxdSmfw> {
   List<ZwywTsxdSmfw> selectZwywTsxdSmfwList(ZwywTsxdSmfw zwywTsxdSmfw);
   public ZwywTsxdSmfw selectZwywTsxdSmfwById(String id);
+
+  public int batchSmfw(List<ZwywTsxdSmfw> zwywTsxdSmfwList);
+
+  List<Map<String,Object>> selectSmfwLists();
 }

+ 8 - 7
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdCwglService.java

@@ -6,15 +6,15 @@ import java.util.List;
 
 /**
  * 家庭养老床位建设质量管理信息Service接口
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
-public interface IZwywTsxdCwglService 
+public interface IZwywTsxdCwglService
 {
     /**
      * 查询家庭养老床位建设质量管理信息
-     * 
+     *
      * @param id 家庭养老床位建设质量管理信息主键
      * @return 家庭养老床位建设质量管理信息
      */
@@ -22,7 +22,7 @@ public interface IZwywTsxdCwglService
 
     /**
      * 查询家庭养老床位建设质量管理信息列表
-     * 
+     *
      * @param zwywTsxdCwgl 家庭养老床位建设质量管理信息
      * @return 家庭养老床位建设质量管理信息集合
      */
@@ -30,7 +30,7 @@ public interface IZwywTsxdCwglService
 
     /**
      * 新增家庭养老床位建设质量管理信息
-     * 
+     *
      * @param zwywTsxdCwgl 家庭养老床位建设质量管理信息
      * @return 结果
      */
@@ -38,7 +38,7 @@ public interface IZwywTsxdCwglService
 
     /**
      * 修改家庭养老床位建设质量管理信息
-     * 
+     *
      * @param zwywTsxdCwgl 家庭养老床位建设质量管理信息
      * @return 结果
      */
@@ -46,10 +46,11 @@ public interface IZwywTsxdCwglService
 
     /**
      * 批量删除家庭养老床位建设质量管理信息
-     * 
+     *
      * @param ids 需要删除的家庭养老床位建设质量管理信息主键集合
      * @return 结果
      */
     public int deleteZwywTsxdCwglByIds(String[] ids);
 
+    public String importCwgl(List<ZwywTsxdCwgl> zwywTsxdCwglList);
 }

+ 8 - 7
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdPblncpService.java

@@ -6,15 +6,15 @@ import java.util.List;
 
 /**
  * 配备老年用品Service接口
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
-public interface IZwywTsxdPblncpService 
+public interface IZwywTsxdPblncpService
 {
     /**
      * 查询配备老年用品
-     * 
+     *
      * @param id 配备老年用品主键
      * @return 配备老年用品
      */
@@ -22,7 +22,7 @@ public interface IZwywTsxdPblncpService
 
     /**
      * 查询配备老年用品列表
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 配备老年用品集合
      */
@@ -30,7 +30,7 @@ public interface IZwywTsxdPblncpService
 
     /**
      * 新增配备老年用品
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 结果
      */
@@ -38,7 +38,7 @@ public interface IZwywTsxdPblncpService
 
     /**
      * 修改配备老年用品
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 结果
      */
@@ -46,10 +46,11 @@ public interface IZwywTsxdPblncpService
 
     /**
      * 批量删除配备老年用品
-     * 
+     *
      * @param ids 需要删除的配备老年用品主键集合
      * @return 结果
      */
     public int deleteZwywTsxdPblncpByIds(String[] ids);
 
+    public String importPblncp(List<ZwywTsxdPblncp> zwywTsxdPblncpList,String id);
 }

+ 8 - 7
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdPbzncpService.java

@@ -6,15 +6,15 @@ import java.util.List;
 
 /**
  * 配备智能化产品Service接口
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
-public interface IZwywTsxdPbzncpService 
+public interface IZwywTsxdPbzncpService
 {
     /**
      * 查询配备智能化产品
-     * 
+     *
      * @param id 配备智能化产品主键
      * @return 配备智能化产品
      */
@@ -22,7 +22,7 @@ public interface IZwywTsxdPbzncpService
 
     /**
      * 查询配备智能化产品列表
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 配备智能化产品集合
      */
@@ -30,7 +30,7 @@ public interface IZwywTsxdPbzncpService
 
     /**
      * 新增配备智能化产品
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 结果
      */
@@ -38,7 +38,7 @@ public interface IZwywTsxdPbzncpService
 
     /**
      * 修改配备智能化产品
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 结果
      */
@@ -46,10 +46,11 @@ public interface IZwywTsxdPbzncpService
 
     /**
      * 批量删除配备智能化产品
-     * 
+     *
      * @param ids 需要删除的配备智能化产品主键集合
      * @return 结果
      */
     public int deleteZwywTsxdPbzncpByIds(String[] ids);
 
+    public String importPbzncp(List<ZwywTsxdPbzncp> zwywTsxdPbzncpList,String id);
 }

+ 8 - 7
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/IZwywTsxdSmfwService.java

@@ -6,15 +6,15 @@ import java.util.List;
 
 /**
  * 居家养老上门服务质量管理Service接口
- * 
+ *
  * @author swq
  * @date 2022-05-20
  */
-public interface IZwywTsxdSmfwService 
+public interface IZwywTsxdSmfwService
 {
     /**
      * 查询居家养老上门服务质量管理
-     * 
+     *
      * @param id 居家养老上门服务质量管理主键
      * @return 居家养老上门服务质量管理
      */
@@ -22,7 +22,7 @@ public interface IZwywTsxdSmfwService
 
     /**
      * 查询居家养老上门服务质量管理列表
-     * 
+     *
      * @param zwywTsxdSmfw 居家养老上门服务质量管理
      * @return 居家养老上门服务质量管理集合
      */
@@ -30,7 +30,7 @@ public interface IZwywTsxdSmfwService
 
     /**
      * 新增居家养老上门服务质量管理
-     * 
+     *
      * @param zwywTsxdSmfw 居家养老上门服务质量管理
      * @return 结果
      */
@@ -38,7 +38,7 @@ public interface IZwywTsxdSmfwService
 
     /**
      * 修改居家养老上门服务质量管理
-     * 
+     *
      * @param zwywTsxdSmfw 居家养老上门服务质量管理
      * @return 结果
      */
@@ -46,10 +46,11 @@ public interface IZwywTsxdSmfwService
 
     /**
      * 批量删除居家养老上门服务质量管理
-     * 
+     *
      * @param ids 需要删除的居家养老上门服务质量管理主键集合
      * @return 结果
      */
     public int deleteZwywTsxdSmfwByIds(String[] ids);
 
+    public String importSmfw(List<ZwywTsxdSmfw> zwywTsxdSmfwList);
 }

+ 146 - 3
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdCwglServiceImpl.java

@@ -1,19 +1,34 @@
 package com.ruoyi.business.service.impl;
 
+import com.alibaba.fastjson2.TypeReference;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywTsxdCwgl;
 import com.ruoyi.business.mapper.ZwywTsxdCwglMapper;
 import com.ruoyi.business.service.IZwywTsxdCwglService;
+import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
+import com.ruoyi.system.api.domain.SysDictType;
+import com.ruoyi.system.api.domain.SysObjDictType;
 import com.ruoyi.system.api.enums.SysDeptJlStatus;
+import com.ruoyi.system.domain.SysTsxdXmgl;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
+import com.ruoyi.system.mapper.SysTsxdXmglMapper;
 import com.ruoyi.system.utils.SubCodeUtil;
+import org.apache.catalina.security.SecurityUtil;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * 家庭养老床位建设质量管理信息Service业务层处理
@@ -30,6 +45,13 @@ public class ZwywTsxdCwglServiceImpl implements IZwywTsxdCwglService
     @Autowired
     private SysDeptJlMapper sysDeptJlMapper;
 
+    @Autowired
+    private SysTsxdXmglMapper sysTsxdXmglMapper;
+
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
+
     /**
      * 查询家庭养老床位建设质量管理信息
      *
@@ -105,4 +127,125 @@ public class ZwywTsxdCwglServiceImpl implements IZwywTsxdCwglService
         return zwywTsxdCwglMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+    @Override
+    public String importCwgl(List<ZwywTsxdCwgl> zwywTsxdCwglList) {
+        if (com.ruoyi.common.core.utils.StringUtils.isNull(zwywTsxdCwglList) || zwywTsxdCwglList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        List<Map<String,Object>> list = new ArrayList<>();
+        for (ZwywTsxdCwgl z : zwywTsxdCwglList) {
+            if (StringUtils.isNotEmpty(z.getMc())) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("申请人身份证号", z.getSqrsfz());
+                map.put("申请人姓名", z.getSqrxm());
+                map.put("月均可支配收入", z.getYjkzpsr());
+                map.put("失能情况", z.getSnqk());
+                map.put("家庭住址", z.getJtzz());
+                map.put("家庭面积", z.getJtmj());
+                map.put("街道乡镇审核人姓名", z.getJdshrxm());
+                map.put("街道乡镇审核意见", z.getJdshyj());
+                map.put("县级民政部门审批人姓名", z.getMzshrxm());
+                map.put("县级民政部门审核意见", z.getMzshyj());
+                map.put("数据更新日期", z.getGxrq());
+                map.put("上报状态", z.getSbzt());
+                list.add(map);
+            } else {
+                throw new ServiceException("项目名称不能为空");
+            }
+            LambdaQueryWrapper<SysTsxdXmgl> lqw = new LambdaQueryWrapper<SysTsxdXmgl>()
+                    .eq(SysTsxdXmgl::getMc, z.getMc());
+            SysTsxdXmgl sysTsxdXmgl = sysTsxdXmglMapper.selectOne(lqw);
+            if (com.ruoyi.common.core.utils.StringUtils.isNull(sysTsxdXmgl)) {
+                throw new ServiceException("该项目不存在,请检查!");
+            }
+            if (z.getSqrsfz().length() != 18) {
+                throw new ServiceException("申请人身份证号存在异常,请检查!");
+            }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String sqrxm = z.getSqrxm();
+            Matcher m = p.matcher(sqrxm);
+            String jdshrxm = z.getJdshrxm();
+            Matcher a = p.matcher(jdshrxm);
+            String mzshrxm = z.getMzshrxm();
+            Matcher t = p.matcher(mzshrxm);
+            if (m.find() == false || a.find() == false || t.find() == false) {
+                throw new ServiceException("申请人姓名,街道乡镇审核人姓名,县级民政部门审批人姓名 必须含有一个汉字,请检查");
+            }
+            AjaxResult xz067 = remoteDictDataService.getDictDataByDictType("XZ067", SecurityConstants.INNER);
+            List<String> snqk = xz067.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!snqk.contains(z.getSnqk())) {
+                throw new ServiceException("失能情况不符合条件,请检查");
+            }
+        }
+        // 流特性去掉重复Map
+        Long count = list.stream().distinct().count();
+        boolean isRepeat = count < list.size();
+        if (isRepeat) {
+            throw new ServiceException("导入的Excel有重复信息,请检查");
+        }
+        int successNum = 0;
+        int failureNum= 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        List<Map<String, Object>> list1 = zwywTsxdCwglMapper.selectCwglLists();
+        int index =0;
+        for (ZwywTsxdCwgl zwywTsxdCwgl:zwywTsxdCwglList){
+            index++;
+            Map<String,Object> map = new HashMap<>();
+            map.put("sqrsfz",zwywTsxdCwgl.getSqrsfz());
+            map.put("sqrxm",zwywTsxdCwgl.getSqrxm());
+            map.put("yjkzpsr",zwywTsxdCwgl.getYjkzpsr());
+            map.put("snqk",zwywTsxdCwgl.getSnqk());
+            map.put("jtzz",zwywTsxdCwgl.getJtzz());
+            map.put("jtmj",zwywTsxdCwgl.getJtmj());
+            map.put("jdshrxm",zwywTsxdCwgl.getJdshrxm());
+            map.put("jdshyj",zwywTsxdCwgl.getJdshyj());
+            map.put("mzshrxm",zwywTsxdCwgl.getMzshrxm());
+            map.put("mzshyj",zwywTsxdCwgl.getMzshyj());
+            if (list1.contains(map)){
+                failureNum++;
+                failureMsg.append("<br/>" + failureNum + "<" + "项目名称:" + zwywTsxdCwgl.getMc()  + " 已存在,请修改。");
+            }
+        }
+        List<ZwywTsxdCwgl> InsertList = new ArrayList<>();
+        for (int i=0;i<zwywTsxdCwglList.size();i++){
+//            导入
+            ZwywTsxdCwgl cwgl = new ZwywTsxdCwgl();
+            cwgl.setSqrsfz(zwywTsxdCwglList.get(i).getSqrsfz());
+            cwgl.setSqrxm(zwywTsxdCwglList.get(i).getSqrxm());
+            cwgl.setSqrxm(zwywTsxdCwglList.get(i).getSqrxm());
+            cwgl.setYjkzpsr(zwywTsxdCwglList.get(i).getYjkzpsr());
+            cwgl.setSnqk(zwywTsxdCwglList.get(i).getSnqk());
+            cwgl.setJtzz(zwywTsxdCwglList.get(i).getJtzz());
+            cwgl.setJtmj(zwywTsxdCwglList.get(i).getJtmj());
+            cwgl.setJdshrxm(zwywTsxdCwglList.get(i).getJdshrxm());
+            cwgl.setJdshyj(zwywTsxdCwglList.get(i).getJdshyj());
+            cwgl.setMzshrxm(zwywTsxdCwglList.get(i).getMzshrxm());
+            cwgl.setMzshyj(zwywTsxdCwglList.get(i).getMzshyj());
+            cwgl.setMc(zwywTsxdCwglList.get(i).getMc());
+            LambdaQueryWrapper<SysTsxdXmgl> lqw = new LambdaQueryWrapper<SysTsxdXmgl>()
+                    .eq(SysTsxdXmgl::getMc,zwywTsxdCwglList.get(i).getMc());
+            SysTsxdXmgl sysTsxdXmgl = sysTsxdXmglMapper.selectOne(lqw);
+            cwgl.setXmId(sysTsxdXmgl.getId());
+            cwgl.setXzqh(SecurityUtils.getAreaCode());
+//            cwgl.setGxrq(gxrqtime);
+//            cwgl.setSbzt("1");
+            InsertList.add(cwgl);
+            successNum++;
+            successMsg.append("<br/>"+ successNum + "、项目名称: " + zwywTsxdCwglList.get(i).getMc() + " 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        if (InsertList.size()>0){
+            zwywTsxdCwglMapper.batchCwgl(InsertList);
+        }
+        return successMsg.toString();
+    }
+
 }

+ 72 - 9
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdPblncpServiceImpl.java

@@ -4,27 +4,28 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywTsxdPblncp;
 import com.ruoyi.business.mapper.ZwywTsxdPblncpMapper;
 import com.ruoyi.business.service.IZwywTsxdPblncpService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 /**
  * 配备老年用品Service业务层处理
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
 @Service
-public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService 
+public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
 {
     @Autowired
     private ZwywTsxdPblncpMapper zwywTsxdPblncpMapper;
 
     /**
      * 查询配备老年用品
-     * 
+     *
      * @param id 配备老年用品主键
      * @return 配备老年用品
      */
@@ -36,7 +37,7 @@ public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
 
     /**
      * 查询配备老年用品列表
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 配备老年用品
      */
@@ -48,7 +49,7 @@ public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
 
     /**
      * 新增配备老年用品
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 结果
      */
@@ -60,7 +61,7 @@ public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
 
     /**
      * 修改配备老年用品
-     * 
+     *
      * @param zwywTsxdPblncp 配备老年用品
      * @return 结果
      */
@@ -72,7 +73,7 @@ public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
 
     /**
      * 批量删除配备老年用品
-     * 
+     *
      * @param ids 需要删除的配备老年用品主键
      * @return 结果
      */
@@ -82,4 +83,66 @@ public class ZwywTsxdPblncpServiceImpl implements IZwywTsxdPblncpService
         return zwywTsxdPblncpMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+    @Override
+    public String importPblncp(List<ZwywTsxdPblncp> zwywTsxdPblncpList,String id) {
+        if (StringUtils.isNull(zwywTsxdPblncpList) || zwywTsxdPblncpList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        List<Map<String,Object>> list = new ArrayList<>();
+        zwywTsxdPblncpList.forEach(z->{
+            if (StringUtils.isNotEmpty(z.getLnyp())){
+                Map<String,Object> map = new HashMap<>();
+                map.put("老年用品",z.getLnyp());
+                map.put("数量",z.getSl());
+                list.add(map);
+            }else {
+                throw new ServiceException("老年用品,数量,不能为空 请检查" );
+            }
+        });
+        // 流特性去掉重复Map
+        Long count = list.stream().distinct().count();
+        boolean isRepeat = count < list.size();
+        if (isRepeat) {
+            throw new ServiceException("导入的Excel有重复信息,请检查");
+        }
+        int successNum = 0;
+        int failureNum= 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        List<Map<String, Object>> list1 = zwywTsxdPblncpMapper.selectpblncpLists();
+        int index = 0;
+        for (ZwywTsxdPblncp zwywTsxdPblncp : zwywTsxdPblncpList){
+            index++;
+            Map<String,Object> map = new HashMap<>();
+            map.put("lnyp",zwywTsxdPblncp.getLnyp());
+            map.put("sl",zwywTsxdPblncp.getSl());
+            if (list1.contains(map)){
+                failureNum++;
+                failureMsg.append("<br/>" + failureNum + "<" + "老年用品:" + zwywTsxdPblncp.getLnyp() + "> "+ "数量:" + zwywTsxdPblncp.getSl() + " 已存在,请修改。");
+            }
+        }
+        List<ZwywTsxdPblncp> sqInsertList = new ArrayList<>();
+        for (int i =0;i<zwywTsxdPblncpList.size();i++){
+            //导入
+            ZwywTsxdPblncp pb = new ZwywTsxdPblncp();
+            pb.setLnyp(zwywTsxdPblncpList.get(i).getLnyp());
+            pb.setSl(zwywTsxdPblncpList.get(i).getSl());
+            pb.setJtId(id);
+            sqInsertList.add(pb);
+            successNum++;
+            successMsg.append("<br/>"+ successNum + "、配备老年产品: " + zwywTsxdPblncpList.get(i).getLnyp() + " 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        if (sqInsertList.size() > 0){
+            zwywTsxdPblncpMapper.batchPblncp(sqInsertList);
+        }
+        return successMsg.toString();
+    }
+
 }

+ 72 - 10
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdPbzncpServiceImpl.java

@@ -4,27 +4,28 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.domain.ZwywTsxdPbzncp;
 import com.ruoyi.business.mapper.ZwywTsxdPbzncpMapper;
 import com.ruoyi.business.service.IZwywTsxdPbzncpService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 /**
  * 配备智能化产品Service业务层处理
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
 @Service
-public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService 
+public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
 {
     @Autowired
     private ZwywTsxdPbzncpMapper zwywTsxdPbzncpMapper;
 
     /**
      * 查询配备智能化产品
-     * 
+     *
      * @param id 配备智能化产品主键
      * @return 配备智能化产品
      */
@@ -36,7 +37,7 @@ public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
 
     /**
      * 查询配备智能化产品列表
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 配备智能化产品
      */
@@ -48,7 +49,7 @@ public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
 
     /**
      * 新增配备智能化产品
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 结果
      */
@@ -60,7 +61,7 @@ public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
 
     /**
      * 修改配备智能化产品
-     * 
+     *
      * @param zwywTsxdPbzncp 配备智能化产品
      * @return 结果
      */
@@ -72,7 +73,7 @@ public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
 
     /**
      * 批量删除配备智能化产品
-     * 
+     *
      * @param ids 需要删除的配备智能化产品主键
      * @return 结果
      */
@@ -82,4 +83,65 @@ public class ZwywTsxdPbzncpServiceImpl implements IZwywTsxdPbzncpService
         return zwywTsxdPbzncpMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
-}
+    @Override
+    public String importPbzncp(List<ZwywTsxdPbzncp> zwywTsxdPbzncpList,String id ) {
+        if (StringUtils.isNull(zwywTsxdPbzncpList) || zwywTsxdPbzncpList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        List<Map<String,Object>> list = new ArrayList<>();
+        zwywTsxdPbzncpList.forEach(z->{
+            if (StringUtils.isNotEmpty(z.getZnhcpmc())){
+                Map<String,Object> map = new HashMap<>();
+                map.put("智能化产品名称",z.getZnhcpmc());
+                map.put("数量",z.getSl());
+                list.add(map);
+            }else {
+                throw new ServiceException("智能化产品名称,数量,不能为空 请检查");
+            }
+        });
+        // 流特性去掉重复Map
+        Long count = list.stream().distinct().count();
+        boolean isRepeat = count < list.size();
+        if (isRepeat) {
+            throw new ServiceException("导入的Excel有重复信息,请检查");
+        }
+        int successNum = 0;
+        int failureNum= 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        List<Map<String, Object>> list1 = zwywTsxdPbzncpMapper.selectPbzncpLists();
+        int index = 0;
+        for (ZwywTsxdPbzncp zwywTsxdPbzncp : zwywTsxdPbzncpList){
+            index++;
+            Map<String,Object> map  = new HashMap<>();
+            map.put("znhcpmc",zwywTsxdPbzncp.getZnhcpmc());
+            map.put("sl",zwywTsxdPbzncp.getSl());
+            if (list1.contains(map)){
+                failureNum++;
+                failureMsg.append("<br/>" + failureNum + "<" + "智能化产品名称:" + zwywTsxdPbzncp.getZnhcpmc() + "> "+ "数量:" + zwywTsxdPbzncp.getSl() + " 已存在,请修改。");
+            }
+        }
+        List<ZwywTsxdPbzncp> sqInsertList = new ArrayList<>();
+        for (int i=0;i<zwywTsxdPbzncpList.size();i++){
+            //导入
+            ZwywTsxdPbzncp pbzncp = new ZwywTsxdPbzncp();
+            pbzncp.setZnhcpmc(zwywTsxdPbzncpList.get(i).getZnhcpmc());
+            pbzncp.setSl(zwywTsxdPbzncpList.get(i).getSl());
+            pbzncp.setJtId(id);
+            sqInsertList.add(pbzncp);
+            successNum++;
+            successMsg.append("<br/>"+ successNum + "、智能化产品名称: " + zwywTsxdPbzncpList.get(i).getZnhcpmc() + " 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        if (sqInsertList.size() > 0){
+            zwywTsxdPbzncpMapper.batchPbzncp(sqInsertList);
+        }
+        return successMsg.toString();
+        }
+    }

+ 129 - 3
ruoyi-modules/mz-business-tsxdxm/src/main/java/com/ruoyi/business/service/impl/ZwywTsxdSmfwServiceImpl.java

@@ -1,16 +1,28 @@
 package com.ruoyi.business.service.impl;
 
+import com.alibaba.fastjson2.TypeReference;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.business.domain.ZwywTsxdCwgl;
 import com.ruoyi.business.domain.ZwywTsxdSmfw;
 import com.ruoyi.business.mapper.ZwywTsxdSmfwMapper;
 import com.ruoyi.business.service.IZwywTsxdSmfwService;
+import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
+import com.ruoyi.system.domain.SysTsxdXmgl;
+import com.ruoyi.system.mapper.SysTsxdXmglMapper;
 import com.ruoyi.system.utils.SubCodeUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * 居家养老上门服务质量管理Service业务层处理
@@ -24,6 +36,12 @@ public class ZwywTsxdSmfwServiceImpl implements IZwywTsxdSmfwService
     @Autowired
     private ZwywTsxdSmfwMapper zwywTsxdSmfwMapper;
 
+    @Autowired
+    private SysTsxdXmglMapper sysTsxdXmglMapper;
+
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
     /**
      * 查询居家养老上门服务质量管理
      *
@@ -92,4 +110,112 @@ public class ZwywTsxdSmfwServiceImpl implements IZwywTsxdSmfwService
         return zwywTsxdSmfwMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+    @Override
+    public String importSmfw(List<ZwywTsxdSmfw> zwywTsxdSmfwList) {
+        if (com.ruoyi.common.core.utils.StringUtils.isNull(zwywTsxdSmfwList) || zwywTsxdSmfwList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        List<Map<String,Object>> list = new ArrayList<>();
+        for (ZwywTsxdSmfw z: zwywTsxdSmfwList){
+            if (StringUtils.isNotEmpty(z.getMc())){
+                Map<String, Object> map = new HashMap<>();
+                map.put("申请人身份证号", z.getSqrsfzh());
+                map.put("申请人姓名", z.getSqrxm());
+                map.put("月均可支配收入", z.getYjkzpsr());
+                map.put("失能情况", z.getSnqk());
+                map.put("街道乡镇审核人姓名", z.getJdshrxm());
+                map.put("街道乡镇审核意见", z.getJdshyj());
+                map.put("县级民政部门审批人姓名", z.getMzsprxm());
+                map.put("县级民政部门审核意见", z.getMzspyj());
+                list.add(map);
+            }else {
+                throw new ServiceException("项目名称不能为空");
+            }
+            LambdaQueryWrapper<SysTsxdXmgl> lqw = new LambdaQueryWrapper<SysTsxdXmgl>()
+                    .eq(SysTsxdXmgl::getMc, z.getMc());
+            SysTsxdXmgl sysTsxdXmgl = sysTsxdXmglMapper.selectOne(lqw);
+            if (com.ruoyi.common.core.utils.StringUtils.isNull(sysTsxdXmgl)) {
+                throw new ServiceException("该项目不存在,请检查!");
+            }
+            if (z.getSqrsfzh().length() != 18) {
+                throw new ServiceException("申请人身份证号存在异常,请检查!");
+            }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String sqrxm = z.getSqrxm();
+            Matcher m = p.matcher(sqrxm);
+            String jdshrxm = z.getJdshrxm();
+            Matcher a = p.matcher(jdshrxm);
+            String mzsprxm = z.getMzsprxm();
+            Matcher t = p.matcher(mzsprxm);
+            if (m.find() == false || a.find() == false || t.find() == false) {
+                throw new ServiceException("申请人姓名,街道乡镇审核人姓名,县级民政部门审批人姓名 必须含有一个汉字,请检查");
+            }
+            AjaxResult xz067 = remoteDictDataService.getDictDataByDictType("XZ067", SecurityConstants.INNER);
+            List<String> snqk = xz067.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!snqk.contains(z.getSnqk())) {
+                throw new ServiceException("失能情况不符合条件,请检查");
+            }
+        }
+        // 流特性去掉重复Map
+        Long count = list.stream().distinct().count();
+        boolean isRepeat = count < list.size();
+        if (isRepeat) {
+            throw new ServiceException("导入的Excel有重复信息,请检查");
+        }
+        int successNum = 0;
+        int failureNum= 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        List<Map<String, Object>> list1 = zwywTsxdSmfwMapper.selectSmfwLists();
+        int index =0;
+        for (ZwywTsxdSmfw zwywTsxdSmfw :zwywTsxdSmfwList){
+            index++;
+            Map<String,Object> map = new HashMap<>();
+            map.put("sqrsfzh",zwywTsxdSmfw.getSqrsfzh());
+            map.put("sqrxm",zwywTsxdSmfw.getSqrxm());
+            map.put("yjkzpsr",zwywTsxdSmfw.getYjkzpsr());
+            map.put("snqk",zwywTsxdSmfw.getSnqk());
+            map.put("jdshrxm",zwywTsxdSmfw.getJdshrxm());
+            map.put("jdshyj",zwywTsxdSmfw.getJdshyj());
+            map.put("mzsprxm",zwywTsxdSmfw.getMzsprxm());
+            map.put("mzspyj",zwywTsxdSmfw.getMzspyj());
+            if (list1.contains(map)){
+                failureNum++;
+                failureMsg.append("<br/>" + failureNum + "<" + "项目名称:" + zwywTsxdSmfw.getMc()  + " 已存在,请修改。");
+            }
+        }
+        List<ZwywTsxdSmfw> InsertList = new ArrayList<>();
+        for (int i =0;i<zwywTsxdSmfwList.size();i++){
+            //导入
+            ZwywTsxdSmfw smfw = new ZwywTsxdSmfw();
+            smfw.setSqrsfzh(zwywTsxdSmfwList.get(i).getSqrsfzh());
+            smfw.setSqrxm(zwywTsxdSmfwList.get(i).getSqrxm());
+            smfw.setYjkzpsr(zwywTsxdSmfwList.get(i).getYjkzpsr());
+            smfw.setSnqk(zwywTsxdSmfwList.get(i).getSnqk());
+            smfw.setJdshrxm(zwywTsxdSmfwList.get(i).getJdshrxm());
+            smfw.setJdshyj(zwywTsxdSmfwList.get(i).getJdshyj());
+            smfw.setMzsprxm(zwywTsxdSmfwList.get(i).getMzsprxm());
+            smfw.setMzspyj(zwywTsxdSmfwList.get(i).getMzspyj());
+            LambdaQueryWrapper<SysTsxdXmgl> lqw = new LambdaQueryWrapper<SysTsxdXmgl>()
+                    .eq(SysTsxdXmgl::getMc,zwywTsxdSmfwList.get(i).getMc());
+            SysTsxdXmgl sysTsxdXmgl = sysTsxdXmglMapper.selectOne(lqw);
+            smfw.setXmId(sysTsxdXmgl.getId());
+            smfw.setXzqh(SecurityUtils.getAreaCode());
+            InsertList.add(smfw);
+            successNum++;
+            successMsg.append("<br/>"+ successNum + "、项目名称: " + zwywTsxdSmfwList.get(i).getMc() + " 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        if (InsertList.size()>0){
+            zwywTsxdSmfwMapper.batchSmfw(InsertList);
+        }
+        return successMsg.toString();
+    }
 }

+ 45 - 0
ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/cwglMapper.xml

@@ -235,4 +235,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <insert id="batchCwgl">
+        insert into zwyw_tsxd_cwgl( id,xm_id,sqrsfz,sqrxm,yjkzpsr,snqk,jtzz,jtmj,jdshrxm,jdshyj,mzshrxm,mzshyj,pgslhgzfx,
+        sjje,lrmycd,ysjgmc,ysryxm,gxrq,xzqh, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (
+            (REPLACE( UUID(),"-","")),#{item.xmId},#{item.sqrsfz},#{item.sqrxm},#{item.yjkzpsr},#{item.snqk},
+            #{item.jtzz},#{item.jtmj},#{item.jdshrxm},#{item.jdshyj},#{item.mzshrxm},#{item.mzshyj},#{item.pgslhgzfx},
+            #{item.sjje},#{item.lrmycd},#{item.ysjgmc},#{item.ysryxm},#{item.gxrq},#{item.xzqh},
+            #{item.createTimeStr},#{item.createUserId},#{item.createBy},#{item.createUserType},
+            #{item.createUnit},#{item.createUnitName},#{item.createAreaCode})
+        </foreach>
+    </insert>
+
+    <select id="selectCwglLists" resultType="java.util.HashMap">
+        SELECT
+	id,
+	xm_id,
+	sqrsfz,
+	sqrxm,
+	yjkzpsr,
+	snqk,
+	jtzz,
+	jtmj,
+	jdshrxm,
+	jdshyj,
+	mzshrxm,
+	mzshyj,
+	pgslhgzfx,
+	sjje,
+	lrmycd,
+	ysjgmc,
+	ysryxm,
+	gxrq,
+	xzqh,
+	create_time_str,
+	create_user_id,
+	create_user_type,
+	create_area_code,
+	create_by,
+	create_unit,
+	create_unit_name
+FROM
+	zwyw_tsxd_cwgl
+    </select>
 </mapper>

+ 21 - 6
ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/pblncpMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.business.mapper.ZwywTsxdPblncpMapper">
-    
+
     <resultMap type="ZwywTsxdPblncp" id="ZwywTsxdPblncpResult">
         <result property="id"    column="id"    />
         <result property="lnyp"    column="lnyp"    />
@@ -29,18 +29,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectZwywTsxdPblncpList" parameterType="ZwywTsxdPblncp" resultMap="ZwywTsxdPblncpResult">
         <include refid="selectZwywTsxdPblncpVo"/>
-        <where>  
+        <where>
             <if test="lnyp != null  and lnyp != ''"> and lnyp = #{lnyp}</if>
             <if test="sl != null "> and sl = #{sl}</if>
             <if test="jtId != null  and jtId != ''"> and jt_id = #{jtId}</if>
         </where>
     </select>
-    
+
     <select id="selectZwywTsxdPblncpById" parameterType="String" resultMap="ZwywTsxdPblncpResult">
         <include refid="selectZwywTsxdPblncpVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertZwywTsxdPblncp" parameterType="ZwywTsxdPblncp">
         insert into zwyw_tsxd_pblncp
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -89,9 +89,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteZwywTsxdPblncpByIds" parameterType="String">
-        delete from zwyw_tsxd_pblncp where id in 
+        delete from zwyw_tsxd_pblncp where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-</mapper>
+
+    <select id="selectpblncpLists" resultType="java.util.HashMap">
+                select id, lnyp, sl, jt_id, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name, update_time_str, update_user_id, update_by, update_unit, update_unit_name from zwyw_tsxd_pblncp
+    </select>
+
+    <insert id="batchPblncp">
+        insert into zwyw_tsxd_pblncp( id, lnyp, sl, jt_id, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (
+            (REPLACE( UUID(),"-","")),#{item.lnyp},#{item.sl},#{item.jtId},
+            #{item.createTimeStr},#{item.createUserId},
+            #{item.createBy},#{item.createUserType},
+            #{item.createUnit},#{item.createUnitName},#{item.createAreaCode})
+        </foreach>
+    </insert>
+</mapper>

+ 21 - 6
ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/pbzncpMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.business.mapper.ZwywTsxdPbzncpMapper">
-    
+
     <resultMap type="ZwywTsxdPbzncp" id="ZwywTsxdPbzncpResult">
         <result property="id"    column="id"    />
         <result property="znhcpmc"    column="znhcpmc"    />
@@ -29,18 +29,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectZwywTsxdPbzncpList" parameterType="ZwywTsxdPbzncp" resultMap="ZwywTsxdPbzncpResult">
         <include refid="selectZwywTsxdPbzncpVo"/>
-        <where>  
+        <where>
             <if test="znhcpmc != null  and znhcpmc != ''"> and znhcpmc = #{znhcpmc}</if>
             <if test="sl != null "> and sl = #{sl}</if>
             <if test="jtId != null  and jtId != ''"> and jt_id = #{jtId}</if>
         </where>
     </select>
-    
+
     <select id="selectZwywTsxdPbzncpById" parameterType="String" resultMap="ZwywTsxdPbzncpResult">
         <include refid="selectZwywTsxdPbzncpVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertZwywTsxdPbzncp" parameterType="ZwywTsxdPbzncp">
         insert into zwyw_tsxd_pbzncp
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -89,9 +89,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteZwywTsxdPbzncpByIds" parameterType="String">
-        delete from zwyw_tsxd_pbzncp where id in 
+        delete from zwyw_tsxd_pbzncp where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-</mapper>
+
+    <insert id="batchPbzncp">
+        insert into zwyw_tsxd_pbzncp( id, znhcpmc, sl, jt_id, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (
+            (REPLACE( UUID(),"-","")),#{item.znhcpmc},#{item.sl},#{item.jtId},
+            #{item.createTimeStr},#{item.createUserId},
+            #{item.createBy},#{item.createUserType},
+            #{item.createUnit},#{item.createUnitName},#{item.createAreaCode})
+        </foreach>
+    </insert>
+
+    <select id="selectPbzncpLists" resultType="java.util.HashMap">
+                select id, znhcpmc, sl, jt_id, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name, update_time_str, update_user_id, update_by, update_unit, update_unit_name from zwyw_tsxd_pbzncp
+    </select>
+</mapper>

+ 17 - 0
ruoyi-modules/mz-business-tsxdxm/src/main/resources/mapper/business/smfwMapper.xml

@@ -176,4 +176,21 @@
             #{id}
         </foreach>
     </delete>
+
+    <insert id="batchSmfw">
+        insert into zwyw_tsxd_smfw( id,xm_id,sqrsfzh,sqrxm,yjkzpsr,snqk,jdshrxm,jdshyj,mzsprxm,mzspyj,xzqh,
+        create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (
+            (REPLACE( UUID(),"-","")),#{item.xmId},#{item.sqrsfzh},#{item.sqrxm},#{item.yjkzpsr},#{item.snqk},
+            #{item.jdshrxm},#{item.jdshyj},#{item.mzsprxm},#{item.mzspyj},#{item.xzqh},
+            #{item.createTimeStr},#{item.createUserId},#{item.createBy},#{item.createUserType},
+            #{item.createUnit},#{item.createUnitName},#{item.createAreaCode})
+        </foreach>
+    </insert>
+
+    <select id="selectSmfwLists" resultType="java.util.HashMap">
+        select id,xm_id,sqrsfzh,sqrxm,yjkzpsr,snqk,jdshrxm,jdshyj,mzsprxm,mzspyj,
+        create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit, create_unit_name from zwyw_tsxd_smfw
+    </select>
 </mapper>

+ 23 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywLrJbxxController.java

@@ -1,8 +1,10 @@
 package com.ruoyi.business.controller;
 
+import com.ruoyi.business.domain.ZwywCyrySxxx;
 import com.ruoyi.business.domain.ZwywLrJbxx;
 import com.ruoyi.business.service.IZwywLrJbxxService;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -12,10 +14,14 @@ import com.ruoyi.common.security.annotation.Logical;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.system.utils.SubCodeUtil;
 import com.ruoyi.system.validate.group.AddGroup;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
@@ -116,4 +122,21 @@ public class ZwywLrJbxxController extends BaseController
     {
         return toAjax(zwywLrJbxxService.deleteZwywLrJbxxByIds(ids));
     }
+
+    @Log(title = "老人基本信息",businessType = BusinessType.IMPORT)
+    @RequiresPermissions("business:lrjbxx:importData")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file)throws Exception{
+        ExcelUtil<ZwywLrJbxx> util = new ExcelUtil<ZwywLrJbxx>(ZwywLrJbxx.class);
+        List<ZwywLrJbxx> zwywLrJbxxList = util.importExcel(file.getInputStream());
+        String message = zwywLrJbxxService.importLrjbxx(zwywLrJbxxList);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) throws IOException
+    {
+        ExcelUtil<ZwywLrJbxx> util = new ExcelUtil<ZwywLrJbxx>(ZwywLrJbxx.class);
+        util.importTemplateExcel(response, "老人基本信息");
+    }
 }

+ 20 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdCwglController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.business.controller;
 
 import com.ruoyi.business.domain.ZwywTsxdCwgl;
+import com.ruoyi.business.domain.ZwywTsxdPblncp;
 import com.ruoyi.business.service.IZwywTsxdCwglService;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
@@ -13,8 +14,10 @@ import com.ruoyi.system.validate.group.AddGroup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -97,4 +100,21 @@ public class ZwywTsxdCwglController extends BaseController
     {
         return toAjax(zwywTsxdCwglService.deleteZwywTsxdCwglByIds(ids));
     }
+
+    @Log(title = "家庭养老床位建设质量管理信息",businessType = BusinessType.IMPORT)
+    @RequiresPermissions("business:cwgl:importData")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception{
+        ExcelUtil<ZwywTsxdCwgl> util = new ExcelUtil<>(ZwywTsxdCwgl.class);
+        List<ZwywTsxdCwgl> zwywTsxdCwglList = util.importExcel(file.getInputStream());
+        String message = zwywTsxdCwglService.importCwgl(zwywTsxdCwglList);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) throws IOException
+    {
+        ExcelUtil<ZwywTsxdCwgl> util = new ExcelUtil<ZwywTsxdCwgl>(ZwywTsxdCwgl.class);
+        util.importTemplateExcel(response, "家庭养老床位建设质量管理信息数据");
+    }
 }

+ 21 - 1
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdPblncpController.java

@@ -10,17 +10,20 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.organization.domain.YljgKhJbxx;
 import com.ruoyi.system.validate.group.AddGroup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
  * 配备老年用品Controller
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
@@ -101,4 +104,21 @@ public class ZwywTsxdPblncpController extends BaseController
     {
         return toAjax(zwywTsxdPblncpService.deleteZwywTsxdPblncpByIds(ids));
     }
+
+    @Log(title = "配备老年用品",businessType = BusinessType.IMPORT)
+    @RequiresPermissions("business:pblncp:importData")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, String id) throws Exception{
+        ExcelUtil<ZwywTsxdPblncp> util = new ExcelUtil<>(ZwywTsxdPblncp.class);
+        List<ZwywTsxdPblncp> zwywTsxdPblncpList = util.importExcel(file.getInputStream());
+        String message = zwywTsxdPblncpService.importPblncp(zwywTsxdPblncpList,id);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) throws IOException
+    {
+        ExcelUtil<ZwywTsxdPblncp> util = new ExcelUtil<ZwywTsxdPblncp>(ZwywTsxdPblncp.class);
+        util.importTemplateExcel(response, "配备老年用品数据");
+    }
 }

+ 21 - 4
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdPbzncpController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.business.controller;
 
+import com.ruoyi.business.domain.ZwywTsxdPblncp;
 import com.ruoyi.business.domain.ZwywTsxdPbzncp;
 import com.ruoyi.business.mapper.ZwywTsxdCwglMapper;
 import com.ruoyi.business.service.IZwywTsxdPbzncpService;
@@ -14,13 +15,15 @@ import com.ruoyi.system.validate.group.AddGroup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
  * 配备智能化产品Controller
- * 
+ *
  * @author swq
  * @date 2022-05-17
  */
@@ -31,9 +34,6 @@ public class ZwywTsxdPbzncpController extends BaseController
     @Autowired
     private IZwywTsxdPbzncpService zwywTsxdPbzncpService;
 
-    @Autowired
-    private ZwywTsxdCwglMapper zwywTsxdCwglMapper;
-
     /**
      * 查询配备智能化产品列表
      */
@@ -101,4 +101,21 @@ public class ZwywTsxdPbzncpController extends BaseController
     {
         return toAjax(zwywTsxdPbzncpService.deleteZwywTsxdPbzncpByIds(ids));
     }
+
+    @Log(title = "配备智能化产品",businessType = BusinessType.IMPORT)
+    @RequiresPermissions("business:pbzncp:importData")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, String id) throws Exception{
+        ExcelUtil<ZwywTsxdPbzncp> util = new ExcelUtil<>(ZwywTsxdPbzncp.class);
+        List<ZwywTsxdPbzncp> zwywTsxdPbzncpList = util.importExcel(file.getInputStream());
+        String message = zwywTsxdPbzncpService.importPbzncp(zwywTsxdPbzncpList,id);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) throws IOException
+    {
+        ExcelUtil<ZwywTsxdPbzncp> util = new ExcelUtil<ZwywTsxdPbzncp>(ZwywTsxdPbzncp.class);
+        util.importTemplateExcel(response, "配备智能化产品数据");
+    }
 }

+ 20 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywTsxdSmfwController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.business.controller;
 
+import com.ruoyi.business.domain.ZwywTsxdCwgl;
 import com.ruoyi.business.domain.ZwywTsxdSmfw;
 import com.ruoyi.business.service.IZwywTsxdSmfwService;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
@@ -13,8 +14,10 @@ import com.ruoyi.system.validate.group.AddGroup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -97,4 +100,21 @@ public class ZwywTsxdSmfwController extends BaseController
     {
         return toAjax(zwywTsxdSmfwService.deleteZwywTsxdSmfwByIds(ids));
     }
+
+    @Log(title = "居家养老上门服务质量管理",businessType = BusinessType.IMPORT)
+    @RequiresPermissions("business:smfw:importData")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception{
+        ExcelUtil<ZwywTsxdSmfw> util = new ExcelUtil<>(ZwywTsxdSmfw.class);
+        List<ZwywTsxdSmfw> zwywTsxdSmfwList = util.importExcel(file.getInputStream());
+        String message = zwywTsxdSmfwService.importSmfw(zwywTsxdSmfwList);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) throws IOException
+    {
+        ExcelUtil<ZwywTsxdSmfw> util = new ExcelUtil<ZwywTsxdSmfw>(ZwywTsxdSmfw.class);
+        util.importTemplateExcel(response, "居家养老上门服务质量管理信息数据");
+    }
 }

+ 8 - 8
ruoyi-modules/mz-organization-khgl/src/main/java/com/ruoyi/organization/domain/YljgKhJbxx.java

@@ -52,7 +52,7 @@ public class YljgKhJbxx extends BaseEntity
     private String xm;
 
     /** 性别(C0007) */
-//    @Excel(name = "性别", dictType = "C0007")
+    @Excel(name = "性别", dictType = "C0007")
     @ApiModelProperty(value = "性别(C0007)", required = true)
     @NotBlank(message = "{性别}",groups = AddGroup.class)
     @DictV(type = "C0007",message = "{性别}")
@@ -66,7 +66,7 @@ public class YljgKhJbxx extends BaseEntity
     private String csrq;
 
     /** 身份证件类型(C0015) */
-    @Excel(name = "身份证件类型", dictType = "C0015")
+    @Excel(name = "身份证件类型")
     @ApiModelProperty(value = "身份证件类型(C0015)", required = true)
     @NotBlank(message = "{身份证件类型}",groups = AddGroup.class)
     @DictV(type = "C0015",message = "{身份证件类型}")
@@ -80,28 +80,28 @@ public class YljgKhJbxx extends BaseEntity
     private String zjhm;
 
     /** 民族(C0009) */
-    @Excel(name = "民族", dictType = "C0009")
+    @Excel(name = "民族")
     @ApiModelProperty(value = "民族(C0009)", required = true)
     @NotBlank(message = "{民族}",groups = AddGroup.class)
     @DictV(type = "C0009",message = "{民族}")
     private String mz;
 
     /** 国籍(XZ002) */
-    @Excel(name = "国籍", dictType = "XZ002")
+    @Excel(name = "国籍")
     @ApiModelProperty(value = "国籍(XZ002)", required = true)
     @NotBlank(message = "{国籍}",groups = AddGroup.class)
     @DictV(type = "XZ002",message = "{国籍}")
     private String gj;
 
     /** 户籍类别(C0031) */
-    @Excel(name = "户籍类别", dictType = "C0031")
+    @Excel(name = "户籍类别")
     @ApiModelProperty(value = "户籍类别(C0031)", required = true)
     @NotBlank(message = "{户籍类别}",groups = AddGroup.class)
     @DictV(type = "C0031",message = "{户籍类别}")
     private String hjlb;
 
     /** 婚姻状况(C0010) */
-    @Excel(name = "婚姻状况", dictType = "C0010")
+    @Excel(name = "婚姻状况")
     @ApiModelProperty(value = "婚姻状况(C0010)", required = true)
     @NotBlank(message = "{婚姻状况}",groups = AddGroup.class)
     @DictV(type = "C0010",message = "{婚姻状况}")
@@ -219,7 +219,7 @@ public class YljgKhJbxx extends BaseEntity
     private String yblb;
 
     /** 身体能力评估等级(CZ036) */
-    @Excel(name = "身体能力评估等级", dictType = "CZ036")
+    @Excel(name = "身体能力评估等级")
     @ApiModelProperty(value = "身体能力评估等级(CZ036)", required = true)
     @NotBlank(message = "{身体能力评估等级}",groups = AddGroup.class)
     @DictV(type = "CZ036",message = "{身体能力评估等级}")
@@ -278,7 +278,7 @@ public class YljgKhJbxx extends BaseEntity
     private String xzqhId;
 
     /** 人员状态(C0034) */
-    @Excel(name = "人员状态", dictType = "C0034")
+    @Excel(name = "人员状态")
     @ApiModelProperty(value = "人员状态(C0034)", required = true)
     @DictV(type = "C0034",message = "{人员状态}")
     private String ryzt;

+ 74 - 2
ruoyi-modules/mz-organization-khgl/src/main/java/com/ruoyi/organization/service/impl/YljgKhJbxxServiceImpl.java

@@ -1,11 +1,14 @@
 package com.ruoyi.organization.service.impl;
 
+import com.alibaba.fastjson2.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.PageDomain;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.security.utils.SecurityUtils;
@@ -14,9 +17,12 @@ import com.ruoyi.organization.mapper.YljgKhHtxxMapper;
 import com.ruoyi.organization.mapper.YljgKhJbxxMapper;
 import com.ruoyi.organization.mapper.YljgKhRztzxxMapper;
 import com.ruoyi.organization.service.IYljgKhJbxxService;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.DataStatus;
 import com.ruoyi.system.api.enums.ResultStatus;
 import com.ruoyi.system.api.enums.WhetherStatus;
+import com.ruoyi.system.domain.SysDeptJl;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
@@ -26,6 +32,8 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
 
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 import static com.ruoyi.common.core.utils.DateUtils.YYYYMMDD;
@@ -55,6 +63,10 @@ public class YljgKhJbxxServiceImpl implements IYljgKhJbxxService
     @Autowired
     private SysDeptJlMapper sysDeptJlMapper;
 
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
+
     /**
      * 查询养老机构_客户_基本信息
      *
@@ -396,6 +408,66 @@ public class YljgKhJbxxServiceImpl implements IYljgKhJbxxService
             if (z.getZjhm().length()!=18){
                 throw new ServiceException("请检查证件号码是否录入正确");
             }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String xm = z.getXm();
+            Matcher matcher = p.matcher(xm);
+            if (matcher.find()==false){
+                throw new ServiceException("姓名必须含有一个汉字,请检查");
+            }
+            AjaxResult C0015 = remoteDictDataService.getDictDataByDictType("C0015", SecurityConstants.INNER);
+            List<String> zjlx = C0015.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zjlx.contains(z.getZjlx())){
+                throw new ServiceException("身份证件类型不符合条件,请检查");
+            }
+
+            AjaxResult C0009 = remoteDictDataService.getDictDataByDictType("C0009", SecurityConstants.INNER);
+            List<String> mz = C0009.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!mz.contains(z.getMz())){
+                throw new ServiceException("民族不符合条件,请检查");
+            }
+
+            AjaxResult xz002 = remoteDictDataService.getDictDataByDictType("XZ002", SecurityConstants.INNER);
+            List<String> gj = xz002.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!gj.contains(z.getGj())){
+                throw new ServiceException("国籍不符合条件,请检查");
+            }
+
+            AjaxResult c0031 = remoteDictDataService.getDictDataByDictType("C0031", SecurityConstants.INNER);
+            List<String> hjlb = c0031.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!hjlb.contains(z.getHjlb())){
+                throw new ServiceException("户籍类别不符合条件,请检查");
+            }
+
+            AjaxResult C0010 = remoteDictDataService.getDictDataByDictType("C0010", SecurityConstants.INNER);
+            List<String> hyzk = C0010.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!hyzk.contains(z.getHyzk())){
+                throw new ServiceException("婚姻状况不符合条件,请检查");
+            }
+
+            AjaxResult cz036 = remoteDictDataService.getDictDataByDictType("CZ036", SecurityConstants.INNER);
+            List<String> nlpg = cz036.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!nlpg.contains(z.getNlpg())){
+                throw new ServiceException("身体能力评估等级不符合条件,请检查");
+            }
+
+            SysDeptJl sysDeptJl = sysDeptJlMapper.selectSysDeptJlByCode(z.getXjdxzqy());
+            if (sysDeptJl==null){
+                throw new ServiceException("请输入正确的居住地行政区划代码");
+            }
+
+            AjaxResult c0034 = remoteDictDataService.getDictDataByDictType("C0034", SecurityConstants.INNER);
+            List<String> ryzt = c0034.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!ryzt.contains(z.getRyzt())){
+                throw new ServiceException("人员状态不符合条件,请检查");
+            }
+
         });
         // 流特性去掉重复Map
         Long count = list.stream().distinct().count();
@@ -447,9 +519,9 @@ public class YljgKhJbxxServiceImpl implements IYljgKhJbxxService
                 day = ss.substring(12).substring(0, 2);
             }
             if(gender % 2 == 1){
-                kh.setXb("1");
+                kh.setXb("2");
             }else{
-                kh.setXb("0");
+                kh.setXb("1");
             }
             kh.setCsrq(year +month + day);
             kh.setMz(yljgKhJbxxList.get(i).getMz());

+ 6 - 6
ruoyi-modules/mz-organization-yggl/src/main/java/com/ruoyi/organization/domain/YljgYgJbxx.java

@@ -54,7 +54,7 @@ public class YljgYgJbxx extends BaseEntity
     private String xm;
 
     /** 身份证件类型(C0015) */
-    @Excel(name = "身份证件类型", dictType = "C0015")
+    @Excel(name = "身份证件类型")
     @ApiModelProperty(value = "身份证件类型(C0015)", required = true)
     @NotBlank(message = "{身份证件类型}",groups = AddGroup.class)
     @DictV(type = "C0015",message = "{身份证件类型}")
@@ -82,7 +82,7 @@ public class YljgYgJbxx extends BaseEntity
     private String csrq;
 
     /** 文化程度(C0008) */
-    @Excel(name = "文化程度", dictType = "C0008")
+    @Excel(name = "文化程度")
     @ApiModelProperty(value = "文化程度(C0008)", required = true)
     @NotBlank(message = "{文化程度}",groups = AddGroup.class)
     @DictV(type = "C0008",message = "{文化程度}")
@@ -117,7 +117,7 @@ public class YljgYgJbxx extends BaseEntity
     private String gwlx;
 
     /** 职业类型(CH061) */
-    @Excel(name = "职业类型", dictType = "CH061")
+    @Excel(name = "职业类型")
     @ApiModelProperty(value = "职业类型(CH061)", required = true)
     @NotBlank(message = "{职业类型}",groups = AddGroup.class)
     @DictV(type = "CH061",message = "{职业类型}")
@@ -130,13 +130,13 @@ public class YljgYgJbxx extends BaseEntity
     private String zylxQt;
 
     /** 是否有护理人员等级证书(CZ035) */
-    @Excel(name = "是否有护理人员等级证书", dictType = "CZ035")
+    @Excel(name = "是否有护理人员等级证书")
     @ApiModelProperty(value = "是否有护理人员等级证书(CZ035)")
     @DictV(type = "CZ035",message = "{是否有护理人员等级证书}")
     private String isHlyyzs;
 
     /** 护理员等级(CH020) */
-    @Excel(name = "护理员等级", dictType = "CH020")
+    @Excel(name = "护理员等级")
     @ApiModelProperty(value = "护理员等级(CH020)")
     @DictV(type = "CH020",message = "{护理员等级}")
     private String hlydj;
@@ -148,7 +148,7 @@ public class YljgYgJbxx extends BaseEntity
     private String gqHlydj;
 
     /** 是否缴纳社保(CZ035) */
-    @Excel(name = "是否缴纳社保", dictType = "CZ035")
+    @Excel(name = "是否缴纳社保")
     @ApiModelProperty(value = "是否缴纳社保(CZ035)", required = true)
     @NotBlank(message = "{是否缴纳社保}",groups = AddGroup.class)
     @DictV(type = "CZ035",message = "{是否缴纳社保}")

+ 79 - 0
ruoyi-modules/mz-organization-yggl/src/main/java/com/ruoyi/organization/service/impl/YljgYgJbxxServiceImpl.java

@@ -2,10 +2,13 @@ package com.ruoyi.organization.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.copier.CopyOptions;
+import com.alibaba.fastjson2.TypeReference;
+import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.organization.domain.YljgJcxx;
 import com.ruoyi.organization.domain.YljgYgJbxx;
@@ -14,6 +17,8 @@ import com.ruoyi.organization.mapper.YljgJcxxMapper;
 import com.ruoyi.organization.mapper.YljgYgJbxxMapper;
 import com.ruoyi.organization.mapper.YljgsqJcxxMapper;
 import com.ruoyi.organization.service.IYljgYgJbxxService;
+import com.ruoyi.system.api.RemoteDictDataService;
+import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.DocumentTypeStatus;
 import com.ruoyi.system.utils.IDCardUtil;
 import org.apache.commons.lang3.ObjectUtils;
@@ -24,6 +29,8 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -45,6 +52,9 @@ public class YljgYgJbxxServiceImpl implements IYljgYgJbxxService
     @Autowired
     private YljgsqJcxxMapper yljgsqJcxxMapper;
 
+    @Autowired
+    private RemoteDictDataService remoteDictDataService;
+
     /**
      * 查询基本信息
      *
@@ -295,6 +305,75 @@ public class YljgYgJbxxServiceImpl implements IYljgYgJbxxService
             if (z.getSfzhm().length()!=18){
                 throw new ServiceException("请检查证件号码是否录入正确");
             }
+            Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+            String xm = z.getXm();
+            Matcher m = p.matcher(xm);
+            if(m.find()==false) {
+                throw new ServiceException("姓名 必须含有一个汉字,请检查");
+            }
+
+            AjaxResult C0015 = remoteDictDataService.getDictDataByDictType("C0015", SecurityConstants.INNER);
+            List<String> zjlx = C0015.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zjlx.contains(z.getSfzlx())){
+                throw new ServiceException("证件类型不符合条件,请检查");
+            }
+
+            // 验证座机号
+            Pattern  p1 = Pattern.compile("\\d{4}+-+\\d{7}");
+            String lxdh = z.getLxdh();
+            Matcher matcher1 = p1.matcher(lxdh);
+
+            Pattern compile = Pattern.compile("^[1]+\\d{10}");
+            String lxdh1 = z.getLxdh();
+            Matcher matcher2 = compile.matcher(lxdh1);
+            if (matcher1.find() == false && matcher2.find()==false) {
+                throw new ServiceException("请检查 人员联系电话 录入是否正确");
+            }
+
+            AjaxResult c00081 = remoteDictDataService.getDictDataByDictType("C0008", SecurityConstants.INNER);
+            List<String> data = c00081.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!data.contains(z.getWhcd())){
+                throw new ServiceException("文化程度不符合条件,请检查");
+            }
+
+            AjaxResult ch061 = remoteDictDataService.getDictDataByDictType("CH061", SecurityConstants.INNER);
+            List<String> zylx = ch061.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!zylx.contains(z.getZylx())){
+                throw new ServiceException("职业类型不符合条件,请检查");
+            }
+
+            AjaxResult ch020 = remoteDictDataService.getDictDataByDictType("CH020", SecurityConstants.INNER);
+            List<String> hlydj = ch020.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!hlydj.contains(z.getHlydj())){
+                throw new ServiceException("护理员等级不符合条件,请检查");
+            }
+
+            AjaxResult cz035 = remoteDictDataService.getDictDataByDictType("CZ035", SecurityConstants.INNER);
+            List<String> isHlyyzs = cz035.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!isHlyyzs.contains(z.getIsHlyyzs())){
+                throw new ServiceException("是否有护理人员等级证书不符合条件,请检查");
+            }
+
+            AjaxResult ch062 = remoteDictDataService.getDictDataByDictType("CH062", SecurityConstants.INNER);
+            List<String> gwlx = ch062.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!gwlx.contains(z.getGwlx())){
+                throw new ServiceException("岗位类型不符合条件,请检查");
+            }
+
+            AjaxResult cz0351 = remoteDictDataService.getDictDataByDictType("CZ035", SecurityConstants.INNER);
+            List<String> isJnsb = cz0351.getData(new TypeReference<List<SysDictData>>() {
+            }).stream().map(SysDictData::getDictValue).collect(Collectors.toList());
+            if (!isJnsb.contains(z.getIsJnsb())){
+                throw new ServiceException("是否缴纳社保不符合条件,请检查");
+            }
+
+
         });
         // 流特性去掉重复Map
         Long count = list.stream().distinct().count();

+ 81 - 1
ruoyi-ui/src/views/business/lrxx/jbxx/index.vue

@@ -137,6 +137,16 @@
         >新增
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-has-permi="['business:lrjbxx:importData']"
+        >导入</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -883,6 +893,34 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialog-drag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
     <!--操作-->
     <el-dialog
       v-dialog-drag
@@ -929,6 +967,7 @@ import lrqtsyr from '../lrqtsyr/index'
 import lrchxxx from '../lrchxxx/index'
 import lrjtxx from '../lrjtxx/index'
 import lrxfrxx from '../lrxfrxx/index'
+import {getToken} from "@/utils/auth";
 
 export default {
     name: 'Lrjbxx',
@@ -989,6 +1028,21 @@ export default {
         // 是否显示弹出层
         open: false,
         openLzzt: false,
+        // 用户导入参数
+        upload: {
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/business/lrjbxx/importData"
+        },
         // 查询参数
         queryParams: {
           pageNum: 1,
@@ -1647,7 +1701,33 @@ export default {
           this.$modal.msgSuccess('删除成功')
         }).catch(() => {
         })
-      }
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        this.upload.title = "用户导入";
+        this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.download('business/lrjbxx/importTemplate', {
+        }, `老人基本信息_模板_${new Date().getTime()}.xlsx`)
+      },
+// 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+// 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+        this.getList();
+      },
+// 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      },
     }
   }
 </script>

+ 80 - 0
ruoyi-ui/src/views/business/tsxdxm/cwgl/index.vue

@@ -88,6 +88,16 @@
           >导出</el-button
         >
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-has-permi="['business:cwgl:importData']"
+        >导入</el-button>
+      </el-col>
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
@@ -442,6 +452,35 @@
       </div>
     </el-dialog>
 
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialog-drag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+
     <!-- 家庭养老床位建设质量管理详情信息对话框 -->
     <el-dialog
       v-dialog-drag
@@ -597,6 +636,7 @@ import {checkPermi} from "@/utils/permission";
 import Table from "@/views/business/fwjggl/djpd/pdzj/table";
 import {getLocationName} from "@/api/system/jlDept";
 import {mapState} from "vuex";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Cwgl",
@@ -655,6 +695,20 @@ export default {
       open: false,
       openYx: false,
       nPopen: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/business/cwgl/importData",
+      },
       // 查询参数
       openXQ: false,
       queryParams: {
@@ -1122,6 +1176,32 @@ export default {
     translateDict(type, value) {
       return this.selectDictLabel(this.dict.type[type], value);
     },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download('business/cwgl/importTemplate', {
+      }, `家庭养老床位建设质量管理信息_模板_${new Date().getTime()}.xlsx`)
+    },
+// 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+// 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+// 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
   },
 };
 </script>

+ 81 - 0
ruoyi-ui/src/views/business/tsxdxm/cwgl/pblncp.vue

@@ -14,6 +14,17 @@
         >新增</el-button>
       </el-col>
 
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-has-permi="['business:pblncp:importData']"
+        >导入</el-button>
+      </el-col>
+
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -75,11 +86,39 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialog-drag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?id=' + upload.id"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import {addPblncp, delPblncp, getPblncp, listPblncp, updatePblncp} from "@/api/business/tsxdxm/pblncp";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Pblncp",
@@ -105,6 +144,21 @@ export default {
       zjId:null,
       // 是否显示弹出层
       open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        id: "",
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/business/pblncp/importData",
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -276,6 +330,33 @@ export default {
         /****** sks 需要改动的地方 end ******/
       }).catch(() => {});
     },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+      this.upload.id = this.zjId;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download('business/pblncp/importTemplate', {
+      }, `配备老年用品信息_模板_${new Date().getTime()}.xlsx`)
+    },
+// 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+// 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+// 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
   }
 };
 </script>

+ 81 - 0
ruoyi-ui/src/views/business/tsxdxm/cwgl/pbzncp.vue

@@ -11,6 +11,17 @@
           v-hasPermi="['business:pbzncp:add']"
         >新增</el-button>
       </el-col>
+
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-has-permi="['business:pbzncp:importData']"
+        >导入</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -72,11 +83,39 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialog-drag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?id=' + upload.id"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import {addPbzncp, delPbzncp, getPbzncp, listPbzncp, updatePbzncp} from "@/api/business/tsxdxm/pbzncp";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Pbzncp",
@@ -102,6 +141,21 @@ export default {
       zjId:null,
       // 是否显示弹出层
       open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        id: "",
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/business/pbzncp/importData",
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -273,6 +327,33 @@ export default {
         /****** sks 需要改动的地方 end ******/
       }).catch(() => {});
     },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+      this.upload.id = this.zjId;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download('business/pbzncp/importTemplate', {
+      }, `智能化产品信息_模板_${new Date().getTime()}.xlsx`)
+    },
+// 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+// 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+// 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
   }
 };
 </script>

+ 81 - 0
ruoyi-ui/src/views/business/tsxdxm/smfw/index.vue

@@ -30,6 +30,16 @@
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
           v-hasPermi="['business:smfw:export']">导出</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-has-permi="['business:smfw:importData']"
+        >导入</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -81,6 +91,36 @@
       <span>*</span>
       如无特殊说明,只填报户籍在本地区的60周岁以上老年人!
     </p>
+
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialog-drag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+
     <!-- 添加或修改居家养老上门服务质量管理对话框 -->
     <el-dialog v-dialog-drag :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="180px">
@@ -246,6 +286,7 @@ import {addSmfw, delSmfw, getSmfw, listSmfw, updateSmfw} from "@/api/business/ts
 import {chineseOne, idCard} from '@/utils/regular'
 import {getLocationName} from "@/api/system/jlDept";
 import {mapGetters, mapState} from 'vuex'
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Smfw",
@@ -274,6 +315,20 @@ export default {
       // 是否显示弹出层
       open: false,
       openXQ: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/business/smfw/importData",
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -651,6 +706,32 @@ export default {
         }
         return this.selectDictLabel(this.dict.type[type], value)
       },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download('business/smfw/importTemplate', {
+      }, `居家养老上门服务质量管理_模板_${new Date().getTime()}.xlsx`)
+    },
+// 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+// 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+// 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
   }
 };
 </script>