|
@@ -1,13 +1,16 @@
|
|
|
package com.ruoyi.interfaces.controller;
|
|
package com.ruoyi.interfaces.controller;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
+import com.ruoyi.interfaces.domain.MdModelFlow;
|
|
|
import com.ruoyi.interfaces.domain.MdModelInfo;
|
|
import com.ruoyi.interfaces.domain.MdModelInfo;
|
|
|
import com.ruoyi.interfaces.domain.PtService;
|
|
import com.ruoyi.interfaces.domain.PtService;
|
|
|
import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
|
|
import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
|
|
|
|
|
+import com.ruoyi.interfaces.service.IMdModelFlowService;
|
|
|
import com.ruoyi.interfaces.service.IMdModelInfoService;
|
|
import com.ruoyi.interfaces.service.IMdModelInfoService;
|
|
|
import com.ruoyi.interfaces.service.PtServiceService;
|
|
import com.ruoyi.interfaces.service.PtServiceService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -46,6 +49,9 @@ public class PtTreeCateController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IMdModelInfoService mdModelInfoService;
|
|
private IMdModelInfoService mdModelInfoService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IMdModelFlowService mdModelFlowService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询树状目录列表
|
|
* 查询树状目录列表
|
|
|
*/
|
|
*/
|
|
@@ -87,6 +93,36 @@ public class PtTreeCateController extends BaseController {
|
|
|
return success(ptTreeCateService.buildDataTreeSelect(ptTreeCates));
|
|
return success(ptTreeCateService.buildDataTreeSelect(ptTreeCates));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 构建模型流程图树状列表
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param par
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping(value = "/treeFlow")
|
|
|
|
|
+ public AjaxResult treeFlow(MdModelInfo par) {
|
|
|
|
|
+ List<PtTreeCate> ptTreeCates = new ArrayList<>();
|
|
|
|
|
+ List<MdModelInfo> mdModelInfos = mdModelInfoService.selectMdModelInfoList(par);
|
|
|
|
|
+
|
|
|
|
|
+ for (MdModelInfo mdModelInfo : mdModelInfos) {
|
|
|
|
|
+ if (StringUtils.isNotNull(mdModelInfo.getMdid()) && StringUtils.isNotNull(mdModelInfo.getCateid())
|
|
|
|
|
+ && StringUtils.isNotNull(mdModelInfo.getName())) {
|
|
|
|
|
+ ptTreeCates.add(new PtTreeCate(mdModelInfo.getMdid(), mdModelInfo.getCateid(), mdModelInfo.getName(), "MODEL"));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ List<MdModelFlow> mdModelFlows = mdModelFlowService.selectMdModelFlowList(new MdModelFlow());
|
|
|
|
|
+ for (MdModelFlow mdModelFlow : mdModelFlows) {
|
|
|
|
|
+ if (StringUtils.isNotNull(mdModelFlow.getMdid()) && StringUtils.isNotNull(mdModelFlow.getFlowId())
|
|
|
|
|
+ && StringUtils.isNotNull(mdModelFlow.getFlowName())) {
|
|
|
|
|
+ ptTreeCates.add(new PtTreeCate(mdModelFlow.getFlowId().toString(), mdModelFlow.getMdid(), mdModelFlow.getFlowName(), "FLOW"));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return success(ptTreeCateService.buildDataTreeSelect(ptTreeCates));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 新增树状目录
|
|
* 新增树状目录
|