Commit 6a42a613 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents c4606483 008fc300
......@@ -1503,14 +1503,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} else {
salary = sr.getData();
}
boolean isActual = false; //false:应发导入; true:实发 倒推导入
List<TSalaryAccountItemVo> itemList = salaryAccountVo.getSaiList();
for (TSalaryAccountItemVo item : itemList) {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
isActual = true;
break;
}
}
if (salary != null) {
// 薪资导入、删除前加锁:
......@@ -1532,7 +1524,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryLock lockUpdate;
try {
// 薪资核心导入代码
return this.doLaborCoreSalary(savList, salaryAccountVo, saiList, sai, dept, invoiceTitle, user, nowTime, salary, isActual);
return this.doLaborCoreSalary(savList, saiList, sai, dept, invoiceTitle, salary);
} catch (Exception e) {
lockUpdate = new TSalaryLock();
lockUpdate.setId(lock.getId());
......@@ -1558,14 +1550,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
/**
* @Description: 劳务费导入核心代码
* @Description: 劳务费导入
* @Author: huyc
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public R doLaborCoreSalary(List<TSalaryAccountVo> savList, TSalaryAccountVo salaryAccountVo
, List<TSalaryAccountItem> saiList, TSalaryAccountItem sai, TSettleDomainSelectVo dept
, String invoiceTitle, YifuUser user, LocalDateTime nowTime, TSalaryStandard salary
, boolean isActual) {
public R doLaborCoreSalary(List<TSalaryAccountVo> savList, List<TSalaryAccountItem> saiList, TSalaryAccountItem sai,
TSettleDomainSelectVo dept, String invoiceTitle, TSalaryStandard salary) {
List<TSalaryAccount> aList = new ArrayList<>();
TSalaryAccount a;//定库:
BigDecimal money = new BigDecimal(CommonConstants.ZERO_STRING); //初始化金额备用
......@@ -1685,11 +1675,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
account.setSaiList(null);
account.setSalaryFormId(salary.getId());
tSalaryAccountService.save(account);
money = SalaryConstants.B_ZERO;
for (TSalaryAccountItem item : saiList) {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
money = item.getSalaryMoney();
}
item.setSalaryAccountId(account.getId());
tSalaryAccountItemService.save(item);
}
......@@ -1753,6 +1739,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
a.setRelaySalaryUnit(relaySalary);
a.setSalaryTaxUnit(nowTaxY);
a.setActualSalary(actualSalarySumNow);
}
// 本次个人应发合计
TSalaryAccountItem sai = new TSalaryAccountItem();
......
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