Commit 53d06260 by guominglei

修改引用报错

parent 54fec14a
...@@ -33,6 +33,17 @@ ...@@ -33,6 +33,17 @@
</dependency> </dependency>
</dependencies> </dependencies>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://10.0.120.2/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://10.0.120.2/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
......
...@@ -25,17 +25,10 @@ public class ApiFlowController { ...@@ -25,17 +25,10 @@ public class ApiFlowController {
@Resource @Resource
private ApiFlowService apiFlowService; private ApiFlowService apiFlowService;
@PostMapping("add") @PostMapping("publish")
@ApiOperation("新建工作流,默认开始调度") @ApiOperation("发布工作流,并开始调度")
public String addFlow(@RequestBody PluginFlow flow){ public String publishFlow(@RequestBody PluginFlow flow){
apiFlowService.addFlow(flow); apiFlowService.publishFlow(flow);
return "SUCCESS";
}
@PostMapping("update")
@ApiOperation("更新工作流,默认开始调度")
public String updateFlow(@RequestBody PluginFlow flow){
apiFlowService.updateFlow(flow);
return "SUCCESS"; return "SUCCESS";
} }
......
...@@ -10,10 +10,6 @@ import com.byit.job.dto.plugin.PluginFlowDepend; ...@@ -10,10 +10,6 @@ import com.byit.job.dto.plugin.PluginFlowDepend;
*/ */
public interface ApiFlowService { public interface ApiFlowService {
void addFlow(PluginFlow flow);
void updateFlow(PluginFlow flow);
void deleteFlow(String flowName); void deleteFlow(String flowName);
void addDepend(String flowName, String dependFlowName, String workspaceName); void addDepend(String flowName, String dependFlowName, String workspaceName);
...@@ -31,4 +27,6 @@ public interface ApiFlowService { ...@@ -31,4 +27,6 @@ public interface ApiFlowService {
String stopSchedule(String flowName, String workspaceName); String stopSchedule(String flowName, String workspaceName);
void reStartSchedule(String runId); void reStartSchedule(String runId);
void publishFlow(PluginFlow flow);
} }
...@@ -26,12 +26,7 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -26,12 +26,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
private WorkspaceMapper workspaceMapper; private WorkspaceMapper workspaceMapper;
@Override @Override
public void addFlow(PluginFlow flow) { public void publishFlow(PluginFlow flow) {
}
@Override
public void updateFlow(PluginFlow flow) {
} }
...@@ -79,4 +74,5 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -79,4 +74,5 @@ public class ApiFlowServiceImpl implements ApiFlowService {
public void reStartSchedule(String runId) { public void reStartSchedule(String runId) {
} }
} }
...@@ -13,4 +13,8 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -13,4 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class ApiWorkspaceServiceImpl implements ApiWorkspaceService { public class ApiWorkspaceServiceImpl implements ApiWorkspaceService {
@Override
public void add(String workspaceName) {
}
} }
/*
package com.byit.service.impl; package com.byit.service.impl;
import com.byit.enums.FlowPropertyEnum; import com.byit.enums.FlowPropertyEnum;
import com.byit.enums.NodePropertyEnum; import com.byit.enums.NodePropertyEnum;
import com.byit.job.utils.CronExpression; import com.byit.job.utils.CronExpression;
import com.byit.mapper.FlowDependentMapper;
import com.byit.mapper.FlowMapper; import com.byit.mapper.FlowMapper;
import com.byit.mapper.NodeDependencyMapper; import com.byit.mapper.NodeDependencyMapper;
import com.byit.mapper.NodeMapper; import com.byit.mapper.NodeMapper;
...@@ -26,16 +24,16 @@ import java.util.ArrayList; ...@@ -26,16 +24,16 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
*/
/** /**
* @description: 工作流业务逻辑实现类 * @description: 工作流业务逻辑实现类
* @author: gml * @author: gml
* @create: 2019-12-23 17:33 * @create: 2019-12-23 17:33
*//* */
@Service @Service
@Slf4j @Slf4j
@Transactional(rollbackFor = Exception.class)
public class FlowServiceImpl implements FlowService { public class FlowServiceImpl implements FlowService {
@Resource @Resource
...@@ -43,8 +41,6 @@ public class FlowServiceImpl implements FlowService { ...@@ -43,8 +41,6 @@ public class FlowServiceImpl implements FlowService {
@Resource @Resource
private NodeMapper nodeMapper; private NodeMapper nodeMapper;
@Resource @Resource
private FlowDependentMapper flowDependentMapper;
@Resource
private NodeDependencyMapper nodeDependencyMapper; private NodeDependencyMapper nodeDependencyMapper;
@Override @Override
...@@ -53,7 +49,7 @@ public class FlowServiceImpl implements FlowService { ...@@ -53,7 +49,7 @@ public class FlowServiceImpl implements FlowService {
//设置在工作流上的节点相关信息 //设置在工作流上的节点相关信息
List<NodeVo> nodeVoList = flowVo.getNodeVoList(); List<NodeVo> nodeVoList = flowVo.getNodeVoList();
if (null != nodeVoList && nodeVoList.size() > 0){ if (null != nodeVoList && nodeVoList.size() > 0) {
//设置在工作流上的节点数目 //设置在工作流上的节点数目
log.info("将【{}】个节点在工作流【{}】调度流程中", nodeVoList.size(), flowVo.getFlowName()); log.info("将【{}】个节点在工作流【{}】调度流程中", nodeVoList.size(), flowVo.getFlowName());
//重新组织节点的依赖和调度关系 //重新组织节点的依赖和调度关系
...@@ -77,12 +73,11 @@ public class FlowServiceImpl implements FlowService { ...@@ -77,12 +73,11 @@ public class FlowServiceImpl implements FlowService {
return flow; return flow;
} }
*/ /**
/**
* 重新组织节点的依赖和调度关系 * 重新组织节点的依赖和调度关系
* @param flowVo * @param flowVo
* @param nodeVoList * @param nodeVoList
*//* */
private void reNodeDepend(FlowVo flowVo, List<NodeVo> nodeVoList) { private void reNodeDepend(FlowVo flowVo, List<NodeVo> nodeVoList) {
...@@ -128,40 +123,40 @@ public class FlowServiceImpl implements FlowService { ...@@ -128,40 +123,40 @@ public class FlowServiceImpl implements FlowService {
} }
*/
/** /**
* 重新组织工作流的依赖关系 * 重新组织工作流的依赖关系
*
* @param flowVo * @param flowVo
*//* */
private void reFlowDepend(FlowVo flowVo) { private void reFlowDepend(FlowVo flowVo) {
//先去除所有的工作流依赖 // //先去除所有的工作流依赖
List<FlowDependentKey> flowDependentKeyList = flowDependentMapper.findByFlowId(flowVo.getFlowId()); // List<FlowDependentKey> flowDependentKeyList = flowDependentMapper.findByFlowId(flowVo.getFlowId());
//解除跟上游工作流的绑定 // //解除跟上游工作流的绑定
log.info("将【{}】工作流上游工作流设置为没有下游工作流", flowVo.getFlowName()); // log.info("将【{}】工作流上游工作流设置为没有下游工作流", flowVo.getFlowName());
for (FlowDependentKey flowDependentKey: flowDependentKeyList) { // for (FlowDependentKey flowDependentKey: flowDependentKeyList) {
Flow flow = flowMapper.getById(flowDependentKey.getDependFlowId()); // Flow flow = flowMapper.getById(flowDependentKey.getDependFlowId());
flow.setIsHaveDepend(FlowPropertyEnum.NO_HAVE_DEPEND.getCode()); // flow.setIsHaveDepend(FlowPropertyEnum.NO_HAVE_DEPEND.getCode());
flowMapper.updateByIdSelective(flow); // flowMapper.updateByIdSelective(flow);
} // }
log.info("删除【{}】工作流的依赖关系", flowVo.getFlowName()); // log.info("删除【{}】工作流的依赖关系", flowVo.getFlowName());
flowDependentMapper.deleteByFlowId(flowVo.getFlowId()); // flowDependentMapper.deleteByFlowId(flowVo.getFlowId());
//
log.info("开始建立【{}】工作流的依赖关系,并将上游工作流设置为拥有下游工作流", flowVo.getFlowName()); // log.info("开始建立【{}】工作流的依赖关系,并将上游工作流设置为拥有下游工作流", flowVo.getFlowName());
//判断是否有工作流依赖 // //判断是否有工作流依赖
if (null != flowVo.getFlowDepend() && flowVo.getFlowDepend().size() > 0){ // if (null != flowVo.getFlowDepend() && flowVo.getFlowDepend().size() > 0){
List<Integer> flowDependList = flowVo.getFlowDepend(); // List<Integer> flowDependList = flowVo.getFlowDepend();
for (Integer flowDependId : flowDependList){ // for (Integer flowDependId : flowDependList){
Flow flow = flowMapper.getById(flowDependId); // Flow flow = flowMapper.getById(flowDependId);
flow.setIsHaveDepend(FlowPropertyEnum.HAVE_DEPEND.getCode()); // flowMapper.updateByIdSelective(flow);
flowMapper.updateByIdSelective(flow); // flowDependentMapper.insert(flowVo.getFlowId(), flowDependId);
flowDependentMapper.insert(flowVo.getFlowId(), flowDependId); // }
} // flowVo.setIsTop(FlowPropertyEnum.ISNOT_TOP.getCode());
flowVo.setIsTop(FlowPropertyEnum.ISNOT_TOP.getCode()); // }else {
}else { // flowVo.setIsTop(FlowPropertyEnum.IS_TOP.getCode());
flowVo.setIsTop(FlowPropertyEnum.IS_TOP.getCode()); // }
}
} }
...@@ -259,6 +254,7 @@ public class FlowServiceImpl implements FlowService { ...@@ -259,6 +254,7 @@ public class FlowServiceImpl implements FlowService {
/** /**
* 判断是否可以包含这个工作流 * 判断是否可以包含这个工作流
*
* @param flowVo 当前工作流 * @param flowVo 当前工作流
* @param nodeVo * @param nodeVo
* @return * @return
...@@ -287,4 +283,3 @@ public class FlowServiceImpl implements FlowService { ...@@ -287,4 +283,3 @@ public class FlowServiceImpl implements FlowService {
return null; return null;
} }
} }
\ No newline at end of file
*/
...@@ -181,4 +181,16 @@ ...@@ -181,4 +181,16 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://10.0.120.2/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://10.0.120.2/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project> </project>
\ 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