Commit b59a0326 authored by huyuchen's avatar huyuchen

申报修改

parent 3acc35dd
...@@ -88,6 +88,14 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -88,6 +88,14 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* */ * */
List<TPaymentInfo> selectListForPaymentImport(@Param("months")List<String> months, @Param("idcards")List<String> idcards); List<TPaymentInfo> selectListForPaymentImport(@Param("months")List<String> months, @Param("idcards")List<String> idcards);
/*
* 已存在公积金缴费库数据 非删除状态
* @param months
* @param idcards
* @return
* */
List<TPaymentInfo> selectListForPaymentImport1(@Param("months")List<String> months, @Param("idcards")List<String> idcards);
/** /**
* 薪资获取缴费库 * 薪资获取缴费库
* @Author hgw * @Author hgw
......
...@@ -1256,7 +1256,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1256,7 +1256,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<String> monthList = list.stream().map(TPaymentInfoVo::getProvidentPayMonth).collect(Collectors.toList()); List<String> monthList = list.stream().map(TPaymentInfoVo::getProvidentPayMonth).collect(Collectors.toList());
//已存在社保缴费库数据 非删除状态 //已存在社保缴费库数据 非删除状态
List<TPaymentInfo> paymentInfos = baseMapper.selectListForPaymentImport(monthList, idcards); List<TPaymentInfo> paymentInfos = baseMapper.selectListForPaymentImport1(monthList, idcards);
//公积金唯一性检验条件:身份证编码+公积金缴纳月份 //公积金唯一性检验条件:身份证编码+公积金缴纳月份
HashMap<String, Object> paymentInfoMap = new HashMap<>(); HashMap<String, Object> paymentInfoMap = new HashMap<>();
if (Common.isNotNull(paymentInfos)) { if (Common.isNotNull(paymentInfos)) {
...@@ -1345,10 +1345,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1345,10 +1345,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ infoVo.getProvidentCreateMonth().trim() + infoVo.getProvidentCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ Math.round(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum()).doubleValue() * 100) / 100.0); + Math.round(BigDecimalUtils.safeAdd(infoVo.getProvidentSum()).doubleValue() * 100) / 100.0);
} }
//存在公积金缴费数据 //存在公积金缴费数据
if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getUnitProvidentSum()).compareTo(BigDecimal.ZERO) != 0) { if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getProvidentSum()).compareTo(BigDecimal.ZERO) != 0) {
//允许覆盖,但已核准表或工资结算或已锁定不允许覆盖 //允许覆盖,但已核准表或工资结算或已锁定不允许覆盖
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" +
...@@ -1413,7 +1413,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1413,7 +1413,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setProvidentNo(infoVo.getProvidentNo()); paymentInfo.setProvidentNo(infoVo.getProvidentNo());
paymentInfo.setPersonalProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum()); paymentInfo.setPersonalProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum()); paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
paymentInfo.setProvidentSum(BigDecimalUtils.safeAdd(paymentInfo.getUnitProvidentSum(), paymentInfo.getPersonalProvidentSum())); paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum());
paymentInfo.setSumAll(paymentInfo.getProvidentSum()); paymentInfo.setSumAll(paymentInfo.getProvidentSum());
if (null != paymentInfo && Common.isEmpty(paymentInfo.getFundId())) { if (null != paymentInfo && Common.isEmpty(paymentInfo.getFundId())) {
paymentInfo.setFundId(UUID.randomUUID().toString()); paymentInfo.setFundId(UUID.randomUUID().toString());
......
...@@ -955,6 +955,25 @@ ...@@ -955,6 +955,25 @@
</if> </if>
</select> </select>
<select id="selectListForPaymentImport1" resultMap="tPaymentInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_payment_info a
where 1=1
<if test="months != null and months.size > 0">
AND a.PROVIDENT_PAY_MONTH in
<foreach item="item" index="index" collection="months" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="idcards != null and idcards.size > 0">
AND a.EMP_IDCARD IN
<foreach item="item" index="index" collection="idcards" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!--tPaymentInfo 查询缴费库要删除的数据--> <!--tPaymentInfo 查询缴费库要删除的数据-->
<select id="selectListForDelete" resultType="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo"> <select id="selectListForDelete" resultType="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo">
select 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