Commit cf982b00 authored by hongguangwu's avatar hongguangwu

1.5.7-王镇彬的-通讯补贴异常

parent a884e6a6
......@@ -141,6 +141,8 @@ public class SalaryAccountUtil implements Serializable {
List<TSalaryEmployee> newEmpList = new ArrayList<>();
Map<String, TSalaryAccountVo> entityMap = new HashMap<>();
List<String> otherIdCard = new ArrayList<>();
BigDecimal phoneSubsidyMoney;
TSalaryAccountItem phoneSubsidyItem;
for (int i = 0; i < rows; i++) {
annualBonusFlag = false;
errorFlag = true;
......@@ -179,9 +181,8 @@ public class SalaryAccountUtil implements Serializable {
annualBonusFlag = true;
}
if (SalaryConstants.PHONE_SUBSIDY_JAVA.equals(scs.getJavaFiedName())) {
BigDecimal bigDecimal1 = NumberUtils.createBigDecimal(cellValueStr);
if(bigDecimal1.compareTo(BigDecimal.valueOf(300)) == 1) {
phoneSubsidyMoney = NumberUtils.createBigDecimal(cellValueStr);
if(phoneSubsidyMoney.compareTo(new BigDecimal("300")) > 0) {
errorFlag = false;
error = "第" + (i + 2) + "行:本次发放"+cellValueStr+"元,超出300元的限制,禁止导入";
errorList.add(new ErrorMessage((i + 2), error));
......@@ -371,15 +372,13 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
TSalaryAccountItem item=tSalaryEmployeeService.selectByIdcard(newEmp.getEmpIdcard(),nowMonth);
if(Common.isNotNull(item)) {
BigDecimal LL = item.getSalaryMoney().add(phoneSubsidy);
if (LL.compareTo(BigDecimal.valueOf(300)) == 1) {
BigDecimal HH = LL.subtract(phoneSubsidy);
error = "第" + (i + 2) + "行:当月已发" + HH + "元,本次发放" + phoneSubsidy + "元,累计超出300元限制,禁止发放!";
if (Common.isNotNull(phoneSubsidy)) {
phoneSubsidyItem = tSalaryEmployeeService.selectByIdcard(newEmp.getEmpIdcard(), nowMonth);
if (phoneSubsidyItem != null && Common.isNotNull(phoneSubsidyItem.getSalaryMoney())
&& (phoneSubsidyItem.getSalaryMoney().add(phoneSubsidy)).compareTo(new BigDecimal("300")) > 0) {
error = "第" + (i + 2) + "行:当月已发" + phoneSubsidyItem.getSalaryMoney() + "元,本次发放" + phoneSubsidy + "元,累计超出300元限制,禁止发放!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (annualBonusFlag && Common.isEmpty(entity.getAnnualBonusType())) {
......
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