Browse Source

福利人员导入----逻辑修改

dev
wanggongfeng 3 years ago
parent
commit
369ee31801
  1. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java

@ -294,7 +294,7 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl<ChangeWelfareDao,
if (list.size() > errorInfo.size()){ if (list.size() > errorInfo.size()){
Map<String, Long> groupByIdCard = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getIdCard, Collectors.counting())); Map<String, Long> groupByIdCard = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getIdCard, Collectors.counting()));
groupByIdCard.forEach((idCard,count) -> { groupByIdCard.forEach((idCard,count) -> {
if (Integer.valueOf(count.toString()).compareTo(1) != 0){ if (StringUtils.isNotBlank(idCard) && Integer.valueOf(count.toString()).compareTo(1) != 0){
for (ChangeWelfareImportExcel i : list) { for (ChangeWelfareImportExcel i : list) {
if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){ if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){
errorInfo.add(getErrorInfo(i,"数据重复",i.getNum())); errorInfo.add(getErrorInfo(i,"数据重复",i.getNum()));
@ -363,8 +363,8 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl<ChangeWelfareDao,
* Desc: 文件上传并返回url * Desc: 文件上传并返回url
* @param errorRows * @param errorRows
* @param tClass * @param tClass
* @author zxc * @author wgf
* @date 2022/3/30 09:16 * @date 2022/11/28 17:17
*/ */
public <T> String importOssUpload(Collection<?> errorRows, Class<T> tClass) throws IOException { public <T> String importOssUpload(Collection<?> errorRows, Class<T> tClass) throws IOException {
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("导入失败的数据列表","导入失败的数据列表"), Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("导入失败的数据列表","导入失败的数据列表"),

Loading…
Cancel
Save