Commit 226f6f3f authored by hongguangwu's avatar hongguangwu

年终奖提示改版

parent 2673996a
...@@ -7,10 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; ...@@ -7,10 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
...@@ -519,14 +516,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -519,14 +516,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 年终奖是否已存在 (true:已存在,不可导入) // 年终奖是否已存在 (true:已存在,不可导入)
boolean yearEndError = false; boolean yearEndError = false;
// 年终奖错误信息合计:
List<ErrorMessage> errorInfo = new ArrayList<>();
// 劳务费、稿酬是否含有发薪false:否;true:是 // 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false; boolean haveSalaryFlag = false;
// 是否含有特殊金额false:否;true:是 // 是否含有特殊金额false:否;true:是
boolean haveSpecialFlag = false; boolean haveSpecialFlag = false;
// 是否重复金额false:否;true:是 // 是否重复金额false:否;true:是
boolean repeatFlag = false; boolean repeatFlag = false;
// 年终奖错误信息合计:
StringBuilder yearEndInfo = new StringBuilder();
List<String> idCardList = new ArrayList<>(); List<String> idCardList = new ArrayList<>();
for (TSalaryAccountVo vo : savList) { for (TSalaryAccountVo vo : savList) {
if (Common.isNotNull(vo.getEmpIdcard())) { if (Common.isNotNull(vo.getEmpIdcard())) {
...@@ -706,12 +703,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -706,12 +703,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
annualBonusList = tSalaryAccountItemService.getAllTSalaryAccountItem( annualBonusList = tSalaryAccountItemService.getAllTSalaryAccountItem(
null, null, SalaryConstants.ANNUAL_BONUS_JAVA, null, null, SalaryConstants.ANNUAL_BONUS_JAVA,
a.getSettlementMonth().substring(0, 4), a.getEmpIdcard(), null); a.getSettlementMonth().substring(0, 4), a.getEmpIdcard(), null);
if (annualBonusList != null && annualBonusList.size() > CommonConstants.ZERO_INT) { if (annualBonusList != null && !annualBonusList.isEmpty()) {
if (!yearEndError) { if (!yearEndError) {
yearEndError = true; yearEndError = true;
yearEndInfo.append("以下人员,年终奖重复发放(一个结算年只能发一次): ||");
} }
yearEndInfo.append("第" + (i + 2) + "行:【" + a.getEmpIdcard() + "】 ||"); errorInfo.add(new ErrorMessage((i + 2), a.getEmpIdcard()+"年终奖重复发放"));
} else { } else {
//年终奖优化方案 2:自动计算 //年终奖优化方案 2:自动计算
if (CommonConstants.TWO_STRING.equals(checkYearFinalStyle)) { if (CommonConstants.TWO_STRING.equals(checkYearFinalStyle)) {
...@@ -774,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -774,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
} }
if (yearEndError) { if (yearEndError) {
return new R<>(CommonConstants.TWO_INT, "年终奖重复", yearEndInfo.toString()); return new R<>(CommonConstants.TWO_INT, "年终奖重复", errorInfo);
} }
salary.setOwnNums(ownNum); salary.setOwnNums(ownNum);
salary.setOwnMoney(ownMoney); salary.setOwnMoney(ownMoney);
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
concat(min(a.TAX_MONTH - 0),'') concat(min(a.TAX_MONTH - 0),'')
from t_salary_account a from t_salary_account a
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%") where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3' and a.FORM_TYPE != '3' and a.FORM_TYPE != '4'
</select> </select>
<select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"> <select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial">
......
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