Commit 473f60f8 authored by wangqiang's avatar wangqiang

修改IED计划状态,完成时间

parent 058fd9fc
...@@ -228,15 +228,16 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan ...@@ -228,15 +228,16 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
public String updatePlanState(Long id, String planState) { public String updatePlanState(Long id, String planState) {
if (!StringUtils.isEmpty(planState)) { if (!StringUtils.isEmpty(planState)) {
SearchQueryCondition queryCondition = SearchUtil.buildQuery("targetId", SearchItem.Operator.EQ, id); SearchQueryCondition queryCondition = SearchUtil.buildQuery("targetId", SearchItem.Operator.EQ, id);
// SearchQueryCondition condition = SearchQueryCondition.builder()
// .searchItems(SearchItems.builder()
// .item(new SearchItem("targetId", SearchItem.Operator.EQ, id, null))
// .build())
// .build();
List<ExtIEDPlanDocLinkVO> content = extIEDPlanDocLinkService.findRecursion(queryCondition).getContent(); List<ExtIEDPlanDocLinkVO> content = extIEDPlanDocLinkService.findRecursion(queryCondition).getContent();
Long iedPlanId = content.get(0).getSourceId(); Long iedPlanId = content.get(0).getSourceId();
if (!ObjectUtil.isEmpty(iedPlanId)) { if (!ObjectUtil.isEmpty(iedPlanId)) {
this.changeStatus(iedPlanId, planState, true); SearchQueryCondition queryIEDPlanCondition = SearchUtil.buildQuery("id", SearchItem.Operator.EQ, iedPlanId);
ExtIEDPlanVO extIEDPlanVOForDB = this.findRecursion(queryIEDPlanCondition).getContent().get(0);
extIEDPlanVOForDB.setState(planState);
extIEDPlanVOForDB = this.changeStatus((V) extIEDPlanVOForDB);
extIEDPlanVOForDB.setOperator(OperatorType.MODIFY);
extIEDPlanVOForDB.setActualCompleteTime(LocalDateTime.now());
this.saveRecursion((V) extIEDPlanVOForDB);
} else { } else {
throw new DxBusinessException("500", "根据文档id:" + id + ",未查到相关计划"); throw new DxBusinessException("500", "根据文档id:" + id + ",未查到相关计划");
} }
......
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