Commit d5fac85f authored by huyuchen's avatar huyuchen

优化接口修改

parent eb21df7e
......@@ -402,10 +402,8 @@ public class TPaymentInfoController {
@Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据")
@SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo(@RequestParam(name = "socialHouse", required = false) String socialHouse,
@RequestParam(name = "fundHouse", required = false) String fundHouse,
@RequestParam(name = "settleDomainId", required = false) String settleDomainId) {
tPaymentInfoService.pushPaymentSocialFundInfo(socialHouse,fundHouse,settleDomainId);
public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
tPaymentInfoService.pushPaymentSocialFundInfo(searchVo);
return R.ok();
}
......
......@@ -163,4 +163,32 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
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> {
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
}
@Override
public void pushPaymentSocialFundInfo(String socialHouse,String fundHouse,String settleDomainId) {
public void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user,socialHouse,settleDomainId);
createPaymentFundInfoReal(user,fundHouse,settleDomainId);
createPaymentSocialInfoReal(user,searchVo);
createPaymentFundInfoReal(user,searchVo);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user,socialHouse,settleDomainId);
createPaymentFundIncomeReal(user,fundHouse,settleDomainId);
createPaymentInfoIncomeReal(user,searchVo);
createPaymentFundIncomeReal(user,searchVo);
redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
......@@ -2602,79 +2602,46 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public void createPaymentSocialInfoReal(YifuUser user,String socialHouse,String settleDomainId) {
//获取所有未推送的社保实缴明细数据
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
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);
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper);
//获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentSocialPushInfo(searchVo);
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo);
}
}
public void createPaymentFundInfoReal(YifuUser user,String fundHouse,String settleDomainId) {
//获取所有未推送的公积金实缴明细数据
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
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);
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper);
//获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.getTPaymentFundPushInfo(searchVo);
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo);
}
}
public void createPaymentInfoIncomeReal(YifuUser user,String socialHouse,String settleDomainId) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
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)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper);
List<TPaymentInfo> sumList = baseMapper.getTPaymentSocialIncomeInfo(searchVo);
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING);
}
}
public void createPaymentFundIncomeReal(YifuUser user,String fundHouse,String settleDomainId) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TPaymentInfo::getCreateBy, 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);
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
if (Common.isNotNull(user)) {
searchVo.setCreateBy(user.getId());
}
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper);
List<TPaymentInfo> sumList = baseMapper.getTPaymentFundIncomeInfo(searchVo);
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING);
......
......@@ -1169,4 +1169,52 @@
</foreach>
</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>
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