Commit d24d5221 authored by huyuchen's avatar huyuchen

项目档案批量操作速度优化

parent ab491d0b
...@@ -2439,7 +2439,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2439,7 +2439,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/** /**
* 薪资获取缴费库 * 薪资获取缴费库
*
* @Author hgw * @Author hgw
* @Date 2022-8-10 18:06:13 * @Date 2022-8-10 18:06:13
**/ **/
...@@ -2578,48 +2577,52 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2578,48 +2577,52 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
//获取所有未推送的社保实缴明细数据 //获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentSocialPushInfo(searchVo); List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentSocialPushInfo(searchVo);
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 List<TPaymentInfo> list = unPushInfo.stream().filter(e -> findList(e, user)).collect(Collectors.toList());
initEkpPushSocialParam(unPushInfo); unPushInfo.clear();
if (Common.isNotNull(list)) {
//推送数据封装并推送
initEkpPushSocialParam(list);
}
} }
} }
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo); List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo);
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 List<TPaymentInfo> list = unPushInfo.stream().filter(e -> findList(e, user)).collect(Collectors.toList());
initEkpPushFundParam(unPushInfo); unPushInfo.clear();
if (Common.isNotNull(list)) {
//推送数据封装并推送
initEkpPushFundParam(list);
}
} }
} }
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> sumList = baseMapper.getTPaymentSocialIncomeInfo(searchVo); List<TPaymentInfo> sumList = baseMapper.getTPaymentSocialIncomeInfo(searchVo);
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 List<TPaymentInfo> list = sumList.stream().filter(e -> findList(e, user)).collect(Collectors.toList());
createIncomeInfo(sumList, CommonConstants.ONE_STRING); sumList.clear();
if (Common.isNotNull(list)) {
//生成收入
createIncomeInfo(list, CommonConstants.ONE_STRING);
}
} }
} }
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> sumList = baseMapper.getTPaymentFundIncomeInfo(searchVo); List<TPaymentInfo> sumList = baseMapper.getTPaymentFundIncomeInfo(searchVo);
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 List<TPaymentInfo> list = sumList.stream().filter(e -> findList(e, user)).collect(Collectors.toList());
createIncomeInfo(sumList, CommonConstants.TWO_STRING); sumList.clear();
if (Common.isNotNull(list)) {
//生成公积金收入
createIncomeInfo(list, CommonConstants.TWO_STRING);
}
} }
} }
...@@ -3150,6 +3153,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3150,6 +3153,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
incomeService.saveBathDetail(detail,library); incomeService.saveBathDetail(detail,library);
} }
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) { public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month); StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-"); sb.insert(4, "-");
...@@ -3279,4 +3286,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3279,4 +3286,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
/**
* @Description: 手动推送时筛选数据
* @Author: huyc
**/
public boolean findList(TPaymentInfo t,YifuUser user) {
return CommonConstants.ONE_STRING.equals(t.getLockStatus()) && user.getId().equals(t.getCreateBy());
}
} }
...@@ -604,6 +604,9 @@ ...@@ -604,6 +604,9 @@
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null"> <if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd} AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if> </if>
<if test="tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''">
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
</if> </if>
</if> </if>
</sql> </sql>
...@@ -1239,8 +1242,7 @@ ...@@ -1239,8 +1242,7 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_payment_info a FROM t_payment_info a
<where> <where>
a.LOCK_STATUS = '1' AND a.CREATE_BY = #{tPaymentInfo.createBy} a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
<include refid="tPaymentInfo_export_where"/> <include refid="tPaymentInfo_export_where"/>
</where> </where>
</select> </select>
...@@ -1251,8 +1253,7 @@ ...@@ -1251,8 +1253,7 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_payment_info a FROM t_payment_info a
<where> <where>
a.LOCK_STATUS = '1' AND a.CREATE_BY = #{tPaymentInfo.createBy} a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
<include refid="tPaymentInfo_export_where"/> <include refid="tPaymentInfo_export_where"/>
</where> </where>
</select> </select>
...@@ -1263,8 +1264,7 @@ ...@@ -1263,8 +1264,7 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_payment_info a FROM t_payment_info a
<where> <where>
a.LOCK_STATUS = '1' AND a.CREATE_BY = #{tPaymentInfo.createBy} a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
<include refid="tPaymentInfo_export_where"/> <include refid="tPaymentInfo_export_where"/>
</where> </where>
</select> </select>
...@@ -1275,8 +1275,7 @@ ...@@ -1275,8 +1275,7 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_payment_info a FROM t_payment_info a
<where> <where>
a.LOCK_STATUS = '1' AND a.CREATE_BY = #{tPaymentInfo.createBy} a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
<include refid="tPaymentInfo_export_where"/> <include refid="tPaymentInfo_export_where"/>
</where> </where>
</select> </select>
......
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