Commit 3fa2fe83 authored by huyuchen's avatar huyuchen

项目基本信息推送

parent 3dc9cf25
......@@ -1543,24 +1543,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
int ownNum = 0;
// 自有员工应发金额
BigDecimal ownMoney = BigDecimal.ZERO;
// 发薪特殊值人数
int specialNums = 0;
// 发薪特殊值应发总额
BigDecimal specialMoney = BigDecimal.ZERO;
// 薪资员工发放稿酬/劳务费人数
int salaryNums = 0;
// 薪资员工发放稿酬/劳务费总额
BigDecimal salaryMoney = BigDecimal.ZERO;
// 本月是否重复金额人数
int repeatNums = 0;
// 本月是否重复金额总额
BigDecimal repeatMoney = BigDecimal.ZERO;
BigDecimal relaySalary; //工资应发
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false;
// 是否含有特殊金额false:否;true:是
boolean haveSpecialFlag = false;
// 是否重复金额false:否;true:是
boolean repeatFlag = false;
......@@ -1575,7 +1560,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getAllItemVoList(idCardList, invoiceTitle);
for (int i = CommonConstants.ZERO_INT; i < size; i++) {
relaySalary = BigDecimal.ZERO;
a = new TSalaryAccount();
// 本次实发
BigDecimal actualSalarySumNow = BigDecimal.ZERO;
......@@ -1586,9 +1570,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (!haveSalaryFlag && a.getHaveSalaryFlag() != null && a.getHaveSalaryFlag() == CommonConstants.ONE_INT) {
haveSalaryFlag = true;
}
if (!haveSpecialFlag && a.getHaveSpecialFlag() != null && a.getHaveSpecialFlag() == CommonConstants.ONE_INT) {
haveSpecialFlag = true;
}
if (!repeatFlag && a.getIsRepeat() != null && a.getIsRepeat() == CommonConstants.ONE_INT) {
repeatFlag = true;
}
......@@ -1606,29 +1587,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
saiList.add(sai);
}
}
// 自有员工以及自有员工应发金额
if (Common.isNotNull(a.getOwnFlag()) && a.getOwnFlag() == 1) {
ownNum++;
ownMoney = ownMoney.add(relaySalary);
}
// 发薪特殊值人数以及应发金额
if (Common.isNotNull(a.getHaveSpecialFlag()) && a.getHaveSpecialFlag() == 1) {
specialNums++;
specialMoney = specialMoney.add(relaySalary);
}
// 薪资员工发放稿酬/劳务费人数以及应发金额
if (Common.isNotNull(a.getHaveSalaryFlag()) && a.getHaveSalaryFlag() == 1) {
salaryNums++;
salaryMoney = salaryMoney.add(relaySalary);
}
// 本月是否重复金额人数以及应发金额
if (Common.isNotNull(a.getIsRepeat()) && a.getIsRepeat() == 1) {
repeatNums++;
repeatMoney = repeatMoney.add(relaySalary);
}
//累计扣税list
asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
......@@ -1639,6 +1597,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
calculationLabor(saiList, asList
, saiList, a), CommonConstants.ZERO_INT);
// 自有员工以及自有员工应发金额
if (Common.isNotNull(a.getOwnFlag()) && a.getOwnFlag() == 1) {
ownNum++;
ownMoney = ownMoney.add(a.getRelaySalaryUnit());
}
a.setSaiList(saiList);
aList.add(a);
} catch (Exception e) {
......@@ -1659,13 +1623,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setHaveSpecialFlag(CommonConstants.ZERO_INT);
salary.setIsRepeat(CommonConstants.ZERO_INT);
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
if (haveSalaryFlag || haveSpecialFlag || ownNum > 0 || repeatFlag) {
if (haveSalaryFlag || ownNum > 0 || repeatFlag) {
if (haveSalaryFlag) {
salary.setHaveSalaryFlag(CommonConstants.ONE_INT);
}
if (haveSpecialFlag) {
salary.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
if (repeatFlag) {
salary.setIsRepeat(CommonConstants.ONE_INT);
}
......
......@@ -264,9 +264,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if (CommonConstants.ZERO_STRING.equals(auditFlag)) {
tSalaryStandard.setStatus(CommonConstants.TWO_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ZERO_STRING);
tApprovalRecord.setNodeId("审核通过");
} else {
tSalaryStandard.setStatus(CommonConstants.FIVE_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING);
tApprovalRecord.setNodeId("审核不通过");
}
if (Common.isNotNull(auditRemark)) {
tSalaryStandard.setAuditRemark(auditRemark);
......@@ -280,7 +282,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
tApprovalRecord.setNodeId("审核");
approvalRecordService.save(tApprovalRecord);
}
return R.ok();
......
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