Commit 332bba9f authored by hongguangwu's avatar hongguangwu

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

parent 0a9bd53f
...@@ -67,18 +67,21 @@ public class HrEquator extends GetterBaseEquator { ...@@ -67,18 +67,21 @@ public class HrEquator extends GetterBaseEquator {
List<Object> firstList = (List<Object>) field.getFirstVal(); List<Object> firstList = (List<Object>) field.getFirstVal();
List<Object> secondList = (List<Object>) field.getSecondVal(); List<Object> secondList = (List<Object>) field.getSecondVal();
curMap.put(fieldName, 1); curMap.put(fieldName, 1);
if (firstList != null && secondList != null) { if (firstList != null && secondList != null && !firstList.isEmpty()) {
if (firstList.size() == secondList.size()) { if (firstList.size() == secondList.size()) {
listA: boolean isTrue = true;
for (int i = 0; i < firstList.size(); i++) { for (int i = 0; i < firstList.size(); i++) {
diff2 = equator.getDiffFields(firstList.get(i), secondList.get(i)); if (isTrue) {
for (FieldInfo field2 : diff2) { diff2 = equator.getDiffFields(firstList.get(i), secondList.get(i));
fieldName2 = field2.getFieldName(); for (FieldInfo field2 : diff2) {
if (!"createTime".equals(fieldName2) && !"createBy".equals(fieldName2) && !"createName".equals(fieldName2) fieldName2 = field2.getFieldName();
&& !"updateTime".equals(fieldName2) && !"updateBy".equals(fieldName2)) { if (!"createTime".equals(fieldName2) && !"createBy".equals(fieldName2) && !"createName".equals(fieldName2)
newChange = true; && !"updateTime".equals(fieldName2) && !"updateBy".equals(fieldName2)) {
sb.append(field.getFieldName()).append(","); newChange = true;
break listA; sb.append(field.getFieldName()).append(",");
isTrue = false;
break;
}
} }
} }
} }
...@@ -86,7 +89,7 @@ public class HrEquator extends GetterBaseEquator { ...@@ -86,7 +89,7 @@ public class HrEquator extends GetterBaseEquator {
newChange = true; newChange = true;
sb.append(field.getFieldName()).append(","); sb.append(field.getFieldName()).append(",");
} }
} else if (firstList != null || secondList != null) { } else if ((firstList != null && !firstList.isEmpty()) || (secondList != null && !secondList.isEmpty())) {
newChange = true; newChange = true;
sb.append(field.getFieldName()).append(","); sb.append(field.getFieldName()).append(",");
} }
......
...@@ -475,8 +475,8 @@ public class SalaryAccountUtil implements Serializable { ...@@ -475,8 +475,8 @@ public class SalaryAccountUtil implements Serializable {
checkTaxMonthList.add(newEmps.getEmpIdcard()); checkTaxMonthList.add(newEmps.getEmpIdcard());
} else { } else {
if ("3".equals(salaryType) || "4".equals(salaryType)) { if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"; error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((newEmps.getLineNums() + 2), error));
} else { } else {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error)); errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
...@@ -911,7 +911,6 @@ public class SalaryAccountUtil implements Serializable { ...@@ -911,7 +911,6 @@ public class SalaryAccountUtil implements Serializable {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim()); areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr); newEmp.setBankProvince(areaStr);
entity.setBankProvince(String.valueOf(newEmp.getBankProvince()));
} else { } else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行省错误:" + entity.getBankProvince(); error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
...@@ -921,7 +920,6 @@ public class SalaryAccountUtil implements Serializable { ...@@ -921,7 +920,6 @@ public class SalaryAccountUtil implements Serializable {
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim()); + CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr); newEmp.setBankCity(areaStr);
entity.setBankCity(String.valueOf(newEmp.getBankCity()));
} else { } else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行市错误:" + entity.getBankCity(); error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
...@@ -963,6 +961,8 @@ public class SalaryAccountUtil implements Serializable { ...@@ -963,6 +961,8 @@ public class SalaryAccountUtil implements Serializable {
} }
} }
} }
entity.setBankProvince(String.valueOf(newEmp.getBankProvince()));
entity.setBankCity(String.valueOf(newEmp.getBankCity()));
newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时 newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId()); newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName()); newEmp.setDeptName(dept.getDepartName());
......
...@@ -701,7 +701,7 @@ ...@@ -701,7 +701,7 @@
ap.AREA_NAME BANK_PROVINCE, ap.AREA_NAME BANK_PROVINCE,
ac.AREA_NAME BANK_CITY, ac.AREA_NAME BANK_CITY,
a.IS_PERSON_TAX, a.IS_PERSON_TAX,
ifnull(a.RELAY_SALARY,0) + ifnull(a.RELAY_SALARY_UNIT,0) RELAY_SALARY, if(a.RELAY_SALARY_UNIT is not null and a.RELAY_SALARY_UNIT != 0,a.RELAY_SALARY_UNIT,ifnull(a.RELAY_SALARY,0)) RELAY_SALARY,
a.ACTUAL_SALARY, a.ACTUAL_SALARY,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) SALARY_TAX, ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) SALARY_TAX,
a.CREATE_NAME, a.CREATE_NAME,
......
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