Commit 648012a7 authored by huyuchen's avatar huyuchen

费用划转提示修改

parent 1d003bf0
......@@ -83,7 +83,7 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
**/
int updatePushStatus(@Param("idList") List<String> idList);
int checkForecastChange(@Param("idSet") Set<String> idSet);
List<String> checkForecastChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
......
......@@ -208,7 +208,7 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @Date: 2022/11/16 17:32
* @return: int
**/
int checkPaymentChange(@Param("idSet") Set<String> idSet);
List<String> checkPaymentChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
......
......@@ -3449,10 +3449,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if (!idSet.isEmpty()) {
// 查询是否允许划转缴费库、预估库 的 社保、公积金
boolean flag = this.checkChange(idSet);
if (!flag) {
return R.failed("社保公积金已被结算,请先退回并删除工资表!");
// 查询是否允许划转缴费库、预估库 的 社保、公积金
List<String> settleList = baseMapper.checkPaymentChange(idSet);
if (settleList.isEmpty()) {
settleList = tForecastLibraryMapper.checkForecastChange(idSet);
}
if (!settleList.isEmpty()) {
String idStr = Common.ListToStr(settleList,",");
return R.failed(idStr + "的社保公积金已被结算,请先退回并删除工资表!");
}
// 1划转缴费率、预估库的项目(社保公积金)
......@@ -3585,23 +3589,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return true;
}
/**
* @param idSet
* @Description: 校验是否存在已结算薪资的数据
* @Author: hgw
* @Date: 2022/11/16 17:30
* @return: boolean
**/
private boolean checkChange(Set<String> idSet) {
int settleCount = baseMapper.checkPaymentChange(idSet);
if (settleCount == 0) {
settleCount = tForecastLibraryMapper.checkForecastChange(idSet);
return settleCount == 0;
} else {
return false;
}
}
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
......@@ -710,8 +710,8 @@
</update>
<!-- 校验预估库库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkForecastChange" resultType="java.lang.Integer">
select count(1) from t_forecast_library p
<select id="checkForecastChange" resultType="java.lang.String">
select p.EMP_IDCARD from t_forecast_library p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
......
......@@ -2433,8 +2433,8 @@
</update>
<!-- 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkPaymentChange" resultType="java.lang.Integer">
select count(1) from t_payment_info p
<select id="checkPaymentChange" resultType="java.lang.String">
select p.EMP_IDCARD from t_payment_info p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
......
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