feat(REQ-3300): 导出调试修复
This commit is contained in:
parent
228190f217
commit
2cb42d034f
@ -15,7 +15,7 @@ public enum VisaChangeFieldEnum {
|
||||
STATUS("status", "单据状态"),
|
||||
TOPIC("topic", "主题"),
|
||||
AMOUNT_CHANGE("amountChange", "金额变化"),
|
||||
CREATE_BY("createBy", "发起人"),
|
||||
INITIATOR("initiator", "发起人"),
|
||||
CREATE_AT("happenTime", "提出时间"),
|
||||
APPROVAL_COMPLETE_TIME("approvalCompleteTime", "审批通过时间"),
|
||||
RELATION_PROJECT("relationProject", "所属工程"),
|
||||
|
||||
@ -859,7 +859,7 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
projectInfoMapById = Collections.emptyMap();
|
||||
}
|
||||
// 发起人
|
||||
if (fields.contains(VisaChangeFieldEnum.CREATE_BY)) {
|
||||
if (fields.contains(VisaChangeFieldEnum.INITIATOR)) {
|
||||
List<Long> initiatorPersonIdList = changeRecordList.stream().map(ChangeRecord::getCreateBy).distinct().collect(Collectors.toList());
|
||||
// Map<personId,OrgNodeUserBriefInfoResp>
|
||||
initiatorMap = getPersonBriefInfoMap(changeRecordList.get(0).getRelationWorkspaceId(), initiatorPersonIdList);
|
||||
@ -886,19 +886,21 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
}
|
||||
|
||||
private void exportToExcel(VisaChangeExportReq req, List<VisaChangeFieldEnum> fields, List<Object> data) {
|
||||
String scene = "visa";
|
||||
String scene = "变更签证表";
|
||||
String fileName = String.format("变更签证单%s", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
|
||||
String sheetName = "变更签证表";
|
||||
String headerName = "变更签证单";
|
||||
SheetWrapper sheetWrapper = SheetWrapper.builder()
|
||||
.headClass(VisaExportDto.class)
|
||||
.title(headerName)
|
||||
.sheetName(sheetName)
|
||||
.includeColumnFieldNames(fields.stream()
|
||||
.map(VisaChangeFieldEnum::getDesc)
|
||||
.map(VisaChangeFieldEnum::getValue)
|
||||
.collect(Collectors.toList()))
|
||||
.sourceData(data)
|
||||
.build();
|
||||
ReportFileReq reportFileReq = ReportFileReq.builder()
|
||||
.convertData(false)
|
||||
.bizScene(scene)
|
||||
.fileName(fileName)
|
||||
.reportPassword(null)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user