Commit 835b4e8f authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5' into MVP1.5

parents f0ee702d 243f0789
......@@ -67,18 +67,21 @@ public class HrEquator extends GetterBaseEquator {
List<Object> firstList = (List<Object>) field.getFirstVal();
List<Object> secondList = (List<Object>) field.getSecondVal();
curMap.put(fieldName, 1);
if (firstList != null && secondList != null) {
if (firstList != null && secondList != null && !firstList.isEmpty()) {
if (firstList.size() == secondList.size()) {
listA:
boolean isTrue = true;
for (int i = 0; i < firstList.size(); i++) {
diff2 = equator.getDiffFields(firstList.get(i), secondList.get(i));
for (FieldInfo field2 : diff2) {
fieldName2 = field2.getFieldName();
if (!"createTime".equals(fieldName2) && !"createBy".equals(fieldName2) && !"createName".equals(fieldName2)
&& !"updateTime".equals(fieldName2) && !"updateBy".equals(fieldName2)) {
newChange = true;
sb.append(field.getFieldName()).append(",");
break listA;
if (isTrue) {
diff2 = equator.getDiffFields(firstList.get(i), secondList.get(i));
for (FieldInfo field2 : diff2) {
fieldName2 = field2.getFieldName();
if (!"createTime".equals(fieldName2) && !"createBy".equals(fieldName2) && !"createName".equals(fieldName2)
&& !"updateTime".equals(fieldName2) && !"updateBy".equals(fieldName2)) {
newChange = true;
sb.append(field.getFieldName()).append(",");
isTrue = false;
break;
}
}
}
}
......@@ -86,7 +89,7 @@ public class HrEquator extends GetterBaseEquator {
newChange = true;
sb.append(field.getFieldName()).append(",");
}
} else if (firstList != null || secondList != null) {
} else if ((firstList != null && !firstList.isEmpty()) || (secondList != null && !secondList.isEmpty())) {
newChange = true;
sb.append(field.getFieldName()).append(",");
}
......
......@@ -475,8 +475,8 @@ public class SalaryAccountUtil implements Serializable {
checkTaxMonthList.add(newEmps.getEmpIdcard());
} else {
if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage((i + 2), error));
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage((newEmps.getLineNums() + 2), error));
} else {
error = "第" + (newEmps.getLineNums() + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + 2, error));
......@@ -911,7 +911,6 @@ public class SalaryAccountUtil implements Serializable {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr);
entity.setBankProvince(String.valueOf(newEmp.getBankProvince()));
} else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error));
......@@ -921,7 +920,6 @@ public class SalaryAccountUtil implements Serializable {
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr);
entity.setBankCity(String.valueOf(newEmp.getBankCity()));
} else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error));
......@@ -963,6 +961,8 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
entity.setBankProvince(String.valueOf(newEmp.getBankProvince()));
entity.setBankCity(String.valueOf(newEmp.getBankCity()));
newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName());
......
......@@ -701,7 +701,7 @@
ap.AREA_NAME BANK_PROVINCE,
ac.AREA_NAME BANK_CITY,
a.IS_PERSON_TAX,
ifnull(a.RELAY_SALARY,0) + ifnull(a.RELAY_SALARY_UNIT,0) RELAY_SALARY,
if(a.RELAY_SALARY_UNIT is not null and a.RELAY_SALARY_UNIT != 0,a.RELAY_SALARY_UNIT,ifnull(a.RELAY_SALARY,0)) RELAY_SALARY,
a.ACTUAL_SALARY,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) SALARY_TAX,
a.CREATE_NAME,
......
......@@ -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);
......
......@@ -2766,9 +2766,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2795,9 +2792,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2823,9 +2817,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
redisUtil.remove(key);
}
......@@ -2880,9 +2871,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2919,9 +2907,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......
......@@ -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,26 +1179,27 @@
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
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SOCIAL_PAY_ADDR
limit 0,10000
</select>
<!--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,a.SOCIAL_PAY_ADDR) c
</select>
<update id="updateDeleteInfo">
......@@ -1398,22 +1499,30 @@
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialPayment">
update t_payment_info
set PUSH_STATUS = '0'
set PUSH_STATUS = '0',UPDATE_TIME = NOW()
where
ID = #{id}
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialPaymentList">
update t_payment_info
set PUSH_STATUS = '0',UPDATE_TIME = NOW()
where
ID in (${idStr})
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialIncomePayment">
update t_payment_info
set INCOME_STATUS = '0'
set INCOME_STATUS = '0',UPDATE_TIME = NOW()
where
ID = #{id}
</update>
<update id="updateBySocialIncomeFlag">
update t_payment_info
set IS_INCOME_STATUS = '1'
set IS_INCOME_STATUS = '1',UPDATE_TIME = NOW()
where
ID = #{id}
</update>
......
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