Commit d8a7dca0 authored by huyuchen's avatar huyuchen

劳务费导入修改

parent 1ca2b4b7
......@@ -172,8 +172,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Map<String, Integer> checkMap = tSalaryAccountService.getAccountCheckMap(dept.getId(), DateUtil.addMonth(configSalary.getSalaryMonth()));
List<String> checkListY = new ArrayList<>();
if (CommonConstants.THREE_STRING.equals(salaryType)) {
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
// 劳务费和稿酬 薪资类型互斥校验Map格式:本年度#身份证号
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
if (Common.isNotNull(configSalary)) {
checkListY = tSalaryAccountService.getAccountYearCheckMap(dept.getId());
}
......@@ -1574,12 +1574,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
for (int j = 0; j < savList.get(i).getSaiList().size(); j++) {
sai = new TSalaryAccountItem();
SalaryAccountUtil.reflectionAttr(savList.get(i).getSaiList().get(j), sai);
//工资应发
if (SalaryConstants.RELAY_SALARY_JAVA.equals(sai.getJavaFiedName())) {
relaySalary = sai.getSalaryMoney();
relaySalarySum = relaySalarySum.add(sai.getSalaryMoney());
}
SalaryAccountUtil.reflectionAttr(savList.get(i).getSaiList().get(j), sai);
//个人实发合计
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(sai.getJavaFiedName())) {
actualSalarySum = actualSalarySum.add(sai.getSalaryMoney());
......@@ -1611,6 +1605,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
salary.setOwnNums(ownNum);
salary.setOwnMoney(ownMoney);
for (TSalaryAccount account : aList) {
relaySalarySum = relaySalarySum.add(account.getRelaySalaryUnit());
saiList = account.getSaiList();
account.setSaiList(null);
account.setSalaryFormId(salary.getId());
tSalaryAccountService.save(account);
for (TSalaryAccountItem item : saiList) {
item.setSalaryAccountId(account.getId());
tSalaryAccountItemService.save(item);
}
}
TSalaryDetailVo salaryDetailVo = new TSalaryDetailVo();
salaryDetailVo.setSalaryAccountList(aList);
salary.setSettlementAmount(relaySalarySum);
......@@ -1637,16 +1644,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salaryDetailVo.setSalary(salary);
for (TSalaryAccount account : aList) {
saiList = account.getSaiList();
account.setSaiList(null);
account.setSalaryFormId(salary.getId());
tSalaryAccountService.save(account);
for (TSalaryAccountItem item : saiList) {
item.setSalaryAccountId(account.getId());
tSalaryAccountItemService.save(item);
}
}
return R.ok(salaryDetailVo);
}
......@@ -1709,6 +1706,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
a.setActualSalary(actualSalarySumNow);
}
a.setRelaySalaryUnit(relaySalary);
a.setRelaySalary(actualSalarySumNow);
// 本次个人应发合计
TSalaryAccountItem sai = new TSalaryAccountItem();
sai.setCnName(SalaryConstants.RELAY_SALARY);
......@@ -1716,7 +1714,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sai.setIsTax(CommonConstants.ZERO_INT);
sai.setSalaryMoney(relaySalary);
saiList.add(sai);
return nowTaxT;
if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) {
return nowTaxT;
}else {
return nowTaxY;
}
}
public static BigDecimal getNowTax(BigDecimal actualSalarySum) {
......
......@@ -308,7 +308,7 @@ public class SalaryAccountUtil implements Serializable {
if (Common.isNotNull(checkListY) && checkListY.contains(entity.getEmpIdcard())) {
entity.setHaveSalaryFlag(CommonConstants.ONE_INT);
}
if (null == error) {
if (!Common.isNotNull(errorList)) {
if (Common.isNotNull(entity.getSalaryStyle())) {
salaryStyle = entity.getSalaryStyle();
} else if (configSalary.getGrantType() != null) {
......
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