Commit afed6ddf authored by hongguangwu's avatar hongguangwu

MVP1.7.0 优化

parent 87c09dfc
......@@ -126,7 +126,7 @@ public class PreUploadEmpImportTwoVo implements Serializable {
// 银行卡号 开户总行 开户省 开户市 开户支行 计税月份
@ExcelAttribute(name = "银行卡号", maxLength = 50)
private String bankNo;
@ExcelAttribute(name = "开户总行", maxLength = 50)
@ExcelAttribute(name = "开户总行", maxLength = 50)
private String bankName;
@ExcelAttribute(name = "开户省", isArea = true)
private String bankProvince;
......
......@@ -3220,7 +3220,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorTitle.append("联系地址省市县需要成对出现;");
}
if (pairsKai.size() == 1) {
errorTitle.append("开户省市需要成对出现;");
errorTitle.append("开户省市需要成对出现;");
}
if (errorTitle.length() > 0) {
return R.failed("表头错误:" + errorTitle + " 请检查调整后再次导入");
......@@ -3296,9 +3296,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 不存在档案,则仅返回这个信息
String errorCur;
// 已存在的主档案Map
Map<String, String> empMap = new HashMap<>();
//Map<String, String> empMap = new HashMap<>();
// 已存在的主档案
String curVo;
//String curVo
// 档案map
Map<String, TEmployeeInfo> existEmpMap = this.getMapByDeptId(paramVo.getDeptId());
Map<String, TEmpContactInfo> existContactMap = this.getTEmpContactInfoMapByDeptId(paramVo.getDeptId());
......@@ -3315,7 +3315,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String errorCurInfoStatus = "该人员档案状态未在档,请核实";
int lineNum = 2;
for (Map<String, String> rowMap : vo.getContentList()) {
curVo = null;
// curVo = null
errorMust = new StringBuilder();
errorFormat = new StringBuilder();
errorCheck = new StringBuilder();
......@@ -3332,8 +3332,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (idNumber.equals(shuName)) {
if (Common.isEmpty(shuValue)) {
errorMust.append("身份证号;");
} else {
curVo = empMap.get(shuValue);
}
}
if (phoneTitleMap.get(shuName) != null && Common.isNotNull(shuValue)) {
......@@ -3342,18 +3340,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
field = fieldsMap.get(shuName);
if (field != null) {
attr = field.getAnnotation(ExcelAttribute.class);
if (curVo == null) {
//if (curVo == null) {
// 必填
if (attr.isNotEmpty() && Common.isEmpty(shuValue)) {
errorMust.append(attr.name()).append(";");
}
}
//}
if (Common.isNotNull(shuValue)) {
shuValue = shuValue.trim();
//校验字段是否符合要求 返回错误信息
dictValue = DiyExcelImportUtil.validateUtil(shuValue, attr, errorFormat, dictMap, parentAreaMap, shuName, false, startDateMap);
//校验字段是否符合要求2 开户行
if (curVo == null && "bankName".equals(shuName) && bankMap.get(shuValue) == null) {
if ("bankName".equals(shuName) && bankMap.get(shuValue) == null) {
errorFormat.append(attr.name()).append("_不符合财务要求,请查薪资配置;");
}
fieldType = field.getType();
......@@ -3419,7 +3417,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(detail.getRelationProvince()) && (Common.isEmpty(detail.getRelationCity()) || Common.isEmpty(detail.getRelationTown()))) {
errorMust.append("联系地址-省、市、区/县联动必填;");
}
if (Common.isNotNull(detail.getFileProvince()) && Common.isEmpty(detail.getFileCity())) {
if (Common.isNotNull(detail.getBankProvince()) && Common.isEmpty(detail.getBankCity())) {
errorMust.append("开户省、市联动必填;");
}
// 手机号码
......@@ -3439,7 +3437,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(errorCur)) {
detail.setErrorInfo(errorCur);
empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING);
//empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING)
} else {
StringBuilder errorInfo = new StringBuilder();
if (errorCheck.length() > 0) {
......@@ -3452,7 +3450,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorInfo.append("格式不正确:").append(errorFormat);
}
detail.setErrorInfo(errorInfo.toString());
empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING);
//empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING)
}
} else {
detail.setErrorInfo("身份证号不存在!");
......
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