Commit fa48f608 authored by huyuchen's avatar huyuchen

合并推送修改

parent d44c6b00
......@@ -30,7 +30,7 @@ import lombok.Data;
* @date 2023-2-9 16:11:24
*/
@Data
@TableName("t_send_ekp_error")
@TableName("t_payment_social_push")
@Schema(description = "社保合并推送id记录表")
public class TPaymentSocialPush {
......
......@@ -18,14 +18,12 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 缴费库合并推送参数
......@@ -258,10 +256,9 @@ public class TPaymentInfoPushVo implements Serializable {
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
private String createTime;
}
......@@ -21,8 +21,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
......@@ -212,6 +210,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void updateBySocialPayment(@Param("id")String id);
void updateBySocialPaymentList(@Param("idStr")String idStr);
void updateBySocialIncomePayment(@Param("id")String id);
void updateBySocialIncomeFlag(@Param("id")String id);
......
......@@ -672,7 +672,7 @@ public class DoJointSocialTask {
idMap.put(library.getId(), library.getIds());
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
paymentInfoMapper.updateBySocialPaymentList(library.getIds());
a = new TPaymentSocialPush();
a.setId(library.getId());
a.setPaymentIds(library.getIds());
......@@ -707,7 +707,7 @@ public class DoJointSocialTask {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbe1f94a08());
paymentInfoMapper.updateBySocialPaymentList(idMap.get(s.getFd_3b0afbe1f94a08()));
a = new TPaymentSocialPush();
a.setId(s.getFd_3b0afbe1f94a08());
a.setPaymentIds(idMap.get(s.getFd_3b0afbe1f94a08()));
......@@ -1223,7 +1223,9 @@ public class DoJointSocialTask {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbe1f94a08());
TForecastLibrary library = forecastLibraryMapper.selectById(s.getFd_3b0afbe1f94a08());
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......@@ -1428,7 +1430,9 @@ public class DoJointSocialTask {
try {
String body = ekpFundUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbaf10df2c());
TForecastLibrary library = forecastLibraryMapper.selectById(s.getFd_3b0afbaf10df2c());
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......
......@@ -186,6 +186,8 @@
<result property="personalMedicalMoney" column="PERSONAL_MEDICAL_MONEY"/>
<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
<result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<resultMap id="tPaymentInfoBatchMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo">
......@@ -649,6 +651,104 @@
</if>
</sql>
<sql id="tPaymentInfo_export_push_where">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tPaymentInfo.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''">
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
</if>
<if test="tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
</if>
<if test="tPaymentInfo.settleDomainCode != null and tPaymentInfo.settleDomainCode.trim() != ''">
AND a.SETTLE_DOMAIN_CODE = #{tPaymentInfo.settleDomainCode}
</if>
<if test="tPaymentInfo.unitName != null and tPaymentInfo.unitName.trim() != ''">
AND a.UNIT_NAME = #{tPaymentInfo.unitName}
</if>
<if test="tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''">
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''">
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
</if>
<if test="tPaymentInfo.socialPayAddr != null and tPaymentInfo.socialPayAddr.trim() != ''">
AND a.SOCIAL_PAY_ADDR = #{tPaymentInfo.socialPayAddr}
</if>
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND (a.SOCIAL_PAY_MONTH = '${tPaymentInfo.socialPayMonth}' or a.PROVIDENT_PAY_MONTH = '${tPaymentInfo.socialPayMonth}')
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''">
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
</if>
<if test="tPaymentInfo.fundProvince != null and tPaymentInfo.fundProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tPaymentInfo.fundProvince}
</if>
<if test="tPaymentInfo.fundCity != null and tPaymentInfo.fundCity.trim() != ''">
AND a.FUND_CITY = #{tPaymentInfo.fundCity}
</if>
<if test="tPaymentInfo.fundTown != null and tPaymentInfo.fundTown.trim() != ''">
AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
</if>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if test="tPaymentInfo.socialTown == null">
<if test="tPaymentInfo.socialCity != null">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if test="tPaymentInfo.socialCity == null">
<if test="tPaymentInfo.socialProvince != null">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
</if>
</if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
<if test="tPaymentInfo.providentNo != null and tPaymentInfo.providentNo.trim() != ''">
AND a.PROVIDENT_NO = #{tPaymentInfo.providentNo}
</if>
<if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
<if test="tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tPaymentInfo.createBy}
</if>
</if>
</if>
</sql>
<resultMap id="tPaymentAllInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo">
<id property="id" column="ID"/>
......@@ -1079,11 +1179,11 @@
SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY,
SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY,
a.CREATE_NAME,
a.CREATE_TIME
DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STAUTS = '1'
<include refid="tPaymentInfo_export_where"/>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STATUS = '1'
<include refid="tPaymentInfo_export_push_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
limit 0,10000
......@@ -1092,13 +1192,14 @@
<!--tPaymentInfo合并查询-->
<select id="getTPaymentInfoSumPushCount" resultType="java.lang.Integer">
SELECT
count(1)
count(1) FROM(
SELECT 1
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STAUTS = '1'
<include refid="tPaymentInfo_export_where"/>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STATUS = '1'
<include refid="tPaymentInfo_export_push_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH) c
</select>
<update id="updateDeleteInfo">
......@@ -1403,6 +1504,14 @@
ID = #{id}
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialPaymentList">
update t_payment_info
set PUSH_STATUS = '0'
where
ID in (${idStr})
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialIncomePayment">
update t_payment_info
......
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