Commit 332bba9f authored by hongguangwu's avatar hongguangwu

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

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