Commit 0f2e36d7 authored by wangqiang's avatar wangqiang

修改标记todo的内容

parent 5a88b549
...@@ -124,6 +124,8 @@ public class ExtPlanVO extends IdOnlyVO implements IdVO ,DxTreeContextVOHolder<E ...@@ -124,6 +124,8 @@ public class ExtPlanVO extends IdOnlyVO implements IdVO ,DxTreeContextVOHolder<E
@JsonIgnore @JsonIgnore
private DxIterationVOEmbeddable<ExtPlanVO> dxIterationEmbeddable; private DxIterationVOEmbeddable<ExtPlanVO> dxIterationEmbeddable;
private List<ExtPlanDocLinkVO> extPlanDocLinkVO;
/** /**
* 实际完成时间 * 实际完成时间
*/ */
......
...@@ -6,6 +6,7 @@ import cn.hutool.poi.excel.ExcelUtil; ...@@ -6,6 +6,7 @@ import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.ExcelWriter;
import cn.hutool.poi.excel.StyleSet; import cn.hutool.poi.excel.StyleSet;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO; import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.document.feign.DocCenterFeignService;
import com.yonde.dcs.plan.common.constants.Constants; import com.yonde.dcs.plan.common.constants.Constants;
import com.yonde.dcs.plan.common.utils.ExcelUtils; import com.yonde.dcs.plan.common.utils.ExcelUtils;
import com.yonde.dcs.plan.common.utils.FileUtils; import com.yonde.dcs.plan.common.utils.FileUtils;
...@@ -428,6 +429,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -428,6 +429,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
} }
@Autowired
private DocCenterFeignService docCenterFeignService;
/** /**
* 通过number查询文档 * 通过number查询文档
* *
...@@ -439,9 +443,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -439,9 +443,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
.searchItems(SearchItems.builder().item( .searchItems(SearchItems.builder().item(
new SearchItem("number", SearchItem.Operator.EQ, number, null)) new SearchItem("number", SearchItem.Operator.EQ, number, null))
.operator(SearchItems.BooleanOperator.AND).build()).build(); .operator(SearchItems.BooleanOperator.AND).build()).build();
//todo wq:在4.1中未找到类似的方法,暂时注释返回null //todo wq:在4.1中找到类似的方法,将2.0代码注释
// DxPageImpl<DxDocumentVO> recursion = documentService.findRecursion(query); //DxPageImpl<DxDocumentVO> recursion = documentService.findRecursion(query);
DxPageImpl<DxDocumentVO> recursion = null; DxPageImpl<DxDocumentVO> recursion = docCenterFeignService.findRecursion(query);
if (org.springframework.util.CollectionUtils.isEmpty(recursion.getContent())) { if (org.springframework.util.CollectionUtils.isEmpty(recursion.getContent())) {
return null; return null;
} }
...@@ -458,77 +462,80 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -458,77 +462,80 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
*/ */
private StringBuffer checkUpdatePlan(PlanExcelVO excelVO, int i, StringBuffer stringBuffer) { private StringBuffer checkUpdatePlan(PlanExcelVO excelVO, int i, StringBuffer stringBuffer) {
ExtPlanVO extPlanVO = this.searchByNumber(excelVO.getNumber()); ExtPlanVO extPlanVO = this.searchByNumber(excelVO.getNumber());
ExtPlanReplyVO v = new ExtPlanReplyVO();
if (!ObjectUtils.isEmpty(extPlanVO)) { if (!ObjectUtils.isEmpty(extPlanVO)) {
switch (extPlanVO.getState()) { switch (extPlanVO.getState()) {
//未完成 //未完成
case Constants.UNFINISHED: case Constants.UNFINISHED:
//todo wq: 2.0是使用extPlanVO.getSourcePlanDocLink,但是在4.0中获取方式?暂时将if前部注释 //todo wq: 2.0是使用extPlanVO.getSourcePlanDocLink,但是在4.1未找到,先手动在VO中添加该属性。先将下面2行代码注释
// if ("交付文件类".equals(extPlanVO.getFeedbackType()) && !CollectionUtils.isEmpty(extPlanVO.getSourcePlanDocLink())) { // if ("交付文件类".equals(extPlanVO.getFeedbackType()) && !CollectionUtils.isEmpty(extPlanVO.getSourcePlanDocLink())) {
// for (PlanDocLinkVO planDocLink : extPlanVO.getSourcePlanDocLink()) { // for (PlanDocLinkVO planDocLink : extPlanVO.getSourcePlanDocLink()) {
// if (!ObjectUtils.isEmpty(planDocLink.getTarget())) { if ("交付文件类".equals(extPlanVO.getFeedbackType()) && !CollectionUtils.isEmpty(extPlanVO.getExtPlanDocLinkVO())) {
// if (!extPlanVO.getNumber().equals(excelVO.getNumber())) { for (ExtPlanDocLinkVO planDocLink : extPlanVO.getExtPlanDocLinkVO()) {
// stringBuffer.append(String.format("第%s行的计划编号不允许修改", i + 1) + "</br>"); if (!ObjectUtils.isEmpty(planDocLink.getTarget())) {
// } if (!extPlanVO.getNumber().equals(excelVO.getNumber())) {
// if (!extPlanVO.getName().equals(excelVO.getName())) { stringBuffer.append(String.format("第%s行的计划编号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划名称不允许修改", i + 1) + "</br>"); }
// } if (!extPlanVO.getName().equals(excelVO.getName())) {
// int compare = extPlanVO.getStartTime().compareTo(excelVO.getStartTime()); stringBuffer.append(String.format("第%s行的计划名称不允许修改", i + 1) + "</br>");
// if (compare != 0) { }
// stringBuffer.append(String.format("第%s行的计划开始时间不允许修改", i + 1) + "</br>"); int compare = extPlanVO.getStartTime().compareTo(excelVO.getStartTime());
// } if (compare != 0) {
// if (!extPlanVO.getFeedbackType().equals(excelVO.getFeedbackType())) { stringBuffer.append(String.format("第%s行的计划开始时间不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划反馈类型不允许修改", i + 1) + "</br>"); }
// } if (!extPlanVO.getFeedbackType().equals(excelVO.getFeedbackType())) {
// if (!extPlanVO.getPlanExecutor().equals(excelVO.getPlanExecutor())) { stringBuffer.append(String.format("第%s行的计划反馈类型不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划执行人不允许修改", i + 1) + "</br>"); }
// } if (!extPlanVO.getPlanExecutor().equals(excelVO.getPlanExecutor())) {
// stringBuffer.append(String.format("第%s行的计划执行人不允许修改", i + 1) + "</br>");
// if (!StringUtil.equals(extPlanVO.getFileType(), excelVO.getFileType())) { }
// stringBuffer.append(String.format("第%s行的计划交付文件类型不允许修改", i + 1) + "</br>");
// } if (!StringUtil.equals(extPlanVO.getFileType(), excelVO.getFileType())) {
// if (!StringUtil.equals(extPlanVO.getFileName(), excelVO.getFileName())) { stringBuffer.append(String.format("第%s行的计划交付文件类型不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划交付文件名称不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getFileName(), excelVO.getFileName())) {
// if (!StringUtil.equals(extPlanVO.getFileNumber(), excelVO.getFileNumber())) { stringBuffer.append(String.format("第%s行的计划交付文件名称不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划交付文件编号不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getFileNumber(), excelVO.getFileNumber())) {
// if (!StringUtil.equals(extPlanVO.getPhaseState(), excelVO.getPhaseState())) { stringBuffer.append(String.format("第%s行的计划交付文件编号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划阶段状态不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getPhaseState(), excelVO.getPhaseState())) {
// stringBuffer.append(String.format("第%s行的计划阶段状态不允许修改", i + 1) + "</br>");
// DxDocumentVO doc = planDocLink.getTarget(); }
// if (Constants.REVIEWING.equals(doc.getState())) {
// if (!StringUtil.equals(extPlanVO.getBusinessPlanType(), excelVO.getBusinessPlanType())) { DxDocumentVO doc = planDocLink.getTarget();
// stringBuffer.append(String.format("第%s行的计划业务计划类型不允许修改", i + 1) + "</br>"); if (Constants.REVIEWING.equals(doc.getState())) {
// } if (!StringUtil.equals(extPlanVO.getBusinessPlanType(), excelVO.getBusinessPlanType())) {
// if (!StringUtil.equals(extPlanVO.getContractNo(), excelVO.getContractNo())) { stringBuffer.append(String.format("第%s行的计划业务计划类型不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划合同编号不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getContractNo(), excelVO.getContractNo())) {
// if (!StringUtil.equals(extPlanVO.getSuperPlanCode(), excelVO.getSuperPlanCode())) { stringBuffer.append(String.format("第%s行的计划合同编号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划父级计划编号不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getSuperPlanCode(), excelVO.getSuperPlanCode())) {
// if (!StringUtil.equals(extPlanVO.getFileCode(), excelVO.getFileCode())) { stringBuffer.append(String.format("第%s行的计划父级计划编号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划文件代号不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getFileCode(), excelVO.getFileCode())) {
// if (!StringUtil.equals(extPlanVO.getProjectCode(), excelVO.getProjectCode())) { stringBuffer.append(String.format("第%s行的计划文件代号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划项目代号不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getProjectCode(), excelVO.getProjectCode())) {
// if (!StringUtil.equals(extPlanVO.getSystemCode(), excelVO.getSystemCode())) { stringBuffer.append(String.format("第%s行的计划项目代号不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划管理信息系统编码不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getSystemCode(), excelVO.getSystemCode())) {
// if (!StringUtil.equals(extPlanVO.getReview(), excelVO.getReview())) { stringBuffer.append(String.format("第%s行的计划管理信息系统编码不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划审核者不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getReview(), excelVO.getReview())) {
// if (!StringUtil.equals(extPlanVO.getApprover(), excelVO.getApprover())) { stringBuffer.append(String.format("第%s行的计划审核者不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划批准者不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getApprover(), excelVO.getApprover())) {
// if (!StringUtil.equals(extPlanVO.getVerifier(), excelVO.getVerifier())) { stringBuffer.append(String.format("第%s行的计划批准者不允许修改", i + 1) + "</br>");
// stringBuffer.append(String.format("第%s行的计划审定者不允许修改", i + 1) + "</br>"); }
// } if (!StringUtil.equals(extPlanVO.getVerifier(), excelVO.getVerifier())) {
// } stringBuffer.append(String.format("第%s行的计划审定者不允许修改", i + 1) + "</br>");
// } }
// } }
// } }
}
}
break; break;
//已完成 //已完成
case Constants.COMPLETED: case Constants.COMPLETED:
......
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