Commit b59a0326 authored by huyuchen's avatar huyuchen

申报修改

parent 3acc35dd
......@@ -88,6 +88,14 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* */
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
......
......@@ -1256,7 +1256,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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<>();
if (Common.isNotNull(paymentInfos)) {
......@@ -1345,10 +1345,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getProvidentCreateMonth().trim()
+ 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(), "已存在对应员工身份证" +
......@@ -1413,7 +1413,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setProvidentNo(infoVo.getProvidentNo());
paymentInfo.setPersonalProvidentSum(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());
if (null != paymentInfo && Common.isEmpty(paymentInfo.getFundId())) {
paymentInfo.setFundId(UUID.randomUUID().toString());
......
......@@ -955,6 +955,25 @@
</if>
</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 查询缴费库要删除的数据-->
<select id="selectListForDelete" resultType="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo">
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