网联二开,社保和公积金申报基数

This commit is contained in:
钱涛 2025-10-31 14:36:59 +08:00
parent 310be11f43
commit 2f57f9b7b1
15 changed files with 108 additions and 21 deletions

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_social_archives ADD base varchar2(200);
/
ALTER TABLE hrsa_fund_archives ADD base varchar2(200);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_social_archives ADD COLUMN base varchar(200) NULL ;
ALTER TABLE hrsa_fund_archives ADD COLUMN base varchar(200) NULL ;

View File

@ -0,0 +1,4 @@
ALTER TABLE hrsa_social_archives ADD base varchar2(200)
/
ALTER TABLE hrsa_fund_archives ADD base varchar2(200)
/

View File

@ -37,6 +37,7 @@ public class InsuranceArchivesBO {
.schemePaymentBaseString(po.getSocialPaymentBaseString())
.schemePaymentComBaseString(po.getSocialPaymentComBaseString())
.underTake(po.getUnderTake() == null ? null : String.valueOf(po.getUnderTake()))
.base(po.getBase())
.build();
}
@ -59,6 +60,7 @@ public class InsuranceArchivesBO {
.nonPayment(po.getNonPayment())
.underTake(po.getUnderTake() == null ? null : String.valueOf(po.getUnderTake()))
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
.base(po.getBase())
.build();
}

View File

@ -67,4 +67,6 @@ public class InsuranceArchivesFundSchemeDTO {
private String fundPaymentBaseString;
private String fundPaymentComBaseString;
private String base;
}

View File

@ -62,4 +62,6 @@ public class InsuranceArchivesSocialSchemeDTO {
//社保缴纳基数单位
private String schemePaymentComBaseString;
private String base;
}

View File

@ -56,4 +56,6 @@ public class InsuranceArchivesFundSaveParam {
//公积金基数jsonString
private String paymentForm;
private String base;
}

View File

@ -53,4 +53,6 @@ public class InsuranceArchivesSocialSaveParam {
//基数jsonString
private String paymentForm;
private String base;
}

View File

@ -138,4 +138,7 @@ public class InsuranceArchivesFundSchemePO {
*/
@ElogTransform(name = "更新时间")
private Date updateTime;
@ElogTransform(name = "公积金基数")
private String base;
}

View File

@ -132,4 +132,7 @@ public class InsuranceArchivesSocialSchemePO {
*/
@ElogTransform(name = "更新时间")
private Date updateTime;
@ElogTransform(name = "社保基数")
private String base;
}

View File

@ -20,6 +20,7 @@
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="base" property="base"/>
</resultMap>
<!-- 表字段 -->
@ -42,6 +43,7 @@
, t.creator
, t.delete_type
, t.tenant_key
, t.base
</sql>
@ -148,7 +150,8 @@
payment_organization,
update_time,
welfare_type,
employee_id)
employee_id,
base)
VALUES
<foreach collection="fundSchemePOS" item="item" separator=",">
(
@ -168,7 +171,8 @@
#{item.paymentOrganization},
#{item.updateTime},
#{item.welfareType},
#{item.employeeId}
#{item.employeeId},
#{item.base}
)
</foreach>
</insert>
@ -190,7 +194,8 @@
payment_organization,
update_time,
welfare_type,
employee_id)
employee_id,
base)
<foreach collection="fundSchemePOS" item="item" separator="union all">
select
#{item.fundSchemeId,jdbcType=DOUBLE},
@ -209,7 +214,8 @@
#{item.paymentOrganization,jdbcType=DOUBLE},
#{item.updateTime,jdbcType=DATE},
#{item.welfareType,jdbcType=INTEGER},
#{item.employeeId,jdbcType=DOUBLE}
#{item.employeeId,jdbcType=DOUBLE},
#{item.base,jdbcType=VARCHAR}
from dual
</foreach>
</insert>
@ -232,7 +238,8 @@
payment_organization,
update_time,
welfare_type,
employee_id)
employee_id,
base)
VALUES
(
#{item.fundSchemeId},
@ -251,7 +258,8 @@
#{item.paymentOrganization},
#{item.updateTime},
#{item.welfareType},
#{item.employeeId}
#{item.employeeId},
#{item.base}
)
</foreach>
</insert>
@ -355,6 +363,9 @@
fund_account = #{fundAccount},
payment_organization = #{paymentOrganization},
supplement_fund_account = #{supplementFundAccount},
<if test="base != null">
base = #{base},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -397,7 +408,8 @@
payment_organization,
update_time,
welfare_type,
employee_id)
employee_id,
base)
VALUES
(
#{fundSchemeId},
@ -416,7 +428,8 @@
#{paymentOrganization},
#{updateTime},
#{welfareType},
#{employeeId}
#{employeeId},
#{base}
)
</insert>

