薪酬系统-福利档案,非系统人员tab页列表

This commit is contained in:
sy 2023-09-06 10:04:58 +08:00
parent 5ef4c8c909
commit f6094cbc7a
14 changed files with 327 additions and 23 deletions

View File

@ -163,7 +163,11 @@ public class SIAccountBiz extends Service {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
//系统人员福利台账明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统各人员台账明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);

View File

@ -29,6 +29,7 @@ import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
import com.engine.salary.entity.sischeme.po.InsuranceSchemePO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.engine.salary.enums.siaccount.EmployeeStatusEnum;
import com.engine.salary.enums.sicategory.*;
import com.engine.salary.exception.SalaryRunTimeException;
@ -691,6 +692,13 @@ public class SIArchivesBiz {
}
encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class);
otherSchemeMapper.updateById(updateOtherInfo);
//更新base_info表状态
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
//对于非系统人员编辑后状态切换为正在缴纳
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
}
sqlSession.commit();
} else {
otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder()
@ -729,6 +737,10 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setOtherArchivesId(otherInfos.get(0).getId());
//对于非系统人员编辑后状态切换为正在缴纳
if (baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
}
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));
@ -790,7 +802,13 @@ public class SIArchivesBiz {
}
encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class);
fundSchemeMapper.updateById(updateFundInfo);
//更新base_info表状态
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
//对于非系统人员编辑后状态切换为正在缴纳
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
}
sqlSession.commit();
} else {
fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder()
@ -831,6 +849,10 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setFundArchivesId(fundInfos.get(0).getId());
//对于非系统人员编辑后状态切换为正在缴纳
if (baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
}
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));
@ -899,7 +921,13 @@ public class SIArchivesBiz {
}
encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class);
socialSchemeMapper.updateById(updateSocialInfo);
//更新base_info表状态
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
//对于非系统人员编辑后状态切换为正在缴纳
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
}
sqlSession.commit();
} else {
socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder()
@ -940,6 +968,10 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setSocialArchivesId(socialInfos.get(0).getId());
//对于非系统人员编辑后状态切换为正在缴纳
if (baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
}
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));

View File

@ -18,6 +18,13 @@ public class SISchemaImportParam {
@DataCheck(require = true,message = "imageId为空")
String imageId;
//福利执行状态
/**
* 福利执行状态
*/
String runStatus;
/**
* 是否是外部人员
*/
boolean isExtEmp;
}

View File

@ -21,4 +21,8 @@ public interface InsuranceExportMapper {
List<AccountExportPO> exportAccount(@Param("paymentStatus") Integer paymentStatus, @Param("param") InsuranceExportParam param);
List<AccountExportPO> exportRecessionAccount(@Param("paymentStatus") Integer paymentStatus, @Param("param") InsuranceExportParam param);
List<AccountExportPO> exportExtAccount(@Param("paymentStatus") Integer paymentStatus, @Param("param") InsuranceExportParam param);
List<ExcelAccountExportPO> exportExtExcelAccount(@Param("param") InsuranceComparisonResultQueryParam param);
}

View File

@ -193,4 +193,102 @@
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
</if>
</select>
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO">
SELECT a.*,
e.username AS userName,
e.mobile AS telephone,
d.departmentname AS departmentName,
e.status AS userStatus,
e.workcode AS workcode
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
where e.status not in (7)
<!-- 排序 -->
</select>
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
SELECT a.*,
e.username AS userName,
e.mobile AS telephone,
d.departmentname AS departmentName,
e.status AS userStatus,
e.workcode AS workcode
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
where e.status not in (7)
<!-- 排序 -->
</select>
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
SELECT a.*,
e.username AS userName,
e.mobile AS telephone,
d.departmentname AS departmentName,
e.status AS userStatus,
e.workcode AS workcode
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
where e.status not in (7)
<!-- 排序 -->
</select>
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO">
SELECT
a.*,e.username AS userName,e.mobile AS telephone,d.departmentname AS departmentName,e.status AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
)a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
where e.status not in (7)
</select>
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
SELECT
a.*,e.username AS userName,e.mobile AS telephone,d.departmentname AS departmentName,e.status AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
)a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
where e.status not in (7)
</select>
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
SELECT
a.*,e.username AS userName,e.mobile AS telephone,d.departmentname AS departmentName,e.status AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
)a
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
where e.status not in (7)
</select>
</mapper>

View File

@ -8,7 +8,8 @@
d.DEPARTMENTNAME as departmentName,
e.status,
e.mobile,
e.workcode
e.workcode,
'false' as extEmp
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7)

View File

@ -239,7 +239,8 @@
d.DEPARTMENTNAME as departmentName,
e.status,
e.mobile,
e.workcode
e.workcode,
'true' as extEmp
from hrsa_external_employee e
left join hrmdepartment d on e.department_id = d.id
</select>

View File

@ -24,6 +24,14 @@ public interface InsuranceAccountDetailMapper {
*/
List<InsuranceAccountDetailPO> list(@Param("param") InsuranceAccountDetailParam queryParam);
/**
* 查询正常缴纳列表_非系统人员
*
* @param queryParam
* @return
*/
List<InsuranceAccountDetailPO> extList(@Param("param") InsuranceAccountDetailParam queryParam);
/**
* 通过id查询
*/

View File

@ -254,6 +254,94 @@
</if>
</sql>
<sql id="extParamSql">
<if test="param.userName != null and param.userName != ''">
AND
(
e.userName like CONCAT('%',#{param.userName},'%')
)
</if>
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like CONCAT('%',#{param.workcode},'%')
</if>
<if test="param.employeeIds != null and param.employeeIds.size()>0">
AND t.employee_id IN
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
#{employeeId}
</foreach>
</if>
<if test="param.recessionMonthList != null and param.recessionMonthList.size()>0">
AND t.bill_month IN
<foreach collection="param.recessionMonthList" open="(" item="recessionMonth" separator="," close=")">
#{recessionMonth}
</foreach>
</if>
<if test="param.taxAgents != null and param.taxAgents.size()>0">
AND t.payment_organization IN
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
#{taxAgent}
</foreach>
</if>
</sql>
<sql id="extParamSql" databaseId="oracle">
<if test="param.userName != null and param.userName != ''">
AND
(
e.userName like '%'||#{param.userName}||'%'
)
</if>
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like '%'||#{param.workcode}||'%'
</if>
<if test="param.employeeIds != null and param.employeeIds.size()>0">
AND t.employee_id IN
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
#{employeeId}
</foreach>
</if>
<if test="param.recessionMonthList != null and param.recessionMonthList.size()>0">
AND t.bill_month IN
<foreach collection="param.recessionMonthList" open="(" item="recessionMonth" separator="," close=")">
#{recessionMonth}
</foreach>
</if>
<if test="param.taxAgents != null and param.taxAgents.size()>0">
AND t.payment_organization IN
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
#{taxAgent}
</foreach>
</if>
</sql>
<sql id="extParamSql" databaseId="sqlserver">
<if test="param.userName != null and param.userName != ''">
AND
(
e.userName like '%'+#{param.userName}+'%'
)
</if>
<if test="param.workcode != null and param.workcode != ''">
AND e.workcode like '%'+#{param.workcode}+'%'
</if>
<if test="param.employeeIds != null and param.employeeIds.size()>0">
AND t.employee_id IN
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
#{employeeId}
</foreach>
</if>
<if test="param.recessionMonthList != null and param.recessionMonthList.size()>0">
AND t.bill_month IN
<foreach collection="param.recessionMonthList" open="(" item="recessionMonth" separator="," close=")">
#{recessionMonth}
</foreach>
</if>
<if test="param.taxAgents != null and param.taxAgents.size()>0">
AND t.payment_organization IN
<foreach collection="param.taxAgents" open="(" item="taxAgent" separator="," close=")">
#{taxAgent}
</foreach>
</if>
</sql>
<select id="list" resultMap="BaseResultMap">
SELECT
@ -274,6 +362,22 @@
</if>
</select>
<select id="extList" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM
hrsa_bill_detail t
left join hrsa_external_employee e on e.ID = t.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.department_id
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
WHERE t.delete_type = 0
and e.status not in (7)
<include refid="paramSqlCommon"/>
<include refid="extParamSql"/>
<!-- 排序 -->
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT
t.employee_id,t.social_sum,t.fund_sum,t.other_sum,t.fund_pay_org,t.social_pay_org,

View File

@ -148,7 +148,11 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
insuranceExportParam.setBillMonth(queryParam.getBillMonth());
insuranceExportParam.setPaymentOrganization(queryParam.getPaymentOrganization());
insuranceExportParam.setOrderRule(orderRule);
//系统人员核算明细
List<AccountExportPO> accountExportPOS = getInsuranceExportMapper().exportAccount(queryParam.getPaymentStatus(), insuranceExportParam);
//非系统人员核算明细
List<AccountExportPO> extAccountExportPOS = getInsuranceExportMapper().exportExtAccount(queryParam.getPaymentStatus(), insuranceExportParam);
accountExportPOS.addAll(extAccountExportPOS);
//如果入参包含姓名信息
if (queryParam.getUserName() != null) {
accountExportPOS = accountExportPOS.stream().filter(v -> v.getUserName().contains(queryParam.getUserName())).collect(Collectors.toList());
@ -165,7 +169,11 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
encryptUtil.decryptList(accountExportPOS, AccountExportPO.class);
//2-查询线下对比数据
//系统人员对比数据
List<ExcelAccountExportPO> excelAccountExportPOS = getInsuranceExportMapper().exportExcelAccount(queryParam);
//非系统人员对比数据
List<ExcelAccountExportPO> extExcelAccountExportPOS = getInsuranceExportMapper().exportExtExcelAccount(queryParam);
excelAccountExportPOS.addAll(extExcelAccountExportPOS);
encryptUtil.decryptList(excelAccountExportPOS, ExcelAccountExportPO.class);
//整理线上核算记录相关的福利方案并以此整理需要对比的福利项类别数据

View File

@ -346,7 +346,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(),queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
@ -412,7 +416,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(),queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
@ -469,7 +477,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
@ -2282,7 +2294,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
// 获取租户下所有的人员
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ORG);
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
// 失败的数量
int failCount = 0;
@ -3235,7 +3247,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
//数据组装
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
@ -3270,7 +3286,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
//数据组装
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
@ -3305,7 +3325,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
//系统人员核算明细
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
//非系统人员核算明细
List<InsuranceAccountDetailPO> extList = getInsuranceAccountDetailMapper().extList(queryParam);
list.addAll(extList);
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
//数据组装
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
@ -3343,7 +3367,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
value = value.add(addValue);
}
sumRow.put(numKey,value);
// sumRow.put(numKey,value);
sumRow.put(numKey,String.format("%.2f", value));
}
return sumRow;
}

View File

@ -659,7 +659,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
//获取所有福利档案基础信息
List<InsuranceArchivesBaseInfoPO> archiveListDTOS = getInsuranceBaseInfoMapper().listAll();
list = archiveListDTOS.stream().filter(dto -> taxAgentIds.contains(dto.getPaymentOrganization()) && !Objects.equals(dto.getEmployeeType(), 1)).collect(Collectors.toList());
list = archiveListDTOS.stream().filter(dto -> taxAgentIds.contains(dto.getPaymentOrganization())).collect(Collectors.toList());
Boolean adminEnable = getTaxAgentService(user).isAdminEnable(currentEmployeeId);
//不是管理员看不到数据返回空
@ -668,7 +668,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
}
} else {
list = getInsuranceBaseInfoMapper().listAll().stream().filter(dto -> !Objects.equals(dto.getEmployeeType(), 1)).collect(Collectors.toList());;
list = getInsuranceBaseInfoMapper().listAll();
}
@ -676,24 +676,32 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
long payTotal = 0L;
long stayDelTotal = 0L;
long stopTotal = 0L;
long extTotal = 0L;
for (InsuranceArchivesBaseInfoPO baseInfoPO : list) {
if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue())) {
stayAddTotal += 1;
} else if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) {
payTotal += 1;
if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) {
stayDelTotal += 1;
Integer employeeType = baseInfoPO.getEmployeeType();
if (employeeType == null || employeeType == 0) {
if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue())) {
stayAddTotal += 1;
} else if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) {
payTotal += 1;
if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) {
stayDelTotal += 1;
}
} else if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue()) || baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue())) {
stopTotal += 1;
}
} else if (baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue()) || baseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue())) {
stopTotal += 1;
} else {
extTotal += 1;
}
}
result.put("stayAdd", stayAddTotal);
result.put("paying", payTotal);
result.put("stayDel", stayDelTotal);
result.put("stopPay", stopTotal);
result.put("ext", extTotal);
return result;
}

View File

@ -1044,7 +1044,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
}
}
//生成福利档案基础信息数据
InsuranceArchivesBaseInfoPO insuranceArchivesBaseInfoPO = buildBaseInfoPO(employeeId, singleAccount, paymentNameIdMap, creator, runStatus);
InsuranceArchivesBaseInfoPO insuranceArchivesBaseInfoPO = buildBaseInfoPO(employeeId, singleAccount, paymentNameIdMap, creator, runStatus, employees.get(0).isExtEmp());
if (!isError) {
insuranceArchivesAccountPO.setSocial(insuranceArchivesSocialSchemePO);
insuranceArchivesAccountPO.setFund(insuranceArchivesFundSchemePO);
@ -1332,7 +1332,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
return insuranceArchivesOtherSchemePO;
}
public InsuranceArchivesBaseInfoPO buildBaseInfoPO(Long employeeId, List<Map<String, Object>> singleAccount, Map<String, Long> paymentNameIdMap, Long creator, String runStatus) {
public InsuranceArchivesBaseInfoPO buildBaseInfoPO(Long employeeId, List<Map<String, Object>> singleAccount, Map<String, Long> paymentNameIdMap, Long creator, String runStatus, Boolean isExtEmp) {
if (employeeId == null) {
return null;
}
@ -1346,6 +1346,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
insuranceArchivesBaseInfoPO.setUpdateTime(new Date());
insuranceArchivesBaseInfoPO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
insuranceArchivesBaseInfoPO.setPaymentOrganization(paymentNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91497, "个税扣缴义务人")).get(SalaryI18nUtil.getI18nLabel(91497, "个税扣缴义务人"))));
if (isExtEmp) {
insuranceArchivesBaseInfoPO.setEmployeeType(1);
}
return insuranceArchivesBaseInfoPO;
}

View File

@ -485,10 +485,10 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// //生成档案
getSalaryArchiveService(user).handleChangeData(1L);
// //生成社保福利档案
// String welSign = (String) Util_DataCache.getObjVal("welfareChangeSign");
// if (welSign == null || "0".equals(welSign)) {
// getSIArchivesService(user).handleChangeData(1L);
// }
String welSign = (String) Util_DataCache.getObjVal("welfareChangeSign");
if (welSign == null || "0".equals(welSign)) {
getSIArchivesService(user).handleChangeData(1L);
}
}