Commit d24d5221 authored by huyuchen's avatar huyuchen

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

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