Commit e3235ee0 authored by hongguangwu's avatar hongguangwu

MVP1.5-薪资导入优化(社保基数)

parent 9dec8307
......@@ -120,8 +120,16 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
Map<String, Boolean> bankMap = new HashMap<>();
for (TCheckBankNo check : list) {
cur = noMap.get(check.getBankNo());
if (cur != null && cur.getName().equals(check.getName())) {
bankMap.put(cur.getBankNo(), CommonConstants.ZERO_ONE.equals(cur.getResult()));
if (cur != null) {
if (CommonConstants.ZERO_ONE.equals(cur.getResult())) {
bankMap.put(cur.getBankNo(), cur.getName().equals(check.getName()));
} else {
if (cur.getName().equals(check.getName())) {
bankMap.put(cur.getBankNo(), false);
} else {
noCurlist.add(check);
}
}
} else {
noCurlist.add(check);
}
......
......@@ -51,15 +51,49 @@ public class HrEquator extends GetterBaseEquator {
List<FieldInfo> diff = equator.getDiffFields(oldInfo, newInfo);
Map<String, Integer> curMap = new HashMap<>();
String fieldName;
String fieldName2;
boolean newChange = false;
if (!Common.isEmpty(diff)) {
List<FieldInfo> diff2;
for(FieldInfo field:diff){
fieldName = field.getFieldName();
curMap.put(fieldName, 1);
if (!"updateTime".equals(fieldName) && !"updateBy".equals(fieldName)) {
if (!"updateTime".equals(fieldName) && !"updateBy".equals(fieldName) && !"java.util.List".equals(field.getFirstFieldType().getName())) {
newChange = true;
sb.append(field.getFieldName()).append(",");
}
try {
if ("java.util.List".equals(field.getFirstFieldType().getName())) {
List<Object> firstList = (List<Object>) field.getFirstVal();
List<Object> secondList = (List<Object>) field.getSecondVal();
curMap.put(fieldName, 1);
if (firstList != null && secondList != null) {
if (firstList.size() == secondList.size()) {
listA:
for (int i = 0; i < firstList.size(); i++) {
diff2 = equator.getDiffFields(firstList.get(i), secondList.get(i));
for (FieldInfo field2 : diff2) {
fieldName2 = field2.getFieldName();
if (!"createTime".equals(fieldName2) && !"createBy".equals(fieldName2) && !"createName".equals(fieldName2)
&& !"updateTime".equals(fieldName2) && !"updateBy".equals(fieldName2)) {
newChange = true;
sb.append(field.getFieldName()).append(",");
break listA;
}
}
}
} else {
newChange = true;
sb.append(field.getFieldName()).append(",");
}
} else if (firstList != null || secondList != null) {
newChange = true;
sb.append(field.getFieldName()).append(",");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
// 从有值变为空,也要记录变更日志
......
......@@ -328,26 +328,30 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
boolean isFalse = false;
for (TSalaryEmployee employee : saveNewEmpList) {
if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验卡号错误"));
return null;
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:认证不一致】"));
isFalse = true;
}
} else {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验卡号错误:【" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
return null;
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true;
}
if (phoneMap.get(employee.getEmpPhone()) != null) {
if (Boolean.FALSE.equals(phoneMap.get(employee.getEmpPhone()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验手机号错误"));
return null;
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【手机号验证:手机号错误】"));
isFalse = true;
}
} else {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验手机号错误:【" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
return null;
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true;
}
}
if (isFalse) {
return null;
}
this.saveBatch(saveNewEmpList);
}
return null;
......
......@@ -477,14 +477,9 @@ public class SalaryAccountUtil implements Serializable {
}
saveNewEmpList.add(newEmps);
checkTaxMonthList.add(newEmps.getEmpIdcard());
} else {
if ("4".equals(salaryType)) {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
} else if (notLabour) {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
}
} else if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
}
} else {
// 使用emp信息
......
......@@ -249,6 +249,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
sysPayProportionService.save(payProportion);
}
}
for (SysPayProportion payProportion : payProportionList) {
payProportion.setCreateBy(null);
payProportion.setCreateName(null);
payProportion.setCreateTime(null);
payProportion.setUpdateBy(null);
payProportion.setUpdateTime(null);
}
if (!oldFundMap.isEmpty()) {
for (SysPayProportion fund : oldFundMap.values()) {
sysPayProportionService.removeById(fund);
......
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