Merge remote-tracking branch 'origin/feature/操作日志组件' into feature/操作日志组件
This commit is contained in:
commit
5c5dcdabb2
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
//---------条件-------
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ public interface InsuranceAccountBatchMapper {
|
|||
*/
|
||||
void updateById(InsuranceAccountBatchPO pos);
|
||||
|
||||
InsuranceAccountBatchPO getById(@Param("id") Long id);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param billMonth
|
||||
|
|
|
|||
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -123,9 +123,9 @@ public interface SIAccountService {
|
|||
|
||||
/**
|
||||
* 删除补缴人员
|
||||
* @param supplementAccountBaseParams
|
||||
* @param param
|
||||
*/
|
||||
void deleteSummplementaryAccount(List<SupplementAccountBaseParam> supplementAccountBaseParams);
|
||||
void deleteSupplementaryAccount(SaveCommonAccountParam param);
|
||||
|
||||
/**
|
||||
* 台账归档
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -662,11 +670,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void deleteSummplementaryAccount(List<SupplementAccountBaseParam> supplementAccountBaseParams) {
|
||||
public void deleteSupplementaryAccount(SaveCommonAccountParam param) {
|
||||
// Long employeeId = (long) user.getUID();
|
||||
// String currentUserName = user.getLastname();
|
||||
// getSiAccountBiz(user).deleteSupplementaryAccount(supplementAccountBaseParams, employeeId, currentUserName);
|
||||
siDeleteSupplementaryAccount(supplementAccountBaseParams);
|
||||
siDeleteSupplementaryAccount(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -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,23 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//刷新hrsa_bill_batch中数据统计信息
|
||||
if (updateInsuranceAccountDetailList.size() > 0) {
|
||||
refreshBillBatch(updateInsuranceAccountDetailList.get(0).getPaymentOrganization(), updateInsuranceAccountDetailList.get(0).getBillMonth());
|
||||
//记录操作日志
|
||||
PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(updateInsuranceAccountDetailList.get(0).getPaymentStatus(), PaymentStatusEnum.values(), PaymentStatusEnum.class);
|
||||
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, "福利台账明细表-导入")
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入"
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()))
|
||||
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
|
||||
updateInsuranceAccountDetailList.forEach(loggerContext::setNewValues);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
apidatas.put("successCount", successCount);
|
||||
|
|
@ -3279,6 +3318,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
|
||||
|
||||
InsuranceAccountDetailPO oldTargetPO = new InsuranceAccountDetailPO();
|
||||
BeanUtils.copyProperties(insuranceAccountDetailPO, oldTargetPO);
|
||||
|
||||
accountSocialByData(insuranceAccountDetailPO, param);
|
||||
accountFundByData(insuranceAccountDetailPO, param);
|
||||
accountOtherByData(insuranceAccountDetailPO, param);
|
||||
|
|
@ -3289,6 +3331,25 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
//刷新_bill_batch表中的统计信息
|
||||
refreshBillBatch(insuranceAccountDetailPO.getPaymentOrganization(), insuranceAccountDetailPO.getBillMonth());
|
||||
//记录操作日志
|
||||
PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(insuranceAccountDetailPO.getPaymentStatus(), PaymentStatusEnum.values(), PaymentStatusEnum.class);
|
||||
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.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑")
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑"
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()))
|
||||
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername());
|
||||
loggerContext.setOldValues(oldTargetPO);
|
||||
loggerContext.setNewValues(insuranceAccountDetailPO);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
public void accountFundByData(InsuranceAccountDetailPO insuranceAccountDetailPO, EditAccountDetailParam baseParam) {
|
||||
|
|
@ -3696,6 +3757,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po);
|
||||
updateByEmployeeIdAndBillMonth(po);
|
||||
}
|
||||
//记录操作日志
|
||||
encryptUtil.decryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization);
|
||||
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);
|
||||
}
|
||||
if (createInsuranceAccountDetailList.size() > 0) {
|
||||
paymentOrganization = createInsuranceAccountDetailList.get(0).getPaymentOrganization();
|
||||
|
|
@ -3708,6 +3783,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//新增
|
||||
List<List<InsuranceAccountDetailPO>> createPartition = Lists.partition((List<InsuranceAccountDetailPO>) createInsuranceAccountDetailList, 20);
|
||||
createPartition.forEach(getInsuranceAccountDetailMapper()::batchSaveAccountDetails);
|
||||
//记录操作日志
|
||||
encryptUtil.decryptList(createInsuranceAccountDetailList, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization);
|
||||
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());
|
||||
createInsuranceAccountDetailList.forEach(loggerContext::setNewValues);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
//刷新bill_batch表中统计信息
|
||||
|
|
@ -4380,14 +4469,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 +5452,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 +5477,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 +5534,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) {
|
||||
|
|
@ -5967,48 +6073,66 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// insuranceSchemeContext.setNewValues(item);
|
||||
// siAccountLoggerTemplate.write(insuranceSchemeContext);
|
||||
// });
|
||||
//记录操作日志
|
||||
encryptUtil.decryptList(pos, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(pos.get(0).getBillMonth(), pos.get(0).getPaymentOrganization());
|
||||
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
|
||||
pos.forEach(targetDetailPO -> {
|
||||
DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetDetailPO.getEmployeeId());
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId("" + 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(targetDetailPO);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
public void siDeleteCommonAccount(SaveCommonAccountParam param) {
|
||||
ValidUtil.doValidator(param);
|
||||
SalaryAssert.notEmpty(param.getIncludes(), SalaryI18nUtil.getI18nLabel(0, "参数错误"));
|
||||
//根据id批量删除
|
||||
if (param.getIds().size() > 0) {
|
||||
getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds());
|
||||
} else {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "请勾选需要删除的数据项!"));
|
||||
}
|
||||
//记录日志
|
||||
// LoggerContext insuranceSchemeContext = new LoggerContext();
|
||||
// insuranceSchemeContext.setTargetId(String.join(",", param.getIncludes().stream().map(item -> String.valueOf(item)).collect(Collectors.toList())));
|
||||
// insuranceSchemeContext.setTargetName(param.getBillMonth());
|
||||
// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账"));
|
||||
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账"));
|
||||
// insuranceSchemeContext.setNewValues(param);
|
||||
// siAccountLoggerTemplate.write(insuranceSchemeContext);
|
||||
//记录操作日志
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除正常缴纳核算记录"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除正常缴纳核算记录"));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
|
||||
updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build());
|
||||
}
|
||||
|
||||
public void siDeleteSupplementaryAccount(List<SupplementAccountBaseParam> param) {
|
||||
SalaryAssert.notEmpty(param, SalaryI18nUtil.getI18nLabel(0, "参数错误"));
|
||||
boolean valid = param.stream().anyMatch(item -> item.getEmployeeId() == null
|
||||
|| StringUtils.isBlank(item.getSupplementaryMonth())
|
||||
|| StringUtils.isBlank(item.getBillMonth()));
|
||||
if (valid) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误"));
|
||||
public void siDeleteSupplementaryAccount(SaveCommonAccountParam param) {
|
||||
ValidUtil.doValidator(param);
|
||||
//根据id批量删除
|
||||
if (param.getIds().size() > 0) {
|
||||
getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds());
|
||||
} else {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "请勾选需要删除的数据项!"));
|
||||
}
|
||||
getInsuranceAccountDetailMapper().batchDelSupplementDetailsByIds(param);
|
||||
// param.stream().forEach(item -> {
|
||||
// LoggerContext insuranceSchemeContext = new LoggerContext();
|
||||
// insuranceSchemeContext.setTargetName(item.getBillMonth());
|
||||
// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录"));
|
||||
// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录"));
|
||||
// insuranceSchemeContext.setNewValues(item);
|
||||
// siAccountLoggerTemplate.write(insuranceSchemeContext);
|
||||
// });
|
||||
updateBatchAccount(AccountParam.builder().billMonth(param.get(0).getBillMonth()).paymentOrganization(param.get(0).getPaymentOrganization()).build());
|
||||
getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds());
|
||||
//记录操作日志
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补缴核算记录"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补缴核算记录"));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
|
||||
updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build());
|
||||
}
|
||||
|
||||
public void accountInspect(Collection<Long> ids, String billMonth, Long paymentOrganization) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -4,15 +4,20 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
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.siaccount.param.BalanceAccountBaseParam;
|
||||
import com.engine.salary.entity.siaccount.param.EditAccountDetailParam;
|
||||
import com.engine.salary.entity.siaccount.param.InspectAccountParam;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siarchives.po.*;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ResourceFromEnum;
|
||||
|
|
@ -21,6 +26,7 @@ import com.engine.salary.enums.sicategory.IsPaymentEnum;
|
|||
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
|
||||
import com.engine.salary.mapper.siarchives.FundSchemeMapper;
|
||||
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
|
||||
|
|
@ -28,6 +34,7 @@ import com.engine.salary.mapper.siarchives.OtherSchemeMapper;
|
|||
import com.engine.salary.mapper.siarchives.SocialSchemeMapper;
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
import com.engine.salary.service.SIBalanceService;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -87,6 +94,14 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
|
||||
private EncryptUtil encryptUtil = new EncryptUtil();
|
||||
|
||||
private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class);
|
||||
}
|
||||
|
||||
private TaxAgentMapper getTaxAgentMapper() {
|
||||
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void del(InspectAccountParam param, Long employeeId) {
|
||||
|
||||
|
|
@ -98,7 +113,15 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
//根据id删除
|
||||
List<List<Long>> partition = Lists.partition((List<Long>) param.getIds(), 100);
|
||||
partition.forEach(getInsuranceAccountDetailMapper()::batchDelAccountDetailsByIds);
|
||||
|
||||
//记录操作日志
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补差核算记录"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补差核算记录"));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
//刷新bill_batch表中统计信息
|
||||
getSIAccountService(user).refreshBillBatch(param.getPaymentOrganization(), param.getBillMonth());
|
||||
}
|
||||
|
|
@ -260,14 +283,14 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
Long creator = (long) user.getUID();
|
||||
Long paymentOrganization = param.getPaymentOrganization();
|
||||
|
||||
InsuranceAccountDetailPO banlanceAccountPO = getInsuranceAccountDetailMapper().getOneByBpep(InsuranceAccountDetailPO.builder()
|
||||
InsuranceAccountDetailPO balanceAccountPO = getInsuranceAccountDetailMapper().getOneByBpep(InsuranceAccountDetailPO.builder()
|
||||
.billMonth(billMonth)
|
||||
.paymentStatus(PaymentStatusEnum.BALANCE.getValue())
|
||||
.employeeId(employeeId)
|
||||
.paymentOrganization(paymentOrganization)
|
||||
.build());
|
||||
|
||||
if (banlanceAccountPO != null) {
|
||||
if (balanceAccountPO != null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据已存在,不可重复新增!"));
|
||||
}
|
||||
|
||||
|
|
@ -324,6 +347,20 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
|
||||
//刷新bill_batch表中统计信息
|
||||
getSIAccountService(user).refreshBillBatch(paymentOrganization, billMonth);
|
||||
//记录操作日志
|
||||
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization);
|
||||
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.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补差"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补差")
|
||||
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
|
||||
loggerContext.setNewValues(insuranceAccountDetailPO);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
} else {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ import com.mzlion.core.utils.BeanUtils;
|
|||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -377,15 +375,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService
|
|||
*/
|
||||
@Override
|
||||
public ICategoryPO getICategoryPOByID(Long id) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class);
|
||||
ICategoryPO iCategoryPO = iCategoryMapper.getById(id);
|
||||
return iCategoryPO;
|
||||
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
ICategoryPO iCategoryPO = getICategoryMapper().getById(id);
|
||||
return iCategoryPO;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -395,16 +388,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService
|
|||
*/
|
||||
@Override
|
||||
public List<ICategoryPO> listByName(String insuranceName) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
|
||||
try{
|
||||
ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class);
|
||||
List<ICategoryPO> iCategoryPOS = iCategoryMapper.listByName(insuranceName);
|
||||
return iCategoryPOS;
|
||||
List<ICategoryPO> iCategoryPOS = getICategoryMapper().listByName(insuranceName);
|
||||
return iCategoryPOS;
|
||||
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -437,30 +424,24 @@ public class SICategoryServiceImpl extends Service implements SICategoryService
|
|||
* @param iCategoryFormDTO
|
||||
*/
|
||||
public void update(ICategoryFormDTO iCategoryFormDTO) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try{
|
||||
if (iCategoryFormDTO.getId() == null) {
|
||||
throw new SalaryRunTimeException("id is required");
|
||||
}
|
||||
ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId());
|
||||
if (Objects.isNull(iCategoryPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在"));
|
||||
}
|
||||
List<ICategoryPO> iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName());
|
||||
if (CollectionUtils.isNotEmpty(iCategoryPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复"));
|
||||
}
|
||||
iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName());
|
||||
if (iCategoryFormDTO.getId() == null) {
|
||||
throw new SalaryRunTimeException("id is required");
|
||||
}
|
||||
ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId());
|
||||
if (Objects.isNull(iCategoryPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在"));
|
||||
}
|
||||
List<ICategoryPO> iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName());
|
||||
if (CollectionUtils.isNotEmpty(iCategoryPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复"));
|
||||
}
|
||||
iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName());
|
||||
// iCategoryPO.setWelfareType(iCategoryFormDTO.getWelfareType().getValue());
|
||||
// iCategoryPO.setPaymentScope(SalaryEnumUtil.enumArrToString(iCategoryFormDTO.getPaymentScope()));
|
||||
iCategoryPO.setUpdateTime(new Date());
|
||||
ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class);
|
||||
iCategoryMapper.update(iCategoryPO);
|
||||
iCategoryPO.setUpdateTime(new Date());
|
||||
|
||||
getICategoryMapper().update(iCategoryPO);
|
||||
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 "配置成功";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.alibaba.fastjson.TypeReference;
|
|||
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.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
|
||||
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
|
||||
|
|
@ -13,6 +15,7 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
|||
import com.engine.salary.entity.siexport.param.InsuranceExportParam;
|
||||
import com.engine.salary.entity.siexport.po.AccountExportPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ResourceFromEnum;
|
||||
|
|
@ -149,8 +152,13 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
rows.add(row);
|
||||
}
|
||||
excelSheetData.addAll(rows);
|
||||
|
||||
|
||||
//记录操作日志
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-导出总览"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-导出总览"));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
|
||||
}
|
||||
|
||||
|
|
@ -248,6 +256,16 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
}
|
||||
|
||||
excelSheetData.addAll(rows);
|
||||
//记录操作日志
|
||||
PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(paymentStatus, PaymentStatusEnum.values(), PaymentStatusEnum.class);
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导出")
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导出")
|
||||
+ SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel()));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName, total);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
|
||||
import com.engine.salary.entity.hrm.param.HrmQueryParam;
|
||||
|
|
@ -12,6 +14,8 @@ import com.engine.salary.entity.siaccount.param.RecessionParam;
|
|||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ProjectTypeEnum;
|
||||
|
|
@ -20,6 +24,7 @@ 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.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
import com.engine.salary.service.SIRecessionService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
|
|
@ -65,6 +70,11 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
|
|||
private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class);
|
||||
}
|
||||
|
||||
private TaxAgentMapper getTaxAgentMapper() {
|
||||
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(RecessionParam param, Long employeeId) {
|
||||
|
||||
|
|
@ -112,13 +122,25 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
|
|||
|
||||
//删除已有退差记录
|
||||
finalRecessionDetails.forEach(getInsuranceAccountDetailMapper()::deleteRecessionData);
|
||||
|
||||
//入库新数据
|
||||
List<List<InsuranceAccountDetailPO>> partition = Lists.partition((List<InsuranceAccountDetailPO>) finalRecessionDetails, 20);
|
||||
partition.forEach(getInsuranceAccountDetailMapper()::batchSaveAccountDetails);
|
||||
|
||||
//刷新bill_batch表中统计信息
|
||||
getSIAccountService(user).refreshBillBatch(Long.valueOf(param.getPaymentOrganization()), param.getBillMonth());
|
||||
//记录操作日志
|
||||
encryptUtil.decryptList(finalRecessionDetails, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), Long.valueOf(param.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.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增退差"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增退差")
|
||||
+ ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth());
|
||||
finalRecessionDetails.forEach(loggerContext::setNewValues);
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +159,15 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
|
|||
//根据id删除
|
||||
List<List<Long>> partition = Lists.partition((List<Long>) ids, 100);
|
||||
partition.forEach(getInsuranceAccountDetailMapper()::batchDelAccountDetailsByIds);
|
||||
|
||||
//记录操作日志
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(ids.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setTargetName(ids.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除退差核算记录"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除退差核算记录"));
|
||||
SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext);
|
||||
//刷新bill_batch表中统计信息
|
||||
getSIAccountService(user).refreshBillBatch(refreshTargetPO.getPaymentOrganization(), refreshTargetPO.getBillMonth());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -279,15 +279,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
@Override
|
||||
public List<InsuranceSchemeDetailPO> queryListByInsuranceIdIsPayment(Long insuranceId, Integer isPayment) {
|
||||
// return new SISchemeBiz().queryListByInsuranceIdIsPayment(insuranceId, isPayment);
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class);
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId, isPayment);
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPOList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().queryListByInsuranceIdIsPayment(insuranceId, isPayment);
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -637,7 +632,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
rows.add(row);
|
||||
}
|
||||
//记录操作日志
|
||||
LoggerContext<InsuranceArchivesOtherSchemePO> loggerContext = new LoggerContext<>();
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案导出"));
|
||||
|
|
@ -2387,15 +2382,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
*/
|
||||
public InsuranceSchemePO getById(Long id) {
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class);
|
||||
InsuranceSchemePO insuranceSchemePO = insuranceSchemeMapper.getById(id);
|
||||
|
||||
return insuranceSchemePO;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
InsuranceSchemePO insuranceSchemePO = getInsuranceSchemeMapper().getById(id);
|
||||
return insuranceSchemePO;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2405,14 +2393,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
* @return
|
||||
*/
|
||||
public List<ICategoryPO> listByWelfareType(Integer welfareType) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class);
|
||||
List<ICategoryPO> insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType, null);
|
||||
return insuranceCategoryPOS;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
List<ICategoryPO> insuranceCategoryPOS = getICategoryMapper().listByWelfareType(welfareType, null);
|
||||
return insuranceCategoryPOS;
|
||||
}
|
||||
|
||||
public boolean numberCheck(String number) {
|
||||
|
|
@ -2420,15 +2403,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
private InsuranceSchemeDetailPO getByPPI(Long primaryId, Integer paymentScope, Long insuranceId) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class);
|
||||
InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailMapper.getByPPI(primaryId, paymentScope, insuranceId);
|
||||
encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPO;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
InsuranceSchemeDetailPO insuranceSchemeDetailPO = getInsuranceSchemeDetailMapper().getByPPI(primaryId, paymentScope, insuranceId);
|
||||
encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPO;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2532,7 +2511,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
||||
//记录主表操作日志
|
||||
loggerContext.setNewValues(insuranceSchemePO1);
|
||||
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
|
||||
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
||||
//更新福利方案明细表 先删后插
|
||||
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
||||
//更新明细表
|
||||
|
|
@ -2548,7 +2527,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceSchemeDetailContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "修改福利方案明细表"));
|
||||
insuranceSchemeDetailContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细"));
|
||||
insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailContext::setNewValues);
|
||||
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(insuranceSchemeDetailContext);
|
||||
SalaryElogConfig.siSchemeLoggerTemplate.write(insuranceSchemeDetailContext);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2715,16 +2694,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
* @return
|
||||
*/
|
||||
public List<InsuranceSchemeDetailPO> listByPrimaryId(Long primaryId) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class);
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListBySchemeId(primaryId);
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPOS;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(primaryId);
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
return insuranceSchemeDetailPOS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2734,14 +2707,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
*/
|
||||
@Override
|
||||
public List<InsuranceSchemePO> listAll(){
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class);
|
||||
List<InsuranceSchemePO> insuranceSchemePOList = insuranceSchemeMapper.listAll();
|
||||
return insuranceSchemePOList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
List<InsuranceSchemePO> insuranceSchemePOList = getInsuranceSchemeMapper().listAll();
|
||||
return insuranceSchemePOList;
|
||||
}
|
||||
|
||||
/*****以上代码为SISchemeBiz中方法逻辑迁移,旨在减少Biz类的使用*****/
|
||||
|
|
|
|||
|
|
@ -315,9 +315,9 @@ public class SIAccountController {
|
|||
@Path("/supplementary/delete")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteSummplementaryAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody List<SupplementAccountBaseParam> param) {
|
||||
@RequestBody SaveCommonAccountParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<List<SupplementAccountBaseParam>, String>(user).run(getService(user)::deleteSummplementaryAccount, param);
|
||||
return new ResponseResult<SaveCommonAccountParam, String>(user).run(getService(user)::deleteSupplementaryAccount, param);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue