2022-03-29 17:10:59 +08:00
|
|
|
package com.engine.salary.service.impl;
|
|
|
|
|
|
|
|
|
|
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.constant.SalaryDefaultTenantConstant;
|
|
|
|
|
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
|
|
|
|
import com.engine.salary.entity.salaryarchive.param.*;
|
|
|
|
|
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.exception.SalaryRunTimeException;
|
|
|
|
|
import com.engine.salary.service.SalaryArchiveItemService;
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
|
|
|
|
import com.engine.salary.util.valid.ValidUtil;
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 薪资档案薪资项目
|
|
|
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
|
|
|
|
* <p>Company: 泛微软件</p>
|
|
|
|
|
*
|
|
|
|
|
* @author qiantao
|
|
|
|
|
* @version 1.0
|
|
|
|
|
**/
|
|
|
|
|
public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchiveItemService {
|
|
|
|
|
|
|
|
|
|
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
|
|
|
|
|
private SalaryItemBiz salaryItemMapper = new SalaryItemBiz();
|
|
|
|
|
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
2022-03-28 20:04:27 +08:00
|
|
|
// private SalaryBatchService salaryBatchService;
|
2022-03-29 17:10:59 +08:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public SalaryArchiveItemPO getById(Long salaryArchiveItemId) {
|
|
|
|
|
return salaryArchiveItemMapper.getById(salaryArchiveItemId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取未生效 lt
|
|
|
|
|
*
|
|
|
|
|
* @param salaryArchiveId
|
|
|
|
|
* @param salaryItemIds
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private List<SalaryArchiveItemPO> getIneffectiveSalaryItems(Long salaryArchiveId, List<Long> salaryItemIds) {
|
|
|
|
|
// 没有薪资项目时,给个不存在的,否则加载所有不合理
|
|
|
|
|
salaryItemIds = CollectionUtils.isEmpty(salaryItemIds) ? Collections.singletonList(0L) : salaryItemIds;
|
|
|
|
|
return salaryArchiveItemMapper.getIneffectiveSalaryItems(SalaryArchiveItemQueryParam.builder()
|
|
|
|
|
.salaryArchiveId(salaryArchiveId)
|
|
|
|
|
.salaryItemIds(salaryItemIds)
|
|
|
|
|
.effectiveTime(new Date()).build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取当前已生效 gt
|
|
|
|
|
*
|
|
|
|
|
* @param salaryArchiveId
|
|
|
|
|
* @param salaryItemIds
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<SalaryArchiveItemPO> getEffectiveSalaryItems(Long salaryArchiveId, List<Long> salaryItemIds) {
|
|
|
|
|
// 没有薪资项目时,给个不存在的,否则加载所有不合理
|
|
|
|
|
salaryItemIds = CollectionUtils.isEmpty(salaryItemIds) ? Collections.singletonList(0L) : salaryItemIds;
|
|
|
|
|
return salaryArchiveItemMapper.getEffectiveSalaryItems(SalaryArchiveItemQueryParam.builder()
|
|
|
|
|
.salaryArchiveId(salaryArchiveId)
|
|
|
|
|
.salaryItemIds(salaryItemIds)
|
|
|
|
|
.effectiveTime(new Date()).build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getSalaryItemAdjustBeforeValue(SalaryItemAdjustBeforeParam adjustBeforeParam) {
|
|
|
|
|
|
|
|
|
|
ValidUtil.doValidator(adjustBeforeParam);
|
|
|
|
|
|
|
|
|
|
List<SalaryArchiveItemPO> archiveItemList;
|
|
|
|
|
if (adjustBeforeParam.getSalaryArchiveItemId() == null) {
|
|
|
|
|
archiveItemList = getEffectiveSalaryItems(adjustBeforeParam.getSalaryArchiveId(), Collections.singletonList(adjustBeforeParam.getSalaryItemId()));
|
|
|
|
|
} else {
|
|
|
|
|
SalaryArchiveItemPO salaryArchiveItem = salaryArchiveItemMapper.getById(adjustBeforeParam.getSalaryArchiveItemId());
|
|
|
|
|
if (salaryArchiveItem == null) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
// 如果不是当前记录的
|
|
|
|
|
if (!salaryArchiveItem.getSalaryItemId().equals(adjustBeforeParam.getSalaryItemId())) {
|
|
|
|
|
archiveItemList = getEffectiveSalaryItems(adjustBeforeParam.getSalaryArchiveId(), Collections.singletonList(adjustBeforeParam.getSalaryItemId()));
|
|
|
|
|
} else {
|
|
|
|
|
archiveItemList = salaryArchiveItemMapper.getIneffectiveSalaryItems(SalaryArchiveItemQueryParam.builder()
|
|
|
|
|
.salaryArchiveId(adjustBeforeParam.getSalaryArchiveId())
|
|
|
|
|
.salaryItemId(salaryArchiveItem.getSalaryItemId())
|
|
|
|
|
.effectiveTime(salaryArchiveItem.getEffectiveTime()).build());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return CollectionUtils.isNotEmpty(archiveItemList) ? archiveItemList.get(0).getItemValue() : "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String saveSalaryItem(SalaryArchiveItemSaveParam saveParam) {
|
|
|
|
|
// 检查参数
|
|
|
|
|
SalaryArchiveItemSaveParam.checkParam(saveParam);
|
|
|
|
|
|
|
|
|
|
Long salaryArchiveId = saveParam.getSalaryArchiveId();
|
|
|
|
|
// 获取所有可被引用的薪资项目
|
|
|
|
|
List<SalaryItemPO> salaryItems = getCanAdjustSalaryItems();
|
|
|
|
|
// 待处理薪资项目
|
|
|
|
|
List<SalaryArchiveItemDetailSaveParam> salaryArchiveItems = saveParam.getSalaryArchiveItems().stream().filter(e -> {
|
|
|
|
|
Optional<SalaryItemPO> optional = salaryItems.stream().filter(i -> i.getId().equals(e.getSalaryItemId())).findFirst();
|
|
|
|
|
return optional.isPresent();
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
List<Long> salaryItemIds = salaryArchiveItems.stream().map(SalaryArchiveItemDetailSaveParam::getSalaryItemId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
// 薪资档案
|
|
|
|
|
SalaryArchivePO salaryArchive = salaryArchiveMapper.getById(salaryArchiveId);
|
|
|
|
|
// 获取当前已生效数据
|
|
|
|
|
List<SalaryArchiveItemPO> effectiveSalaryItems = getEffectiveSalaryItems(salaryArchiveId, salaryItemIds);
|
|
|
|
|
|
|
|
|
|
// 获取未生效数据
|
|
|
|
|
List<SalaryArchiveItemPO> ineffectiveSalaryItems = getIneffectiveSalaryItems(salaryArchiveId, salaryItemIds);
|
|
|
|
|
// 待保存生效时间
|
|
|
|
|
Date saveEffectiveTime = saveParam.getEffectiveTime();
|
|
|
|
|
// 当天
|
|
|
|
|
Date today = new Date();
|
|
|
|
|
// 当前时间
|
|
|
|
|
Date nowTime = new Date();
|
|
|
|
|
|
|
|
|
|
List<Long> effectiveSalaryItemDels = Lists.newArrayList();
|
|
|
|
|
List<SalaryArchiveItemPO> salaryArchiveItemNews = Lists.newArrayList();
|
|
|
|
|
salaryArchiveItems.forEach(e -> {
|
|
|
|
|
// 已生效
|
|
|
|
|
List<SalaryArchiveItemPO> effectiveList = effectiveSalaryItems.stream().filter(i -> i.getSalaryItemId().equals(e.getSalaryItemId())).collect(Collectors.toList());
|
|
|
|
|
// 当前已生效
|
|
|
|
|
SalaryArchiveItemPO effectiveSalaryItem = CollectionUtils.isNotEmpty(effectiveList) && effectiveList.size() > 0 ? effectiveList.get(0) : null;
|
|
|
|
|
// 当前已生效的前一次调整
|
|
|
|
|
SalaryArchiveItemPO effectiveBeforeSalaryItem = CollectionUtils.isNotEmpty(effectiveList) && effectiveList.size() > 1 ? effectiveList.get(1) : null;
|
|
|
|
|
// 未生效
|
|
|
|
|
Optional<SalaryArchiveItemPO> optionalIneffective = ineffectiveSalaryItems.stream().filter(i -> i.getSalaryItemId().equals(e.getSalaryItemId())).findFirst();
|
|
|
|
|
SalaryArchiveItemPO ineffectiveSalaryItem = optionalIneffective.orElse(null);
|
|
|
|
|
|
|
|
|
|
// 1.检验是否可以调整
|
|
|
|
|
if (effectiveSalaryItem != null) {
|
|
|
|
|
// 当前已经生效的时间
|
|
|
|
|
Date effectiveTime = effectiveSalaryItem.getEffectiveTime();
|
|
|
|
|
// 1.1 如果早于<当前已生效
|
|
|
|
|
if (saveEffectiveTime.before(effectiveTime)) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100429, "生效日期不可早于当前已生效的调整日期"));
|
|
|
|
|
// 1.2 如果等于当前已生效 fixme 日期比较可能有bug
|
|
|
|
|
} else if (saveEffectiveTime.equals(effectiveTime)) {
|
|
|
|
|
if (effectiveBeforeSalaryItem != null && effectiveBeforeSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
// 1.3 如果>已经生效且<=今天
|
|
|
|
|
} else if (saveEffectiveTime.after(effectiveTime) && !saveEffectiveTime.after(today)) {
|
|
|
|
|
if (effectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
// 1.4 如果>今天
|
|
|
|
|
} else if (saveEffectiveTime.after(today) && effectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100432, "调整前后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
} else if (ineffectiveSalaryItem != null && ineffectiveSalaryItem.getItemValue().equals(e.getAdjustValue())) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100434, "与未生效的调整后不可相同"));
|
|
|
|
|
}
|
|
|
|
|
// 2.数据处理
|
|
|
|
|
if (effectiveSalaryItem != null && saveEffectiveTime.equals(effectiveSalaryItem.getEffectiveTime())) {
|
|
|
|
|
effectiveSalaryItemDels.add(effectiveSalaryItem.getId());
|
|
|
|
|
}
|
|
|
|
|
if (ineffectiveSalaryItem != null && saveEffectiveTime.after(today)) {
|
|
|
|
|
effectiveSalaryItemDels.add(ineffectiveSalaryItem.getId());
|
|
|
|
|
}
|
|
|
|
|
salaryArchiveItemNews.add(buildInsert(salaryArchive, e.getSalaryItemId(), e.getAdjustValue(), saveParam, nowTime));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 落库处理
|
|
|
|
|
if (CollectionUtils.isNotEmpty(effectiveSalaryItemDels)) {
|
|
|
|
|
salaryArchiveItemMapper.deleteBatchIds(effectiveSalaryItemDels);
|
|
|
|
|
}
|
|
|
|
|
if (CollectionUtils.isNotEmpty(salaryArchiveItemNews)) {
|
|
|
|
|
salaryArchiveItemMapper.batchInsert(salaryArchiveItemNews);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 插入
|
|
|
|
|
*
|
|
|
|
|
* @param salaryArchive
|
|
|
|
|
* @param saveParam
|
|
|
|
|
*/
|
|
|
|
|
private SalaryArchiveItemPO buildInsert(SalaryArchivePO salaryArchive, Long salaryItemId, String adjustValue, SalaryArchiveItemSaveParam saveParam, Date now) {
|
|
|
|
|
return SalaryArchiveItemPO.builder()
|
2022-03-28 20:04:27 +08:00
|
|
|
// .id(IdGenerator.generate())
|
2022-03-29 17:10:59 +08:00
|
|
|
.salaryArchiveId(saveParam.getSalaryArchiveId())
|
|
|
|
|
.employeeId(salaryArchive.getEmployeeId())
|
|
|
|
|
.effectiveTime(saveParam.getEffectiveTime())
|
|
|
|
|
.adjustReason(saveParam.getAdjustReason().getValue())
|
|
|
|
|
.description(saveParam.getDescription())
|
|
|
|
|
.salaryItemId(salaryItemId)
|
|
|
|
|
// 调整后
|
|
|
|
|
.itemValue(adjustValue)
|
|
|
|
|
.operator((long) user.getUID())
|
|
|
|
|
.operateTime(now)
|
|
|
|
|
.createTime(now)
|
|
|
|
|
.updateTime(now)
|
|
|
|
|
.creator((long) user.getUID())
|
|
|
|
|
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public String deleteSalaryItem(Long salaryArchiveItemId) {
|
|
|
|
|
SalaryArchiveItemPO salaryArchiveItem = salaryArchiveItemMapper.getById(salaryArchiveItemId);
|
|
|
|
|
if (salaryArchiveItem == null) {
|
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
|
}
|
|
|
|
|
if (salaryArchiveItem.getEffectiveTime().after(new Date())) {
|
|
|
|
|
salaryArchiveItem.setDeleteType(1);
|
|
|
|
|
// 删除未生效数据
|
|
|
|
|
salaryArchiveItemMapper.updateById(salaryArchiveItem);
|
|
|
|
|
}
|
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取所有可被引用的薪资项目
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<SalaryItemPO> getCanAdjustSalaryItems() {
|
|
|
|
|
return salaryItemMapper.getCanAdjustSalaryItems();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-03-28 20:04:27 +08:00
|
|
|
// @Override
|
|
|
|
|
// public Page<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordListPage(Page<SalaryItemAdjustRecordListDTO> page, SalaryItemAdjustRecordQueryParam queryParam, List<Long> salaryItemIds, String tenantKey) {
|
|
|
|
|
// salaryArchiveItemMapper.salaryItemAdjustRecordList(page, queryParam, salaryItemIds, tenantKey);
|
|
|
|
|
// return page;
|
|
|
|
|
// }
|
2022-03-29 17:10:59 +08:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam, List<Long> salaryItemIds) {
|
|
|
|
|
return salaryArchiveItemMapper.salaryItemAdjustRecordList(queryParam, salaryItemIds);
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-28 20:04:27 +08:00
|
|
|
// @Override
|
2022-03-29 17:10:59 +08:00
|
|
|
// public void exportAdjustRecordList(Map<String, Object> map, String username, String eteamsId, SalaryItemAdjustRecordQueryParam queryParam) {
|
2022-03-28 20:04:27 +08:00
|
|
|
// List<ExcelSheetData> sheetList = new ArrayList<>();
|
|
|
|
|
//
|
|
|
|
|
// ExcelSheetData excelSheetData = new ExcelSheetData();
|
|
|
|
|
// // 1.工作簿名称
|
2022-03-29 17:10:59 +08:00
|
|
|
// String nameI18n = SalaryI18nUtil.getI18nLabel( 100438, "薪资项目调整记录");
|
2022-03-28 20:04:27 +08:00
|
|
|
// excelSheetData.setSheetName(nameI18n);
|
|
|
|
|
// String[] header = {
|
2022-03-29 17:10:59 +08:00
|
|
|
// SalaryI18nUtil.getI18nLabel( 85429, "姓名"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 86187, "员工状态"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 86185, "部门"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 84960, "薪资项目"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85433, "调整前"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85434, "调整后"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85431, "调整原因"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85904, "生效日期"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85435, "操作人"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 85436, "操作时间"),
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel( 84961, "备注")
|
2022-03-28 20:04:27 +08:00
|
|
|
// };
|
|
|
|
|
// // 2.表头
|
|
|
|
|
// excelSheetData.setHeaders(Collections.singletonList(header));
|
|
|
|
|
// // 获取所有可被引用的薪资项目
|
|
|
|
|
// List<SalaryItemPO> salaryItemList = getCanAdjustSalaryItems(currentTenantKey);
|
|
|
|
|
// List<Long> salaryItemIds = salaryItemList.stream().map(SalaryItemPO::getId).collect(Collectors.toList());
|
|
|
|
|
// // 获取记录
|
|
|
|
|
// List<SalaryItemAdjustRecordListDTO> list = salaryArchiveItemMapper.salaryItemAdjustRecordList(queryParam, salaryItemIds, currentTenantKey);
|
|
|
|
|
// List<SalaryItemAdjustRecordListDTO> listAll = salaryArchiveItemMapper.salaryItemAdjustRecordList(SalaryItemAdjustRecordQueryParam.builder().build(), salaryItemIds, currentTenantKey);
|
|
|
|
|
// // 人员信息赋值
|
2022-03-29 17:10:59 +08:00
|
|
|
// list.forEach(m -> {
|
2022-03-28 20:04:27 +08:00
|
|
|
// if (!org.springframework.util.CollectionUtils.isEmpty(listAll)) {
|
2022-03-29 17:10:59 +08:00
|
|
|
// listAll.removeIf(a -> a.getId().equals(m.getId()));
|
2022-03-28 20:04:27 +08:00
|
|
|
// }
|
2022-03-29 17:10:59 +08:00
|
|
|
// Optional<SalaryItemAdjustRecordListDTO> optional = listAll.stream().filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId()) && f.getSalaryItemId().equals(m.getSalaryItemId())).findFirst();
|
|
|
|
|
// m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : "");
|
2022-03-28 20:04:27 +08:00
|
|
|
//
|
|
|
|
|
// m.setEmployeeStatus(SalaryUserStatusEnum.getDefaultLabelByValue(m.getEmployeeStatus(), currentEmployeeId, currentTenantKey));
|
|
|
|
|
// m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason(), currentEmployeeId, currentTenantKey));
|
|
|
|
|
// });
|
|
|
|
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// List<List<Object>> rows = new ArrayList<>();
|
|
|
|
|
// for (SalaryItemAdjustRecordListDTO dto : list) {
|
|
|
|
|
// List<Object> row = new ArrayList<>();
|
|
|
|
|
// row.add(dto.getUsername());
|
|
|
|
|
// row.add(dto.getEmployeeStatus());
|
|
|
|
|
// row.add(dto.getDepartmentName());
|
|
|
|
|
// row.add(dto.getAdjustItem());
|
|
|
|
|
// row.add(dto.getAdjustBefore());
|
|
|
|
|
// row.add(dto.getAdjustAfter());
|
|
|
|
|
// row.add(dto.getAdjustReason());
|
2022-03-29 17:10:59 +08:00
|
|
|
// row.add(dto.getEffectiveTime() + "");
|
2022-03-28 20:04:27 +08:00
|
|
|
// row.add(dto.getOperator());
|
|
|
|
|
// row.add(format.format(dto.getOperateTime()));
|
|
|
|
|
// row.add(dto.getDescription());
|
|
|
|
|
// rows.add(row);
|
|
|
|
|
// }
|
|
|
|
|
// // 3.表数据
|
|
|
|
|
// excelSheetData.setRows(rows);
|
|
|
|
|
//
|
|
|
|
|
// sheetList.add(excelSheetData);
|
|
|
|
|
//
|
|
|
|
|
// salaryBatchService.simpleExportExcel(ExportExcelInfo.builder()
|
|
|
|
|
// .bizId(map.get("biz").toString())
|
|
|
|
|
// .flag(true)
|
|
|
|
|
// .userId(currentEmployeeId)
|
|
|
|
|
// .eteamsId(eteamsId)
|
|
|
|
|
// .tenantKey(currentTenantKey)
|
|
|
|
|
// .operator(username)
|
|
|
|
|
// .module(map.get("module").toString())
|
|
|
|
|
// .fileName(nameI18n + SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
|
|
|
|
|
// .handlerName(map.get("function").toString())
|
|
|
|
|
// .dataType(nameI18n)
|
|
|
|
|
// .function(map.get("function").toString()).build(), sheetList);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @BatchExportHandler("exportSalaryArchiveItemAdjustRecord")
|
|
|
|
|
// public void exportSalaryArchiveItemAdjustRecordHandler() {
|
|
|
|
|
// BatchCallbackMessage message = BatchExportContext.getBatchCallbackMessage();
|
|
|
|
|
// log.info("接受到薪资项目操作记录导出的结果:{}", JSONObject.toJSONString(message));
|
|
|
|
|
// }
|
2022-03-29 17:10:59 +08:00
|
|
|
}
|