Commit 3a6f07d9 by 王志超

feat: 查询节点信息

parent 774ff248
Pipeline #86386 failed with stages
in 41 seconds
...@@ -281,14 +281,4 @@ public class ChangeFlowController { ...@@ -281,14 +281,4 @@ public class ChangeFlowController {
return AjaxResult.success(interiorChangeConfigService.queryCommanderEmail(req)); return AjaxResult.success(interiorChangeConfigService.queryCommanderEmail(req));
} }
/**
* 查询topo实际节点信息
*
* @param flowId 工单ID
* @return topo实际节点信息
*/
@GetMapping("/flowNodeInfo")
public AjaxResult<FlowDataDTO> getFlowNodeInfo(@RequestParam Long flowId) {
return AjaxResult.success(changeFlowBiz.getFlowNodeInfo(flowId));
}
} }
...@@ -9,8 +9,9 @@ package com.netease.mail.yanxuan.change.web.controller; ...@@ -9,8 +9,9 @@ package com.netease.mail.yanxuan.change.web.controller;
import java.util.List; import java.util.List;
import com.netease.mail.yanxuan.change.biz.biz.ChangeSubFlowBiz; import com.netease.mail.yanxuan.change.biz.biz.ChangeSubFlowBiz;
import com.netease.mail.yanxuan.change.biz.service.rpc.FlowService;
import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeSubFlowCreateReq; import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeSubFlowCreateReq;
import org.springframework.beans.factory.annotation.Autowired; import com.netease.yanxuan.flowx.sdk.meta.dto.base.FlowDataDTO;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -18,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -18,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.netease.mail.yanxuan.change.biz.biz.ChangeFlowBiz;
import com.netease.mail.yanxuan.change.biz.biz.DepartmentLeaderBiz; import com.netease.mail.yanxuan.change.biz.biz.DepartmentLeaderBiz;
import com.netease.mail.yanxuan.change.biz.service.change.ChangeConfigService; import com.netease.mail.yanxuan.change.biz.service.change.ChangeConfigService;
import com.netease.mail.yanxuan.change.biz.service.rpc.QCService; import com.netease.mail.yanxuan.change.biz.service.rpc.QCService;
...@@ -30,6 +30,7 @@ import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRel ...@@ -30,6 +30,7 @@ import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRel
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp; import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp;
import com.netease.mail.yanxuan.change.integration.qc.meta.QcCategoryVO; import com.netease.mail.yanxuan.change.integration.qc.meta.QcCategoryVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -41,42 +42,21 @@ import javax.validation.Valid; ...@@ -41,42 +42,21 @@ import javax.validation.Valid;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/test") @RequestMapping("/test")
@RequiredArgsConstructor
public class TestController { public class TestController {
@Autowired private final ChangeConfigService changeConfigService;
private ChangeFlowBiz changeFlowBiz; private final QCService qcService;
private final ChangeSubFlowBiz changeSubFlowBiz;
@Autowired private final DepartmentLeaderBiz departmentLeaderBiz;
private ChangeConfigService changeConfigService; private final FlowService flowService;
private final FlowRpcSupplierInfoService supplierInfoService;
@Autowired
private QCService qcService;
@Autowired
private ChangeSubFlowBiz changeSubFlowBiz;
@Autowired
private DepartmentLeaderBiz departmentLeaderBiz;
// @PostMapping("/submit")
// public AjaxResult<Void> submit(Long id) {
// ChangeRecord record = changeFlowService.getById(id);
// Assert.notNull(record, "工单不存在");
// if (!record.getFlowNode().equals(ChangeFlowEnum.CHANGE_FLOW_EXE.getNodeId())) {
// throw ExceptionFactory.createBiz(ResponseCode.SUBMIT_FLOW_ERROR, "不是变更执行节点,不可运维提交");
// }
// autoSubmit.progressRecord(record);
// return AjaxResult.success();
// }
@GetMapping("/getUid") @GetMapping("/getUid")
public AjaxResult<String> getUid() { public AjaxResult<String> getUid() {
return AjaxResult.success(RequestLocalBean.getUid()); return AjaxResult.success(RequestLocalBean.getUid());
} }
@Autowired
private FlowRpcSupplierInfoService supplierInfoService;
@PostMapping("/test") @PostMapping("/test")
public List<SupplierUserRsp> test(@RequestBody SupplierRelatedUserReq req) { public List<SupplierUserRsp> test(@RequestBody SupplierRelatedUserReq req) {
return supplierInfoService.querySupplierRelatedUser(req); return supplierInfoService.querySupplierRelatedUser(req);
...@@ -123,4 +103,15 @@ public class TestController { ...@@ -123,4 +103,15 @@ public class TestController {
public AjaxResult<String> createAndSubmit(@RequestBody @Valid ChangeSubFlowCreateReq changeSubFlowCreateReq) { public AjaxResult<String> createAndSubmit(@RequestBody @Valid ChangeSubFlowCreateReq changeSubFlowCreateReq) {
return AjaxResult.success(changeSubFlowBiz.createAndSubmit(changeSubFlowCreateReq)); return AjaxResult.success(changeSubFlowBiz.createAndSubmit(changeSubFlowCreateReq));
} }
/**
* 查询topo实际节点信息
*
* @param flowId 工单ID
* @return topo实际节点信息
*/
@GetMapping("/flowNodeInfo")
public AjaxResult<FlowDataDTO> getFlowNodeInfo(@RequestParam Long flowId) {
return AjaxResult.success(flowService.flowDetail(flowId.toString()));
}
} }
\ No newline at end of file
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