Commit e3235ee0 authored by hongguangwu's avatar hongguangwu

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

parent 9dec8307
...@@ -120,8 +120,16 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh ...@@ -120,8 +120,16 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
Map<String, Boolean> bankMap = new HashMap<>(); Map<String, Boolean> bankMap = new HashMap<>();
for (TCheckBankNo check : list) { for (TCheckBankNo check : list) {
cur = noMap.get(check.getBankNo()); cur = noMap.get(check.getBankNo());
if (cur != null && cur.getName().equals(check.getName())) { if (cur != null) {
bankMap.put(cur.getBankNo(), CommonConstants.ZERO_ONE.equals(cur.getResult())); 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 { } else {
noCurlist.add(check); noCurlist.add(check);
} }
......
...@@ -51,15 +51,49 @@ public class HrEquator extends GetterBaseEquator { ...@@ -51,15 +51,49 @@ public class HrEquator extends GetterBaseEquator {
List<FieldInfo> diff = equator.getDiffFields(oldInfo, newInfo); List<FieldInfo> diff = equator.getDiffFields(oldInfo, newInfo);
Map<String, Integer> curMap = new HashMap<>(); Map<String, Integer> curMap = new HashMap<>();
String fieldName; String fieldName;
String fieldName2;
boolean newChange = false; boolean newChange = false;
if (!Common.isEmpty(diff)) { if (!Common.isEmpty(diff)) {
List<FieldInfo> diff2;
for(FieldInfo field:diff){ for(FieldInfo field:diff){
fieldName = field.getFieldName(); fieldName = field.getFieldName();
curMap.put(fieldName, 1); 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; newChange = true;
sb.append(field.getFieldName()).append(","); 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,25 +328,29 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -328,25 +328,29 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
} }
boolean isFalse = false;
for (TSalaryEmployee employee : saveNewEmpList) { for (TSalaryEmployee employee : saveNewEmpList) {
if (bankMap.get(employee.getBankNo()) != null) { if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) { if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验卡号错误")); errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:认证不一致】"));
return null; isFalse = true;
} }
} else { } else {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验卡号错误:【" + SalaryConstants.CHECK_NO_RESPONSE + "】")); errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
return null; isFalse = true;
} }
if (phoneMap.get(employee.getEmpPhone()) != null) { if (phoneMap.get(employee.getEmpPhone()) != null) {
if (Boolean.FALSE.equals(phoneMap.get(employee.getEmpPhone()))) { if (Boolean.FALSE.equals(phoneMap.get(employee.getEmpPhone()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验手机号错误")); errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【手机号验证:手机号错误】"));
return null; isFalse = true;
} }
} else { } else {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建时校验手机号错误:【" + SalaryConstants.CHECK_NO_RESPONSE + "】")); errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【手机号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
return null; isFalse = true;
}
} }
if (isFalse) {
return null;
} }
this.saveBatch(saveNewEmpList); this.saveBatch(saveNewEmpList);
} }
......
...@@ -477,15 +477,10 @@ public class SalaryAccountUtil implements Serializable { ...@@ -477,15 +477,10 @@ public class SalaryAccountUtil implements Serializable {
} }
saveNewEmpList.add(newEmps); saveNewEmpList.add(newEmps);
checkTaxMonthList.add(newEmps.getEmpIdcard()); checkTaxMonthList.add(newEmps.getEmpIdcard());
} else { } else if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if ("4".equals(salaryType)) {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
} else if (notLabour) {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error)); errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
} }
}
} else { } else {
// 使用emp信息 // 使用emp信息
if (setEntityByEmpInfo(dept, ownEmployeeMap, ownDeptMap, salaryType, isIssue, errorList if (setEntityByEmpInfo(dept, ownEmployeeMap, ownDeptMap, salaryType, isIssue, errorList
......
...@@ -249,6 +249,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -249,6 +249,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
sysPayProportionService.save(payProportion); 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()) { if (!oldFundMap.isEmpty()) {
for (SysPayProportion fund : oldFundMap.values()) { for (SysPayProportion fund : oldFundMap.values()) {
sysPayProportionService.removeById(fund); 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