View File

@ -19,6 +19,7 @@
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="base" property="base"/>
</resultMap>
<!-- 表字段 -->
@ -40,6 +41,7 @@
, t.creator
, t.delete_type
, t.tenant_key
, t.base
</sql>
@ -142,7 +144,8 @@
update_time,
under_take,
social_account,
payment_organization)
payment_organization,
base)
VALUES
<foreach collection="socialSchemePOS" item="item" separator=",">
(
@ -161,8 +164,8 @@
#{item.updateTime},
#{item.underTake},
#{item.socialAccount},
#{item.paymentOrganization}
)
#{item.paymentOrganization},
#{item.base})
</foreach>
</insert>
<insert id="batchSave" databaseId="oracle">
@ -182,7 +185,8 @@
update_time,
under_take,
social_account,
payment_organization)
payment_organization,
base)
<foreach collection="socialSchemePOS" item="item" separator="union all">
select
#{item.welfareType,jdbcType=INTEGER},
@ -200,7 +204,8 @@
#{item.updateTime,jdbcType=DATE},
#{item.underTake,jdbcType=INTEGER},
#{item.socialAccount,jdbcType=VARCHAR},
#{item.paymentOrganization,jdbcType=DOUBLE}
#{item.paymentOrganization,jdbcType=DOUBLE},
#{item.base,jdbcType=VARCHAR}
from dual
</foreach>
</insert>
@ -222,7 +227,8 @@
update_time,
under_take,
social_account,
payment_organization)
payment_organization,
base)
VALUES
(
#{item.welfareType},
@ -240,7 +246,8 @@
#{item.updateTime},
#{item.underTake},
#{item.socialAccount},
#{item.paymentOrganization}
#{item.paymentOrganization},
#{item.base}
)
</foreach>
</insert>
@ -997,6 +1004,9 @@
under_take = #{underTake},
social_account = #{socialAccount},
payment_organization = #{paymentOrganization},
<if test="base != null">
base = #{base},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -1038,7 +1048,8 @@
update_time,
under_take,
social_account,
payment_organization)
payment_organization,
base)
VALUES
(
#{welfareType},
@ -1056,7 +1067,8 @@
#{updateTime},
#{underTake},
#{socialAccount},
#{paymentOrganization}
#{paymentOrganization},
#{base}
)
</insert>

View File

@ -1655,6 +1655,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
map.put("socialAccount", socialItem.getSocialAccount());
map.put("socialStartTime", socialItem.getSocialStartTime());
map.put("socialEndTime", socialItem.getSocialEndTime());
map.put("socialBase", socialItem.getBase());
}
if (fundItem != null) {
map.put("fundName", getInsuranceSchemeMapper().querySchemeName(fundItem.getFundSchemeId()));
@ -1697,7 +1698,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
map.put("supplementFundAccount", fundItem.getSupplementFundAccount());
map.put("fundStartTime", fundItem.getFundStartTime());
map.put("fundEndTime", fundItem.getFundEndTime());
map.put("fundBase", fundItem.getBase());
}
if (otherItem != null) {
map.put("otherName", getInsuranceSchemeMapper().querySchemeName(otherItem.getOtherSchemeId()));
@ -1835,6 +1836,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保基数"), "socialBase"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "公积金基数"), "fundBase"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount"));
@ -2993,6 +2996,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.updateTime(new Date())
.welfareType(paramReq.getWelfareType().getValue())
.employeeId(param.getEmployeeId())
.base(param.getBase())
.build();
//校验福利基数是否符合上下限要求
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
@ -3079,6 +3083,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.updateTime(new Date())
.welfareType(paramReq.getWelfareType().getValue())
.employeeId(param.getEmployeeId())
.base(param.getBase())
.build();
//校验福利基数是否符合上下限要求
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
@ -3236,6 +3241,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.underTake(param.getUnderTake())
.socialAccount(param.getSchemeAccount())
.paymentOrganization(param.getPaymentOrganization())
.base(param.getBase())
.build();
//校验福利基数是否符合上下限要求
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
@ -3321,6 +3327,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.underTake(param.getUnderTake())
.socialAccount(param.getSchemeAccount())
.paymentOrganization(param.getPaymentOrganization())
.base(param.getBase())
.build();
//校验福利基数是否符合上下限要求
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {

View File

@ -189,8 +189,8 @@ public class SIImportServiceImpl extends Service implements SIImportService {
// 4.注释
List<ExcelComment> excelComments = Lists.newArrayList();
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
// excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
// excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
//工作簿数据
@ -215,6 +215,8 @@ public class SIImportServiceImpl extends Service implements SIImportService {
result.add(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "社保基数"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "公积金基数"));
result.add(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"));
// result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"));
//社保福利基数

View File

@ -1,5 +1,7 @@
package com.engine.salary.service.impl;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.api.formmode.mybatis.util.SqlProxyHandle;
@ -451,6 +453,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
map.put("socialAccount", socialItem.getSocialAccount());
map.put("socialStartTime", socialItem.getSocialStartTime());
map.put("socialEndTime", socialItem.getSocialEndTime());
map.put("socialBase", socialItem.getBase());
}
if (fundItem != null) {
map.put("fundName", getSiSchemeService().querySchemeName(fundItem.getFundSchemeId()));
@ -494,6 +497,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
map.put("supplementFundAccount", fundItem.getSupplementFundAccount());
map.put("fundStartTime", fundItem.getFundStartTime());
map.put("fundEndTime", fundItem.getFundEndTime());
map.put("fundBase", fundItem.getBase());
}
if (otherItem != null) {
@ -692,6 +696,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "社保基数"), "socialBase"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "公积金基数"), "fundBase"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));
@ -1524,6 +1530,12 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
}
insuranceArchivesSocialSchemePO.setId(IdGenerator.generate());
String socialBase = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91324, "社保基数")).get(SalaryI18nUtil.getI18nLabel(91324, "社保基数"));
if(StringUtils.isNotBlank(socialBase)&& NumberUtil.isNumber(socialBase)){
insuranceArchivesSocialSchemePO.setBase(socialBase);
}
if (StringUtils.isNotBlank(socialAccount)) {
insuranceArchivesSocialSchemePO.setSocialAccount(socialAccount);
}
@ -1592,7 +1604,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
if (StringUtils.isNotBlank(itemValue)) {
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
} else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) {
}else if (StrUtil.isNotBlank(insuranceArchivesSocialSchemePO.getBase())){
//网联二开申报基数有值小项无值采用申报基数
socialPaymentBase.put(String.valueOf(insuranceId), insuranceArchivesSocialSchemePO.getBase());
}else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) {
socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId)));
}
}
@ -1642,6 +1657,12 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
if (fundSchemeId != null) {
insuranceArchivesFundSchemePO.setFundSchemeId(fundSchemeId);
}
String fundBase = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91324, "公积金基数")).get(SalaryI18nUtil.getI18nLabel(91324, "公积金基数"));
if(StringUtils.isNotBlank(fundBase)&& NumberUtil.isNumber(fundBase)){
insuranceArchivesFundSchemePO.setBase(fundBase);
}
if (StringUtils.isNotBlank(fundAccount)) {
insuranceArchivesFundSchemePO.setFundAccount(fundAccount);
}
@ -1705,6 +1726,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
if (StringUtils.isNotBlank(itemValue)) {
fundPaymentBase.put(String.valueOf(insuranceId), itemValue);
} else if (StrUtil.isNotBlank(insuranceArchivesFundSchemePO.getBase())){
//网联二开申报基数有值小项无值采用申报基数
fundPaymentBase.put(String.valueOf(insuranceId), insuranceArchivesFundSchemePO.getBase());
} else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) {
fundPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId)));
}