Commit 2b54ba92 authored by hongguangwu's avatar hongguangwu

预估库优化+薪资推送月份

parent 5dcb8d72
......@@ -240,4 +240,20 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("客户编码")
private String unitNo;
/**
* 推送时间
*/
@ExcelAttribute(name = "推送时间", isDate = true)
@ExcelProperty("推送时间")
private Date sendTime;
/**
* 推送月份(YYYYMM)
*/
@ExcelAttribute(name = "推送月份(YYYYMM)", isNotEmpty = true, errorInfo = "推送月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "推送月份(YYYYMM)不能为空")
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份(YYYYMM)")
private String sendMonth;
}
......@@ -56,7 +56,8 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -91,7 +92,9 @@
a.UPDATE_TIME,
a.UNIT_ID,
a.UNIT_NAME,
a.UNIT_NO
a.UNIT_NO,
a.SEND_TIME,
a.SEND_MONTH
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......@@ -194,6 +197,9 @@
<if test="tSalaryStandard.unitNo != null and tSalaryStandard.unitNo.trim() != ''">
AND a.UNIT_NO = #{tSalaryStandard.unitNo}
</if>
<if test="tSalaryStandard.sendMonth != null and tSalaryStandard.sendMonth.trim() != ''">
AND a.SEND_MONTH = #{tSalaryStandard.sendMonth}
</if>
</if>
</sql>
<!--tSalaryStandard简单分页查询-->
......
......@@ -260,7 +260,7 @@ public class TForecastLibraryExportVo {
private BigDecimal personalFundProp;
@ExcelAttribute(name = "同步状态", readConverterExp = "0=未同步,1=已同步")
@ExcelProperty("同步状态:0未同步;1已同步")
@ExcelProperty("同步状态")
private String dataPush;
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
......
......@@ -215,6 +215,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(searchVo.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, searchVo.getCreateTimeEnd());
}
wrapper.eq(TDispatchInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL);
return baseMapper.selectCount(wrapper);
}
......
......@@ -1497,7 +1497,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(library.getSocialPayMonth())) {
if (socialReduceDate != null) {
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if (DateUtil.formatDateInt(socialReduceDate) < Integer.parseInt(library.getSocialPayMonth())) {
if (DateUtil.formatDateInt(socialReduceDate) <= Integer.parseInt(library.getSocialPayMonth())) {
this.calculateSocialType(zero, library);
}
} else {
......@@ -1520,7 +1520,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(library.getProvidentPayMonth())) {
if (fundReduceDate != null) {
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if (DateUtil.formatDateInt(fundReduceDate) < Integer.parseInt(library.getProvidentPayMonth())) {
if (DateUtil.formatDateInt(fundReduceDate) <= Integer.parseInt(library.getProvidentPayMonth())) {
this.calculateFundType(zero, library);
}
} else {
......
......@@ -358,9 +358,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
errorMessageList.add(new ErrorMessage(i, "未找到公积金基数配置!"));
continue;
}
/*if (!ServiceUtil.checkFundPercentByList(fundSetInfo.getFundProList(), history)) {
errorMessageList.add(new ErrorMessage(i, "无对应公积金比例,请查验公积金户+缴纳地+缴纳月份的公积金比例配置!"));
continue;
/* if (!ServiceUtil.checkFundPercentByList(fundSetInfo.getFundProList(), history)) {
errorMessageList.add(new ErrorMessage(i, "无对应公积金比例,请查验公积金户+缴纳地+缴纳月份的公积金比例配置!"))
continue
}*/
history.setUnitFundMoney(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(history.getUnitFundBase()
, history.getUnitFundProp(), CommonConstants.ONE_OF_PERCENT), Integer.parseInt(socialFundInfo.getFundPayPoint())));
......@@ -431,10 +431,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
}
} else if (CommonConstants.ZERO_INT == baseSetVo.getPaymentType()) {
BigDecimal limitBase = socialSetInfo.getLowerLimit();
this.setLimtBase(socialFundInfo, limitBase);
this.setLimtBase(socialFundInfo, limitBase, socialSetInfo);
} else if (CommonConstants.TWO_INT == baseSetVo.getPaymentType()) {
BigDecimal limitBase = socialSetInfo.getUpperLimit();
this.setLimtBase(socialFundInfo, limitBase);
this.setLimtBase(socialFundInfo, limitBase, socialSetInfo);
}
// 金额计算
......@@ -469,7 +469,7 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
* @Date: 2022/7/25 16:15
* @return: void
**/
private void setLimtBase(TSocialFundInfo socialFundInfo, BigDecimal limitBase) {
private void setLimtBase(TSocialFundInfo socialFundInfo, BigDecimal limitBase, SysBaseSetInfo sysBaseSetInfo) {
socialFundInfo.setUnitPensionCardinal(limitBase);
socialFundInfo.setUnitMedicalCardinal(limitBase);
socialFundInfo.setUnitBirthCardinal(limitBase);
......@@ -479,6 +479,45 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
socialFundInfo.setPersonalPensionCardinal(limitBase);
socialFundInfo.setPersonalMedicalCardinal(limitBase);
socialFundInfo.setPersonalUnemploymentCardinal(limitBase);
// 大病处理: 0 收取 按派单的社保里的基数和比例来
if (CommonConstants.ZERO_STRING.equals(sysBaseSetInfo.getIsIllness())) {
// 大病收取方式 0.按年 判断当前月份是否收取大病 按年收大病起缴月份收取一次,非当年的 大病 按实际收取月份收取大病金额
this.setBigMoney(socialFundInfo, sysBaseSetInfo, limitBase);
// 大病处理: 1 不收取
} else {
socialFundInfo.setUnitBigailmentMoney(BigDecimal.ZERO);
socialFundInfo.setPersonalBigailmentMoney(BigDecimal.ZERO);
}
}
private void setBigMoney(TSocialFundInfo socialInfo, SysBaseSetInfo sysBaseSetInfo
, BigDecimal limitBase) {
if (CommonConstants.ZERO_STRING.equals(sysBaseSetInfo.getCollectType())) {
socialInfo.setUnitBigailmentMoney(BigDecimalUtils.isNullToZero(sysBaseSetInfo.getPayCompany()));
socialInfo.setPersonalBigailmentMoney(BigDecimalUtils.isNullToZero(sysBaseSetInfo.getPayPersonal()));
//大病收取方式 : 1.按月
} else if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getCollectType())) {
// 大病取值方式:1 按比例 按派单的基数和比例来
if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getValueType())) {
socialInfo.setUnitBigailmentCardinal(limitBase);
socialInfo.setUnitBigailmentPer(sysBaseSetInfo.getPayCompanyPro());
socialInfo.setPersonalBigailmentCardinal(limitBase);
socialInfo.setPersonalBigailmentPer(sysBaseSetInfo.getPayPersonalPro());
socialInfo.setPersonalBigailmentMoney(BigDecimalUtils.safeMultiply(
limitBase,
sysBaseSetInfo.getPayPersonalPro(),
CommonConstants.ONE_OF_PERCENT));
socialInfo.setUnitBigailmentMoney(BigDecimalUtils.safeMultiply(
limitBase,
sysBaseSetInfo.getPayCompanyPro(),
CommonConstants.ONE_OF_PERCENT));
} else {
// 大病取值方式:0按定值
socialInfo.setUnitBigailmentMoney(BigDecimalUtils.isNullToZero(sysBaseSetInfo.getPayCompany()));
socialInfo.setPersonalBigailmentMoney(BigDecimalUtils.isNullToZero(sysBaseSetInfo.getPayPersonal()));
}
}
}
/**
......
......@@ -465,7 +465,7 @@
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID
<where>
1=1
a.DELETE_FLAG = '0'
<include refid="tDispatchInfo_where"/>
</where>
order by a.CREATE_TIME desc
......
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