Commit 9fc1509d authored by wangqiang's avatar wangqiang

修改IED的审核时间和提交时间的格式

parent f38ddacc
......@@ -87,14 +87,14 @@ public class ExtIEDPlanExcelVO {
*/
@ExcelProperty(value = {"IED计划","节点审核时间*"},index = 9)
@ColumnWidth(20)
private LocalDateTime auditTime;
private String auditTime;
/**
* 文件提交时间
*/
@ExcelProperty(value = {"IED计划","文件提交时间*"},index = 10)
@ColumnWidth(20)
private LocalDateTime fileSubmitTime;
private String fileSubmitTime;
/**
* 编写者
......
......@@ -25,6 +25,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -203,8 +204,24 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
extIEDPlanVO.setSystemNumber(extIEDPlanExcelVO.getSystemNumber());
extIEDPlanVO.setDeviceNumber(extIEDPlanExcelVO.getDeviceNumber());
extIEDPlanVO.setPhase(extIEDPlanExcelVO.getPhase());
extIEDPlanVO.setAuditTime(extIEDPlanExcelVO.getAuditTime());
extIEDPlanVO.setFileSubmitTime(extIEDPlanExcelVO.getFileSubmitTime());
if(!ObjectUtils.isEmpty(extIEDPlanExcelVO.getAuditTime())){
try {
LocalDateTime auditTime = LocalDateTime.parse(extIEDPlanExcelVO.getAuditTime());
extIEDPlanVO.setAuditTime(auditTime);
}catch (Exception e){
throw new DxBusinessException("-1","审核时间格式不正确!");
}
}
if(!ObjectUtils.isEmpty(extIEDPlanExcelVO.getFileSubmitTime())){
try {
LocalDateTime submitTime = LocalDateTime.parse(extIEDPlanExcelVO.getFileSubmitTime());
extIEDPlanVO.setFileSubmitTime(submitTime);
}catch (Exception e){
throw new DxBusinessException("-1","文件提交时间格式不正确!");
}
}
extIEDPlanVO.setEditor(extIEDPlanExcelVO.getEditor());
extIEDPlanVO.setChecker(extIEDPlanExcelVO.getChecker());
extIEDPlanVO.setAuditor(extIEDPlanExcelVO.getAuditor());
......
......@@ -43,6 +43,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -144,8 +145,12 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
extIEDPlanExcelVO.setSystemNumber(extIEDPlanVO.getSystemNumber());
extIEDPlanExcelVO.setDeviceNumber(extIEDPlanVO.getDeviceNumber());
extIEDPlanExcelVO.setPhase(extIEDPlanVO.getPhase());
extIEDPlanExcelVO.setAuditTime(extIEDPlanVO.getAuditTime());
extIEDPlanExcelVO.setFileSubmitTime(extIEDPlanVO.getFileSubmitTime());
if(!ObjectUtil.isEmpty(extIEDPlanVO.getAuditTime())){
extIEDPlanExcelVO.setAuditTime(extIEDPlanVO.getAuditTime().format(DateTimeFormatter.ISO_DATE));
}
if(!ObjectUtil.isEmpty(extIEDPlanVO.getFileSubmitTime())){
extIEDPlanExcelVO.setFileSubmitTime(extIEDPlanVO.getFileSubmitTime().format(DateTimeFormatter.ISO_DATE));
}
extIEDPlanExcelVO.setEditor(extIEDPlanVO.getEditor());
extIEDPlanExcelVO.setChecker(extIEDPlanVO.getChecker());
extIEDPlanExcelVO.setAuditor(extIEDPlanVO.getAuditor());
......
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