Commit 3fa2fe83 authored by huyuchen's avatar huyuchen

项目基本信息推送

parent 3dc9cf25
...@@ -1543,24 +1543,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1543,24 +1543,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
int ownNum = 0; int ownNum = 0;
// 自有员工应发金额 // 自有员工应发金额
BigDecimal ownMoney = BigDecimal.ZERO; 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:是 // 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false; boolean haveSalaryFlag = false;
// 是否含有特殊金额false:否;true:是
boolean haveSpecialFlag = false;
// 是否重复金额false:否;true:是 // 是否重复金额false:否;true:是
boolean repeatFlag = false; boolean repeatFlag = false;
...@@ -1575,7 +1560,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1575,7 +1560,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getAllItemVoList(idCardList, invoiceTitle); Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getAllItemVoList(idCardList, invoiceTitle);
for (int i = CommonConstants.ZERO_INT; i < size; i++) { for (int i = CommonConstants.ZERO_INT; i < size; i++) {
relaySalary = BigDecimal.ZERO;
a = new TSalaryAccount(); a = new TSalaryAccount();
// 本次实发 // 本次实发
BigDecimal actualSalarySumNow = BigDecimal.ZERO; BigDecimal actualSalarySumNow = BigDecimal.ZERO;
...@@ -1586,9 +1570,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1586,9 +1570,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (!haveSalaryFlag && a.getHaveSalaryFlag() != null && a.getHaveSalaryFlag() == CommonConstants.ONE_INT) { if (!haveSalaryFlag && a.getHaveSalaryFlag() != null && a.getHaveSalaryFlag() == CommonConstants.ONE_INT) {
haveSalaryFlag = true; haveSalaryFlag = true;
} }
if (!haveSpecialFlag && a.getHaveSpecialFlag() != null && a.getHaveSpecialFlag() == CommonConstants.ONE_INT) {
haveSpecialFlag = true;
}
if (!repeatFlag && a.getIsRepeat() != null && a.getIsRepeat() == CommonConstants.ONE_INT) { if (!repeatFlag && a.getIsRepeat() != null && a.getIsRepeat() == CommonConstants.ONE_INT) {
repeatFlag = true; repeatFlag = true;
} }
...@@ -1606,29 +1587,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1606,29 +1587,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
saiList.add(sai); 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 //累计扣税list
asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth()); asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
...@@ -1639,6 +1597,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1639,6 +1597,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
calculationLabor(saiList, asList calculationLabor(saiList, asList
, saiList, a), CommonConstants.ZERO_INT); , saiList, a), CommonConstants.ZERO_INT);
// 自有员工以及自有员工应发金额
if (Common.isNotNull(a.getOwnFlag()) && a.getOwnFlag() == 1) {
ownNum++;
ownMoney = ownMoney.add(a.getRelaySalaryUnit());
}
a.setSaiList(saiList); a.setSaiList(saiList);
aList.add(a); aList.add(a);
} catch (Exception e) { } catch (Exception e) {
...@@ -1659,13 +1623,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1659,13 +1623,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setHaveSpecialFlag(CommonConstants.ZERO_INT); salary.setHaveSpecialFlag(CommonConstants.ZERO_INT);
salary.setIsRepeat(CommonConstants.ZERO_INT); salary.setIsRepeat(CommonConstants.ZERO_INT);
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]); salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
if (haveSalaryFlag || haveSpecialFlag || ownNum > 0 || repeatFlag) { if (haveSalaryFlag || ownNum > 0 || repeatFlag) {
if (haveSalaryFlag) { if (haveSalaryFlag) {
salary.setHaveSalaryFlag(CommonConstants.ONE_INT); salary.setHaveSalaryFlag(CommonConstants.ONE_INT);
} }
if (haveSpecialFlag) {
salary.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
if (repeatFlag) { if (repeatFlag) {
salary.setIsRepeat(CommonConstants.ONE_INT); salary.setIsRepeat(CommonConstants.ONE_INT);
} }
......
...@@ -264,9 +264,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -264,9 +264,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if (CommonConstants.ZERO_STRING.equals(auditFlag)) { if (CommonConstants.ZERO_STRING.equals(auditFlag)) {
tSalaryStandard.setStatus(CommonConstants.TWO_INT); tSalaryStandard.setStatus(CommonConstants.TWO_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ZERO_STRING); tApprovalRecord.setApprovalResult(CommonConstants.ZERO_STRING);
tApprovalRecord.setNodeId("审核通过");
} else { } else {
tSalaryStandard.setStatus(CommonConstants.FIVE_INT); tSalaryStandard.setStatus(CommonConstants.FIVE_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING); tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING);
tApprovalRecord.setNodeId("审核不通过");
} }
if (Common.isNotNull(auditRemark)) { if (Common.isNotNull(auditRemark)) {
tSalaryStandard.setAuditRemark(auditRemark); tSalaryStandard.setAuditRemark(auditRemark);
...@@ -280,7 +282,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -280,7 +282,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tApprovalRecord.setApprovalMan(user.getId()); tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname()); tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime()); tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
tApprovalRecord.setNodeId("审核");
approvalRecordService.save(tApprovalRecord); approvalRecordService.save(tApprovalRecord);
} }
return R.ok(); return R.ok();
......
...@@ -275,6 +275,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -275,6 +275,7 @@ public class SalaryAccountUtil implements Serializable {
} }
} }
} }
if (errorFlag) {
must = null; must = null;
for (Map.Entry<String, Boolean> entry : isMustMap.entrySet()) { for (Map.Entry<String, Boolean> entry : isMustMap.entrySet()) {
if (Boolean.TRUE.equals(entry.getValue())) { if (Boolean.TRUE.equals(entry.getValue())) {
...@@ -286,32 +287,27 @@ public class SalaryAccountUtil implements Serializable { ...@@ -286,32 +287,27 @@ public class SalaryAccountUtil implements Serializable {
} }
} }
if (Common.isNotNull(must)) { if (Common.isNotNull(must)) {
errorFlag = false;
error = "第" + (i + 2) + "行:" + must + "列_不可缺少"; error = "第" + (i + 2) + "行:" + must + "列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if (annualBonusFlag && Common.isEmpty(entity.getAnnualBonusType())) { if (annualBonusFlag && Common.isEmpty(entity.getAnnualBonusType())) {
errorFlag = false;
error = "第" + (i + 2) + "行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】"; error = "第" + (i + 2) + "行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if ("3".equals(salaryType) && actualSalarySum == null) { if ("3".equals(salaryType) && actualSalarySum == null) {
errorFlag = false;
error = "第" + (i + 2) + "行:【实发劳务费】列_不可缺少"; error = "第" + (i + 2) + "行:【实发劳务费】列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if ("3".equals(salaryType) && Common.isEmpty(entity.getIsPersonTax())) { if ("3".equals(salaryType) && Common.isEmpty(entity.getIsPersonTax())) {
errorFlag = false;
error = "第" + (i + 2) + "行:【是否个人承担部分税费】列_不可为空"; error = "第" + (i + 2) + "行:【是否个人承担部分税费】列_不可为空";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if ("4".equals(salaryType) && actualSalarySum == null) { if ("4".equals(salaryType) && actualSalarySum == null) {
errorFlag = false;
error = "第" + (i + 2) + "行:【稿酬】列_不可缺少"; error = "第" + (i + 2) + "行:【稿酬】列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
...@@ -319,7 +315,6 @@ public class SalaryAccountUtil implements Serializable { ...@@ -319,7 +315,6 @@ public class SalaryAccountUtil implements Serializable {
// 应发、实发、实发劳务费不可都为空 // 应发、实发、实发劳务费不可都为空
if (relaySalary == null && actualSalarySum == null) { if (relaySalary == null && actualSalarySum == null) {
errorFlag = false;
error = "第" + (i + 2) + "行:【应发工资】列_不可缺少"; error = "第" + (i + 2) + "行:【应发工资】列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
...@@ -345,15 +340,10 @@ public class SalaryAccountUtil implements Serializable { ...@@ -345,15 +340,10 @@ public class SalaryAccountUtil implements Serializable {
+ CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + actualSalarySum) != null) { + CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + actualSalarySum) != null) {
entity.setIsRepeat(CommonConstants.ONE_INT); entity.setIsRepeat(CommonConstants.ONE_INT);
} }
if (new BigDecimal("3500").compareTo(actualSalarySum) == CommonConstants.ZERO_INT
|| new BigDecimal("5000").compareTo(actualSalarySum) == CommonConstants.ZERO_INT) {
entity.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
} }
if (Common.isNotNull(checkListY) && checkListY.contains(entity.getEmpIdcard())) { if (Common.isNotNull(checkListY) && checkListY.contains(entity.getEmpIdcard())) {
entity.setHaveSalaryFlag(CommonConstants.ONE_INT); entity.setHaveSalaryFlag(CommonConstants.ONE_INT);
} }
if (errorFlag) {
if (Common.isNotNull(entity.getSalaryStyle())) { if (Common.isNotNull(entity.getSalaryStyle())) {
salaryStyle = entity.getSalaryStyle(); salaryStyle = entity.getSalaryStyle();
} else if (configSalary.getGrantType() != null) { } else if (configSalary.getGrantType() != null) {
...@@ -426,7 +416,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -426,7 +416,7 @@ public class SalaryAccountUtil implements Serializable {
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(Integer.parseInt(areaStr)); newEmp.setBankProvince(Integer.parseInt(areaStr));
} else { } else {
error = "第" + (i + 2) + "行:新员工-开户行省错误:"+ entity.getBankProvince(); error = "第" + (i + 2) + "行:新员工-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
...@@ -435,7 +425,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -435,7 +425,7 @@ public class SalaryAccountUtil implements Serializable {
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(Integer.parseInt(areaStr)); newEmp.setBankCity(Integer.parseInt(areaStr));
} else { } else {
error = "第" + (i + 2) + "行:新员工-开户行市错误:"+ entity.getBankCity(); error = "第" + (i + 2) + "行:新员工-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
...@@ -496,7 +486,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -496,7 +486,7 @@ public class SalaryAccountUtil implements Serializable {
} }
saveNewEmpReturn = tSalaryEmployeeService.saveNewSalaryEmployee(newEmp); saveNewEmpReturn = tSalaryEmployeeService.saveNewSalaryEmployee(newEmp);
if (Common.isNotNull(saveNewEmpReturn)) { if (Common.isNotNull(saveNewEmpReturn)) {
error = "第" + (i + 2) + "行:该员工新建失败:【" + saveNewEmpReturn + "】" ; error = "第" + (i + 2) + "行:该员工新建失败:【" + saveNewEmpReturn + "】";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
...@@ -504,7 +494,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -504,7 +494,7 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
if ("3".equals(salaryType) || "4".equals(salaryType)) { if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
}else { } else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
} }
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
...@@ -650,7 +640,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -650,7 +640,7 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
if ("3".equals(salaryType) || "4".equals(salaryType)) { if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
}else { } else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
} }
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
......
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