Commit 5ac61659 authored by wangyangyang's avatar wangyangyang

文档 图册:回写ied计划状态

parent c53c3d19
...@@ -179,6 +179,11 @@ public class Constants { ...@@ -179,6 +179,11 @@ public class Constants {
*/ */
public static final String COMPLETED = "completed"; public static final String COMPLETED = "completed";
/**
* IED计划已完成
*/
public static final String IED_Complete = "Complete";
/** /**
* 已终止 * 已终止
*/ */
......
...@@ -22,7 +22,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign { ...@@ -22,7 +22,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/** /**
* 生成图册目录 * 生成图册目录 且修改关联ied计划状态 一个IED计划对应一个图册
* @param docId * @param docId
* @return * @return
*/ */
...@@ -30,7 +30,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign { ...@@ -30,7 +30,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/** /**
* 客户化文档修改状态 * 客户化文档修改状态 如果是图册图纸则回写IED计划状态
* *
* @param documentVO * @param documentVO
*/ */
......
...@@ -173,17 +173,18 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -173,17 +173,18 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
Boolean isChageIEDStatus = true; Boolean isChageIEDStatus = true;
for (ExtIEDPlanDocLinkVO iedPlanDocLinkVO : content) { for (ExtIEDPlanDocLinkVO iedPlanDocLinkVO : content) {
String state = iedPlanDocLinkVO.getTarget().getState(); String state = iedPlanDocLinkVO.getTarget().getState();
if (!Constants.DOC_RELEASE.equalsIgnoreCase(state)){ if (!Constants.DOC_RELEASE.equalsIgnoreCase(state)) {
isChageIEDStatus = false; isChageIEDStatus = false;
} }
} }
if (isChageIEDStatus){ if (isChageIEDStatus) {
extIEDPlanServiceFeign.changeStatus(iedPlanId, iedStatus, true); extIEDPlanServiceFeign.changeStatus(iedPlanId, iedStatus, true);
} }
} }
@SneakyThrows @SneakyThrows
@Override @Override
@Transactional(rollbackFor = Exception.class)
public void generateCatalog(Long docId) { public void generateCatalog(Long docId) {
SearchQueryCondition queryCondition = SearchUtil.buildQueryWithOpenAttr("id", SearchItem.Operator.EQ, docId, "targetExtAtlasDrawingLink.target"); SearchQueryCondition queryCondition = SearchUtil.buildQueryWithOpenAttr("id", SearchItem.Operator.EQ, docId, "targetExtAtlasDrawingLink.target");
DxPageImpl<DxDocumentVO> recursion = documentService.findRecursion(queryCondition); DxPageImpl<DxDocumentVO> recursion = documentService.findRecursion(queryCondition);
...@@ -219,8 +220,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -219,8 +220,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
dxDocumentVO = (DxDocumentVO) documentService.saveRecursion(dxDocumentVO); dxDocumentVO = (DxDocumentVO) documentService.saveRecursion(dxDocumentVO);
FileUtil.del(dir); FileUtil.del(dir);
//TODO 设置图册图纸 状态为已发布 (客制化修改文档状态接口 已存在直接流程中配置即可 ExtAutoTaskService extChangeDocState) //TODO 设置图册图纸 状态为已发布 (客制化修改文档状态接口 已存在直接流程中配置即可 ExtAutoTaskService extChangeDocState)
//TODO 判断该文档关联IED计划下所有的文档状态是否为已完成,已完成则回写IED计划状态----后续补充
} }
} }
...@@ -250,6 +249,12 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -250,6 +249,12 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
documentService.changeStatus(doc); documentService.changeStatus(doc);
} }
}); });
//TODO 判断该文档关联IED计划下所有的文档状态是否为已完成,已完成则回写IED计划状态----一个IED计划对应一个图册,直接修改计划状态即可
SearchQueryCondition query = SearchUtil.buildQuery("targetId", SearchItem.Operator.EQ, documentVO.getId());
DxPageImpl iedPage = extIEDPlanDocLinkServiceFeign.findRecursion(query);
ExtIEDPlanDocLinkVO extIEDPlanDocLinkVO = (ExtIEDPlanDocLinkVO) iedPage.getContent().get(0);
Long iedPlanId = extIEDPlanDocLinkVO.getSourceId();
extIEDPlanServiceFeign.changeStatus(iedPlanId, Constants.IED_Complete, true);
} }
//判断接口单为审阅中设置全局状态为已打开 //判断接口单为审阅中设置全局状态为已打开
if (Constants.INTERNAL_INTERFACE.equals(documentVO.getSubTypeName())) { if (Constants.INTERNAL_INTERFACE.equals(documentVO.getSubTypeName())) {
...@@ -1655,7 +1660,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -1655,7 +1660,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
} }
/** /**
* TODO 获取组织下面 岗位为主设人 的用户 * TODO 获取组织下面 岗位为主设人 的用户
* *
......
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