薪酬系统-福利台账,正常缴纳页相关功能操作日志添加

This commit is contained in:
sy 2024-02-20 16:50:45 +08:00
parent cfb82cb9b2
commit 088a5c1d72
7 changed files with 243 additions and 35 deletions

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.siaccount.po;
import com.engine.salary.annotation.Encrypt;
import com.engine.salary.elog.annotation.ElogTransform;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -20,94 +21,112 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
//hrsa_bill_batch
@ElogTransform(name = "福利台账主表")
public class InsuranceAccountBatchPO {
/**
* 主键id
*/
@ElogTransform(name = "主键id")
private Long id;
/**
* 账单月份
*/
@ElogTransform(name = "账单月份")
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
@ElogTransform(name = "账单状态")
private Integer billStatus;
/**
* 社保核算人数
*/
@ElogTransform(name = "社保核算人数")
private Integer socialNum;
/**
* 公积金核算人数
*/
@ElogTransform(name = "公积金核算人数")
private Integer fundNum;
/**
* 其他福利核算人数
*/
@ElogTransform(name = "其他福利核算人数")
private Integer otherNum;
/**
* 社保缴费总额(单位+个人)
*/
@Encrypt
@ElogTransform(name = "社保缴费总额(单位+个人)")
private String socialPay;
/**
* 公积金缴费总额(单位+个人)
*/
@Encrypt
@ElogTransform(name = "公积金缴费总额(单位+个人)")
private String fundPay;
/**
* 其他福利缴费总额(单位+个人)
*/
@Encrypt
@ElogTransform(name = "其他福利缴费总额(单位+个人)")
private String otherPay;
/**
* 核算人
*/
@ElogTransform(name = "核算人")
private String accountant;
/**
* 备注
*/
@ElogTransform(name = "备注")
private String remarks;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
private Long creator;
/**
* 是否删除
*/
@ElogTransform(name = "是否删除")
private Integer deleteType;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
private Date updateTime;
/**
* 租户key
*/
@ElogTransform(name = "租户key")
private String tenantKey;
/**
* 个税扣缴义务人
*/
@ElogTransform(name = "个税扣缴义务人id")
private Long paymentOrganization;

View File

@ -3,6 +3,7 @@ package com.engine.salary.entity.siaccount.po;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.Encrypt;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.elog.annotation.ElogTransform;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -23,260 +24,308 @@ import java.util.Date;
@AllArgsConstructor
@SalaryTable(pageId = "2394fba1-1381-428a-8532-4e1e6b86626e", tableType = WeaTableType.CHECKBOX)
//hrsa_bill_detail
@ElogTransform(name = "福利台账明细表")
public class InsuranceAccountDetailPO {
/**
* 主键id
*/
@ElogTransform(name = "主键id")
private Long id;
/**
* 员工id
*/
@ElogTransform(name = "员工id")
private Long employeeId;
/**
* 账单月份
*/
@ElogTransform(name = "账单月份")
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
@ElogTransform(name = "账单状态")
private Integer billStatus;
/**
* 缴纳状态
*/
@ElogTransform(name = "缴纳状态")
private Integer paymentStatus;
/**
* 补缴月份/退差月份
*/
@ElogTransform(name = "补缴月份/退差月份")
private String supplementaryMonth;
/**
* 补缴项目
*/
@ElogTransform(name = "补缴项目")
private String supplementaryProjects;
/**
* 数据来源 0-系统核算 1-临时数据
*/
@ElogTransform(name = "数据来源")
private Integer resourceFrom;
/**
* 社保缴纳组织
*/
@ElogTransform(name = "社保缴纳组织")
private Long socialPayOrg;
/**
* 社保账号
*/
@ElogTransform(name = "社保账号")
private String socialAccount;
/**
* 公积金缴纳组织
*/
@ElogTransform(name = "公积金缴纳组织")
private Long fundPayOrg;
/**
* 公积金账号
*/
@ElogTransform(name = "公积金账号")
private String fundAccount;
/**
* 补充公积金账号
*/
@ElogTransform(name = "补充公积金账号")
private String supplementFundAccount;
/**
* 其他福利缴纳组织
*/
@ElogTransform(name = "其他福利缴纳组织")
private Long otherPayOrg;
/**
* 社保方案ID
*/
@ElogTransform(name = "社保方案ID")
private Long socialSchemeId;
/**
* 社保缴纳基数
*/
@Encrypt
@ElogTransform(name = "社保缴纳基数")
private String socialPaymentBaseString;
/**
* 社保缴纳基数单位
*/
@Encrypt
@ElogTransform(name = "社保缴纳基数——单位")
private String socialPaymentComBaseString;
/**
* 公积金方案ID
*/
@ElogTransform(name = "公积金方案ID")
private Long fundSchemeId;
/**
* 公积金缴纳基数
*/
@Encrypt
@ElogTransform(name = "公积金缴纳基数")
private String fundPaymentBaseString;
/**
* 公积金缴纳基数单位
*/
@Encrypt
@ElogTransform(name = "公积金缴纳基数——单位")
private String fundPaymentComBaseString;
/**
* 其他福利方案id
*/
@ElogTransform(name = "其他福利方案id")
private Long otherSchemeId;
/**
* 其他福利缴纳基数
*/
@Encrypt
@ElogTransform(name = "其他福利缴纳基数")
private String otherPaymentBaseString;
/**
* 其他福利缴纳基数单位
*/
@Encrypt
@ElogTransform(name = "其他福利缴纳基数——单位")
private String otherPaymentComBaseString;
/**
* 社保个人缴费明细
*/
@Encrypt
@ElogTransform(name = "社保个人缴费明细")
private String socialPerJson;
/**
* 社保个人合计
*/
@Encrypt
@ElogTransform(name = "社保个人合计")
private String socialPerSum;
/**
* 公积金个人缴费明细
*/
@Encrypt
@ElogTransform(name = "公积金个人缴费明细")
private String fundPerJson;
/**
* 公积金个人合计
*/
@Encrypt
@ElogTransform(name = "公积金个人合计")
private String fundPerSum;
/**
* 其他福利个人缴费明细
*/
@Encrypt
@ElogTransform(name = "其他福利个人缴费明细")
private String otherPerJson;
/**
* 其他福利个人合计
*/
@Encrypt
@ElogTransform(name = "其他福利个人合计")
private String otherPerSum;
/**
* 个人合计
*/
@Encrypt
@ElogTransform(name = "个人合计")
private String perSum;
/**
* 社保单位缴费明细
*/
@Encrypt
@ElogTransform(name = "社保单位缴费明细")
private String socialComJson;
/**
* 社保单位合计
*/
@Encrypt
@ElogTransform(name = "社保单位合计")
private String socialComSum;
/**
* 公积金单位缴费明细
*/
@ElogTransform(name = "公积金单位缴费明细")
private String fundComJson;
/**
* 公积金单位合计
*/
@ElogTransform(name = "公积金单位合计")
private String fundComSum;
/**
* 其他福利单位缴费明细
*/
@ElogTransform(name = "其他福利单位缴费明细")
private String otherComJson;
/**
* 其他福利单位合计
*/
@ElogTransform(name = "其他福利单位合计")
private String otherComSum;
/**
* 单位合计
*/
@Encrypt
@ElogTransform(name = "单位合计")
private String comSum;
/**
* 社保合计
*/
@Encrypt
@ElogTransform(name = "社保合计")
private String socialSum;
/**
* 公积金合计
*/
@Encrypt
@ElogTransform(name = "公积金合计")
private String fundSum;
/**
* 其他福利合计
*/
@Encrypt
@ElogTransform(name = "其他福利合计")
private String otherSum;
/**
* 合计
*/
@Encrypt
@ElogTransform(name = "合计")
private String total;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
private Long creator;
/**
* 是否删除
*/
@ElogTransform(name = "是否删除")
private Integer deleteType;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
private Date updateTime;
/**
* 租户key
*/
@ElogTransform(name = "租户key")
private String tenantKey;
/**
* 个税扣缴义务人
*/
@ElogTransform(name = "个税扣缴义务人")
private Long paymentOrganization;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.siaccount.po;
import com.engine.salary.elog.annotation.ElogTransform;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -18,86 +19,103 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
//hrsa_compensation_log
@ElogTransform(name = "福利台账-调差历史表")
public class InsuranceCompensationPO {
/**
* 主键id
*/
@ElogTransform(name = "主键id")
private Long id;
/**
* 缴纳组织
*/
@ElogTransform(name = "缴纳组织")
private Long paymentAgency;
/**
* 个税扣缴义务人
*/
@ElogTransform(name = "个税扣缴义务人id")
private Long paymentOrganization;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
private Long creator;
/**
* 是否删除
*/
@ElogTransform(name = "是否删除")
private Integer deleteType;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
private Date updateTime;
/**
* 租户key
*/
@ElogTransform(name = "租户key")
private String tenantKey;
/**
* 员工id
*/
@ElogTransform(name = "员工id")
private Long employeeId;
/**
* 统计调差福利
*/
@ElogTransform(name = "统计调差福利")
private Integer welfareType;
/**
* 统计调差福利类型
*/
@ElogTransform(name = "统计调差福利类型")
private String categoryType;
/**
* 国家核算金额
*/
@ElogTransform(name = "国家核算金额")
private String countryTotal;
/**
* 公司核算金额
*/
@ElogTransform(name = "公司核算金额")
private String companyTotal;
/**
* 应调差额
*/
@ElogTransform(name = "应调差额")
private String adjustmentTotal;
/**
* 调差到
*/
@ElogTransform(name = "调差到")
private Long adjustTo;
/**
* 账单月份
*/
@ElogTransform(name = "账单月份")
private String billMonth;
//---------条件-------

View File

@ -50,6 +50,9 @@ public interface InsuranceAccountBatchMapper {
*/
void updateById(InsuranceAccountBatchPO pos);
InsuranceAccountBatchPO getById(@Param("id") Long id);
/**
*
* @param billMonth

View File

@ -244,6 +244,15 @@
</if>
</update>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM
hrsa_bill_batch t
WHERE t.delete_type = 0
AND t.id = #{id}
</select>
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>

View File

@ -13,7 +13,9 @@ import com.engine.core.impl.Service;
import com.engine.salary.biz.*;
import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.component.SalaryWeaTable;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.elog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.progress.ProgressDTO;
@ -28,12 +30,14 @@ import com.engine.salary.entity.siexport.po.AccountExportPO;
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.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.enums.siaccount.*;
import com.engine.salary.enums.sicategory.*;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.InsuranceExportMapper;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.*;
import com.engine.salary.mapper.siarchives.FundSchemeMapper;
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
@ -231,6 +235,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
return ServiceUtil.getService(SIArchivesServiceImpl.class, user);
}
private EmployMapper getEmployMapper() {
return MapperProxyFactory.getProxy(EmployMapper.class);
}
@Override
public Map<String, Object> listPage(InsuranceAccountBatchParam queryParam) {
Long employeeId = (long) user.getUID();
@ -1548,6 +1556,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
param.setBillStatus(0);
// getSiAccountBiz(user).updateById(param);
updateById(param);
//记录操作日志
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getById(param.getId());
encryptUtil.decrypt(targetPO, InsuranceAccountBatchPO.class);
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
LoggerContext<InsuranceAccountBatchPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId("" + targetPO.getId());
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-重新核算"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-重新核算")
+ ": " + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
loggerContext.setNewValues(targetPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
/**
@ -1831,6 +1853,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
//刷新hrsa_bill_batch中数据统计信息
if (updateInsuranceAccountDetailList.size() > 0) {
refreshBillBatch(updateInsuranceAccountDetailList.get(0).getPaymentOrganization(), updateInsuranceAccountDetailList.get(0).getBillMonth());
//记录操作日志
encryptUtil.decryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class);
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(updateInsuranceAccountDetailList.get(0).getBillMonth(), updateInsuranceAccountDetailList.get(0).getPaymentOrganization());
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入")
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
updateInsuranceAccountDetailList.forEach(loggerContext::setNewValues);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
apidatas.put("successCount", successCount);
@ -3289,6 +3325,21 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
//刷新_bill_batch表中的统计信息
refreshBillBatch(insuranceAccountDetailPO.getPaymentOrganization(), insuranceAccountDetailPO.getBillMonth());
//记录操作日志
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(insuranceAccountDetailPO.getBillMonth(), insuranceAccountDetailPO.getPaymentOrganization());
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑")
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername());
loggerContext.setNewValues(insuranceAccountDetailPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
public void accountFundByData(InsuranceAccountDetailPO insuranceAccountDetailPO, EditAccountDetailParam baseParam) {
@ -4380,14 +4431,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
.build();
encryptUtil.encrypt(build, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().insert(build);
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(build.getId()));
// insuranceSchemeContext.setTargetName(build.getBillMonth());
// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue());
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账"));
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账"));
// insuranceSchemeContext.setNewValues(build);
// siAccountLoggerTemplate.write(insuranceSchemeContext);
//记录操作日志
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
encryptUtil.decrypt(targetPO, InsuranceAccountBatchPO.class);
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
LoggerContext<InsuranceAccountBatchPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增福利台账"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增福利台账")
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
loggerContext.setNewValues(targetPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
try {
List<Long> employeeIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(param.getPaymentOrganization());
@ -5357,15 +5414,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
insuranceAccountBatchPO.setOtherPay(otherSum.toPlainString());
encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO);
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth());
// insuranceSchemeContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100491, "更新台账"));
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100491, "更新台账"));
// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO);
// siAccountLoggerTemplate.write(insuranceSchemeContext);
//记录操作日志
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountBatchPO.getPaymentOrganization());
LoggerContext<InsuranceAccountBatchPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新福利台账"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新福利台账")
+ ":" + taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setNewValues(insuranceAccountBatchPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
public void siFile(String billMonth, Long paymentOrganization) {
@ -5378,15 +5439,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
insuranceAccountBatchPO.setBillStatus(BillStatusEnum.ARCHIVED.getValue());
encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO);
//日志记录
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth());
// insuranceSchemeContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100506, "台账归档"));
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100506, "台账归档"));
// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO);
// siAccountLoggerTemplate.write(insuranceSchemeContext);
//记录操作日志
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountBatchPO.getPaymentOrganization());
LoggerContext<InsuranceAccountBatchPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId("" + insuranceAccountBatchPO.getId());
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-归档"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-归档")
+ ": " + taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setNewValues(insuranceAccountBatchPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
@ -5431,17 +5496,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
// }
getInsuranceAccountBatchMapper().deleteById(insuranceAccountBatchPO.getId());
getInsuranceAccountDetailMapper().batchDeleteNotFile(param.getBillMonth(), param.getPaymentOrganization());
//删除账单月份+个税扣缴义务人下的调差数据
getInsuranceCompensationMapper().deleteByBillMonthAndPayOrg(param.getBillMonth(), param.getPaymentOrganization());
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth());
// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue());
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantkey, employeeId, 100464, "删除台账"));
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantkey, employeeId, 100464, "删除台账"));
// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO);
// siAccountLoggerTemplate.write(insuranceSchemeContext);
//记录操作日志
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountBatchPO.getPaymentOrganization());
LoggerContext<InsuranceAccountBatchPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利台账"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利台账")
+ ":" + taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth());
loggerContext.setNewValues(insuranceAccountBatchPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
public void siSaveSupplementaryAccount(SaveSupplementaryAccountParam param) {

View File

@ -6,26 +6,33 @@ import com.cloudstore.eccom.pc.table.WeaTable;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.elog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
import com.engine.salary.entity.hrm.param.HrmQueryParam;
import com.engine.salary.entity.siaccount.dto.InsuranceCompensationDTO;
import com.engine.salary.entity.siaccount.param.CompensationParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import com.engine.salary.entity.siaccount.po.InsuranceCompensationConfigPO;
import com.engine.salary.entity.siaccount.po.InsuranceCompensationPO;
import com.engine.salary.entity.sicategory.po.ICategoryPO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
import com.engine.salary.mapper.siaccount.InsuranceCompensationConfigMapper;
import com.engine.salary.mapper.siaccount.InsuranceCompensationMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
import com.engine.salary.service.*;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryEntityUtil;
@ -85,6 +92,15 @@ public class SICompensationServiceImpl extends Service implements SICompensation
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() {
return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class);
}
private TaxAgentMapper getTaxAgentMapper() {
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
}
/**
* 可调差人员
*/
@ -451,6 +467,20 @@ public class SICompensationServiceImpl extends Service implements SICompensation
idList.add(insuranceCompensationPO.getId());
// result.put(param.getOriginId(), insuranceCompensationPO.getId().toString());
//记录操作日志
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(insuranceAccountDetailPO.getBillMonth(), insuranceAccountDetailPO.getPaymentOrganization());
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountDetailPO.getPaymentOrganization());
DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
LoggerContext<InsuranceCompensationPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountDetailPO.getBillMonth() + "-" + empInfo.getUsername());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-新增调差"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-新增调差")
+ ":" + taxAgentInfo.getName() + "-" + insuranceAccountDetailPO.getBillMonth() + "-" + empInfo.getUsername());
loggerContext.setNewValues(insuranceCompensationPO);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
}
}
@ -493,6 +523,18 @@ public class SICompensationServiceImpl extends Service implements SICompensation
.creator(currentEmployeeId).build();
}).collect(Collectors.toList());
configList.forEach(config -> getInsuranceCompensationConfigMapper().insert(config));
//记录操作日志
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(param.get(0).getPaymentOrganization());
LoggerContext<InsuranceCompensationConfigPO> loggerContext = new LoggerContext();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(param.get(0).getPaymentOrganization()));
loggerContext.setTargetName(taxAgentInfo.getName());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-保存社保调差默认配置"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-保存社保调差默认配置")
+ ":" + taxAgentInfo.getName());
configList.forEach(loggerContext::setNewValues);
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
return "配置成功";
}