Commit 9b811080 by “zcwang”

modify: 导出字段完善

parent e509a0cc
...@@ -221,14 +221,14 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -221,14 +221,14 @@ public class ChangeFlowExportCallback implements DesCallbackService {
} }
ChangeGoodsPrincipalPO changeGoodsPrincipalPO = longChangeGoodsPrincipalPOMap.get(itemId); ChangeGoodsPrincipalPO changeGoodsPrincipalPO = longChangeGoodsPrincipalPOMap.get(itemId);
try { try {
changeFlowExcelDTO.setFunctionary(changeGoodsPrincipalPO.getFunctionaryName() if (null == changeGoodsPrincipalPO) {
+ changeGoodsPrincipalPO.getFunctionaryEmail()); changeFlowExcelDTO.setFunctionary("/");
changeFlowExcelDTO.setPurchase( changeFlowExcelDTO.setPurchase("/");
changeGoodsPrincipalPO.getPurchaseName() + changeGoodsPrincipalPO.getPurchaseEmail()); changeFlowExcelDTO.setGoodsProject("/");
changeFlowExcelDTO.setGoodsSqe( changeFlowExcelDTO.setGoodsSqe("/");
changeGoodsPrincipalPO.getGoodsSqeName() + changeGoodsPrincipalPO.getGoodsSqeEmail()); } else {
changeFlowExcelDTO.setGoodsProjectName( buildGoodsPrincipal(changeGoodsPrincipalPO, changeFlowExcelDTO);
changeGoodsPrincipalPO.getGoodsProjectName() + changeGoodsPrincipalPO.getGoodsProjectEmail()); }
} catch (Exception e) { } catch (Exception e) {
log.debug("[getExportList] changeGoodsPrincipalPO has ex:{}", log.debug("[getExportList] changeGoodsPrincipalPO has ex:{}",
JSON.toJSONString(changeGoodsPrincipalPO)); JSON.toJSONString(changeGoodsPrincipalPO));
...@@ -252,7 +252,7 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -252,7 +252,7 @@ public class ChangeFlowExportCallback implements DesCallbackService {
for (ChangeExecRecord changeExecRecord : changeExecRecords) { for (ChangeExecRecord changeExecRecord : changeExecRecords) {
// 组装通用信息,除商品信息,行动项以外其他字段一致 // 组装通用信息,除商品信息,行动项以外其他字段一致
ChangeFlowExcelDTO changeFlowExcelDTO = this.obtainCommon(record, changeSubjectEnum); ChangeFlowExcelDTO changeFlowExcelDTO = this.obtainCommon(record, changeSubjectEnum);
changeFlowExcelDTO.setSupplier(record.getChangeSupplier()); changeFlowExcelDTO.setSupplier(StringUtils.isBlank(record.getChangeSupplier())? "/": record.getChangeSupplier());
changeFlowExcelDTO.setChangeItem(null); changeFlowExcelDTO.setChangeItem(null);
changeFlowExcelDTO.setSPUId(null); changeFlowExcelDTO.setSPUId(null);
changeFlowExcelDTO.setQcCategory(null); changeFlowExcelDTO.setQcCategory(null);
...@@ -263,7 +263,7 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -263,7 +263,7 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO.setFunctionary(null); changeFlowExcelDTO.setFunctionary(null);
changeFlowExcelDTO.setPurchase(null); changeFlowExcelDTO.setPurchase(null);
changeFlowExcelDTO.setGoodsSqe(null); changeFlowExcelDTO.setGoodsSqe(null);
changeFlowExcelDTO.setGoodsProjectName(null); changeFlowExcelDTO.setGoodsProject(null);
// 组装行动项相关信息 // 组装行动项相关信息
this.obtainChangeExec(changeExecRecord, changeFlowExcelDTO, userListInfo); this.obtainChangeExec(changeExecRecord, changeFlowExcelDTO, userListInfo);
ChangeResultEnum resultEnum = ChangeResultEnum.getByStatus(record.getChangeResult()); ChangeResultEnum resultEnum = ChangeResultEnum.getByStatus(record.getChangeResult());
...@@ -271,7 +271,7 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -271,7 +271,7 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO changeFlowExcelDTO
.setChangeEndTime(record.getState().equals(ChangeStatusEnum.END.getStatus()) .setChangeEndTime(record.getState().equals(ChangeStatusEnum.END.getStatus())
? DateUtils.parseLongToString(record.getUpdateTime(), DateUtils.DATE_TIME_FORMAT) ? DateUtils.parseLongToString(record.getUpdateTime(), DateUtils.DATE_TIME_FORMAT)
: ""); : "/");
changeFlowExcelDTOList.add(changeFlowExcelDTO); changeFlowExcelDTOList.add(changeFlowExcelDTO);
} }
break; break;
...@@ -282,6 +282,26 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -282,6 +282,26 @@ public class ChangeFlowExportCallback implements DesCallbackService {
} }
private void buildGoodsPrincipal(ChangeGoodsPrincipalPO changeGoodsPrincipalPO, ChangeFlowExcelDTO changeFlowExcelDTO) {
String functionaryName = StringUtils.isBlank(changeGoodsPrincipalPO.getFunctionaryName()) ? "" : changeGoodsPrincipalPO.getFunctionaryName();
String functionaryEmail = StringUtils.isBlank(changeGoodsPrincipalPO.getFunctionaryEmail()) ? "" : changeGoodsPrincipalPO.getFunctionaryEmail();
String purchaseName = StringUtils.isBlank(changeGoodsPrincipalPO.getPurchaseName()) ? "" : changeGoodsPrincipalPO.getPurchaseName();
String purchaseEmail = StringUtils.isBlank(changeGoodsPrincipalPO.getPurchaseEmail()) ? "" : changeGoodsPrincipalPO.getPurchaseEmail();
String goodsProjectName = StringUtils.isBlank(changeGoodsPrincipalPO.getGoodsProjectName()) ? "" : changeGoodsPrincipalPO.getGoodsProjectName();
String goodsProjectEmail = StringUtils.isBlank(changeGoodsPrincipalPO.getGoodsProjectEmail()) ? "" : changeGoodsPrincipalPO.getGoodsProjectEmail();
String goodsSqeName = StringUtils.isBlank(changeGoodsPrincipalPO.getGoodsSqeName()) ? "" : changeGoodsPrincipalPO.getGoodsSqeName();
String goodsSqeEmail = StringUtils.isBlank(changeGoodsPrincipalPO.getGoodsSqeEmail()) ? "" : changeGoodsPrincipalPO.getGoodsSqeEmail();
String functionary = functionaryName + functionaryEmail;
String purchase = purchaseName + purchaseEmail;
String goodsProject = goodsProjectName + goodsProjectEmail;
String goodsSqe = goodsSqeName + goodsSqeEmail;
changeFlowExcelDTO.setFunctionary(StringUtils.isBlank(functionary) ? "/" :functionary);
changeFlowExcelDTO.setPurchase(StringUtils.isBlank(purchase) ? "/" :purchase);
changeFlowExcelDTO.setGoodsProject(StringUtils.isBlank(goodsProject) ? "/" :goodsProject);
changeFlowExcelDTO.setGoodsSqe(StringUtils.isBlank(goodsSqe) ? "/" :goodsSqe);
}
private void obtainChangeExec(ChangeExecRecord changeExecRecord, ChangeFlowExcelDTO changeFlowExcelDTO, private void obtainChangeExec(ChangeExecRecord changeExecRecord, ChangeFlowExcelDTO changeFlowExcelDTO,
List<IusUserInfoRsp> userListInfo) { List<IusUserInfoRsp> userListInfo) {
changeFlowExcelDTO.setExecDepartment(changeExecRecord.getChangeExecDepartment()); changeFlowExcelDTO.setExecDepartment(changeExecRecord.getChangeExecDepartment());
...@@ -295,8 +315,13 @@ public class ChangeFlowExportCallback implements DesCallbackService { ...@@ -295,8 +315,13 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO.setChangeExecRiskDesc(changeExecRecord.getChangeRiskDesc()); changeFlowExcelDTO.setChangeExecRiskDesc(changeExecRecord.getChangeRiskDesc());
changeFlowExcelDTO.setChangeExecProject(changeExecRecord.getChangeExecProject()); changeFlowExcelDTO.setChangeExecProject(changeExecRecord.getChangeExecProject());
changeFlowExcelDTO.setChangeChecking(changeExecRecord.getChangeChecking()); changeFlowExcelDTO.setChangeChecking(changeExecRecord.getChangeChecking());
changeFlowExcelDTO.setChangeExecFinishTime( Long changeExecFinishTime = changeExecRecord.getChangeExecFinishTime();
DateUtils.parseLongToString(changeExecRecord.getChangeExecFinishTime(), DateUtils.DATE_TIME_FORMAT)); if (changeExecFinishTime == 0L) {
changeFlowExcelDTO.setChangeExecFinishTime("/");
} else {
changeFlowExcelDTO.setChangeExecFinishTime(
DateUtils.parseLongToString(changeExecFinishTime, DateUtils.DATE_TIME_FORMAT));
}
changeFlowExcelDTO.setChangeExecFinishDesc(changeExecRecord.getChangeExecFinishDesc()); changeFlowExcelDTO.setChangeExecFinishDesc(changeExecRecord.getChangeExecFinishDesc());
} }
......
...@@ -163,7 +163,7 @@ public class ChangeFlowExcelDTO { ...@@ -163,7 +163,7 @@ public class ChangeFlowExcelDTO {
* 计划负责人 * 计划负责人
*/ */
@Excel(name = "计划负责人") @Excel(name = "计划负责人")
private String goodsProjectName; private String goodsProject;
/** /**
* 变更行动部门 * 变更行动部门
......
...@@ -12,7 +12,6 @@ import java.util.List; ...@@ -12,7 +12,6 @@ import java.util.List;
import com.netease.mail.dp.des.common.api.enums.ExcelCellType; import com.netease.mail.dp.des.common.api.enums.ExcelCellType;
import com.netease.mail.dp.des.process.api.entity.ExcelCell; import com.netease.mail.dp.des.process.api.entity.ExcelCell;
import com.netease.mail.yanxuan.change.common.anno.ExcelTitleName; import com.netease.mail.yanxuan.change.common.anno.ExcelTitleName;
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.ChangeSubjectEnum;
import lombok.Data; import lombok.Data;
...@@ -221,7 +220,7 @@ public class ChangeFlowExcelVo { ...@@ -221,7 +220,7 @@ public class ChangeFlowExcelVo {
/** /**
* 变更完结时间 * 变更完结时间
*/ */
@ExcelTitleName(title = "变更结论", order = 34) @ExcelTitleName(title = "变更完结时间", order = 34)
private Integer changeEndTime; private Integer changeEndTime;
...@@ -326,7 +325,7 @@ public class ChangeFlowExcelVo { ...@@ -326,7 +325,7 @@ public class ChangeFlowExcelVo {
cellInfo.add(excelCell); cellInfo.add(excelCell);
// 25.计划负责人 // 25.计划负责人
excelCell = new ExcelCell(); excelCell = new ExcelCell();
excelCell.setValue(dto.getGoodsProjectName()); excelCell.setValue(dto.getGoodsProject());
cellInfo.add(excelCell); cellInfo.add(excelCell);
// 26.变更行动部门 // 26.变更行动部门
excelCell = new ExcelCell(); excelCell = new ExcelCell();
......
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