Commit a53d553e authored by wujipeng's avatar wujipeng
Browse files

解析优化

parent 45676539
package com.platform.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.collect.Maps;
import com.platform.exception.BusinessException;
import com.platform.model.entity.ExcelDataEntity;
......@@ -148,14 +149,14 @@ public class AnalysisServiceImpl implements AnalysisService {
(key, excelDatum) -> afterDeduplication.add(excelDatum)
);
for (ExcelDataEntity excelDataEntity : afterDeduplication) {
if (StringUtils.isNotEmpty(excelDataEntity.getPayeeName()) && !"-".equals(excelDataEntity.getPayeeName())){
if(excelDataEntity.getPayeeName().contains("(个人)")){
if (StringUtils.isNotEmpty(excelDataEntity.getPayeeName()) && !"-".equals(excelDataEntity.getPayeeName())) {
if (excelDataEntity.getPayeeName().contains("(个人)")) {
excelDataEntity.setPayeeName(excelDataEntity.getPayeeName().replace("(个人)", ""));
afterDeduplication1.add(excelDataEntity);
}else if (excelDataEntity.getPayeeName().contains("(商户)")){
} else if (excelDataEntity.getPayeeName().contains("(商户)")) {
excelDataEntity.setPayeeName(excelDataEntity.getPayeeName().replace("(商户)", ""));
afterDeduplication1.add(excelDataEntity);
}else {
} else {
afterDeduplication1.add(excelDataEntity);
}
}
......@@ -175,14 +176,14 @@ public class AnalysisServiceImpl implements AnalysisService {
} else {
List<ExcelDataEntity> excelData1 = Lists.newArrayList();
for (ExcelDataEntity excelDataEntity : excelData) {
if (StringUtils.isNotEmpty(excelDataEntity.getPayeeName()) && !"-".equals(excelDataEntity.getPayeeName())){
if(excelDataEntity.getPayeeName().contains("(个人)")){
if (StringUtils.isNotEmpty(excelDataEntity.getPayeeName()) && !"-".equals(excelDataEntity.getPayeeName())) {
if (excelDataEntity.getPayeeName().contains("(个人)")) {
excelDataEntity.setPayeeName(excelDataEntity.getPayeeName().replace("(个人)", ""));
excelData1.add(excelDataEntity);
}else if (excelDataEntity.getPayeeName().contains("(商户)")){
} else if (excelDataEntity.getPayeeName().contains("(商户)")) {
excelDataEntity.setPayeeName(excelDataEntity.getPayeeName().replace("(商户)", ""));
excelData1.add(excelDataEntity);
}else {
} else {
excelData1.add(excelDataEntity);
}
}
......@@ -206,6 +207,10 @@ public class AnalysisServiceImpl implements AnalysisService {
//保存用户
if (StringUtils.isNotEmpty(folderName)) {
Map<String, String> idCardInfo = IdCardUtils.parseIdCardInfo(folderName);
//删除旧用户
userService.remove(new LambdaQueryWrapper<UserEntity>()
.eq(UserEntity::getUserName, folderName)
.eq(UserEntity::getCaseId, caseId));
if (!ObjectUtils.isEmpty(idCardInfo)) {
userService.save(UserEntity.builder()
.userName(folderName)
......@@ -215,7 +220,7 @@ public class AnalysisServiceImpl implements AnalysisService {
.idType("身份证")
.type("1")
.caseId(caseId).build());
}else {
} else {
userService.save(UserEntity.builder()
.userName(folderName)
.type("1")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment