Commit fa31b382 authored by hongguangwu's avatar hongguangwu

回复代码HAVE_

parent a960d2e6
......@@ -432,7 +432,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (tPaymentVoR != null && tPaymentVoR.getData() != null && tPaymentVoR.getData().getPaymentList() != null) {
fundEstmateList = tPaymentVoR.getData().getPaymentList();
// 新增一步:根据同步表里的数据更新获取到的社保缴费库数据
if (salaryPaymentMap != null && !salaryPaymentMap.isEmpty()) {
if (!salaryPaymentMap.isEmpty()) {
MSalaryPaymentRes res;
for (TPaymentBySalaryVo vo : fundEstmateList) {
res = salaryPaymentMap.get(vo.getId());
......@@ -497,6 +497,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 年终奖是否已存在 (true:已存在,不可导入)
boolean yearEndError = false;
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false;
// 是否含有特殊金额false:否;true:是
boolean haveSpecialFlag = false;
// 年终奖错误信息合计:
StringBuilder yearEndInfo = new StringBuilder();
List<String> idCardList = new ArrayList<>();
......@@ -529,6 +533,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
annousSai = null;
try {
SalaryAccountUtil.reflectionAttr(savList.get(i), a);
if (!haveSalaryFlag && a.getHaveSalaryFlag() != null && a.getHaveSalaryFlag() == CommonConstants.ONE_INT) {
haveSalaryFlag = true;
}
if (!haveSpecialFlag && a.getHaveSpecialFlag() != null && a.getHaveSpecialFlag() == CommonConstants.ONE_INT) {
haveSpecialFlag = true;
}
checkYearFinalStyle = a.getAnnualBonusType();
if (Common.isNotNull(a.getTaxMonth())) {
maxYearMonth = DateUtil.getMaxYearMonth(a.getTaxMonth());
......@@ -762,27 +772,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setOwnMoney(ownMoney);
TSalaryDetailVo salaryDetailVo = new TSalaryDetailVo();
salaryDetailVo.setSalaryAccountList(aList);
// 版本2.7.3.3 2022-1-13 20:54:34 洪光武变更:不同步缴费库,改为存放在同步表,定时任务更新(或社保服务变更缴费库时更新)
/*String str = SalaryCommonUtil.setToStrEasy(socialList);
if (Common.isNotNull(str)) {
//更新社保状态为-待结算
R<String> socialR = archivesProperties.updatePaymentSocialStatusByIdStr(str, CommonConstants.ONE, SecurityConstants.FROM_IN);
if (socialR == null || socialR.getCode() != CommonConstants.SUCCESS) {
throw new RuntimeException((null == socialR ? "调用社保同步结算中状态服务异常,请重试!" : socialR.getMsg()));
}
}
str = SalaryCommonUtil.setToStrEasy(fundList);
if (Common.isNotNull(str)) {
//更新公积金状态为-待结算
R<String> fundR = archivesProperties.updatePaymentFundStatusByIdStr(str, CommonConstants.ONE, SecurityConstants.FROM_IN);
if (fundR == null || fundR.getCode() != CommonConstants.SUCCESS) {
throw new RuntimeException((null == fundR ? "调用公积金同步结算中状态服务异常,请重试!" : fundR.getMsg()));
}
}*/
salary.setSettlementAmount(relaySalarySum);
salary.setHaveSalaryFlag(CommonConstants.ZERO_INT);
salary.setHaveSpecialFlag(CommonConstants.ZERO_INT);
if (haveSalaryFlag || haveSpecialFlag || ownNum>0) {
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
if (haveSalaryFlag) {
salary.setHaveSalaryFlag(CommonConstants.ONE_INT);
}
if (haveSpecialFlag) {
salary.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
} else {
salary.setStatus(SalaryConstants.AUDIT_STATUS[2]);
}
//保存工资表
tSalaryStandardService.save(salary);
......@@ -799,7 +802,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 新增一步:增加同步表
MSalaryPaymentRes res;
Map<String, MSalaryPaymentRes> saveResMap = new HashMap<>();
if (socialList != null && !socialList.isEmpty()) {
if (!socialList.isEmpty()) {
for (String estId : socialList) {
se = new MSalaryEstimate();
se.setSalaryId(salary.getId());
......@@ -817,7 +820,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
saveResMap.put(estId, res);
}
}
if (fundList != null && !fundList.isEmpty()) {
if (!fundList.isEmpty()) {
for (String estId : fundList) {
se = new MSalaryEstimate();
se.setSalaryId(salary.getId());
......@@ -839,7 +842,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
// 开始更新res
if (saveResMap != null && !saveResMap.isEmpty()) {
if (!saveResMap.isEmpty()) {
Iterator<MSalaryPaymentRes> iter = saveResMap.values().iterator();
while (iter.hasNext()) {
res = iter.next();
......
......@@ -290,10 +290,6 @@ public class SalaryAccountUtil implements Serializable {
if (checkMap.get(entity.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + DateUtil.addMonth(configSalary.getSalaryMonth())
+ CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + relaySalary) != null) {
entity.setIsRepeat(CommonConstants.ONE_INT);
if (repeatFlag == 0) {
repeatList.add(new ErrorMessage((i + 2), "第" + (i + 2) + "行:同一项目、结算月份、报表类型、工资月份、身份证号、应发金额,存在相同数据"));
continue;
}
}
if (new BigDecimal("3500").equals(relaySalary) || new BigDecimal("5000").equals(relaySalary)) {
entity.setHaveSpecialFlag(CommonConstants.ONE_INT);
......
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