Commit fd0fdb5b by “zcwang”

modify:导出字段完善

parent 9c6d24c4
......@@ -1235,7 +1235,7 @@ public class ChangeFlowBiz {
}
List<ChangeFlowExcelDTO> changeFlowExcelDTOList = changeRecords.stream().map(record -> {
ChangeFlowExcelDTO changeFlowExcelDTO = new ChangeFlowExcelDTO();
changeFlowExcelDTO.setId(record.getId());
/*changeFlowExcelDTO.setId(record.getId());
changeFlowExcelDTO.setChangeSubject(ChangeSubjectEnum.getChangeSubjectEnum(record.getChangeSubject()).getDesc());
ChangeType parentChangeType = changeTypeService.getChangeTypeById(record.getParentChangeClassId());
ChangeType sonChangeType = changeTypeService.getChangeTypeById(record.getSonChangeClassId());
......@@ -1256,7 +1256,7 @@ public class ChangeFlowBiz {
// todo:变更发起人组织查询:姓名(组织架构三级部门)/供应商ID/system+发起时间
changeFlowExcelDTO.setChangeCreator(record.getCreator());
changeFlowExcelDTO.setExecDepartmentStrList(record.getParticipateChangeExecDepartment());
changeFlowExcelDTO.setCreateTime(record.getCreateTime());
changeFlowExcelDTO.setCreateTime(record.getCreateTime());*/
return changeFlowExcelDTO;
}).collect(Collectors.toList());
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ChangeFlowExcelDTO.class, changeFlowExcelDTOList);
......
......@@ -34,6 +34,7 @@ import com.netease.mail.yanxuan.change.biz.service.rpc.ItemService;
import com.netease.mail.yanxuan.change.biz.service.rpc.IusService;
import com.netease.mail.yanxuan.change.biz.service.rpc.QCService;
import com.netease.mail.yanxuan.change.common.enums.BusinessFormEnum;
import com.netease.mail.yanxuan.change.common.enums.ChangeResultEnum;
import com.netease.mail.yanxuan.change.common.enums.ChangeStatusEnum;
import com.netease.mail.yanxuan.change.common.enums.ChangeSubjectEnum;
import com.netease.mail.yanxuan.change.common.enums.ItemSetupTypeEnum;
......@@ -197,7 +198,8 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeGoodsPrincipalPO.getGoodsProjectName() + changeGoodsPrincipalPO.getGoodsProjectEmail());
// 组装行动项相关信息
obtainChangeExec(changeExecRecord, changeFlowExcelDTO, userListInfo);
changeFlowExcelDTO.setChangeResult(record.getChangeResult());
ChangeResultEnum resultEnum = ChangeResultEnum.getByStatus(record.getChangeResult());
changeFlowExcelDTO.setChangeResult(resultEnum == null ? "": resultEnum.getDesc());
changeFlowExcelDTO
.setChangeEndTime(record.getState().equals(ChangeStatusEnum.END.getStatus())
? DateUtils.parseLongToString(record.getUpdateTime(), DateUtils.DATE_TIME_FORMAT)
......@@ -224,7 +226,8 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO.setGoodsProjectName(null);
// 组装行动项相关信息
this.obtainChangeExec(changeExecRecord, changeFlowExcelDTO, userListInfo);
changeFlowExcelDTO.setChangeResult(record.getChangeResult());
ChangeResultEnum resultEnum = ChangeResultEnum.getByStatus(record.getChangeResult());
changeFlowExcelDTO.setChangeResult(resultEnum == null ? "": resultEnum.getDesc());
changeFlowExcelDTO
.setChangeEndTime(record.getState().equals(ChangeStatusEnum.END.getStatus())
? DateUtils.parseLongToString(record.getUpdateTime(), DateUtils.DATE_TIME_FORMAT)
......@@ -251,7 +254,8 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO.setGoodsProjectName(null);
// 组装行动项相关信息
this.obtainChangeExec(changeExecRecord, changeFlowExcelDTO, userListInfo);
changeFlowExcelDTO.setChangeResult(record.getChangeResult());
ChangeResultEnum resultEnum = ChangeResultEnum.getByStatus(record.getChangeResult());
changeFlowExcelDTO.setChangeResult(resultEnum == null ? "": resultEnum.getDesc());
changeFlowExcelDTO
.setChangeEndTime(record.getState().equals(ChangeStatusEnum.END.getStatus())
? DateUtils.parseLongToString(record.getUpdateTime(), DateUtils.DATE_TIME_FORMAT)
......
......@@ -36,4 +36,8 @@ public enum ChangeResultEnum {
public Integer getStatus() {
return status;
}
public String getDesc() {
return desc;
}
}
\ No newline at end of file
......@@ -210,7 +210,7 @@ public class ChangeFlowExcelDTO {
* 变更结论
*/
@Excel(name = "变更结论")
private Integer changeResult;
private String changeResult;
/**
* 变更完结时间
......
......@@ -216,7 +216,7 @@ public class ChangeFlowExcelVo {
* 变更结论
*/
@ExcelTitleName(title = "变更结论", order = 33)
private Integer changeResult;
private String changeResult;
/**
* 变更完结时间
......@@ -229,52 +229,140 @@ public class ChangeFlowExcelVo {
List<ExcelCell> cellInfo = new ArrayList<>();
ExcelCell excelCell = new ExcelCell();
excelCell.setCellType(ExcelCellType.TEXT);
// id
excelCell.setValue(dto.getId());
// 1.id
excelCell.setValue(dto.getFlowId());
cellInfo.add(excelCell);
// 变更主体
// 2.变更发起时间
excelCell = new ExcelCell();
excelCell.setValue(dto.getCreateTime());
cellInfo.add(excelCell);
// 3.变更发起人
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeCreator());
cellInfo.add(excelCell);
// 4.变更主体
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeSubject());
cellInfo.add(excelCell);
// 变更类型
// 5.变更类型,一级类型>二级类型
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeType());
cellInfo.add(excelCell);
// 变更负责部门名
// 6.变更等级
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeLevel());
cellInfo.add(excelCell);
// 7.变更负责部门名
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeDepartment());
cellInfo.add(excelCell);
// 变更内容
// 8.变更负责人
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeCommander());
cellInfo.add(excelCell);
// 9.变更供应商
excelCell = new ExcelCell();
excelCell.setValue(dto.getSupplier());
cellInfo.add(excelCell);
// 10.变更原因
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeReason());
cellInfo.add(excelCell);
// 11.变更内容
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeContent());
cellInfo.add(excelCell);
// 变更负责人
// 12.变更潜在风险描述
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeCommander());
excelCell.setValue(dto.getChangeRiskDesc());
cellInfo.add(excelCell);
// 变更商品列表
// 13.变更收益类型
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeItems());
excelCell.setValue(dto.getChangeProfit());
cellInfo.add(excelCell);
// 变更供应商
// 14.变更收益说明
excelCell = new ExcelCell();
excelCell.setValue(dto.getSupplier());
excelCell.setValue(dto.getChangeProfitDesc());
cellInfo.add(excelCell);
// 变更状态
// 15.变更商品,商品名称
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeState());
excelCell.setValue(dto.getChangeItem());
cellInfo.add(excelCell);
// 变更发起人
// 16.SPUID
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeCreator());
excelCell.setValue(dto.getSPUId());
cellInfo.add(excelCell);
// 变更行动部门列表
// 17.品控类目
excelCell = new ExcelCell();
excelCell.setValue(dto.getExecDepartmentStrList());
excelCell.setValue(dto.getQcCategory());
cellInfo.add(excelCell);
// 创建时间
// 18.物理类目
excelCell = new ExcelCell();
excelCell.setValue(dto.getCreateTime());
excelCell.setValue(dto.getPhyCategory());
cellInfo.add(excelCell);
// 19.商品立项类型.0-正常立项商品,2-特殊免立项商品 3-组合装
excelCell = new ExcelCell();
excelCell.setValue(dto.getItemSetupType());
cellInfo.add(excelCell);
// 20.经营形式,0-自营,3-严选贴牌代销,4-他方品牌代销,5-代销2.0
excelCell = new ExcelCell();
excelCell.setValue(dto.getBusinessForm());
cellInfo.add(excelCell);
// 21.商品状态,0-未上架,1-未上架,2-已上架,4-预上架
excelCell = new ExcelCell();
excelCell.setValue(dto.getStatus());
cellInfo.add(excelCell);
// 22.商品负责人
excelCell = new ExcelCell();
excelCell.setValue(dto.getFunctionary());
cellInfo.add(excelCell);
// 23.采购负责人
excelCell = new ExcelCell();
excelCell.setValue(dto.getPurchase());
cellInfo.add(excelCell);
// 24.SQE负责人
excelCell = new ExcelCell();
excelCell.setValue(dto.getGoodsSqe());
cellInfo.add(excelCell);
// 25.计划负责人
excelCell = new ExcelCell();
excelCell.setValue(dto.getGoodsProjectName());
cellInfo.add(excelCell);
// 26.变更行动部门
excelCell = new ExcelCell();
excelCell.setValue(dto.getExecDepartment());
cellInfo.add(excelCell);
// 27.变更行动人
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeExecUser());
cellInfo.add(excelCell);
// 28.行动项变更风险描述
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeExecRiskDesc());
cellInfo.add(excelCell);
// 29.行动项
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeExecProject());
cellInfo.add(excelCell);
// 30.变更验证措施
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeChecking());
cellInfo.add(excelCell);
// 31.行动完成时间
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeExecFinishTime());
cellInfo.add(excelCell);
// 32.行动完成情况
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeExecFinishDesc());
cellInfo.add(excelCell);
// 33.变更结论
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeResult());
cellInfo.add(excelCell);
// 34.变更完结时间
excelCell = new ExcelCell();
excelCell.setValue(dto.getChangeEndTime());
cellInfo.add(excelCell);
return cellInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment