Commit 8a1616b8 authored by fangxinjiang's avatar fangxinjiang

商险优化,推送分批优化

parent e1bd2a64
......@@ -156,6 +156,10 @@ public interface CommonConstants {
* number 5000
*/
int FIVES_INT = 5000;
/**
* number 5000
*/
int TEN_THOUSAND_INT = 10000;
/**
* number 1
......
......@@ -3827,6 +3827,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setMId(mId);
}
param.setCreateBy(user.getId());
//设置updateBy字段是给导出使用的
param.setUpdateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
......@@ -3834,7 +3836,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<RefundExportListVo> refundExportList;
//如果是待减员状态,sql中UPDATE_BY过滤条件不需要,这里强制变为null
if(param.getReduceHandleStatus() == CommonConstants.ONE_INT){
param.setCreateBy(null);
param.setUpdateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
......
......@@ -1020,8 +1020,8 @@
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if test="param.createBy != null and param.createBy.trim() != ''">
and refund.UPDATE_BY = #{param.createBy}
<if test="param.updateBy != null and param.updateBy.trim() != ''">
and refund.UPDATE_BY = #{param.updateBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
......
......@@ -2513,13 +2513,25 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public void createPaymentSocialInfo() {
//获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo);
if (count > 0){
List<TPaymentInfo> unPushs;
int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT);
for (int j=0;j<i;j++){
unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000"));
synchronized (this){
if (Common.isNotNull(unPushs)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushs);
}
}
}
}
}
......
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