Commit 72fda5cf authored by huyuchen's avatar huyuchen

社保配置修改

parent feed4723
...@@ -1950,6 +1950,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1950,6 +1950,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
detailList.add(detail); detailList.add(detail);
this.updateById(detail);
try { try {
//获取项目信息 //获取项目信息
if (null != mapSelectVo) { if (null != mapSelectVo) {
...@@ -2042,9 +2043,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2042,9 +2043,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
log.info("登记保单保费一条耗时:" + (d2 - d1)); log.info("登记保单保费一条耗时:" + (d2 - d1));
} }
//批量更新和插入数据 //批量更新和插入数据
if (!detailList.isEmpty()) {
this.updateBatchById(detailList);
}
if (!settleList.isEmpty()) { if (!settleList.isEmpty()) {
tInsuranceSettleService.updateBatchById(settleList); tInsuranceSettleService.updateBatchById(settleList);
settleList.clear(); settleList.clear();
......
...@@ -476,8 +476,7 @@ public class TPaymentInfoController { ...@@ -476,8 +476,7 @@ public class TPaymentInfoController {
@SysLog("手动推送社保缴费库明细的数据") @SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo") @PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) { public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
tPaymentInfoService.pushPaymentSocialFundInfo(searchVo); return tPaymentInfoService.pushPaymentSocialFundInfo(searchVo);
return R.ok();
} }
/** /**
......
...@@ -149,7 +149,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -149,7 +149,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo getPaymentSocialAndFound(TPaymentInfo info); TPaymentVo getPaymentSocialAndFound(TPaymentInfo info);
void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo); R<Boolean> pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo);
/** /**
* 批量标识可以推送的数据 * 批量标识可以推送的数据
......
...@@ -38,9 +38,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; ...@@ -38,9 +38,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -272,7 +270,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -272,7 +270,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public R<Boolean> removeInFoById(String id) { public R<Boolean> removeInFoById(String id) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = CacheConstants.PAYMENT_SOCIAL_PUSH + CommonConstants.DOWN_LINE_STRING + user.getId(); String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CacheConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) { if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!"); return R.failed("用户正在推送实缴数据中禁止删除!");
} }
...@@ -300,7 +298,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -300,7 +298,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.failed(CommonConstants.NO_DATA_TO_HANDLE); return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
} }
String key = CacheConstants.PAYMENT_SOCIAL_PUSH + CommonConstants.DOWN_LINE_STRING + user.getId(); String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CacheConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) { if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!"); return R.failed("用户正在推送实缴数据中禁止删除!");
} }
...@@ -342,7 +340,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -342,7 +340,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String socialCreateMonth, String socialPayMonth) { String socialCreateMonth, String socialPayMonth) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = CacheConstants.PAYMENT_SOCIAL_PUSH + CommonConstants.DOWN_LINE_STRING + user.getId(); String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CacheConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) { if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!"); return R.failed("用户正在推送实缴数据中禁止删除!");
} }
...@@ -2814,17 +2812,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2814,17 +2812,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) { public R<Boolean> pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
// 获取redis分布式事务锁 String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CacheConstants.PAYMENT_SOCIAL_PUSH;
String key = CacheConstants.PAYMENT_SOCIAL_PUSH + CommonConstants.DOWN_LINE_STRING + user.getId(); if (Common.isNotNull(redisUtil.get(key))) {
String requestId; return R.failed("用户正在推送实缴数据中,禁止重复推送!");
try { } else {
requestId = RedisDistributedLock.getLock(key,"10"); redisUtil.set(key, user.getId(), 1200L);
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA);
} }
redisUtil.set(key, user.getId(), 36000L);
Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
//手动推送未推送的社保公积金明细数据 //手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user, searchVo, mapSelectVo); createPaymentSocialInfoReal(user, searchVo, mapSelectVo);
...@@ -2840,10 +2836,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2840,10 +2836,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
doJointSocialTask.asynchronousEkpIncomePaymentT(income); doJointSocialTask.asynchronousEkpIncomePaymentT(income);
} }
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
redisUtil.remove(key);
} }
//主动释放锁 redisUtil.remove(key);
RedisDistributedLock.unlock(key, requestId); return R.ok();
} }
@Override @Override
......
...@@ -326,6 +326,7 @@ ...@@ -326,6 +326,7 @@
a.UPDATE_TIME, a.UPDATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
a.BPO_FLAG,
a.CREATE_TIME a.CREATE_TIME
</sql> </sql>
<sql id="tPaymentInfo_where"> <sql id="tPaymentInfo_where">
......
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