Commit 9bcba46c authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents 99e81fdf d5fac85f
...@@ -402,10 +402,8 @@ public class TPaymentInfoController { ...@@ -402,10 +402,8 @@ public class TPaymentInfoController {
@Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据") @Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据")
@SysLog("手动推送社保缴费库明细的数据") @SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo") @PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo(@RequestParam(name = "socialHouse", required = false) String socialHouse, public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
@RequestParam(name = "fundHouse", required = false) String fundHouse, tPaymentInfoService.pushPaymentSocialFundInfo(searchVo);
@RequestParam(name = "settleDomainId", required = false) String settleDomainId) {
tPaymentInfoService.pushPaymentSocialFundInfo(socialHouse,fundHouse,settleDomainId);
return R.ok(); return R.ok();
} }
......
...@@ -163,4 +163,32 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -163,4 +163,32 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/ */
List<String> getTPaymentInfoList(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo); List<String> getTPaymentInfoList(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentSocialPushInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentFundPushInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentSocialIncomeInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentFundIncomeInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
} }
...@@ -148,7 +148,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -148,7 +148,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo getPaymentSocialAndFound(TPaymentInfo info); TPaymentVo getPaymentSocialAndFound(TPaymentInfo info);
void pushPaymentSocialFundInfo(String socialHouse,String fundHouse,String settleDomainId); void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo);
/** /**
* 批量标识可以推送的数据 * 批量标识可以推送的数据
......
...@@ -2542,17 +2542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2542,17 +2542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public void pushPaymentSocialFundInfo(String socialHouse,String fundHouse,String settleDomainId) { public void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L); redisUtil.set(key, user.getId(), 36000L);
try { try {
//手动推送未推送的社保公积金明细数据 //手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user,socialHouse,settleDomainId); createPaymentSocialInfoReal(user,searchVo);
createPaymentFundInfoReal(user,fundHouse,settleDomainId); createPaymentFundInfoReal(user,searchVo);
//推送社保公积金收入数据 //推送社保公积金收入数据
createPaymentInfoIncomeReal(user,socialHouse,settleDomainId); createPaymentInfoIncomeReal(user,searchVo);
createPaymentFundIncomeReal(user,fundHouse,settleDomainId); createPaymentFundIncomeReal(user,searchVo);
redisUtil.remove(key); redisUtil.remove(key);
} catch (Exception e) { } catch (Exception e) {
log.error("社保缴费库:" + e); log.error("社保缴费库:" + e);
...@@ -2602,79 +2602,46 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2602,79 +2602,46 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentSocialInfoReal(YifuUser user,String socialHouse,String settleDomainId) { public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
//获取所有未推送的社保实缴明细数据 if (Common.isNotNull(user)) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery(); searchVo.setCreateBy(user.getId());
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getSocialId);
if (Common.isNotNull(socialHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, socialHouse);
} }
if (Common.isNotNull(settleDomainId)) { //获取所有未推送的社保实缴明细数据
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId); List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentSocialPushInfo(searchVo);
}
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper);
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushSocialParam(unPushInfo); initEkpPushSocialParam(unPushInfo);
} }
} }
public void createPaymentFundInfoReal(YifuUser user,String fundHouse,String settleDomainId) { public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
//获取所有未推送的公积金实缴明细数据 if (Common.isNotNull(user)) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery(); searchVo.setCreateBy(user.getId());
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getFundId);
if (Common.isNotNull(fundHouse)) {
wrapper.eq(TPaymentInfo::getProvidentHousehold, fundHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
} }
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper); //获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo);
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushFundParam(unPushInfo); initEkpPushFundParam(unPushInfo);
} }
} }
public void createPaymentInfoIncomeReal(YifuUser user,String socialHouse,String settleDomainId) { public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入 if (Common.isNotNull(user)) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery(); searchVo.setCreateBy(user.getId());
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getSocialId);
if (Common.isNotNull(socialHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, socialHouse);
} }
if (Common.isNotNull(settleDomainId)) { List<TPaymentInfo> sumList = baseMapper.getTPaymentSocialIncomeInfo(searchVo);
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
}
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper);
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 //生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING); createIncomeInfo(sumList, CommonConstants.ONE_STRING);
} }
} }
public void createPaymentFundIncomeReal(YifuUser user,String fundHouse,String settleDomainId) { public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery(); if (Common.isNotNull(user)) {
wrapper.eq(TPaymentInfo::getCreateBy, user.getId()); searchVo.setCreateBy(user.getId());
wrapper.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getFundId);
if (Common.isNotNull(fundHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, fundHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
} }
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper); List<TPaymentInfo> sumList = baseMapper.getTPaymentFundIncomeInfo(searchVo);
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 //生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING); createIncomeInfo(sumList, CommonConstants.TWO_STRING);
......
...@@ -1169,4 +1169,52 @@ ...@@ -1169,4 +1169,52 @@
</foreach> </foreach>
</update> </update>
<!--tPaymentInfo社保推送查询-->
<select id="getTPaymentSocialPushInfo" resultMap="tPaymentInfoMap">
SELECT
<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
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
<!--tPaymentInfo公积金推送查询-->
<select id="getTPaymentFundPushInfo" resultMap="tPaymentInfoMap">
SELECT
<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
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
<!--tPaymentInfo社保收入推送查询-->
<select id="getTPaymentSocialIncomeInfo" resultMap="tPaymentInfoMap">
SELECT
<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
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
<!--tPaymentInfo公积金收入推送查询-->
<select id="getTPaymentFundIncomeInfo" resultMap="tPaymentInfoMap">
SELECT
<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
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
</mapper> </mapper>
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