This commit is contained in:
parent
117dbeb211
commit
dee20149bb
|
|
@ -1,15 +1,22 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
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.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -130,7 +137,7 @@ public class OtherDeductionBiz extends BaseBean {
|
|||
*
|
||||
* @param pos
|
||||
*/
|
||||
public void handleImportData(List<OtherDeductionPO> pos) {
|
||||
public void handleImportData(List<OtherDeductionPO> pos, User user) {
|
||||
if (CollectionUtils.isEmpty(pos)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -169,6 +176,30 @@ public class OtherDeductionBiz extends BaseBean {
|
|||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
batchSave(saveList);
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = saveList.stream().map(OtherDeductionPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<OtherDeductionPO> insertList = listSome(OtherDeductionPO.builder().declareMonth(po.getDeclareMonth()).employeeIds(empIds).build());
|
||||
Map<String, OtherDeductionPO> insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId());
|
||||
saveList.forEach(save -> {
|
||||
OtherDeductionPO otherDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId());
|
||||
if (otherDeductionPO != null) {
|
||||
updateList.add(otherDeductionPO);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
String name = SalaryDateUtil.getFormatYearMonth(po.getDeclareMonth());
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "其他免税扣除 ") + name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导入"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "其他免税扣除") + name);
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,28 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class SalaryArchiveItemBiz {
|
||||
public EncryptUtil encryptUtil = new EncryptUtil();
|
||||
|
|
@ -104,10 +112,11 @@ public class SalaryArchiveItemBiz {
|
|||
}
|
||||
}
|
||||
|
||||
public void batchInsert(List<SalaryArchiveItemPO> salaryArchiveItemNews) {
|
||||
public void batchInsert(List<SalaryArchiveItemPO> salaryArchiveItemNews, User user) {
|
||||
if (CollectionUtils.isEmpty(salaryArchiveItemNews)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalaryArchiveItemMapper mapper = sqlSession.getMapper(SalaryArchiveItemMapper.class);
|
||||
|
|
@ -115,6 +124,25 @@ public class SalaryArchiveItemBiz {
|
|||
List<List<SalaryArchiveItemPO>> partition = Lists.partition(salaryArchiveItemNews, 100);
|
||||
partition.forEach(mapper::batchInsert);
|
||||
sqlSession.commit();
|
||||
|
||||
// 记录日志
|
||||
List<Long> archiveIdList = salaryArchiveItemNews.stream().map(SalaryArchiveItemPO::getSalaryArchiveId).distinct().collect(Collectors.toList());
|
||||
List<Long> itemIdList = salaryArchiveItemNews.stream().map(SalaryArchiveItemPO::getSalaryItemId).distinct().collect(Collectors.toList());
|
||||
// 查出保存的id
|
||||
List<SalaryArchiveItemPO> savePO = mapper.listByParam(SalaryArchiveItemQueryParam.builder().salaryArchivesIds(archiveIdList).salaryItemIds(itemIdList).build());
|
||||
encryptUtil.decryptList(savePO, SalaryArchiveItemPO.class);
|
||||
Map<String, SalaryArchiveItemPO> saveMap = SalaryEntityUtil.convert2Map(savePO, p -> p.getSalaryArchiveId() + p.getSalaryItemId() + SalaryDateUtil.getFormatDate(p.getEffectiveTime()));
|
||||
String operateName = SalaryI18nUtil.getI18nLabel(0, "新增调薪记录");
|
||||
salaryArchiveItemNews.forEach(e -> {
|
||||
SalaryArchiveItemPO archive = saveMap.getOrDefault(e.getSalaryArchiveId() + e.getSalaryItemId() + SalaryDateUtil.getFormatDate(e.getEffectiveTime()), SalaryArchiveItemPO.builder().build());
|
||||
SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.salaryArchiveItemAdjustLoggerTemplate,
|
||||
archive.getId(),
|
||||
operateName + ":" + archive.getId(),
|
||||
operateName,
|
||||
operateName,
|
||||
archive,
|
||||
user);
|
||||
});
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,23 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
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.datacollection.dto.SpecialAddDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.mapper.datacollection.SpecialAddDeductionMapper;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -98,13 +104,30 @@ public class SpecialAddDeductionBiz extends BaseBean {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public List<SpecialAddDeductionPO> listSome(SpecialAddDeductionPO param) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SpecialAddDeductionMapper mapper = sqlSession.getMapper(SpecialAddDeductionMapper.class);
|
||||
List<SpecialAddDeductionPO> specialAddDeductionPOS = mapper.listSome(param);
|
||||
return encryptUtil.decryptList(specialAddDeductionPOS, SpecialAddDeductionPO.class);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理导入数据
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
public void handleImportData(List<SpecialAddDeductionPO> pos) {
|
||||
public void handleImportData(List<SpecialAddDeductionPO> pos, User user) {
|
||||
if (CollectionUtils.isEmpty(pos)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -140,6 +163,29 @@ public class SpecialAddDeductionBiz extends BaseBean {
|
|||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
batchSave(saveList);
|
||||
}
|
||||
|
||||
// 记录操作日志
|
||||
// 根据人员id查出保存的数据
|
||||
List<Long> empIds = saveList.stream().map(SpecialAddDeductionPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<SpecialAddDeductionPO> insertLogList = listSome(SpecialAddDeductionPO.builder().employeeIds(empIds).build());
|
||||
Map<String, SpecialAddDeductionPO> insertMap = SalaryEntityUtil.convert2Map(insertLogList, p -> p.getTaxAgentId() + "-" + p.getEmployeeId());
|
||||
saveList.forEach(save -> {
|
||||
SpecialAddDeductionPO specialAddDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + save.getEmployeeId());
|
||||
if (specialAddDeductionPO != null) {
|
||||
updateList.add(specialAddDeductionPO);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "专项附加扣除 "));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入专项附加扣除 "));
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.specialAddDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ public class SalaryElogConfig {
|
|||
*/
|
||||
public static LoggerTemplate otherDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "otherdeduction");
|
||||
|
||||
/**
|
||||
* 专项附加扣除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static LoggerTemplate specialAddDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "specialAddDeduction");
|
||||
|
||||
/**
|
||||
* 减税
|
||||
*
|
||||
|
|
@ -289,4 +296,25 @@ public class SalaryElogConfig {
|
|||
* @return
|
||||
*/
|
||||
public static LoggerTemplate annualBonusLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "annualbonus");
|
||||
|
||||
/**
|
||||
* 我的工资单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static LoggerTemplate mySalaryBillLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "mysalarybill");
|
||||
|
||||
/**
|
||||
* 我的调薪记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static LoggerTemplate myAdjustRecordLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "myadjustrecord");
|
||||
|
||||
/**
|
||||
* 薪酬报表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static LoggerTemplate salaryStatReportLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "statreport");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection;
|
|||
|
||||
import com.engine.salary.annotation.Encrypt;
|
||||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -19,30 +20,36 @@ import java.util.List;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_add_up_deduction
|
||||
@ElogTransform(name = "累计专项附加扣除")
|
||||
public class AddUpDeduction {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform(name = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
@ElogTransform(name = "人员id")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@ElogTransform(name = "个税扣缴义务人id")
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 申报月份
|
||||
*/
|
||||
@ElogTransform(name = "申报月份")
|
||||
private Date declareMonth;
|
||||
|
||||
/**
|
||||
* 累计子女教育
|
||||
*/
|
||||
@ElogTransform(name = "累计子女教育")
|
||||
@SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpChildEducation;
|
||||
|
|
@ -50,6 +57,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计继续教育
|
||||
*/
|
||||
@ElogTransform(name = "累计继续教育")
|
||||
@SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpContinuingEducation;
|
||||
|
|
@ -57,6 +65,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计住房贷款利息
|
||||
*/
|
||||
@ElogTransform(name = "累计住房贷款利息")
|
||||
@SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpHousingLoanInterest;
|
||||
|
|
@ -64,6 +73,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计住房租金
|
||||
*/
|
||||
@ElogTransform(name = "累计住房租金")
|
||||
@SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpHousingRent;
|
||||
|
|
@ -71,6 +81,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计赡养老人
|
||||
*/
|
||||
@ElogTransform(name = "累计赡养老人")
|
||||
@SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpSupportElderly;
|
||||
|
|
@ -78,6 +89,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计大病医疗
|
||||
*/
|
||||
@ElogTransform(name = "累计大病医疗")
|
||||
@SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpIllnessMedical;
|
||||
|
|
@ -85,6 +97,7 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 累计婴幼儿照护
|
||||
*/
|
||||
@ElogTransform(name = "累计婴幼儿照护")
|
||||
@SalaryFormulaVar(defaultLabel = "累计婴幼儿照护", labelId = 117732, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpInfantCare;
|
||||
|
|
@ -92,26 +105,31 @@ public class AddUpDeduction {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform(name = "是否已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户ID")
|
||||
private String tenantKey;
|
||||
|
||||
List<Long> employeeIds;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.annotation.Encrypt;
|
|||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,36 +23,43 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f83287-e3f9-4275-9527-7d06e54y6238", fields = "id,addUpSubtraction", operates = {@SalaryTableOperate(text = "删除",index = "0")})
|
||||
//hrsa_add_up_situation
|
||||
@ElogTransform(name = "往期累计情况")
|
||||
public class AddUpSituation {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
@ElogTransform(name = "创建人id")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@ElogTransform(name = "个税扣缴义务人id")
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 税款所属期
|
||||
*/
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
private List<Date> taxYearMonthRange;
|
||||
|
||||
/**
|
||||
* 年份
|
||||
*/
|
||||
@ElogTransform(name = "年份")
|
||||
private Integer year;
|
||||
|
||||
/**
|
||||
* 累计收入额
|
||||
*/
|
||||
@ElogTransform(name = "累计收入额")
|
||||
@SalaryFormulaVar(defaultLabel = "累计收入额", labelId = 86712, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpIncome;
|
||||
|
|
@ -59,6 +67,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计减除费用
|
||||
*/
|
||||
@ElogTransform(name = "累计减除费用")
|
||||
@SalaryFormulaVar(defaultLabel = "累计减除费用", labelId = 86711, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpSubtraction;
|
||||
|
|
@ -66,6 +75,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计社保个人合计
|
||||
*/
|
||||
@ElogTransform(name = "累计社保个人合计")
|
||||
@SalaryFormulaVar(defaultLabel = "累计社保个人合计", labelId = 86710, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpSocialSecurityTotal;
|
||||
|
|
@ -73,6 +83,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计公积金个人合计
|
||||
*/
|
||||
@ElogTransform(name = "累计公积金个人合计")
|
||||
@SalaryFormulaVar(defaultLabel = "累计公积金个人合计", labelId = 86709, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAccumulationFundTotal;
|
||||
|
|
@ -80,6 +91,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计子女教育
|
||||
*/
|
||||
@ElogTransform(name = "累计子女教育")
|
||||
@SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpChildEducation;
|
||||
|
|
@ -87,6 +99,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计继续教育
|
||||
*/
|
||||
@ElogTransform(name = "累计继续教育")
|
||||
@SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpContinuingEducation;
|
||||
|
|
@ -94,6 +107,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计住房贷款利息
|
||||
*/
|
||||
@ElogTransform(name = "累计住房贷款利息")
|
||||
@SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpHousingLoanInterest;
|
||||
|
|
@ -101,6 +115,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计住房租金
|
||||
*/
|
||||
@ElogTransform(name = "累计住房租金")
|
||||
@SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpHousingRent;
|
||||
|
|
@ -108,6 +123,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计赡养老人
|
||||
*/
|
||||
@ElogTransform(name = "累计赡养老人")
|
||||
@SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpSupportElderly;
|
||||
|
|
@ -115,6 +131,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计大病医疗
|
||||
*/
|
||||
@ElogTransform(name = "累计大病医疗")
|
||||
@SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpIllnessMedical;
|
||||
|
|
@ -122,6 +139,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计婴幼儿照护
|
||||
*/
|
||||
@ElogTransform(name = "累计婴幼儿照护")
|
||||
@SalaryFormulaVar(defaultLabel = "累计婴幼儿照护", labelId = 117732, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpInfantCare;
|
||||
|
|
@ -129,6 +147,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计婴幼儿照护
|
||||
*/
|
||||
@ElogTransform(name = "累计个人养老金")
|
||||
@SalaryFormulaVar(defaultLabel = "累计个人养老金", labelId = 117732, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpPrivatePension;
|
||||
|
|
@ -136,6 +155,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计企业(职业)年金及其他福利
|
||||
*/
|
||||
@ElogTransform(name = "累计企业(职业)年金及其他福利")
|
||||
@SalaryFormulaVar(defaultLabel = "累计企业(职业)年金及其他福利", labelId = 90567, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpEnterpriseAndOther;
|
||||
|
|
@ -143,6 +163,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计其他免税扣除
|
||||
*/
|
||||
@ElogTransform(name = "累计其他免税扣除")
|
||||
@SalaryFormulaVar(defaultLabel = "累计其他免税扣除", labelId = 93902, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpOtherDeduction;
|
||||
|
|
@ -150,6 +171,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计免税收入
|
||||
*/
|
||||
@ElogTransform(name = "累计免税收入")
|
||||
@SalaryFormulaVar(defaultLabel = "累计免税收入", labelId = 86704, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpTaxExemptIncome;
|
||||
|
|
@ -157,6 +179,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计准予扣除的捐赠额
|
||||
*/
|
||||
@ElogTransform(name = "累计准予扣除的捐赠额")
|
||||
@SalaryFormulaVar(defaultLabel = "累计准予扣除的捐赠额", labelId = 86703, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAllowedDonation;
|
||||
|
|
@ -164,6 +187,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计减免税额
|
||||
*/
|
||||
@ElogTransform(name = "累计减免税额")
|
||||
@SalaryFormulaVar(defaultLabel = "累计减免税额", labelId = 105478, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpTaxSavings;
|
||||
|
|
@ -171,6 +195,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计已预扣预缴税额
|
||||
*/
|
||||
@ElogTransform(name = "累计已预扣预缴税额")
|
||||
@SalaryFormulaVar(defaultLabel = "累计已预扣预缴税额", labelId = 86702, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAdvanceTax;
|
||||
|
|
@ -178,16 +203,19 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -198,6 +226,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户")
|
||||
private String tenantKey;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -15,54 +16,78 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_attend_quote_field
|
||||
@ElogTransform( name ="考勤引用字段")
|
||||
public class AttendQuoteFieldPO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ElogTransform( name ="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段名称
|
||||
*/
|
||||
@ElogTransform( name ="字段名称")
|
||||
private String fieldName;
|
||||
|
||||
/**
|
||||
* 来源。1:自定义、2:考勤模块
|
||||
*/
|
||||
@ElogTransform( name ="来源")
|
||||
private Integer sourceType;
|
||||
|
||||
/**
|
||||
* 字段类型。1:数值、2:文本
|
||||
*/
|
||||
@ElogTransform( name ="字段类型")
|
||||
private Integer fieldType;
|
||||
|
||||
/**
|
||||
* 是否启用。0:否、1:是
|
||||
*/
|
||||
@ElogTransform( name ="是否启用")
|
||||
private Integer enableStatus;
|
||||
|
||||
/**
|
||||
* 编码(对应考勤模块字段)
|
||||
*/
|
||||
@ElogTransform( name ="编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ElogTransform( name ="备注")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform( name ="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform( name ="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform( name ="创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform( name ="是否已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform( name ="租户")
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -16,66 +17,93 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_attend_quote
|
||||
@ElogTransform(name = "考勤数据")
|
||||
public class AttendQuotePO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ElogTransform(name = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 税款所属期
|
||||
*/
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date salaryYearMonth;
|
||||
/**
|
||||
* 年份
|
||||
*/
|
||||
@ElogTransform(name = "年份")
|
||||
private Integer year;
|
||||
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
@ElogTransform(name = "月份")
|
||||
private Integer month;
|
||||
|
||||
/**
|
||||
* 薪资账套表的主键id
|
||||
*/
|
||||
@ElogTransform(name = "薪资账套id")
|
||||
private Long salarySobId;
|
||||
|
||||
/**
|
||||
* 来源。1:引用、2:导入
|
||||
*/
|
||||
@ElogTransform(name = "来源")
|
||||
private Integer sourceType;
|
||||
|
||||
/**
|
||||
* 薪资核算状态。0:未核算、1:已核算
|
||||
*/
|
||||
@ElogTransform(name = "薪资核算状态")
|
||||
private Integer salaryAccountingStatus;
|
||||
|
||||
/**
|
||||
* 考勤周期
|
||||
*/
|
||||
@ElogTransform(name = "考勤周期")
|
||||
private String attendCycle;
|
||||
|
||||
/**
|
||||
* 薪资周期
|
||||
*/
|
||||
@ElogTransform(name = "薪资周期")
|
||||
private String salaryCycle;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ElogTransform(name = "备注")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户")
|
||||
private String tenantKey;
|
||||
|
||||
//主键id
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po;
|
|||
|
||||
import com.engine.salary.annotation.Encrypt;
|
||||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -18,31 +19,37 @@ import java.util.List;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ElogTransform( name = "其他免税扣除")
|
||||
public class OtherDeductionPO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ElogTransform( name="主键id" )
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
@ElogTransform( name ="人员id")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@ElogTransform( name ="个税扣缴义务人id")
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 申报月份
|
||||
*/
|
||||
@ElogTransform( name ="税款所属期")
|
||||
private Date declareMonth;
|
||||
|
||||
/**
|
||||
* 商业健康保险
|
||||
*/
|
||||
@ElogTransform( name ="商业健康保险")
|
||||
@SalaryFormulaVar(defaultLabel = "商业健康保险", labelId = 91238, dataType = "number")
|
||||
@Encrypt
|
||||
private String businessHealthyInsurance;
|
||||
|
|
@ -50,6 +57,7 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 税延养老保险
|
||||
*/
|
||||
@ElogTransform( name ="税延养老保险")
|
||||
@SalaryFormulaVar(defaultLabel = "税延养老保险", labelId = 91239, dataType = "number")
|
||||
@Encrypt
|
||||
private String taxDelayEndowmentInsurance;
|
||||
|
|
@ -57,6 +65,7 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 其他
|
||||
*/
|
||||
@ElogTransform( name ="其他")
|
||||
@SalaryFormulaVar(defaultLabel = "其他", labelId = 84500, dataType = "number")
|
||||
@Encrypt
|
||||
private String otherDeduction;
|
||||
|
|
@ -64,6 +73,7 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 准予扣除的捐赠额
|
||||
*/
|
||||
@ElogTransform( name ="准予扣除的捐赠额")
|
||||
@SalaryFormulaVar(defaultLabel = "准予扣除的捐赠额", labelId = 91240, dataType = "number")
|
||||
@Encrypt
|
||||
private String deductionAllowedDonation;
|
||||
|
|
@ -71,6 +81,7 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 个人养老金
|
||||
*/
|
||||
@ElogTransform( name ="个人养老金")
|
||||
@SalaryFormulaVar(defaultLabel = "个人养老金", labelId = 91240, dataType = "number")
|
||||
@Encrypt
|
||||
private String privatePension;
|
||||
|
|
@ -78,16 +89,19 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform( name ="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform( name ="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform( name ="创建人id")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -98,6 +112,7 @@ public class OtherDeductionPO {
|
|||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform( name ="租户")
|
||||
private String tenantKey;
|
||||
|
||||
private List<Long> employeeIds;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据采集-专项附加扣除表
|
||||
|
|
@ -96,4 +97,6 @@ public class SpecialAddDeductionPO {
|
|||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
private List<Long> employeeIds;
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.annotation.SalaryTable;
|
|||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,37 +23,44 @@ import lombok.NoArgsConstructor;
|
|||
@SalaryTableOperate(index = "2", text = "删除" ),
|
||||
@SalaryTableOperate(index = "3", text = "操作日志" )
|
||||
})
|
||||
@ElogTransform(name = "工资单模板")
|
||||
public class SalaryTemplateListDTO {
|
||||
|
||||
//主键id
|
||||
@SalaryTableColumn(column = "id", display = false)
|
||||
@TableTitle(title = "id", dataIndex = "id", key = "id",display = false)
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
//工资单模板名称
|
||||
@SalaryTableColumn(text = "工资单模板名称", width = "20%", column = "name")
|
||||
@TableTitle(title = "工资单模板名称", dataIndex = "name", key = "name")
|
||||
@ElogTransform(name = "工资单模板名称")
|
||||
private String name;
|
||||
|
||||
//补发工资单模板名称
|
||||
@SalaryTableColumn(text = "补发工资单模板名称", width = "20%", column = "replenishName")
|
||||
@TableTitle(title = "补发工资单模板名称", dataIndex = "replenishName", key = "replenishName")
|
||||
@ElogTransform(name = "补发工资单模板名称")
|
||||
private String replenishName;
|
||||
|
||||
|
||||
//所属薪资账套
|
||||
@SalaryTableColumn(text = "所属薪资账套", width = "20%", column = "salarySob")
|
||||
@TableTitle(title = "所属薪资账套", dataIndex = "salarySob", key = "salarySob")
|
||||
@ElogTransform(name = "所属薪资账套")
|
||||
private String salarySob;
|
||||
|
||||
//默认使用
|
||||
@SalaryTableColumn(text = "默认使用", width = "20%", column = "useType")
|
||||
@TableTitle(title = "默认使用", dataIndex = "useType", key = "useType")
|
||||
@ElogTransform(name = "默认使用")
|
||||
private String useType;
|
||||
|
||||
// 备注
|
||||
@SalaryTableColumn(text = "备注", width = "20%", column = "description")
|
||||
@TableTitle(title = "备注", dataIndex = "description", key = "description")
|
||||
@ElogTransform(name = "备注")
|
||||
private String description;
|
||||
|
||||
// 薪资账套id
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salaryBill.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -16,73 +17,87 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
////hrsa_salary_send")
|
||||
////工资单发放表")
|
||||
@ElogTransform(name = "工资单发放")
|
||||
public class SalarySendPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 薪资所属月
|
||||
*/
|
||||
@ElogTransform(name = "薪资所属月")
|
||||
private Date salaryMonth;
|
||||
|
||||
/**
|
||||
* 薪资核算id
|
||||
*/
|
||||
@ElogTransform(name = "薪资核算id")
|
||||
private Long salaryAccountingId;
|
||||
|
||||
/**
|
||||
* 薪资账套id
|
||||
*/
|
||||
@ElogTransform(name = "薪资账套id")
|
||||
private Long salarySobId;
|
||||
|
||||
/**
|
||||
* 已发送数量
|
||||
*/
|
||||
@ElogTransform(name = "已发送数量")
|
||||
private Integer sendNum;
|
||||
|
||||
/**
|
||||
* 发送总数
|
||||
*/
|
||||
@ElogTransform(name = "发送总数")
|
||||
private Integer sendTotal;
|
||||
|
||||
/**
|
||||
* 最后发送时间
|
||||
*/
|
||||
@ElogTransform(name = "最后发送时间")
|
||||
private Date lastSendTime;
|
||||
|
||||
|
||||
/**
|
||||
* 发放状态。0:未冻结、1:已冻结
|
||||
*/
|
||||
@ElogTransform(name = "发放状态")
|
||||
private Integer sendStatus;
|
||||
|
||||
/**
|
||||
* 核算类型。0:正常,1:补发
|
||||
*/
|
||||
@ElogTransform(name = "核算类型")
|
||||
private Integer salaryAcctType;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform(name = "是否已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salaryBill.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -19,155 +20,185 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
////hrsa_salary_template")
|
||||
////工资单模板表")
|
||||
@ElogTransform(name = "工资单模板")
|
||||
public class SalaryTemplatePO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ElogTransform(name = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 薪资账套表的主键id
|
||||
*/
|
||||
@ElogTransform(name = "薪资账套id")
|
||||
private Long salarySobId;
|
||||
|
||||
/**
|
||||
* 使用类型。0:普通、1:默认
|
||||
*/
|
||||
@ElogTransform(name = "使用类型")
|
||||
private Integer useType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ElogTransform(name = "备注")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 消息中心开启状态。0:关、1:开 ,默认开启
|
||||
*/
|
||||
@ElogTransform(name = "消息中心开启状态")
|
||||
private Integer msgStatus;
|
||||
|
||||
/**
|
||||
* 邮箱开启状态。0:关、1:开,默认关闭
|
||||
*/
|
||||
@ElogTransform(name = "邮箱开启状态")
|
||||
private Integer emailStatus;
|
||||
|
||||
|
||||
/**
|
||||
* 发送地址:公共邮箱账号id
|
||||
*/
|
||||
@ElogTransform(name = "邮箱发送地址")
|
||||
private Long sendEmailId;
|
||||
|
||||
|
||||
/**
|
||||
* 短信开启状态。0:关、1:开,默认关闭
|
||||
*/
|
||||
@ElogTransform(name = "短信开启状态")
|
||||
private Integer smsStatus;
|
||||
|
||||
/**
|
||||
* 短信模板设置
|
||||
*/
|
||||
@ElogTransform(name = "短信模板设置")
|
||||
private String smsSetting;
|
||||
|
||||
/**
|
||||
* 薪酬水印
|
||||
*/
|
||||
@ElogTransform(name = "薪酬水印")
|
||||
private String salaryWatermark;
|
||||
|
||||
/**
|
||||
* 主题
|
||||
*/
|
||||
@ElogTransform(name = "主题")
|
||||
private String theme;
|
||||
|
||||
/**
|
||||
* 背景图
|
||||
*/
|
||||
@ElogTransform(name = "背景图")
|
||||
private String background;
|
||||
|
||||
/**
|
||||
* 文本内容
|
||||
*/
|
||||
@ElogTransform(name = "文本内容")
|
||||
private String textContent;
|
||||
|
||||
/**
|
||||
* 文本内容显示位置。1:薪资项目前、2:薪资项目后
|
||||
*/
|
||||
@ElogTransform(name = "文本内容显示位置")
|
||||
private Integer textContentPosition;
|
||||
|
||||
/**
|
||||
* 薪资项为空时不显示开启状态。0:关、1:开
|
||||
*/
|
||||
@ElogTransform(name = "薪资项为空时不显示开启状态")
|
||||
private Integer salaryItemNullStatus;
|
||||
|
||||
/**
|
||||
* 薪资项为0时不显示开启状态。0:关、1:开
|
||||
*/
|
||||
@ElogTransform(name = "薪资项为0时不显示开启状态")
|
||||
private Integer salaryItemZeroStatus;
|
||||
|
||||
/**
|
||||
* 薪资项目设置
|
||||
*/
|
||||
@ElogTransform(name = "薪资项目设置")
|
||||
private String salaryItemSetting;
|
||||
|
||||
//=====================补发===================
|
||||
/**
|
||||
* 补发工资单模板名称
|
||||
*/
|
||||
@ElogTransform(name = "补发工资单模板名称")
|
||||
private String replenishName;
|
||||
|
||||
/**
|
||||
* 补发工资单名单生成规则
|
||||
*/
|
||||
@ElogTransform(name = "补发工资单名单生成规则")
|
||||
private String replenishRule;
|
||||
|
||||
/**
|
||||
* 补发薪资项目设置
|
||||
*/
|
||||
@ElogTransform(name = "补发薪资项目设置")
|
||||
private String replenishSalaryItemSetting;
|
||||
|
||||
|
||||
/**
|
||||
* 是否启用工资单定时发送。0:未启用、1:已启用
|
||||
*/
|
||||
@ElogTransform(name = "是否启用工资单定时发送")
|
||||
private Integer autoSendStatus;
|
||||
|
||||
/**
|
||||
* 自动发送工资单周期1:本月、2:上月
|
||||
*/
|
||||
@ElogTransform(name = "自动发送工资单周期1")
|
||||
private Integer autoSendCycleType;
|
||||
|
||||
/**
|
||||
* 每月几号自动发送工资单
|
||||
*/
|
||||
@ElogTransform(name = "每月几号自动发送工资单")
|
||||
private String autoSendDayOfMonth;
|
||||
|
||||
/**
|
||||
* 自动发放时间
|
||||
*/
|
||||
@ElogTransform(name = "自动发放时间")
|
||||
private String autoSendTimeOfDay;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform(name = "是否已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
|
|
@ -178,6 +209,7 @@ public class SalaryTemplatePO {
|
|||
/**
|
||||
* 工资单确认反馈状态
|
||||
*/
|
||||
@ElogTransform(name = "工资单确认反馈状态")
|
||||
private Integer ackFeedbackStatus;
|
||||
|
||||
/**
|
||||
|
|
@ -188,12 +220,14 @@ public class SalaryTemplatePO {
|
|||
/**
|
||||
* 自动确认超时天数
|
||||
*/
|
||||
@ElogTransform(name = "自动确认超时天数")
|
||||
private Integer autoAckDays;
|
||||
|
||||
/**
|
||||
* 反馈流程地址
|
||||
*
|
||||
*/
|
||||
@ElogTransform(name = "反馈流程地址")
|
||||
private String feedbackUrl;
|
||||
|
||||
|
||||
|
|
@ -201,6 +235,7 @@ public class SalaryTemplatePO {
|
|||
* 移动端反馈流程地址
|
||||
*
|
||||
*/
|
||||
@ElogTransform(name = "移动端反馈流程地址")
|
||||
private String mobileFeedbackUrl;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.entity.salaryacct.po;
|
||||
|
||||
import com.engine.salary.annotation.Encrypt;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,63 +23,75 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//value = "hrsa_salary_acct_result
|
||||
@ElogTransform( name="薪资核算结果" )
|
||||
public class SalaryAcctResultPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform( name="主键" )
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 薪资账套id
|
||||
*/
|
||||
@ElogTransform( name="薪资账套id" )
|
||||
private Long salarySobId;
|
||||
|
||||
/**
|
||||
* 薪资项目id
|
||||
*/
|
||||
@ElogTransform( name="薪资项目id" )
|
||||
private Long salaryItemId;
|
||||
|
||||
/**
|
||||
* 薪资核算的id
|
||||
*/
|
||||
@ElogTransform( name="薪资核算记录id" )
|
||||
private Long salaryAcctRecordId;
|
||||
|
||||
/**
|
||||
* 薪资核算人员id
|
||||
*/
|
||||
@ElogTransform( name="薪资核算人员id" )
|
||||
private Long salaryAcctEmpId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
@ElogTransform( name="人员id" )
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
@ElogTransform( name="个税扣缴义务人id" )
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 计算后的值
|
||||
*/
|
||||
@ElogTransform( name="计算后的值" )
|
||||
@Encrypt
|
||||
private String resultValue;
|
||||
|
||||
/**
|
||||
* 回算前的值
|
||||
*/
|
||||
@ElogTransform( name="回算前的值" )
|
||||
@Encrypt
|
||||
private String originResultValue;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
@ElogTransform( name="租户" )
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ElogTransform( name="创建人" )
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -89,11 +102,13 @@ public class SalaryAcctResultPO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform( name="创建时间" )
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform( name="更新时间" )
|
||||
private Date updateTime;
|
||||
|
||||
//条件
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.salaryarchive.bo;
|
|||
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustValidDTO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,6 +22,31 @@ public class SalaryArchiveItemBO {
|
|||
return "SalaryArchiveItemBO{}";
|
||||
}
|
||||
|
||||
public static List<SalaryArchiveItemPO> buildLogEntity(List<SalaryArchiveItemPO> salaryArchiveItemSaves) {
|
||||
List<SalaryArchiveItemPO> salaryArchiveItemSaveLogs = Lists.newArrayList();
|
||||
for (SalaryArchiveItemPO sai : salaryArchiveItemSaves) {
|
||||
// BeanUtils.copyProperties(sai, saiNew);性能差
|
||||
salaryArchiveItemSaveLogs.add(SalaryArchiveItemPO.builder()
|
||||
.id(sai.getId())
|
||||
.salaryArchiveId(sai.getSalaryArchiveId())
|
||||
.employeeId(sai.getEmployeeId())
|
||||
.effectiveTime(sai.getEffectiveTime())
|
||||
.adjustReason(sai.getAdjustReason())
|
||||
.salaryItemId(sai.getSalaryItemId())
|
||||
.itemValue(sai.getItemValue())
|
||||
.description(sai.getDescription())
|
||||
.operator(sai.getOperator())
|
||||
.operateTime(sai.getOperateTime())
|
||||
.createTime(sai.getCreateTime())
|
||||
.updateTime(sai.getUpdateTime())
|
||||
.creator(sai.getCreator())
|
||||
.deleteType(sai.getDeleteType())
|
||||
.tenantKey(sai.getTenantKey())
|
||||
.build());
|
||||
}
|
||||
return salaryArchiveItemSaveLogs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建薪资项目基础信息表单
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.entity.salaryarchive.po;
|
||||
|
||||
import com.engine.salary.annotation.Encrypt;
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,82 +23,98 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_salary_archive_item
|
||||
@ElogTransform( name="薪资档案调薪记录" )
|
||||
public class SalaryArchiveItemPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform( name = "主键" )
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 薪资档案表的主键id
|
||||
*/
|
||||
@ElogTransform( name = "薪资档案id" )
|
||||
private Long salaryArchiveId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
@ElogTransform( name = "人员id" )
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@ElogTransform( name = "生效时间" )
|
||||
private Date effectiveTime;
|
||||
|
||||
/**
|
||||
* 调整原因
|
||||
*/
|
||||
@ElogTransform( name = "调整原因" )
|
||||
private String adjustReason;
|
||||
|
||||
/**
|
||||
* 薪资项目表的主键id
|
||||
*/
|
||||
@ElogTransform( name = "薪资项目id" )
|
||||
private Long salaryItemId;
|
||||
|
||||
/**
|
||||
* 薪资项目值
|
||||
*/
|
||||
@ElogTransform( name = "薪资项目值" )
|
||||
@Encrypt
|
||||
private String itemValue;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ElogTransform( name = "备注" )
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
@ElogTransform( name = "操作人" )
|
||||
private Long operator;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ElogTransform( name = "操作时间" )
|
||||
private Date operateTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform( name = "创建时间" )
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform( name = "更新时间" )
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform( name = "创建人" )
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform( name = "是否已删除" )
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform( name = "租户" )
|
||||
private String tenantKey;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salaryarchive.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
|
||||
import com.engine.salary.enums.salaryarchive.SalaryArchiveAddTypeEnum;
|
||||
|
|
@ -27,27 +28,32 @@ import java.util.List;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_salary_archive
|
||||
@ElogTransform(name = "薪资档案")
|
||||
public class SalaryArchivePO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform(name = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
@ElogTransform(name = "人员id")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 起始发薪日期
|
||||
*/
|
||||
@ElogTransform(name = "起始发薪日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date payStartDate;
|
||||
|
||||
/**
|
||||
* 最后发薪日期
|
||||
*/
|
||||
@ElogTransform(name = "最后发薪日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date payEndDate;
|
||||
|
||||
|
|
@ -56,6 +62,7 @@ public class SalaryArchivePO {
|
|||
*
|
||||
* @see SalaryArchiveStatusEnum
|
||||
*/
|
||||
@ElogTransform(name = "档案状态")
|
||||
private String runStatus;
|
||||
|
||||
/**
|
||||
|
|
@ -63,6 +70,7 @@ public class SalaryArchivePO {
|
|||
*
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
|
||||
|
|
@ -71,6 +79,7 @@ public class SalaryArchivePO {
|
|||
*
|
||||
* @see SalaryArchiveAddTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "定薪类型")
|
||||
private Integer addType;
|
||||
|
||||
/**
|
||||
|
|
@ -78,21 +87,25 @@ public class SalaryArchivePO {
|
|||
*
|
||||
* @see
|
||||
*/
|
||||
@ElogTransform(name = "停薪类型")
|
||||
private Integer stopType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -103,11 +116,13 @@ public class SalaryArchivePO {
|
|||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户")
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@ElogTransform(name = "个税扣缴义务人id")
|
||||
private Long taxAgentId;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentRangeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -23,11 +24,13 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_manage_range
|
||||
@ElogTransform( name="个税扣缴义务人管理范围" )
|
||||
public class TaxAgentManageRangePO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform( name ="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -38,42 +41,51 @@ public class TaxAgentManageRangePO {
|
|||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@ElogTransform( name ="个税扣缴义务人id")
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 范围类型
|
||||
* @see TaxAgentRangeTypeEnum
|
||||
*/
|
||||
@ElogTransform( name ="范围类型")
|
||||
private Integer rangeType;
|
||||
|
||||
/**
|
||||
* 对象类型
|
||||
* @see TargetTypeEnum
|
||||
*/
|
||||
@ElogTransform( name ="对象类型")
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 对象id
|
||||
*/
|
||||
@ElogTransform( name ="对象id")
|
||||
private Long targetId;
|
||||
|
||||
/**
|
||||
* 人员状态
|
||||
*/
|
||||
@ElogTransform( name ="人员状态")
|
||||
private String employeeStatus;
|
||||
|
||||
/**
|
||||
* 是包含还是排除 0:排除、1:包含
|
||||
*/
|
||||
@ElogTransform( name ="是包含还是排除 0:排除、1:包含")
|
||||
private Integer includeType;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
@ElogTransform( name ="租户key")
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ElogTransform( name ="创建人id")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -84,11 +96,13 @@ public class TaxAgentManageRangePO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform( name ="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform( name ="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,26 +23,31 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
//hrsa_tax_agent")
|
||||
//个税扣缴义务人表")
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
public class TaxAgentPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ElogTransform(name = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 代缴机构
|
||||
*/
|
||||
// @ElogTransform(name = "代缴机构")
|
||||
private String paymentAgency;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ElogTransform(name = "备注")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
|
|
@ -52,6 +58,7 @@ public class TaxAgentPO {
|
|||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ElogTransform(name = "创建人id")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
|
|
@ -62,11 +69,13 @@ public class TaxAgentPO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.engine.salary.enums.salaryarchive;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 薪资档案状态
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
|
|
@ -32,4 +34,13 @@ public enum SalaryArchiveStatusEnum {
|
|||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
|
||||
public static SalaryArchiveStatusEnum parseByValue(String value) {
|
||||
for (SalaryArchiveStatusEnum salaryArchiveStatusEnum : SalaryArchiveStatusEnum.values()) {
|
||||
if (Objects.equals(salaryArchiveStatusEnum.getValue(), value)) {
|
||||
return salaryArchiveStatusEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,6 @@ public interface SpecialAddDeductionMapper {
|
|||
@Param("taxAgentId") Long taxAgentId);
|
||||
|
||||
List<SpecialAddDeductionPO> listAll();
|
||||
|
||||
List<SpecialAddDeductionPO> listSome(SpecialAddDeductionPO specialAddDeduction);
|
||||
}
|
||||
|
|
@ -690,4 +690,66 @@
|
|||
<include refid="Base_Column_List"/>
|
||||
from hrsa_special_add_deduction t1
|
||||
</select>
|
||||
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM hrsa_special_add_deduction t
|
||||
WHERE delete_type = 0
|
||||
<if test="childrenEducation != null">
|
||||
AND children_education = #{childrenEducation}
|
||||
</if>
|
||||
<if test="continuingEducation != null">
|
||||
AND continuing_education = #{continuingEducation}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="housingLoanInterest != null">
|
||||
AND housing_loan_interest = #{housingLoanInterest}
|
||||
</if>
|
||||
<if test="housingRent != null">
|
||||
AND housing_rent = #{housingRent}
|
||||
</if>
|
||||
<if test="infantCare != null">
|
||||
AND infant_care = #{infantCare}
|
||||
</if>
|
||||
<if test="seriousIllnessTreatment != null">
|
||||
AND serious_illness_treatment = #{seriousIllnessTreatment}
|
||||
</if>
|
||||
<if test="supportingElder != null">
|
||||
AND supporting_elder = #{supportingElder}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="employeeIds != null employeeIds ids.size()>0">
|
||||
AND employee_id IN
|
||||
<foreach collection="employeeIds" open="(" item="empId" separator="," close=")">
|
||||
#{empId}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -97,7 +97,8 @@
|
|||
send_total,
|
||||
last_send_time,
|
||||
send_status,
|
||||
salary_acct_type
|
||||
salary_acct_type,
|
||||
creator
|
||||
FROM hrsa_salary_send
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.report.entity.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import com.engine.salary.report.enums.UnitTypeEnum;
|
||||
import lombok.*;
|
||||
|
||||
|
|
@ -14,20 +15,25 @@ import java.util.Date;
|
|||
@ToString
|
||||
//hrsa_salary_statistics_item")
|
||||
//薪酬报表统计子表自定义统计项")
|
||||
@ElogTransform(name = "统计项目")
|
||||
public class SalaryStatisticsItemPO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5335849418826222822L;
|
||||
|
||||
//主键id")
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
//统计报表id")
|
||||
@ElogTransform(name = "报表id")
|
||||
private Long statReportId;
|
||||
|
||||
//统计项名称")
|
||||
@ElogTransform(name = "统计项名称")
|
||||
private String itemName;
|
||||
|
||||
//统计项集合")
|
||||
@ElogTransform(name = "统计项集合")
|
||||
private String itemValue;
|
||||
|
||||
/**
|
||||
|
|
@ -44,6 +50,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//计数规则")
|
||||
@ElogTransform(name = "计数规则")
|
||||
private String countRule;
|
||||
|
||||
/**
|
||||
|
|
@ -60,6 +67,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//求和规则")
|
||||
@ElogTransform(name = "求和规则")
|
||||
private String sumRule;
|
||||
|
||||
/**
|
||||
|
|
@ -76,6 +84,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//平均值规则")
|
||||
@ElogTransform(name = "平均值规则")
|
||||
private String avgRule;
|
||||
|
||||
/**
|
||||
|
|
@ -92,6 +101,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//最大值规则")
|
||||
@ElogTransform(name = "最大值规则")
|
||||
private String maxRule;
|
||||
|
||||
/**
|
||||
|
|
@ -108,6 +118,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//最小值规则")
|
||||
@ElogTransform(name = "最小值规则")
|
||||
private String minRule;
|
||||
|
||||
/**
|
||||
|
|
@ -124,6 +135,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* jsonToString
|
||||
*/
|
||||
//中位数规则")
|
||||
@ElogTransform(name = "中位数规则")
|
||||
private String medianRule;
|
||||
|
||||
|
||||
|
|
@ -132,6 +144,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* <p>
|
||||
* "totalValue":"1", 是否使用
|
||||
*/
|
||||
@ElogTransform(name = "最近值是否使用")
|
||||
private String lastRule;
|
||||
|
||||
/**
|
||||
|
|
@ -141,6 +154,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* "totalValue":"1", 是否使用
|
||||
* }
|
||||
*/
|
||||
@ElogTransform(name = "最早值是否使用")
|
||||
private String oldRule;
|
||||
|
||||
/**
|
||||
|
|
@ -150,6 +164,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* "totalValue":"1", 是否使用
|
||||
* }
|
||||
*/
|
||||
@ElogTransform(name = "出现最多是否使用")
|
||||
private String frequentRule;
|
||||
|
||||
/**
|
||||
|
|
@ -159,9 +174,11 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* "totalValue":"1", 是否使用
|
||||
* }
|
||||
*/
|
||||
@ElogTransform(name = "平铺是否使用")
|
||||
private String tileRule;
|
||||
|
||||
//顺序")
|
||||
@ElogTransform(name = "顺序")
|
||||
private Integer indexValue;
|
||||
|
||||
/**
|
||||
|
|
@ -170,6 +187,7 @@ public class SalaryStatisticsItemPO implements Serializable {
|
|||
* @see UnitTypeEnum
|
||||
*/
|
||||
//统计单位")
|
||||
@ElogTransform(name = "统计单位")
|
||||
private Integer unitType;
|
||||
|
||||
//创建时间")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.report.entity.po;
|
||||
|
||||
import com.engine.salary.elog.annotation.ElogTransform;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,77 +23,105 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_salary_stats_report
|
||||
@ElogTransform(name = "薪酬统计报表")
|
||||
public class SalaryStatisticsReportPO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6526480959578343197L;
|
||||
|
||||
//主键id
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
//报表名称
|
||||
@ElogTransform(name = "报表名称")
|
||||
private String reportName;
|
||||
|
||||
@ElogTransform(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ElogTransform(name = "二级维度")
|
||||
private String secondDimension;
|
||||
|
||||
@ElogTransform(name = "排序列")
|
||||
private String sortIndex;
|
||||
|
||||
@ElogTransform(name = "排序方式")
|
||||
private String sortType;
|
||||
|
||||
//时间类型
|
||||
@ElogTransform(name = "时间类型")
|
||||
private Integer timeType;
|
||||
|
||||
//统计维度
|
||||
@ElogTransform(name = "统计维度")
|
||||
private String dimension;
|
||||
|
||||
//薪资所属月-起始
|
||||
@ElogTransform(name = "薪资所属月-起始")
|
||||
private Date salaryStartMonth;
|
||||
|
||||
//薪资所属月-截止
|
||||
@ElogTransform(name = "薪资所属月-截止")
|
||||
private Date salaryEndMonth;
|
||||
|
||||
//个税扣缴义务人配置
|
||||
@ElogTransform(name = "个税扣缴义务人配置")
|
||||
private String taxAgentSetting;
|
||||
|
||||
//收入所得项目配置
|
||||
@ElogTransform(name = "收入所得项目配置")
|
||||
private String incomeCategorySetting;
|
||||
|
||||
//分部配置
|
||||
@ElogTransform(name = "分部配置")
|
||||
private String subCompanySetting;
|
||||
|
||||
//部门配置
|
||||
@ElogTransform(name = "部门配置")
|
||||
private String departSetting;
|
||||
|
||||
//职级配置
|
||||
@ElogTransform(name = "职级配置")
|
||||
private String gradeSetting;
|
||||
|
||||
//岗位配置
|
||||
@ElogTransform(name = "岗位配置")
|
||||
private String positionSetting;
|
||||
|
||||
//人员状态配置
|
||||
@ElogTransform(name = "人员状态配置")
|
||||
private String statusSetting;
|
||||
|
||||
//人员配置
|
||||
@ElogTransform(name = "人员配置")
|
||||
private String employeeSetting;
|
||||
|
||||
//入职日期配置
|
||||
@ElogTransform(name = "入职日期配置")
|
||||
private String hiredateSetting;
|
||||
|
||||
//离职日期配置
|
||||
@ElogTransform(name = "离职日期配置")
|
||||
private String leavedateSetting;
|
||||
|
||||
//租户key
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
|
||||
//创建人id
|
||||
@ElogTransform(name = "创建人id", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
//是否删除
|
||||
@ElogTransform(name = "是否删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
//创建时间
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
//更新时间
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package com.engine.salary.report.service.impl;
|
||||
|
||||
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.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.report.SalaryStatisticsItemMapper;
|
||||
|
|
@ -12,10 +15,11 @@ import com.engine.salary.report.service.SalaryStatisticsItemService;
|
|||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -66,15 +70,17 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt
|
|||
List<SalaryStatisticsItemPO> list = this.listByIds(ids);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
getSalaryStatisticsItemMapper().deleteByIds(ids);
|
||||
// list.forEach(po -> {
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(po.getId()));
|
||||
// loggerContext.setTargetName(po.getItemName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152639, "删除统计项目"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152639, "删除统计项目"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
// });
|
||||
list.forEach(po -> {
|
||||
LoggerContext<SalaryStatisticsItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(po.getId()));
|
||||
loggerContext.setTargetName(po.getItemName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除统计项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除统计项目"));
|
||||
loggerContext.setOldValues(po);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -130,19 +136,24 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt
|
|||
getSalaryStatisticsItemMapper().insertIgnoreNull(subTableItemPO);
|
||||
|
||||
// 记录操作日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(subTableItemPO.getId()));
|
||||
// loggerContext.setTargetName(subTableItemPO.getItemName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152643, "新增统计项目"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152643, "新增统计项目"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalaryStatisticsItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(subTableItemPO.getId()));
|
||||
loggerContext.setTargetName(subTableItemPO.getItemName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增统计项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增统计项目"));
|
||||
loggerContext.setNewValues(subTableItemPO);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
// 更新
|
||||
} else {
|
||||
SalaryStatisticsItemPO itemPO = this.getById(saveParam.getId());
|
||||
SalaryAssert.notNull(itemPO, SalaryI18nUtil.getI18nLabel(152591, "统计项目不存在"));
|
||||
Optional.ofNullable(saveParam.getItemName()).ifPresent(itemPO::setItemName);
|
||||
|
||||
SalaryStatisticsItemPO oldPO = new SalaryStatisticsItemPO();
|
||||
BeanUtils.copyProperties(itemPO, oldPO);
|
||||
|
||||
if (Objects.nonNull(saveParam.getUnitType())) {
|
||||
itemPO.setUnitType(saveParam.getUnitType());
|
||||
} else {
|
||||
|
|
@ -162,13 +173,16 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt
|
|||
getSalaryStatisticsItemMapper().updateIgnoreNull(itemPO);
|
||||
|
||||
// 记录操作日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(itemPO.getId()));
|
||||
// loggerContext.setTargetName(itemPO.getItemName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152669, "更新统计项目"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152669, "更新统计项目"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalaryStatisticsItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(itemPO.getId().toString());
|
||||
loggerContext.setTargetName(itemPO.getItemName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增统计项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增统计项目"));
|
||||
loggerContext.setOldValues(oldPO);
|
||||
loggerContext.setNewValues(itemPO);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.cache.SalaryCacheKey;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.dto.EmployeeInfoExpandDTO;
|
||||
import com.engine.salary.entity.hrm.dto.FieldSetting;
|
||||
|
|
@ -13,6 +15,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
|||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.report.SalaryStatisticsReportMapper;
|
||||
import com.engine.salary.report.common.constant.SalaryConstant;
|
||||
|
|
@ -31,13 +34,13 @@ import com.engine.salary.report.util.ReportTimeUtil;
|
|||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
|
@ -194,13 +197,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
this.getSalaryStatisticsReportMapper().updateIgnoreNull(poNew);
|
||||
|
||||
// 记录日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(poNew.getId()));
|
||||
// loggerContext.setTargetName(poNew.getReportName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 152565, "更新报表"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 152565, "更新报表"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(poNew.getId()));
|
||||
loggerContext.setTargetName(poNew.getReportName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
|
||||
loggerContext.setOldValues(po);
|
||||
loggerContext.setNewValues(poNew);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
} else {
|
||||
List<SalaryStatisticsReportPO> list = listByName(saveParam.getReportName());
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
|
|
@ -211,13 +217,15 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
getSalaryStatisticsReportMapper().insertIgnoreNull(poNew);
|
||||
|
||||
// 记录日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(poNew.getId()));
|
||||
// loggerContext.setTargetName(poNew.getReportName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 152561, "新增报表"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 152561, "新增报表"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(poNew.getId()));
|
||||
loggerContext.setTargetName(poNew.getReportName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
|
||||
loggerContext.setNewValues(poNew);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -233,6 +241,8 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
}
|
||||
|
||||
SalaryStatisticsReportPO po = getById(param.getId());
|
||||
SalaryStatisticsReportPO oldPO = new SalaryStatisticsReportPO();
|
||||
BeanUtils.copyProperties(po, oldPO);
|
||||
SalaryAssert.notNull(po, SalaryI18nUtil.getI18nLabel(152563, "报表不存在"));
|
||||
po.setSalaryStartMonth(param.getSalaryStartMonth());
|
||||
po.setSalaryEndMonth(param.getSalaryEndMonth());
|
||||
|
|
@ -286,13 +296,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
getSalaryStatisticsItemService(user).saveOrUpdateBatch(salaryStatisticsItemList);
|
||||
|
||||
//记录日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(po.getId()));
|
||||
// loggerContext.setTargetName(po.getReportName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(// 152565, "更新报表"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(// 152565, "更新报表"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(po.getId()));
|
||||
loggerContext.setTargetName(po.getReportName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
|
||||
loggerContext.setOldValues(oldPO);
|
||||
loggerContext.setNewValues(po);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
|
|
@ -311,16 +324,17 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
getSalaryStatisticsReportMapper().deleteByIds(deleteIds);
|
||||
//删除薪资项
|
||||
getSalaryStatisticsItemService(user).deleteByReportIds(deleteIds);
|
||||
// list.forEach(e -> {
|
||||
// // 记录日志
|
||||
// LoggerContext<SubTablePO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(e.getId()));
|
||||
// loggerContext.setTargetName(e.getReportName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 153162, "删除报表"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 153162, "删除报表"));
|
||||
// salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
// });
|
||||
list.forEach(e -> {
|
||||
// 记录日志
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(e.getId()));
|
||||
loggerContext.setTargetName(e.getReportName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "删除报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "删除报表") + e.getReportName());
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>(2);
|
||||
|
|
@ -366,6 +380,17 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
return item;
|
||||
}).collect(Collectors.toList());
|
||||
getSalaryStatisticsItemService(user).saveOrUpdateBatch(itemList);
|
||||
|
||||
// 记录日志
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(po.getId()));
|
||||
loggerContext.setTargetName(po.getReportName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
|
||||
loggerContext.setNewValues(po);
|
||||
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.service;
|
|||
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuotePO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
||||
import java.time.YearMonth;
|
||||
|
|
@ -35,4 +36,6 @@ public interface AttendQuoteService {
|
|||
*/
|
||||
Boolean checkOperation(YearMonth salaryYearMonth, Long salarySobId);
|
||||
|
||||
AttendQuotePO getById(Long id);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public interface SalaryItemService {
|
|||
*
|
||||
* @param saveParam 保存参数
|
||||
*/
|
||||
void save(SalaryItemSaveParam saveParam);
|
||||
SalaryItemPO save(SalaryItemSaveParam saveParam);
|
||||
|
||||
/**
|
||||
* 批量保存
|
||||
|
|
@ -113,7 +113,7 @@ public interface SalaryItemService {
|
|||
*
|
||||
* @param saveParam 更新参数
|
||||
*/
|
||||
void update(SalaryItemSaveParam saveParam);
|
||||
SalaryItemPO update(SalaryItemSaveParam saveParam);
|
||||
|
||||
/**
|
||||
* 根据主键id删除薪资项目
|
||||
|
|
|
|||
|
|
@ -392,7 +392,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
apidatas.put("errorData", errorData);
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
}
|
||||
|
|
@ -439,19 +438,31 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
addUpDeductionBiz.batchSave(saveList);
|
||||
}
|
||||
// 记录操作日志
|
||||
saveList.addAll(updateList);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
// 记录操作日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = saveList.stream().map(AddUpDeduction::getEmployeeId).collect(Collectors.toList());
|
||||
List<AddUpDeduction> insertList = addUpDeductionBiz.listSome(AddUpDeduction.builder().declareMonth(po.getDeclareMonth()).employeeIds(empIds).build());
|
||||
Map<String, AddUpDeduction> insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId());
|
||||
saveList.forEach(save -> {
|
||||
AddUpDeduction addUpDeduction = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId());
|
||||
if (addUpDeduction != null) {
|
||||
updateList.add(addUpDeduction);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
String formatYearMonth = SalaryDateUtil.getFormatYearMonth(po.getDeclareMonth());
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "累计专项附加扣除 ") + formatYearMonth);
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setNewValueList(saveList);
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入累计专项附加扣除 ") + formatYearMonth);
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -484,9 +495,24 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
}
|
||||
}
|
||||
ArrayList<AddUpDeduction> updateList = new ArrayList<>();
|
||||
AddUpDeduction build = AddUpDeduction.builder().id(addUpDeduction.getId()).addUpChildEducation(addUpDeduction.getAddUpChildEducation()).addUpContinuingEducation(addUpDeduction.getAddUpContinuingEducation()).addUpHousingLoanInterest(addUpDeduction.getAddUpHousingLoanInterest()).addUpHousingRent(addUpDeduction.getAddUpHousingRent()).addUpSupportElderly(addUpDeduction.getAddUpSupportElderly()).addUpIllnessMedical(addUpDeduction.getAddUpIllnessMedical()).addUpInfantCare(addUpDeduction.getAddUpInfantCare()).build();
|
||||
AddUpDeduction build = AddUpDeduction.builder().id(addUpDeduction.getId()).addUpChildEducation(addUpDeduction.getAddUpChildEducation()).addUpContinuingEducation(addUpDeduction.getAddUpContinuingEducation()).addUpHousingLoanInterest(addUpDeduction.getAddUpHousingLoanInterest()).addUpHousingRent(addUpDeduction.getAddUpHousingRent()).addUpSupportElderly(addUpDeduction.getAddUpSupportElderly()).addUpIllnessMedical(addUpDeduction.getAddUpIllnessMedical()).addUpInfantCare(addUpDeduction.getAddUpInfantCare()).createTime(new Date()).build();
|
||||
updateList.add(build);
|
||||
addUpDeductionBiz.batchUpdate(updateList);
|
||||
|
||||
// 记录日志
|
||||
AddUpDeduction newValue = addUpDeductionBiz.getById(build.getId());
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "编辑");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(addUpDeduction.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + addUpDeduction.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "编辑"));
|
||||
loggerContext.setOldValues(byId);
|
||||
loggerContext.setNewValues(newValue);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -589,6 +615,19 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
handleImportData(insertData);
|
||||
}
|
||||
|
||||
private void addLogger4Insert(Integer currentEmployeeId, AddUpDeduction addUpDeduction, String targetName) {
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "新增") + SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(addUpDeduction.getId().toString());
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(name);
|
||||
loggerContext.setNewValues(addUpDeduction);
|
||||
loggerContext.setOperator(currentEmployeeId.toString());
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSelectAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
|
|
@ -602,9 +641,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeDataByTaxYearMonth(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
ArrayList<AddUpDeduction> oldAddUpDeductions = new ArrayList<>();
|
||||
for (int i = 0; i < deleteIds.size(); i++) {
|
||||
Long id = deleteIds.get(i);
|
||||
AddUpDeduction byId = addUpDeductionBiz.getById(id);
|
||||
|
||||
if (byId == null) {
|
||||
throw new SalaryRunTimeException("数据不存在或已被删除!");
|
||||
}
|
||||
|
|
@ -621,8 +662,25 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
oldAddUpDeductions.add(byId);
|
||||
}
|
||||
addUpDeductionBiz.batchDeleteByIDS(deleteList);
|
||||
|
||||
//记录日志
|
||||
if (CollectionUtils.isNotEmpty(oldAddUpDeductions)) {
|
||||
oldAddUpDeductions.stream().forEach( e -> {
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(e.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + e.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOldValues(e);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -668,6 +726,20 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
}
|
||||
List<Long> deleteIds = list.stream().map(AddUpDeductionDTO::getId).collect(Collectors.toList());
|
||||
addUpDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
|
||||
// 记录日志
|
||||
Collection<Long> finalTaxAgentIds = queryParam.getTaxAgentIds();
|
||||
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId()))
|
||||
.map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ",");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "一键清空:") + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -788,6 +860,31 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
.forEach(l -> getAddUpDeductionMapper().insertData((List<AddUpDeduction>) l));
|
||||
Lists.partition(updateList, 100)
|
||||
.forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List<AddUpDeduction>) l));
|
||||
|
||||
// 记录日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = insertList.stream().map(AddUpDeduction::getEmployeeId).collect(Collectors.toList());
|
||||
List<AddUpDeduction> insertLogList = getAddUpDeductionMapper().listSome(AddUpDeduction.builder().declareMonth(yearMonth).employeeIds(empIds).build());
|
||||
Map<String, AddUpDeduction> insertMap = SalaryEntityUtil.convert2Map(insertLogList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId());
|
||||
insertList.forEach(save -> {
|
||||
AddUpDeduction addUpDeduction = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId());
|
||||
if (addUpDeduction != null) {
|
||||
updateList.add(addUpDeduction);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
String yearMonthStr = SalaryDateUtil.getFormatYearMonth(yearMonth);
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+yearMonthStr));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键累计专项附加扣除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+ yearMonthStr +" 专项附加扣除"));
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
if (!errorMessages.isEmpty()) {
|
||||
String userNames = getSalaryEmployeeService(user)
|
||||
.getEmployeeByIdsAll(errorMessages)
|
||||
|
|
@ -980,6 +1077,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowDetailList(isChief, queryParam);
|
||||
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除明细");
|
||||
}
|
||||
|
|
@ -1149,6 +1247,16 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(isChief, queryParam);
|
||||
|
||||
// 记录日志
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "导出");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,10 +259,20 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
|
||||
@Override
|
||||
public XSSFWorkbook export(AddUpSituationQueryParam queryParam) {
|
||||
//获取操作按钮资源
|
||||
// 获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(queryParam);
|
||||
|
||||
//获取excel
|
||||
// 记录日志
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "导出");
|
||||
LoggerContext<AddUpSituation> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext);
|
||||
|
||||
// 获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计情况");
|
||||
}
|
||||
|
||||
|
|
@ -870,17 +880,27 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
batchSave(saveList);
|
||||
}
|
||||
// 记录操作日志
|
||||
saveList.addAll(updateList);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
// 记录操作日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = saveList.stream().map(AddUpSituation::getEmployeeId).collect(Collectors.toList());
|
||||
List<AddUpSituation> insertList = biz.listSome(AddUpSituation.builder().taxYearMonth(po.getTaxYearMonth()).employeeIds(empIds).build());
|
||||
Map<String, AddUpSituation> insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getTaxYearMonth()) + "-" + p.getEmployeeId());
|
||||
saveList.forEach(save -> {
|
||||
AddUpSituation addUpSituation = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getTaxYearMonth()) + "-" + save.getEmployeeId());
|
||||
if (addUpSituation != null) {
|
||||
updateList.add(addUpSituation);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除"));
|
||||
loggerContext.setNewValueList(saveList);
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入往期累计情况"));
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
|
@ -958,6 +978,21 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
.build();
|
||||
updateList.add(build);
|
||||
biz.batchUpdate(updateList);
|
||||
|
||||
// 记录日志
|
||||
AddUpSituation newValue = biz.getById(build.getId());
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "编辑");
|
||||
LoggerContext<AddUpSituation> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(newValue.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + newValue.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "编辑"));
|
||||
loggerContext.setOldValues(byId);
|
||||
loggerContext.setNewValues(newValue);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1112,6 +1147,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
String format = salaryMonthDate.atStartOfDay().format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(format);
|
||||
// 判断是否有核算过
|
||||
List<AddUpSituation> deletePOList = new ArrayList<>();
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
for (int i = 0; i < deleteIds.size(); i++) {
|
||||
Long id = deleteIds.get(i);
|
||||
|
|
@ -1132,8 +1168,23 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
deletePOList.add(byId);
|
||||
}
|
||||
biz.batchDeleteByIDS(deleteList);
|
||||
|
||||
// 记录日志
|
||||
deletePOList.stream().forEach(po -> {
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(po.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + po.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOldValues(po);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -1183,6 +1234,20 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
}
|
||||
List<Long> deleteIds = list.stream().map(AddUpSituation::getId).collect(Collectors.toList());
|
||||
biz.batchDeleteByIDS(deleteIds);
|
||||
|
||||
// 记录日志
|
||||
Collection<Long> finalTaxAgentIds = queryParam.getTaxAgentIds();
|
||||
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId()))
|
||||
.map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ",");
|
||||
LoggerContext<AddUpSituation> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "一键清空:") + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -8,9 +8,14 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.salary.biz.AttendQuoteBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataValueBiz;
|
||||
import com.engine.salary.biz.AttendQuoteFieldBiz;
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.bo.AttendQuoteDataBO;
|
||||
import com.engine.salary.entity.datacollection.dto.*;
|
||||
|
|
@ -24,6 +29,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
|||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -34,10 +40,7 @@ import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
|||
import com.engine.salary.remote.attend.entity.Attend4Salary;
|
||||
import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService;
|
||||
import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl;
|
||||
import com.engine.salary.service.AttendQuoteDataService;
|
||||
import com.engine.salary.service.AttendQuoteFieldSettingService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.SalarySobService;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
|
|
@ -45,6 +48,7 @@ import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
|
|
@ -55,7 +59,6 @@ import com.engine.salary.util.valid.ValidUtil;
|
|||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -104,6 +107,10 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private AttendQuoteService getAttendQuoteService(User user) {
|
||||
return ServiceUtil.getService(AttendQuoteServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private AttendQuoteDataMapper getAttendQuoteDataMapper() {
|
||||
return MapperProxyFactory.getProxy(AttendQuoteDataMapper.class);
|
||||
}
|
||||
|
|
@ -265,6 +272,20 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
}
|
||||
rows.add(row);
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
AttendQuotePO attendQuotePO = getAttendQuoteService(user).getById(queryParam.getAttendQuoteId());
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(attendQuotePO.getSalarySobId());
|
||||
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(attendQuotePO.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuotePO.getSalaryYearMonth()) + " " + (salarySob != null ? salarySob.getName() : ""));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导出考勤数据"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "考勤数据"));
|
||||
SalaryElogConfig.attendQuoteLoggerTemplate.write(loggerContext);
|
||||
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
|
||||
}
|
||||
|
|
@ -370,15 +391,30 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
|
||||
// 6.数据落库处理
|
||||
handleDataToDB(attendQuote.getId(), pos, values);
|
||||
// 记录日志
|
||||
recordLog(attendQuote);
|
||||
} else {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100368, "暂无考勤数据可以同步"));
|
||||
}
|
||||
|
||||
// todo 记录日志
|
||||
// recordLog(attendQuote, currentEmployeeId, currentTenantKey, null);
|
||||
return null;
|
||||
}
|
||||
|
||||
private void recordLog(AttendQuotePO attendQuote) {
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(attendQuote.getSalarySobId());
|
||||
String sourceType = AttendQuoteSourceTypeEnum.getDefaultLabelByValue(attendQuote.getSourceType());
|
||||
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(attendQuote.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuote.getSalaryYearMonth()) + " " + (salarySob != null ? salarySob.getName() : ""));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(sourceType + SalaryI18nUtil.getI18nLabel(0, "考勤数据"));
|
||||
loggerContext.setOperatedesc(sourceType + SalaryI18nUtil.getI18nLabel(0, "考勤数据"));
|
||||
loggerContext.setNewValues(attendQuote);
|
||||
SalaryElogConfig.attendQuoteLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取考勤引用
|
||||
*
|
||||
|
|
@ -769,8 +805,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
handleDataToDB(attendQuote.getId(), pos, values);
|
||||
|
||||
|
||||
// todo 记录日志
|
||||
// recordLog(attendQuote, message.getUserId(), message.getTenantKey(), message.getClientIp());
|
||||
// 记录日志
|
||||
recordLog(attendQuote);
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
apidatas.put("successCount", successCount);
|
||||
|
|
@ -882,35 +918,6 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
return bigDecimalVal == null ? "" : bigDecimalVal.toString();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 记录日志
|
||||
// * @param attendQuote
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @param clientIp
|
||||
// */
|
||||
// private void recordLog(AttendQuotePO attendQuote, Long currentEmployeeId, String currentTenantKey, String clientIp) {
|
||||
// List<SalarySobPO> salarySobs = new LambdaQueryChainWrapper<>(getSalarySobMapper())
|
||||
// .eq(SalarySobPO::getTenantKey, TenantContext.getCurrentTenantKey())
|
||||
// .eq(SalarySobPO::getDeleteType, 0)
|
||||
// .eq(SalarySobPO::getId, attendQuote.getSalarySobId())
|
||||
// .list();
|
||||
// String sourceType = AttendQuoteSourceTypeEnum.getDefaultLabelByValue(attendQuote.getSourceType(), currentEmployeeId, currentTenantKey);
|
||||
//
|
||||
// LoggerContext loggerContext = new LoggerContext();
|
||||
// loggerContext.setTargetId(String.valueOf(attendQuote.getId()));
|
||||
// loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuote.getSalaryYearMonth())+" "+(CollectionUtils.isNotEmpty(salarySobs)?salarySobs.get(0).getName():""));
|
||||
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// loggerContext.setOperateTypeName(sourceType+SalaryI18nUtil.getI18nLabel(93931, "考勤数据"));
|
||||
// loggerContext.setOperatedesc(sourceType+SalaryI18nUtil.getI18nLabel( 93931, "考勤数据"));
|
||||
// loggerContext.setNewValues(attendQuote);
|
||||
// loggerContext.setTenant_key(currentTenantKey);
|
||||
// loggerContext.setOperator(currentEmployeeId.toString());
|
||||
// if (StringUtils.isNotEmpty(clientIp)) {
|
||||
// loggerContext.setClientIp(clientIp);
|
||||
// }
|
||||
// attendQuoteLoggerTemplate.write(loggerContext);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 检查参数
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.AttendQuoteFieldBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldSaveParam;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.datacollection.AttendQuoteFieldSourceTypeEnum;
|
||||
import com.engine.salary.enums.datacollection.AttendQuoteFieldTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -16,6 +19,7 @@ import com.engine.salary.mapper.datacollection.AttendQuoteFieldMapper;
|
|||
import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService;
|
||||
import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl;
|
||||
import com.engine.salary.service.AttendQuoteFieldService;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -142,6 +146,17 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
|||
// 保存
|
||||
biz.save(attendQuoteField);
|
||||
|
||||
// 记录日志
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(attendQuoteField.getId()));
|
||||
loggerContext.setTargetName(attendQuoteField.getFieldName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建自定义字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建自定义字段"));
|
||||
loggerContext.setNewValues(attendQuoteField);
|
||||
SalaryElogConfig.attendQuoteFieldLoggerTemplate.write(loggerContext);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -222,6 +237,18 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
|||
newAttendQuoteField.setUpdateTime(new Date());
|
||||
// 更新
|
||||
biz.update(newAttendQuoteField);
|
||||
|
||||
// 记录日志
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(attendQuoteField.getId()));
|
||||
loggerContext.setTargetName(attendQuoteField.getFieldName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "启用/停用自定义字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "启用/停用自定义字段"));
|
||||
loggerContext.setOldValues(attendQuoteField);
|
||||
loggerContext.setNewValues(newAttendQuoteField);
|
||||
SalaryElogConfig.attendQuoteFieldLoggerTemplate.write(loggerContext);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.biz.AttendQuoteBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataValueBiz;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuoteDataPO;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuotePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
|
|
@ -20,6 +22,8 @@ import com.engine.salary.service.SalarySobService;
|
|||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -130,17 +134,18 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic
|
|||
dataValueBiz.deleteByAttendQuoteDataIds(attendQuoteDataIds);
|
||||
}
|
||||
|
||||
//todo 日志
|
||||
// attendQuotes.forEach(e -> {
|
||||
// SalaryLoggerUtil.recordDeleteSingleLog(attendQuoteLoggerTemplate,
|
||||
// e.getId(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 85367, "考勤引用"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100412, "删除考勤引用"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100412, "删除考勤引用") +
|
||||
// ":[" + SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 87614, "薪资所属月") + ":" + e.getSalaryYearMonth() + "," +
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 87615, "关联账套") + ":" + e.getSalarySobName() + "]",
|
||||
// e);
|
||||
// });
|
||||
// 记录日志
|
||||
attendQuotes.forEach(e -> {
|
||||
SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.attendQuoteLoggerTemplate,
|
||||
e.getId(),
|
||||
SalaryI18nUtil.getI18nLabel(0, SalaryDateUtil.getFormatYearMonth(e.getSalaryYearMonth()) + " " + e.getSalarySobName()),
|
||||
SalaryI18nUtil.getI18nLabel(0, "删除考勤引用"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "删除考勤引用") +
|
||||
":[" + SalaryI18nUtil.getI18nLabel(0, "薪资所属月") + ":" + e.getSalaryYearMonth() + "," +
|
||||
SalaryI18nUtil.getI18nLabel(0, "关联账套") + ":" + e.getSalarySobName() + "]",
|
||||
e,
|
||||
user);
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -161,5 +166,11 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic
|
|||
return isEnableOperation.get();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AttendQuotePO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return getAttendQuoteMapper().getById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ 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.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
|
|
@ -361,7 +362,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
//入库
|
||||
OtherDeductionBiz.handleImportData(eligibleData);
|
||||
OtherDeductionBiz.handleImportData(eligibleData, user);
|
||||
|
||||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
|
|
@ -418,18 +419,27 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
otherDeductionBiz.batchSave(saveList);
|
||||
}
|
||||
// 记录操作日志
|
||||
saveList.addAll(updateList);
|
||||
// 记录日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = saveList.stream().map(OtherDeductionPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<OtherDeductionPO> insertList = otherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(po.getDeclareMonth()).employeeIds(empIds).build());
|
||||
Map<String, OtherDeductionPO> insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId());
|
||||
saveList.forEach(save -> {
|
||||
OtherDeductionPO otherDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId());
|
||||
if (otherDeductionPO != null) {
|
||||
updateList.add(otherDeductionPO);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
if (CollectionUtils.isNotEmpty(updateList)) {
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除"));
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "其他免税扣除"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增计专项附加扣除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除"));
|
||||
loggerContext.setNewValueList(saveList);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增其他免税扣除"));
|
||||
loggerContext.setNewValueList(updateList);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -461,6 +471,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(param);
|
||||
|
||||
// 记录日志
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "导出");
|
||||
LoggerContext<OtherDeductionPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "其他免税扣除");
|
||||
}
|
||||
|
|
@ -655,6 +675,21 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
.build();
|
||||
updateList.add(build);
|
||||
OtherDeductionBiz.batchUpdate(updateList);
|
||||
|
||||
// 记录日志
|
||||
OtherDeductionPO newValue = OtherDeductionBiz.getById(build.getId());
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "编辑");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(newValue.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + newValue.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "编辑"));
|
||||
loggerContext.setOldValues(byId);
|
||||
loggerContext.setNewValues(newValue);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -755,6 +790,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
List<OtherDeductionPO> resultList = new ArrayList<>();
|
||||
for (int i = 0; i < deleteIds.size(); i++) {
|
||||
Long id = deleteIds.get(i);
|
||||
OtherDeductionPO byId = otherDeductionBiz.getById(id);
|
||||
|
|
@ -774,8 +810,22 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
resultList.add(byId);
|
||||
}
|
||||
otherDeductionBiz.batchDeleteByIDS(deleteList);
|
||||
// 记录日志
|
||||
resultList.stream().forEach(r -> {
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(r.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + r.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOldValues(r);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -822,6 +872,20 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
List<Long> deleteIds = list.stream().map(OtherDeductionPO::getId).collect(Collectors.toList());
|
||||
otherDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
|
||||
// 记录日志
|
||||
Collection<Long> finalTaxAgentIds = queryParam.getTaxAgentIds();
|
||||
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId()))
|
||||
.map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ",");
|
||||
LoggerContext<OtherDeductionPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "一键清空:") + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -906,6 +970,31 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
|
||||
getOtherDeductionBiz().batchSave(insertInfo);
|
||||
getOtherDeductionBiz().batchUpdate(updatetInfo);
|
||||
|
||||
//记录日志
|
||||
// 根据月份、人员id查出保存的数据
|
||||
List<Long> empIds = insertInfo.stream().map(OtherDeductionPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<OtherDeductionPO> insertList = getOtherDeductionBiz().listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.stringToDate(param.getDeclareMonth())).employeeIds(empIds).build());
|
||||
Map<String, OtherDeductionPO> insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId());
|
||||
insertList.forEach(save -> {
|
||||
OtherDeductionPO otherDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId());
|
||||
if (otherDeductionPO != null) {
|
||||
updatetInfo.add(otherDeductionPO);
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtils.isNotEmpty(updatetInfo)) {
|
||||
String yearMonthStr = SalaryDateUtil.getFormatYearMonth(lastMonth.toLocalDate()) ;
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+yearMonthStr));
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "沿用上月其他免税扣除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+ yearMonthStr +" 其他免税扣除"));
|
||||
loggerContext.setNewValueList(updatetInfo);
|
||||
SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,7 @@ import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
|||
import com.engine.salary.sys.enums.OpenEnum;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
|
|
@ -64,6 +61,7 @@ import org.apache.commons.lang3.math.NumberUtils;
|
|||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -156,6 +154,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
public XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId());
|
||||
if (salaryAcctRecordPO == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"薪资核算记录不存在或已被删除"));
|
||||
}
|
||||
// 1.工作簿名称
|
||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "核算人员范围");
|
||||
// 2.表头
|
||||
|
|
@ -180,6 +182,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// 3.表数据
|
||||
List<List<Object>> lists = convert2ExcelRow(salaryAcctEmployees);
|
||||
rows.addAll(lists);
|
||||
|
||||
// 记录日志
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
|
||||
String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth());
|
||||
SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate,
|
||||
queryParam.getSalaryAcctRecordId(),
|
||||
targetName,
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算人员"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算人员") + ":" + targetName,
|
||||
user
|
||||
);
|
||||
|
||||
// return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
|
@ -188,6 +202,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
@Override
|
||||
public XSSFWorkbook exportReducedEmployee(SalaryAcctEmployeeQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId());
|
||||
if (salaryAcctRecordPO == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "薪资核算记录不存在或已被删除"));
|
||||
}
|
||||
|
||||
// 1.工作簿名称
|
||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "环比上月减少人员");
|
||||
|
|
@ -213,6 +231,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// 3.表数据
|
||||
List<List<Object>> lists = convert2ExcelRow(salaryAcctEmployees);
|
||||
rows.addAll(lists);
|
||||
|
||||
// 记录日志
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
|
||||
String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth());
|
||||
SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate,
|
||||
queryParam.getSalaryAcctRecordId(),
|
||||
targetName,
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出环比上月减少人员"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出环比上月减少人员") + ":" + targetName,
|
||||
user
|
||||
);
|
||||
|
||||
// return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
|
@ -384,6 +414,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
rows.add(row);
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
|
||||
String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth());
|
||||
SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate,
|
||||
queryParam.getSalaryAcctRecordId(),
|
||||
targetName,
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果") + ":" + targetName,
|
||||
user
|
||||
);
|
||||
|
||||
|
||||
String sheetName = "薪资核算结果";
|
||||
// return ExcelUtil.genWorkbookV2(rows, sheetName, total);
|
||||
return ExcelUtilPlus.genWorkbookWithChildTitleColumnWithExcelFormat(rows, sheetName, total);
|
||||
|
|
@ -790,6 +832,17 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
rows.add(row);
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
|
||||
String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth());
|
||||
SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate,
|
||||
queryParam.getSalaryAcctRecordId(),
|
||||
targetName,
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出线下对比结果"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "导出线下对比结果") + ":" + targetName,
|
||||
user
|
||||
);
|
||||
|
||||
String sheetName = "线下对比结果";
|
||||
|
||||
// return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
|
|
@ -1287,7 +1340,28 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
if (CollectionUtils.isNotEmpty(salaryAcctResults)) {
|
||||
// 处理导入薪资项的回算值
|
||||
handleOriginResultValue(deleteResults, salaryAcctResults);
|
||||
// 备份一份加密前的值
|
||||
List<SalaryAcctResultPO> list4log = new ArrayList<>();
|
||||
salaryAcctResults.stream().forEach(source -> {
|
||||
SalaryAcctResultPO target = new SalaryAcctResultPO();
|
||||
BeanUtils.copyProperties(source,target);
|
||||
list4log.add(target);
|
||||
});
|
||||
getSalaryAcctResultService(user).batchSave(salaryAcctResults);
|
||||
|
||||
// 记录操作日志 TODO 这里的数据没有id,id是自增的重新查数据太多效率太低
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
|
||||
String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth());
|
||||
LoggerContext loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(param.getSalaryAcctRecordId().toString());
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据 ") + targetName);
|
||||
loggerContext.setOldValueList(list4log);
|
||||
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
|
||||
|
||||
// 存储薪资核算结果数据来源日志
|
||||
new Thread() {
|
||||
public void run() {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package com.engine.salary.service.impl;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryarchive.bo.SalaryArchiveExcelBO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveInitImportDTO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveListDTO;
|
||||
|
|
@ -29,6 +31,7 @@ import com.engine.salary.sys.service.SalarySysConfService;
|
|||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelComment;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
|
|
@ -823,7 +826,8 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
List<TaxAgentRangeSaveParam> taxAgentRanges = importHandleParam.getTaxAgentRanges();
|
||||
List<SalarySobRangeSaveParam> salaryArchiveSobSaves = importHandleParam.getSalaryArchiveSobSaves();
|
||||
|
||||
|
||||
Map<Long, String> empMap = SalaryEntityUtil.convert2Map(importHandleParam.getEmployees(), DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
Map<Long, String> taxAgentMap = SalaryEntityUtil.convert2Map(importHandleParam.getTaxAgentList(), TaxAgentManageRangeEmployeeDTO::getTaxAgentId, TaxAgentManageRangeEmployeeDTO::getTaxAgentName);
|
||||
// 新增薪资档案
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveSaves)) {
|
||||
// 去除已经存在的,避免重复
|
||||
|
|
@ -836,8 +840,24 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
}
|
||||
// 修改薪资档案
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveUpdates)) {
|
||||
// 查询更新前档案信息
|
||||
List<SalaryArchivePO> oldArchive = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(salaryArchiveUpdates.stream().map(SalaryArchivePO::getId).collect(Collectors.toList())).build());
|
||||
Map<Long, SalaryArchivePO> oldArchiveMap = SalaryEntityUtil.convert2Map(oldArchive, SalaryArchivePO::getId);
|
||||
// 薪资档案
|
||||
salaryArchiveMapper.batchUpdate(salaryArchiveUpdates);
|
||||
// 记录日志
|
||||
salaryArchiveUpdates.stream().forEach(a -> {
|
||||
SalaryArchivePO oldPO = oldArchiveMap.getOrDefault(a.getId(), SalaryArchivePO.builder().build());
|
||||
String name = taxAgentMap.getOrDefault(a.getTaxAgentId(), StringUtils.EMPTY) + "-" + empMap.getOrDefault(a.getEmployeeId(), StringUtils.EMPTY);
|
||||
SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.salaryArchiveLoggerTemplate,
|
||||
a.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "薪资档案导入更新"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "薪资档案导入更新") + name,
|
||||
oldPO,
|
||||
a,
|
||||
user);
|
||||
});
|
||||
}
|
||||
// 薪资档案-薪资项目
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemDelSalaryItemIds)) {
|
||||
|
|
@ -845,7 +865,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
}
|
||||
// 薪资档案-薪资项目
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemSaves)) {
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemSaves);
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemSaves, user);
|
||||
}
|
||||
|
||||
// 薪资档案-薪资账套
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.biz.SalaryArchiveBiz;
|
||||
import com.engine.salary.biz.SalaryArchiveItemBiz;
|
||||
import com.engine.salary.biz.SalaryItemBiz;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
|
|
@ -25,6 +26,7 @@ import com.engine.salary.service.SalaryEmployeeService;
|
|||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
|
|
@ -247,6 +249,20 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
// 构建更新PO
|
||||
SalaryArchiveItemPO updateSalaryArchiveItemPO = buildUpdateSalaryArchiveItemPO(salaryArchiveItemSaveParam, salaryArchiveItems, salaryItemIds, salaryArchiveItem);
|
||||
salaryArchiveItemMapper.updateIgnoreNull(updateSalaryArchiveItemPO);
|
||||
|
||||
// 查询更新后的po
|
||||
SalaryArchiveItemPO saiNew = salaryArchiveItemMapper.getById(updateSalaryArchiveItemPO.getId());
|
||||
// 记录操作日志
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "编辑调薪记录");
|
||||
SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.salaryArchiveItemAdjustLoggerTemplate,
|
||||
saiNew.getId(),
|
||||
name + ":" + saiNew.getId(),
|
||||
name,
|
||||
name + ":" + saiNew.getId(),
|
||||
salaryArchiveItem,
|
||||
saiNew,
|
||||
user
|
||||
);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -447,7 +463,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
salaryArchiveItemMapper.deleteBatchIds(effectiveSalaryItemDels);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemNews)) {
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemNews);
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemNews, user);
|
||||
}
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
|
|
@ -565,6 +581,15 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
salaryArchiveItem.setDeleteType(1);
|
||||
// 删除未生效数据
|
||||
salaryArchiveItemMapper.updateById(salaryArchiveItem);
|
||||
// 记录日志
|
||||
String operateName = SalaryI18nUtil.getI18nLabel(0, "删除调薪记录");
|
||||
SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.salaryArchiveItemAdjustLoggerTemplate,
|
||||
salaryArchiveItem.getId(),
|
||||
operateName + ":" + salaryArchiveItem.getId(),
|
||||
operateName,
|
||||
operateName,
|
||||
salaryArchiveItem,
|
||||
user);
|
||||
// } else {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98299, "该薪资项目已生效不可删除"));
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -5,8 +5,11 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryarchive.bo.SalaryArchiveBO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO;
|
||||
|
|
@ -21,6 +24,7 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
|||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO;
|
||||
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.salaryarchive.*;
|
||||
|
|
@ -39,6 +43,7 @@ import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
|
|
@ -48,7 +53,6 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
|
|
@ -321,7 +325,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
// 落库处理薪资项目
|
||||
if (CollectionUtils.isNotEmpty(changeData.getSalaryArchiveItemAddTodos())) {
|
||||
salaryArchiveItemMapper.batchInsert(changeData.getSalaryArchiveItemAddTodos());
|
||||
salaryArchiveItemMapper.batchInsert(changeData.getSalaryArchiveItemAddTodos(), user);
|
||||
}
|
||||
// 删除增量数据
|
||||
if (CollectionUtils.isNotEmpty(changeData.getChangeIds())) {
|
||||
|
|
@ -586,6 +590,17 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// 3.表数据
|
||||
|
||||
// return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
|
||||
// 记录日志
|
||||
String statusStr = StringUtils.join(queryParam.getRunStatusList().stream().map(status -> SalaryArchiveStatusEnum.parseByValue(status).getDefaultLabel()).collect(Collectors.toList()), ",");
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "导出");
|
||||
LoggerContext<AddUpSituation> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "薪资档案 ") + statusStr);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "薪资档案") + "-" + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.salaryArchiveLoggerTemplate.write(loggerContext);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
|
@ -685,7 +700,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
});
|
||||
// 落库处理薪资档案项目数据
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemAddTodos)) {
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddTodos);
|
||||
salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddTodos, user);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemDelTodoIds)) {
|
||||
salaryArchiveItemMapper.deleteBatchIds(salaryArchiveItemDelTodoIds);
|
||||
|
|
@ -724,9 +739,49 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// List<SalaryArchiveSobPO> salaryArchiveSobSaveList = SalaryArchiveBO.buildSalaryArchiveSob(salaryArchive.getId(), salarySobIds, LocalDateTime.now());
|
||||
// this.salaryArchiveSobService.saveBatchBySalaryArchiveIdsAndSaves(Collections.singletonList(salaryArchive.getId()), salaryArchiveSobSaveList, currentTenantKey);
|
||||
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> newList = Collections.singletonList(this.getById(salaryArchive.getId()));
|
||||
String operatedesc = SalaryI18nUtil.getI18nLabel(0, "发薪设置");
|
||||
recordLog(oldList, newList, operatedesc);
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录日志
|
||||
*
|
||||
* @param oldSalaryArchiveList
|
||||
* @param newSalaryArchiveList
|
||||
* @param operatedesc
|
||||
*/
|
||||
private void recordLog(List<SalaryArchivePO> oldSalaryArchiveList, List<SalaryArchivePO> newSalaryArchiveList, String operatedesc) {
|
||||
if (CollectionUtils.isEmpty(oldSalaryArchiveList) || CollectionUtils.isEmpty(oldSalaryArchiveList)) {
|
||||
return;
|
||||
}
|
||||
List<Long> updateEmpIds = newSalaryArchiveList.stream().map(SalaryArchivePO::getEmployeeId).distinct().collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(updateEmpIds);
|
||||
Map<Long, String> empMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
|
||||
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentPO> taxAgents = getTaxAgentService(user).listAll();
|
||||
Map<Long, String> taxAgentMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName);
|
||||
String bar = "-";
|
||||
oldSalaryArchiveList.forEach(e -> {
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(e.getId()));
|
||||
loggerContext.setTargetName(Optional.ofNullable(empMap.get(e.getEmployeeId())).orElse(StringUtils.EMPTY) + bar + Optional.ofNullable(taxAgentMap.get(e.getTaxAgentId())).orElse(StringUtils.EMPTY));
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(operatedesc);
|
||||
loggerContext.setOperatedesc(operatedesc);
|
||||
loggerContext.setOldValues(e);
|
||||
Optional<SalaryArchivePO> optionalNew = newSalaryArchiveList.stream().filter(n -> n.getId().equals(e.getId())).findFirst();
|
||||
loggerContext.setNewValues(optionalNew.orElse(null));
|
||||
SalaryElogConfig.salaryArchiveLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<SalaryArchiveDimissionPO> dimissionSets() {
|
||||
|
|
@ -955,7 +1010,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
this.salaryArchiveMapper.batchInsert(salaryArchiveAddList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(salaryArchiveItemAddList)) {
|
||||
this.salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddList);
|
||||
this.salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddList, user);
|
||||
}
|
||||
log.info("处理历史数据结束===============");
|
||||
}
|
||||
|
|
@ -1076,6 +1131,10 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
// 从待定薪到停薪
|
||||
getSalaryArchiveMapper().deletePendingTodo(ids);
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build());
|
||||
String operatedesc = SalaryI18nUtil.getI18nLabel(0, "删除待办");
|
||||
recordLog(oldList, newList, operatedesc);
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -1106,6 +1165,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
List<List<Long>> partition = Lists.partition((List<Long>) ids, 1000);
|
||||
partition.forEach(getSalaryArchiveMapper()::gotoFixed);
|
||||
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build());
|
||||
String operateDesc = SalaryI18nUtil.getI18nLabel(0, "设为发薪员工");
|
||||
recordLog(salaryArchiveList, newList, operateDesc);
|
||||
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<Long> salaryItemIds = getSalaryArchiveItemService(user).getCanAdjustSalaryItems().stream().map(SalaryItemPO::getId).collect(Collectors.toList());
|
||||
List<SalaryArchiveItemPO> currentEffectiveItemList = getSalaryArchiveItemService(user).getCurrentEffectiveItemListIngoreValue(ids, salaryItemIds)
|
||||
|
|
@ -1170,6 +1234,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// 从待停薪到停薪
|
||||
getSalaryArchiveMapper().gotoStop(ids);
|
||||
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build());
|
||||
String operatedesc = SalaryI18nUtil.getI18nLabel(0, "停薪");
|
||||
recordLog(oldList, newList, operatedesc);
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>(2);
|
||||
String resultMsg = SalaryI18nUtil.getI18nLabel(94620, "操作成功");
|
||||
String resultType = "success";
|
||||
|
|
@ -1241,7 +1310,13 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
// 删除最后发薪日期,设置状态为发薪
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
getSalaryArchiveMapper().deleteSuspendTodo(list.stream().map(SalaryArchiveListDTO::getId).collect(Collectors.toList()));
|
||||
List<Long> salaryArchiveIds = list.stream().map(SalaryArchiveListDTO::getId).collect(Collectors.toList());
|
||||
getSalaryArchiveMapper().deleteSuspendTodo(salaryArchiveIds);
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> oldList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(salaryArchiveIds).build());
|
||||
List<SalaryArchivePO> newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build());
|
||||
String operatedesc = SalaryI18nUtil.getI18nLabel(0, "删除待办");
|
||||
recordLog(oldList, newList, operatedesc);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -1275,6 +1350,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// 从停薪到定薪
|
||||
getSalaryArchiveMapper().gotoFixedFromStop(ids);
|
||||
|
||||
// 记录日志
|
||||
List<SalaryArchivePO> newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build());
|
||||
String operatedesc = SalaryI18nUtil.getI18nLabel(0, "取消停薪");
|
||||
recordLog(oldList, newList, operatedesc);
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.biz.SalarySendBiz;
|
||||
import com.engine.salary.biz.SalarySendInfoBiz;
|
||||
import com.engine.salary.cache.SalaryCacheKey;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.HrmSalaryPayrollConf;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.progress.ProgressDTO;
|
||||
import com.engine.salary.entity.salaryBill.bo.SalaryBillBO;
|
||||
|
|
@ -24,6 +26,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
|||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salarybill.*;
|
||||
import com.engine.salary.enums.salarysend.SalarySendGrantTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -758,6 +761,19 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
salarySendNew.setLastSendTime(new Date());
|
||||
|
||||
mapper.updateById(salarySendNew);
|
||||
|
||||
// 记录日志
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setTargetId(String.valueOf(salarySend.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()));
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"工资单发放"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"工资单发放"));
|
||||
loggerContext.setOldValues(salarySend);
|
||||
loggerContext.setNewValues(salarySendNew);
|
||||
loggerContext.setOperator(user.getUID() + StringUtils.EMPTY);
|
||||
loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername());
|
||||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
// /**
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
// }
|
||||
|
||||
@Override
|
||||
public void save(SalaryItemSaveParam saveParam) {
|
||||
public SalaryItemPO save(SalaryItemSaveParam saveParam) {
|
||||
// 名称不能和已有的自定义薪资项目重名
|
||||
List<SalaryItemPO> salaryItemPOS = listByName(saveParam.getName());
|
||||
if (CollectionUtils.isNotEmpty(salaryItemPOS)) {
|
||||
|
|
@ -204,16 +204,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
}
|
||||
SalaryItemPO salaryItemPO = SalaryItemBO.convert2SalaryItemPO(saveParam, (long) user.getUID());
|
||||
salaryItemBiz.insert(salaryItemPO);
|
||||
// 记录日志
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setNewValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
return salaryItemPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -222,7 +213,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
}
|
||||
|
||||
@Override
|
||||
public void update(SalaryItemSaveParam saveParam) {
|
||||
public SalaryItemPO update(SalaryItemSaveParam saveParam) {
|
||||
// 查询薪资项目,判断薪资项目是否存在
|
||||
SalaryItemPO salaryItemPO = getById(saveParam.getId());
|
||||
if (Objects.isNull(salaryItemPO)) {
|
||||
|
|
@ -286,18 +277,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// 记录日志
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId()));
|
||||
loggerContext.setTargetName(newSalaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目") + ": " + newSalaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
loggerContext.setNewValues(newSalaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
return salaryItemPO;
|
||||
}
|
||||
|
||||
private void changeName(SalaryItemPO salaryItemPO, String oldName, String newName, String itemPrefix, String fieldNamePrefix) {
|
||||
|
|
@ -351,18 +331,36 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
// 删除薪资项目
|
||||
ids = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getId);
|
||||
salaryItemBiz.deleteByIds(ids);
|
||||
Integer useInEmployeeSalary = salaryItemPOS.get(0).getUseInEmployeeSalary();
|
||||
// 记录删除日志
|
||||
salaryItemPOS.forEach(salaryItemPO -> {
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
if (useInEmployeeSalary == 0) {
|
||||
// 薪资项目
|
||||
salaryItemPOS.forEach(salaryItemPO -> {
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
} else {
|
||||
// 字段管理
|
||||
salaryItemPOS.forEach(salaryItemPO -> {
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除字段") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,13 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SalarySendBiz;
|
||||
import com.engine.salary.biz.SalarySendInfoBiz;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryArchiveConstant;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.constant.SalaryTemplateSalaryItemSetGroupConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryBill.bo.SalaryBillBO;
|
||||
import com.engine.salary.entity.salaryBill.dto.*;
|
||||
|
|
@ -35,6 +38,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO;
|
|||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum;
|
||||
import com.engine.salary.enums.salarybill.BillConfimStatusEnum;
|
||||
|
|
@ -57,11 +61,11 @@ import com.engine.salary.util.JsonUtil;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
|
@ -660,6 +664,17 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
map.put("showFeedback", "0");
|
||||
}
|
||||
|
||||
|
||||
// 记录查看日志
|
||||
String targetName = taxAgentPO.getName() + "-" + SalaryDateUtil.getFormatYearMonth(salarySendInfo.getSalaryMonth());
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salarySendInfo.getId()));
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.READ.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看工资单") + ": " + targetName + " " + salaryInfoId);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看工资单") + ": " + targetName);
|
||||
SalaryElogConfig.mySalaryBillLoggerTemplate.write(loggerContext);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -1409,14 +1424,20 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
salarySendNew.setSendTotal(sendTotal);
|
||||
mapper.updateById(salarySendNew);
|
||||
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(salarySend.getSalarySobId());
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(salarySendLoggerTemplate,
|
||||
// salarySend.getId(),
|
||||
// salarySend.getSalaryMonth() + "-" + (CollectionUtils.isNotEmpty(salarySobs) ? salarySobs.get(0).getName() : ""),
|
||||
// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100521, "撤回工资单发放"),
|
||||
// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100521, "撤回工资单发放"),
|
||||
// salarySend,
|
||||
// salarySendNew);
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setTargetId(String.valueOf(salarySend.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()));
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "撤回工资单"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "撤回工资单"));
|
||||
loggerContext.setOldValues(salarySend);
|
||||
loggerContext.setNewValues(salarySendNew);
|
||||
loggerContext.setOperator(user.getUID() + StringUtils.EMPTY);
|
||||
loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername());
|
||||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
|
||||
|
||||
|
||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder().ids(param.getIds()).salarySendId(param.getSalarySendId()).build();
|
||||
|
|
@ -1487,6 +1508,19 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
row.add(dto.getSendStatus());
|
||||
rows.add(row);
|
||||
}
|
||||
|
||||
// 记录操作日志
|
||||
SalarySendPO salarySend = mapper.getById(queryParam.getSalarySendId());
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(salarySend.getSalarySobId());
|
||||
|
||||
String name = SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName());
|
||||
LoggerContext<AddUpSituation> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "工资单发放") + ":" + name + SalaryI18nUtil.getI18nLabel(0, " 导出"));
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
|
@ -1551,6 +1585,19 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
rows.add(row);
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(salaryAcctRecord.getSalarySobId());
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setTargetId(String.valueOf(salarySend.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"导出工资单"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"导出工资单"));
|
||||
loggerContext.setOperator(user.getUID() + StringUtils.EMPTY);
|
||||
loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername());
|
||||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,11 +79,12 @@ public class SalarySobAdjustRuleServiceImpl extends Service implements SalarySob
|
|||
}
|
||||
// 记录日志
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salarySobPO.getId()));
|
||||
loggerContext.setTargetName(salarySobPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则"));
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "保存调薪计薪规则"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "保存调薪计薪规则"));
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.engine.salary.service.impl;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
|
||||
|
|
@ -18,6 +20,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentRangeQueryParam;
|
|||
import com.engine.salary.entity.taxagent.po.TaxAgentAdminPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentExtRangePO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
|
|
@ -30,13 +33,13 @@ import com.engine.salary.sys.service.SalarySysConfService;
|
|||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
|
@ -281,15 +284,16 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
SalarySobPO salarySobPO = SalarySobBO.convert2PO(saveParam, (long) user.getUID());
|
||||
// 保存薪资账套
|
||||
salarySobMapper.insert(salarySobPO);
|
||||
//todo 记录日志
|
||||
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(salarySobPO.getId()));
|
||||
// loggerContext.setTargetName(salarySobPO.getName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98404, "新建薪资账套"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98404, "新建薪资账套") + ": " + salarySobPO.getName());
|
||||
// loggerContext.setOldValues(salarySobPO);
|
||||
// salarySobLoggerTemplate.write(loggerContext);
|
||||
// 记录日志
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salarySobPO.getId()));
|
||||
loggerContext.setTargetName(salarySobPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资账套"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资账套") + ": " + salarySobPO.getName());
|
||||
loggerContext.setNewValues(salarySobPO);
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
// 新建薪资账套时,保存默认的员工信息字段
|
||||
saveDefaultEmpField(salarySobPO);
|
||||
// 新建薪资账套时,保存默认的薪资项目
|
||||
|
|
@ -531,15 +535,16 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
.setUpdateTime(new Date());
|
||||
salarySobMapper.updateById(newSalarySobPO);
|
||||
// 记录日志
|
||||
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId(String.valueOf(newSalarySobPO.getId()));
|
||||
// loggerContext.setTargetName(newSalarySobPO.getName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98526, "编辑薪资账套基础设置"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98526, "编辑薪资账套基础设置"));
|
||||
// loggerContext.setOldValues(salarySobPO);
|
||||
// loggerContext.setNewValues(newSalarySobPO);
|
||||
// salarySobLoggerTemplate.write(loggerContext);
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(newSalarySobPO.getId()));
|
||||
loggerContext.setTargetName(newSalarySobPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套基础设置"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套基础设置"));
|
||||
loggerContext.setOldValues(salarySobPO);
|
||||
loggerContext.setNewValues(newSalarySobPO);
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
// 返回薪资账套的主键id
|
||||
return salarySobPO.getId();
|
||||
}
|
||||
|
|
@ -548,6 +553,8 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
public void updateDisable(SalarySobDisableParam disableParam) {
|
||||
// 查询薪资账套
|
||||
SalarySobPO salarySobPO = getById(disableParam.getId());
|
||||
SalarySobPO oldSalarySobPO = new SalarySobPO();
|
||||
BeanUtils.copyProperties(salarySobPO, oldSalarySobPO);
|
||||
if (Objects.isNull(salarySobPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98379, "参数错误,薪资账套不存在或者已被删除"));
|
||||
}
|
||||
|
|
@ -555,16 +562,19 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
salarySobPO.setDisable(disableParam.getDisable());
|
||||
salarySobPO.setUpdateTime(new Date());
|
||||
salarySobMapper.updateById(salarySobPO);
|
||||
// todo 记录日志
|
||||
// String operateTypeName = Objects.equals(disableParam.getDisable(), NumberUtils.INTEGER_ONE) ?
|
||||
// SalaryI18nUtil.getI18nLabel(98591, "禁用薪资账套") : SalaryI18nUtil.getI18nLabel(98592, "启用薪资账套");
|
||||
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId("" + salarySobPO.getId());
|
||||
// loggerContext.setTargetName(salarySobPO.getName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(operateTypeName);
|
||||
// loggerContext.setOperatedesc(operateTypeName + ": " + salarySobPO.getName());
|
||||
// salarySobLoggerTemplate.write(loggerContext);
|
||||
// 记录日志
|
||||
String operateTypeName = Objects.equals(disableParam.getDisable(), NumberUtils.INTEGER_ONE) ?
|
||||
SalaryI18nUtil.getI18nLabel(0, "禁用薪资账套") : SalaryI18nUtil.getI18nLabel(0, "启用薪资账套");
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId("" + salarySobPO.getId());
|
||||
loggerContext.setTargetName(salarySobPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(operateTypeName);
|
||||
loggerContext.setOperatedesc(operateTypeName + ": " + salarySobPO.getName());
|
||||
loggerContext.setOldValues(oldSalarySobPO);
|
||||
loggerContext.setNewValues(salarySobPO);
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -619,16 +629,18 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
getSalarySobBackItemService(user).deleteBySalarySobIds(ids);
|
||||
// 删除薪资账套的校验规则
|
||||
getSalarySobCheckRuleService(user).deleteBySalarySobIds(ids);
|
||||
// // 记录日志
|
||||
// salarySobPOS.forEach(salarySobPO -> {
|
||||
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId("" + salarySobPO.getId());
|
||||
// loggerContext.setTargetName(salarySobPO.getName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98535, "删除薪资账套"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98535, "删除薪资账套"));
|
||||
// salarySobLoggerTemplate.write(loggerContext);
|
||||
// });
|
||||
// 记录日志
|
||||
salarySobPOS.forEach(salarySobPO -> {
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId("" + salarySobPO.getId());
|
||||
loggerContext.setTargetName(salarySobPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资账套"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资账套"));
|
||||
loggerContext.setOldValues(salarySobPO);
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -771,14 +783,15 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
if (CollectionUtils.isNotEmpty(result.getSalarySobCheckRules())) {
|
||||
getSalarySobCheckRuleService(user).batchSave(result.getSalarySobCheckRules());
|
||||
}
|
||||
// // 记录日志
|
||||
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
// loggerContext.setTargetId("" + result.getSalarySob().getId());
|
||||
// loggerContext.setTargetName(result.getSalarySob().getName());
|
||||
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套"));
|
||||
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套") + ": " + salarySobPO.getName());
|
||||
// salarySobLoggerTemplate.write(loggerContext);
|
||||
// 记录日志
|
||||
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId("" + result.getSalarySob().getId());
|
||||
loggerContext.setTargetName(result.getSalarySob().getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套") + ": " + salarySobPO.getName());
|
||||
SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SalarySobBiz;
|
||||
import com.engine.salary.biz.SalaryTemplateBiz;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.salaryBill.bo.SalaryTemplateBO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemListDTO;
|
||||
|
|
@ -18,22 +20,26 @@ import com.engine.salary.entity.salaryBill.param.SalaryTemplateQueryParam;
|
|||
import com.engine.salary.entity.salaryBill.param.SalaryTemplateSaveParam;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO;
|
||||
import com.engine.salary.entity.salarysob.po.*;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateWhetherEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobEmpFieldMapper;
|
||||
import com.engine.salary.report.entity.po.SalaryStatisticsReportPO;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.mzlion.core.utils.BeanUtils;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
|
@ -116,14 +122,14 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
mapper.updateById(salaryTemplateNew);
|
||||
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(salaryTemplateLoggerTemplate,
|
||||
// salaryTemplate.getId(),
|
||||
// salaryTemplateNew.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100534, "设为默认使用"),
|
||||
// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100534, "设为默认使用"),
|
||||
// salaryTemplate,
|
||||
// salaryTemplateNew);
|
||||
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId()));
|
||||
loggerContext.setTargetName(salaryTemplateNew.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "设为默认使用"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "设为默认使用"));
|
||||
SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -167,12 +173,15 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
saveParam.getSalaryBillItemNameSetting().stream().forEach(set -> set.setSalaryTemplateId(salaryTemplate.getId()));
|
||||
getSalaryBillItemNameService(user).saveItemShowName(saveParam.getSalaryBillItemNameSetting());
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordAddSingleLog(salaryTemplateLoggerTemplate,
|
||||
// salaryTemplate.getId(),
|
||||
// salaryTemplate.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100538, "新增工资单模板"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100538, "新增工资单模板"),
|
||||
// salaryTemplate);
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryTemplate.getId()));
|
||||
loggerContext.setTargetName(salaryTemplate.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增工资单模板"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增工资单模板"));
|
||||
loggerContext.setNewValues(salaryTemplate);
|
||||
SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
@ -255,13 +264,16 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
getSalaryBillItemNameService(user).deleteByIds(needDeleteIds);
|
||||
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(salaryTemplateLoggerTemplate,
|
||||
// salaryTemplate.getId(),
|
||||
// salaryTemplateNew.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100539, "编辑工资单模板"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100539, "编辑工资单模板"),
|
||||
// salaryTemplate,
|
||||
// salaryTemplateNew);
|
||||
LoggerContext<SalaryTemplatePO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId()));
|
||||
loggerContext.setTargetName(salaryTemplateNew.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "编辑工资单模板"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "编辑工资单模板"));
|
||||
loggerContext.setOldValues(salaryTemplate);
|
||||
loggerContext.setNewValues(salaryTemplateNew);
|
||||
SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
@ -369,12 +381,15 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
getSalaryBillItemNameService(user).batchInsert(needInsertList);
|
||||
}
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordAddSingleLog(salaryTemplateLoggerTemplate,
|
||||
// salaryTemplateNew.getId(),
|
||||
// salaryTemplateNew.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100541, "复制工资单模板"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100541, "复制工资单模板"),
|
||||
// salaryTemplateNew);
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId()));
|
||||
loggerContext.setTargetName(salaryTemplateNew.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "复制工资单模板"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "复制工资单模板"));
|
||||
loggerContext.setNewValues(salaryTemplateNew);
|
||||
SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
@ -393,12 +408,16 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
// 删除工资单重命名表
|
||||
getSalaryBillItemNameService(user).deleteByTemplateIds(ids);
|
||||
// 记录日志
|
||||
// salaryTemplates.forEach(e -> SalaryLoggerUtil.recordDeleteSingleLog(salaryTemplateLoggerTemplate,
|
||||
// e.getId(),
|
||||
// e.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100542, "删除工资单模板"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100542, "删除工资单模板")+":" + e.getName(),
|
||||
// e));
|
||||
salaryTemplates.stream().forEach(template -> {
|
||||
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(template.getId()));
|
||||
loggerContext.setTargetName(template.getName() + ":" + template.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "删除工资单模板"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "删除工资单模板"));
|
||||
SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SpecialAddDeductionBiz;
|
||||
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.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO;
|
||||
|
|
@ -16,6 +19,7 @@ import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO;
|
|||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.datacollection.SpecialAddDeductionMapper;
|
||||
|
|
@ -330,7 +334,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
}
|
||||
|
||||
//入库
|
||||
SpecialAddDeductionBiz.handleImportData(eligibleData);
|
||||
SpecialAddDeductionBiz.handleImportData(eligibleData, user);
|
||||
|
||||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
|
|
@ -365,6 +369,16 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(param, isTemplate);
|
||||
|
||||
// 记录操作日志
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "导出");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除"));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "专项附加免税扣除");
|
||||
}
|
||||
|
|
@ -509,6 +523,21 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
.build();
|
||||
updateList.add(build);
|
||||
SpecialAddDeductionBiz.batchUpdate(updateList);
|
||||
|
||||
// 记录操作日志
|
||||
SpecialAddDeductionPO newValue = SpecialAddDeductionBiz.getById(build.getId());
|
||||
String name = SalaryI18nUtil.getI18nLabel(0, "编辑");
|
||||
LoggerContext<SpecialAddDeductionPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(newValue.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + newValue.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(name);
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "编辑"));
|
||||
loggerContext.setOldValues(byId);
|
||||
loggerContext.setNewValues(newValue);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.specialAddDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -568,7 +597,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
//fixme 分权判断
|
||||
insertData.add(po);
|
||||
//入库
|
||||
SpecialAddDeductionBiz.handleImportData(insertData);
|
||||
SpecialAddDeductionBiz.handleImportData(insertData, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -580,6 +609,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
List<Long> deleteIds = deleteParam.getIds();
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
List<SpecialAddDeductionPO> oldSpecialAddDeductionList = new ArrayList<>();
|
||||
for (Long id : deleteIds) {
|
||||
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(id);
|
||||
if (byId == null) {
|
||||
|
|
@ -595,6 +625,22 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
deleteList.add(byId.getId());
|
||||
}
|
||||
SpecialAddDeductionBiz.batchDeleteByIds(deleteList);
|
||||
|
||||
// 记录操作日志
|
||||
if (CollectionUtils.isNotEmpty(oldSpecialAddDeductionList)) {
|
||||
oldSpecialAddDeductionList.stream().forEach( e -> {
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetId(e.getId().toString());
|
||||
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + e.getId());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "删除"));
|
||||
loggerContext.setOldValues(e);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -622,6 +668,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
List<SpecialAddDeductionPO> list = specialAddDeductionBiz.listByTaxAgentIds(taxAgentIds);
|
||||
List<Long> deleteIds = list.stream().map(SpecialAddDeductionPO::getId).collect(Collectors.toList());
|
||||
specialAddDeductionBiz.batchDeleteByIds(deleteIds);
|
||||
|
||||
// 记录操作日志
|
||||
Collection<Long> finalTaxAgentIds =taxAgentIds;
|
||||
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId()))
|
||||
.map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
String name = StringUtils.join(taxAgentNames, ",");
|
||||
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setTargetName(name);
|
||||
loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil
|
||||
.getI18nLabel(0, "一键清空:") + name);
|
||||
loggerContext.setUser(user);
|
||||
SalaryElogConfig.specialAddDeductionLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
|
|||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
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.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
|
|
@ -30,6 +31,8 @@ import com.engine.salary.service.*;
|
|||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -38,13 +41,13 @@ import com.google.common.collect.Lists;
|
|||
import com.google.common.collect.Maps;
|
||||
import com.weaver.util.threadPool.ThreadPoolUtil;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -316,6 +319,12 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
List<TaxAgentManageRangePO> taxAgentManageAllRanges = listByTaxAgentId(saveParam.getTaxAgentId());
|
||||
|
||||
List<TaxAgentManageRangePO> taxAgentManageRanges = taxAgentManageAllRanges.stream().filter(f -> f.getIncludeType().equals(saveParam.getIncludeType())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> oldManageList = new ArrayList<>();
|
||||
taxAgentManageRanges.stream().forEach(p -> {
|
||||
TaxAgentManageRangePO target = new TaxAgentManageRangePO();
|
||||
BeanUtils.copyProperties(p, target);
|
||||
oldManageList.add(target);
|
||||
});
|
||||
// 处理一下本次的保存参数(如果原来添加过对应的人员(/部门/岗位),那么本次不需要新增,只需要更新)
|
||||
TaxAgentBO.Result result = TaxAgentBO.handleTaxAgentRange(taxAgentManageRanges, saveParam, taxAgent.getId(), (long) user.getUID(), false);
|
||||
|
||||
|
|
@ -331,10 +340,37 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
|
||||
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
|
||||
if (CollectionUtils.isNotEmpty(result.getNeedInsertTaxAgentManageRanges())) {
|
||||
result.getNeedInsertTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().insertIgnoreNull(range));
|
||||
result.getNeedInsertTaxAgentManageRanges().forEach(range -> {
|
||||
getTaxAgentManageRangeMapper().insertIgnoreNull(range);
|
||||
// 记录操作日志
|
||||
String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId();
|
||||
SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
|
||||
range.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "新增人员范围"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "新增人员范围") + name,
|
||||
range,
|
||||
user);
|
||||
});
|
||||
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(result.getNeedUpdateTaxAgentManageRanges())) {
|
||||
result.getNeedUpdateTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().updateIgnoreNull(range));
|
||||
Map<Long, TaxAgentManageRangePO> oldMap = SalaryEntityUtil.convert2Map(oldManageList, TaxAgentManageRangePO::getId);
|
||||
result.getNeedUpdateTaxAgentManageRanges().forEach(range -> {
|
||||
getTaxAgentManageRangeMapper().updateIgnoreNull(range);
|
||||
// 记录操作日志
|
||||
TaxAgentManageRangePO oldPO = oldMap.getOrDefault(range.getId(), TaxAgentManageRangePO.builder().build());
|
||||
String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId();
|
||||
SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
|
||||
range.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "更新人员范围"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "更新人员范围") + name,
|
||||
oldPO,
|
||||
range,
|
||||
user);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* 同步本地人员范围的关联人员=========================== */
|
||||
|
|
@ -527,19 +563,21 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
@Override
|
||||
public void deleteByIds(Collection<Long> ids) {
|
||||
// 查询管理范围
|
||||
List<TaxAgentManageRangePO> taxAgentManageRanges = listByIds(ids);
|
||||
if (CollectionUtils.isEmpty(taxAgentManageRanges)) {
|
||||
List<TaxAgentManageRangePO> taxAgentManageRangeList = listByIds(ids);
|
||||
|
||||
if (CollectionUtils.isEmpty(taxAgentManageRangeList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98604, "数据不存在或已被删除"));
|
||||
}
|
||||
List<Long> taxAgentIds = taxAgentManageRanges.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList());
|
||||
List<Long> taxAgentIds = taxAgentManageRangeList.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList());
|
||||
if (taxAgentIds.size() > 1) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110159, "一次只能删一个个税个税扣缴义务人的范围"));
|
||||
}
|
||||
taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds);
|
||||
List<TaxAgentManageRangePO> taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds);
|
||||
List<TaxAgentManageRangePO> allManageRanges = taxAgentManageRanges.stream().filter(f -> !ids.contains(f.getId())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> allRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.TAXAGENT.getValue())).collect(Collectors.toList());
|
||||
// List<TaxAgentManageRangePO> allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList());
|
||||
Long taxAgentId = taxAgentIds.get(0);
|
||||
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxAgentId);
|
||||
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ORG);
|
||||
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
|
||||
|
|
@ -554,9 +592,21 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
// 删除管理范围
|
||||
getTaxAgentManageRangeMapper().deleteByIds(ids);
|
||||
|
||||
// 记录操作日志
|
||||
taxAgentManageRangeList.stream().forEach(range -> {
|
||||
String name = taxAgentPO.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId();
|
||||
SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
|
||||
range.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "删除人员范围"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "删除人员范围") + name,
|
||||
range,
|
||||
user);
|
||||
});
|
||||
|
||||
|
||||
/** 同步本地人员范围的关联人员=========================== */
|
||||
syncLocalEmp(taxAgentId, allSalaryEmployees, false);
|
||||
// 记录日志 todo
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -858,6 +908,13 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
// 查询已有的管理范围
|
||||
List<TaxAgentManageRangePO> taxAgentManageAllRanges = listByTaxAgentId(taxAgentId);
|
||||
List<TaxAgentManageRangePO> taxAgentManageRanges = taxAgentManageAllRanges.stream().filter(f -> f.getIncludeType().equals(taxAgentRangeSaveParam.getIncludeType())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> oldManageList = new ArrayList<>();
|
||||
taxAgentManageRanges.stream().forEach(p -> {
|
||||
TaxAgentManageRangePO target = new TaxAgentManageRangePO();
|
||||
BeanUtils.copyProperties(p, target);
|
||||
oldManageList.add(target);
|
||||
});
|
||||
|
||||
// 处理一下本次的保存参数(如果原来添加过对应的人员(/部门/岗位),那么本次不需要新增,只需要更新)
|
||||
TaxAgentBO.Result result = TaxAgentBO.handleTaxAgentRange(taxAgentManageRanges, taxAgentRangeSaveParam, taxAgent.getId(), (long) user.getUID(), true);
|
||||
|
||||
|
|
@ -873,10 +930,36 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
|
||||
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
|
||||
if (CollectionUtils.isNotEmpty(result.getNeedInsertTaxAgentManageRanges())) {
|
||||
result.getNeedInsertTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().insertIgnoreNull(range));
|
||||
result.getNeedInsertTaxAgentManageRanges().forEach(range -> {
|
||||
getTaxAgentManageRangeMapper().insertIgnoreNull(range);
|
||||
// 记录操作日志
|
||||
String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTargetId();
|
||||
SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
|
||||
range.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "新增人员范围"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "新增人员范围") + name,
|
||||
range,
|
||||
user);
|
||||
});
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(result.getNeedUpdateTaxAgentManageRanges())) {
|
||||
result.getNeedUpdateTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().updateIgnoreNull(range));
|
||||
Map<Long, TaxAgentManageRangePO> oldMap = SalaryEntityUtil.convert2Map(oldManageList, TaxAgentManageRangePO::getId);
|
||||
result.getNeedUpdateTaxAgentManageRanges().forEach(range -> {
|
||||
getTaxAgentManageRangeMapper().updateIgnoreNull(range);
|
||||
// 记录操作日志
|
||||
TaxAgentManageRangePO oldPO = oldMap.getOrDefault(range.getId(), TaxAgentManageRangePO.builder().build());
|
||||
String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTargetId();
|
||||
SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
|
||||
range.getId(),
|
||||
name,
|
||||
SalaryI18nUtil.getI18nLabel(0, "更新人员范围"),
|
||||
SalaryI18nUtil.getI18nLabel(0, "更新人员范围") + name,
|
||||
oldPO,
|
||||
range,
|
||||
user);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* 同步本地人员范围的关联人员=========================== */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import com.engine.common.service.HrmCommonService;
|
|||
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryAuthConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -24,6 +26,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentAdminChangeCheckParam;
|
|||
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentSaveParam;
|
||||
import com.engine.salary.entity.taxagent.po.*;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
|
|
@ -347,13 +350,15 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
getTaxAgentAdminService(user).batchInsert(taxAgent.getId(), saveParam.getAdminUserIds());
|
||||
}
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordAddSingleLog(taxAgentLoggerTemplate,
|
||||
// taxAgent.getId(),
|
||||
// taxAgent.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel( 93766, "新增个税扣缴义务人"),
|
||||
// SalaryI18nUtil.getI18nLabel( 93766, "新增个税扣缴义务人"),
|
||||
// taxAgent);
|
||||
|
||||
LoggerContext<TaxAgentPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(taxAgent.getId().toString());
|
||||
loggerContext.setTargetName(taxAgent.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增个税扣缴义务人"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增个税扣缴义务人"));
|
||||
loggerContext.setNewValues(taxAgent);
|
||||
SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext);
|
||||
return StringUtils.EMPTY + taxAgent.getId();
|
||||
}
|
||||
|
||||
|
|
@ -402,13 +407,16 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
getTaxAgentAdminService(user).batchInsert(saveParam.getId(), saveParam.getAdminUserIds());
|
||||
}
|
||||
// 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(taxAgentLoggerTemplate,
|
||||
// taxAgent.getId(),
|
||||
// taxAgentNew.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(93767, "编辑个税扣缴义务人"),
|
||||
// SalaryI18nUtil.getI18nLabel(93767, "编辑个税扣缴义务人"),
|
||||
// taxAgent,
|
||||
// taxAgentNew);
|
||||
LoggerContext<TaxAgentPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(taxAgentNew.getId().toString());
|
||||
loggerContext.setTargetName(taxAgentNew.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑个税扣缴义务人"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑个税扣缴义务人"));
|
||||
loggerContext.setOldValues(taxAgent);
|
||||
loggerContext.setNewValues(taxAgentNew);
|
||||
SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext);
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
|
@ -460,13 +468,18 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
getTaxAgentMapper().deleteByIds(ids);
|
||||
|
||||
// 记录日志
|
||||
// taxAgents.forEach(e -> SalaryLoggerUtil.recordDeleteSingleLog(taxAgentLoggerTemplate,
|
||||
// e.getId(),
|
||||
// e.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(100546, "删除个税扣缴义务人"),
|
||||
// SalaryI18nUtil.getI18nLabel(100546, "删除个税扣缴义务人") + ":" + e.getName(),
|
||||
// e));
|
||||
taxAgents.forEach(e ->{
|
||||
LoggerContext<TaxAgentPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(e.getId().toString());
|
||||
loggerContext.setTargetName(e.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除个税扣缴义务人"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除个税扣缴义务人"));
|
||||
loggerContext.setOldValues(e);
|
||||
SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext);
|
||||
|
||||
});
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,17 +2,23 @@ package com.engine.salary.service.impl;
|
|||
|
||||
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.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationAnnualListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.service.TaxDeclarationDetailService;
|
||||
import com.engine.salary.service.TaxDeclarationExcelService;
|
||||
import com.engine.salary.service.TaxDeclarationService;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
|
|
@ -47,6 +53,10 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar
|
|||
return ServiceUtil.getService(TaxDeclarationServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -128,6 +138,20 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 查询个税扣缴义务人名称
|
||||
String bar = "_";
|
||||
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxDeclarationPO.getTaxAgentId());
|
||||
String targetName = SalaryDateUtil.getFormatYearMonth(taxDeclarationPO.getSalaryMonth()) + bar + taxAgentPO.getName() + bar + IncomeCategoryEnum.parseByValue(taxDeclarationPO.getIncomeCategory()).getDefaultLabel();
|
||||
// 记录日志
|
||||
LoggerContext<TaxDeclarationPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(taxDeclarationId.toString());
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导出个税申报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "导出个税申报表"));
|
||||
SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext);
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.engine.salary.service.impl;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
|
|
@ -12,7 +14,9 @@ import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationBO;
|
|||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.datacollection.AddUpSituationMapper;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctRecordMapper;
|
||||
|
|
@ -259,6 +263,20 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
log.info("salary TaxDeclaration step4 AcctRecordStatus save {}", salaryAcctRecordIds.size());
|
||||
}
|
||||
getSalaryAcctRecordService(user).updateStatusByIds(salaryAcctRecordIds, SalaryAcctRecordStatusEnum.DECLARED);
|
||||
|
||||
// 记录日志
|
||||
result.getNeedInsertTaxDeclarations().stream().forEach(declare -> {
|
||||
String taxAgentName = taxAgentNameMap.getOrDefault(declare.getTaxAgentId(), "");
|
||||
String targetName = SalaryDateUtil.getFormatYearMonth(declare.getSalaryMonth()) + " " + taxAgentName + " " + IncomeCategoryEnum.parseByValue(declare.getIncomeCategory()).getDefaultLabel();
|
||||
LoggerContext<TaxDeclarationPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(declare.getId().toString());
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "生成个税申报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "生成个税申报表"));
|
||||
SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -334,5 +352,19 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
if(CollectionUtils.isNotEmpty(salaryAcctRecordIds)){
|
||||
getSalaryAcctRecordService(user).updateStatusByIds(salaryAcctRecordIds,SalaryAcctRecordStatusEnum.ARCHIVED);
|
||||
}
|
||||
|
||||
// 查询个税扣缴义务人名称
|
||||
String bar = "_";
|
||||
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(po.getTaxAgentId());
|
||||
String targetName = SalaryDateUtil.getFormatYearMonth(po.getSalaryMonth()) + bar + taxAgentPO.getName() + bar + IncomeCategoryEnum.parseByValue(po.getIncomeCategory()).getDefaultLabel();
|
||||
// 记录日志
|
||||
LoggerContext<TaxDeclarationPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(taxDeclarationId.toString());
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "撤回个税申报表"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "撤回个税申报表"));
|
||||
SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package com.engine.salary.util;
|
|||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.elog.util.LoggerTemplate;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import weaver.hrm.User;
|
||||
|
||||
/**
|
||||
* 操作日志工具类
|
||||
|
|
@ -23,9 +24,10 @@ public class SalaryLoggerUtil {
|
|||
* @param operateTypeName
|
||||
* @param operatedesc
|
||||
* @param newValues
|
||||
* @param user
|
||||
*/
|
||||
public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues);
|
||||
public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues, User user) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues, user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,9 +39,10 @@ public class SalaryLoggerUtil {
|
|||
* @param operatedesc
|
||||
* @param oldValues
|
||||
* @param newValues
|
||||
* @param user
|
||||
*/
|
||||
public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues);
|
||||
public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues, User user) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues, user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,9 +53,23 @@ public class SalaryLoggerUtil {
|
|||
* @param operateTypeName
|
||||
* @param operatedesc
|
||||
* @param oldValues
|
||||
* @param user
|
||||
*/
|
||||
public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null);
|
||||
public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, User user) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录单个对象导出操作日志
|
||||
* @param loggerTemplate
|
||||
* @param targetId
|
||||
* @param targetName
|
||||
* @param operateTypeName
|
||||
* @param operatedesc
|
||||
* @param user
|
||||
*/
|
||||
public static void recordExportSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, User user) {
|
||||
recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.EXCEL_EXPORT.getValue(), operateTypeName, operatedesc, null, null, user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +83,9 @@ public class SalaryLoggerUtil {
|
|||
* @param oldValues
|
||||
* @param newValues
|
||||
*/
|
||||
private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues) {
|
||||
private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues, User user) {
|
||||
LoggerContext loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(targetId));
|
||||
loggerContext.setTargetName(targetName);
|
||||
loggerContext.setOperateType(operateType);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.engine.salary.wrapper;
|
|||
|
||||
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.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveItemFormDTO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
|
|
@ -14,6 +16,7 @@ import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
|||
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
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.salaryarchive.SalaryArchiveItemAdjustReasonEnum;
|
||||
|
|
@ -318,6 +321,16 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
});
|
||||
|
||||
// 记录查看日志
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
// TODO 我的调薪记录setTargetId
|
||||
// loggerContext.setTargetId();
|
||||
loggerContext.setTargetName("我的调薪记录");
|
||||
loggerContext.setOperateType(OperateTypeEnum.READ.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看调薪记录"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看调薪记录"));
|
||||
SalaryElogConfig.myAdjustRecordLoggerTemplate.write(loggerContext);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.engine.salary.wrapper;
|
|||
|
||||
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.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryFieldListDTO;
|
||||
|
|
@ -11,10 +13,7 @@ import com.engine.salary.entity.salaryitem.param.SalaryItemSaveParam;
|
|||
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO;
|
||||
import com.engine.salary.enums.SalaryOnOffEnum;
|
||||
import com.engine.salary.enums.SalaryRoundingModeEnum;
|
||||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.*;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalaryFormulaService;
|
||||
|
|
@ -173,7 +172,17 @@ public class SalaryFieldWrapper extends Service {
|
|||
ValidUtil.doValidator(saveParam);
|
||||
validParam(saveParam);
|
||||
|
||||
getSalaryItemService(user).save(saveParam);
|
||||
SalaryItemPO salaryItemPO = getSalaryItemService(user).save(saveParam);
|
||||
// 记录日志
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建字段") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setNewValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
private void validParam(SalaryItemSaveParam saveParam) {
|
||||
|
|
@ -205,7 +214,20 @@ public class SalaryFieldWrapper extends Service {
|
|||
|
||||
ValidUtil.doValidator(saveParam, RuntimeTypeEnum.UPDATE);
|
||||
validParam(saveParam);
|
||||
getSalaryItemService(user).update(saveParam);
|
||||
SalaryItemPO salaryItemPO = getSalaryItemService(user).update(saveParam);
|
||||
|
||||
// 记录日志
|
||||
SalaryItemPO newSalaryItemPO = getSalaryItemService(user).getById(salaryItemPO.getId());
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId()));
|
||||
loggerContext.setTargetName(newSalaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑字段") + ": " + newSalaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
loggerContext.setNewValues(newSalaryItemPO);
|
||||
SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.engine.salary.wrapper;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.component.WeaFormOption;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
|
||||
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
|
||||
|
|
@ -221,7 +223,17 @@ public class SalaryItemWrapper extends Service {
|
|||
ValidUtil.doValidator(saveParam);
|
||||
validParam(saveParam);
|
||||
|
||||
getSalaryItemService(user).save(saveParam);
|
||||
SalaryItemPO salaryItemPO = getSalaryItemService(user).save(saveParam);
|
||||
// 记录日志
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(salaryItemPO.getId()));
|
||||
loggerContext.setTargetName(salaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目") + ": " + salaryItemPO.getName());
|
||||
loggerContext.setNewValues(salaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
private void validParam(SalaryItemSaveParam saveParam) {
|
||||
|
|
@ -250,7 +262,20 @@ public class SalaryItemWrapper extends Service {
|
|||
public void update(SalaryItemSaveParam saveParam) {
|
||||
ValidUtil.doValidator(saveParam, RuntimeTypeEnum.UPDATE);
|
||||
validParam(saveParam);
|
||||
getSalaryItemService(user).update(saveParam);
|
||||
SalaryItemPO salaryItemPO = getSalaryItemService(user).update(saveParam);
|
||||
|
||||
// 记录日志
|
||||
SalaryItemPO newSalaryItemPO = getSalaryItemService(user).getById(salaryItemPO.getId());
|
||||
LoggerContext<SalaryItemPO> loggerContext = new LoggerContext<>();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId()));
|
||||
loggerContext.setTargetName(newSalaryItemPO.getName());
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑字段"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑字段") + ": " + newSalaryItemPO.getName());
|
||||
loggerContext.setOldValues(salaryItemPO);
|
||||
loggerContext.setNewValues(newSalaryItemPO);
|
||||
SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue