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