|
@@ -77,21 +77,21 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
|
|
|
//params.put("isEnablePaging", "false"); // 不弃启用分页
|
|
|
//params.put("dictType", "plan_execution_data"); // 排需要的必要参数
|
|
|
//ResponseEntity tenantDict = sending.sendGetTenantDict(params);
|
|
|
- SysDictData dictData=new SysDictData();
|
|
|
+ SysDictData dictData = new SysDictData();
|
|
|
dictData.setDictType("plan_execution_data");
|
|
|
List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
|
|
|
//if (tenantDict.getStatusCodeValue() == 200) {
|
|
|
- if(StringUtils.isNotEmpty(dictDataList)){
|
|
|
+ if (StringUtils.isNotEmpty(dictDataList)) {
|
|
|
Map<String, Object> objectMap = new HashMap<>(); // 查询执行管道的参数
|
|
|
objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
|
|
|
+ dictDataList.forEach(item -> {
|
|
|
+ objectMap.put(item.getDictLabel(), item.getDictValue());
|
|
|
+ });
|
|
|
if (bpmExecuteProcess.getTaskProcessState() == 3L) {
|
|
|
// 首先根据当前登陆用户得到他可以执行的所有节点
|
|
|
- List<CommonEntity> commonEntities = runBpmExecuteProcessMapper.queryExecuteProcess(objectMap);
|
|
|
+ List<CommonEntity> commonEntities = runBpmExecuteProcessMapper.queryExecuteProcessEnd(objectMap);
|
|
|
return commonEntities;
|
|
|
} else {
|
|
|
- dictDataList.forEach(item -> {
|
|
|
- objectMap.put(item.getDictLabel(), item.getDictValue());
|
|
|
- });
|
|
|
List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
|
|
|
List<String> roles = new ArrayList<>();
|
|
|
if (sysRoles.size() != 0) {
|
|
@@ -125,41 +125,50 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
|
|
|
|
|
|
@Override
|
|
|
public List<CommonEntity> selectBpmExecuteProcessListLog(BpmExecuteProcess bpmExecuteProcess) {
|
|
|
- Map<String, Object> objectMap = new HashMap<>();
|
|
|
- List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
|
|
|
- List<String> roles = new ArrayList<>();
|
|
|
- if (sysRoles.size() != 0) {
|
|
|
- roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
|
|
|
- }
|
|
|
- // 根据当前的用户id得到可以执行的流程节点
|
|
|
- objectMap.put("userId", SecurityUtils.getUserId());
|
|
|
- // 得到当前发起请求的用户角色列表
|
|
|
- objectMap.put("taskRealRoleList", roles);
|
|
|
- objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
|
|
|
- List<CommonEntity> commonEntityList = runBpmExecuteProcessMapper.selectBpmExecuteProcessListLog(objectMap); // 得到当前用户可以查看的流程
|
|
|
- // 根据用户可以查看的流程任务编码,查询当前流程的详细信息
|
|
|
- String[] taksKey = new String[commonEntityList.size()];
|
|
|
- final int[] index = {0};
|
|
|
- commonEntityList.forEach(item -> {
|
|
|
- taksKey[index[0]] = item.getResultMap().get("taskKey").toString();
|
|
|
- index[0]++;
|
|
|
- });
|
|
|
- if (taksKey.length <= 0){
|
|
|
+ SysDictData dictData = new SysDictData();
|
|
|
+ dictData.setDictType("plan_execution_data");
|
|
|
+ List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
|
|
|
+ if (StringUtils.isNotEmpty(dictDataList)) {
|
|
|
+ Map<String, Object> objectMap = new HashMap<>();
|
|
|
+ dictDataList.forEach(item -> {
|
|
|
+ objectMap.put(item.getDictLabel(), item.getDictValue());
|
|
|
+ });
|
|
|
+ List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
|
|
|
+ List<String> roles = new ArrayList<>();
|
|
|
+ if (sysRoles.size() != 0) {
|
|
|
+ roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ // 根据当前的用户id得到可以执行的流程节点
|
|
|
+ objectMap.put("userId", SecurityUtils.getUserId());
|
|
|
+ // 得到当前发起请求的用户角色列表
|
|
|
+ objectMap.put("taskRealRoleList", roles);
|
|
|
+ objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
|
|
|
+ List<CommonEntity> commonEntityList = runBpmExecuteProcessMapper.selectBpmExecuteProcessListLog(objectMap); // 得到当前用户可以查看的流程
|
|
|
+ // 根据用户可以查看的流程任务编码,查询当前流程的详细信息
|
|
|
+ String[] taksKey = new String[commonEntityList.size()];
|
|
|
+ final int[] index = {0};
|
|
|
+ commonEntityList.forEach(item -> {
|
|
|
+ taksKey[index[0]] = item.getResultMap().get("taskKey").toString();
|
|
|
+ index[0]++;
|
|
|
+ });
|
|
|
+ if (taksKey.length <= 0) {
|
|
|
+ return commonEntityList;
|
|
|
+ }
|
|
|
+ objectMap.put("taskProcessList", taksKey);
|
|
|
+ // 当前用户可以看到流程的所有节点信息
|
|
|
+ List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteProcessNodeListLog(objectMap);
|
|
|
+ // 循环添加流程的详细信息
|
|
|
+ commonEntityList.forEach(item -> {
|
|
|
+ // 根据流程key筛选得到当前流程的所有执行过的节点信息
|
|
|
+ item.getResultMap().put("nodeLogList",
|
|
|
+ bpmExecuteNodeLogList
|
|
|
+ .stream()
|
|
|
+ .filter(e -> e.getTaskProcessKey().equals(item.getResultMap().get("taskKey").toString()))
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ });
|
|
|
return commonEntityList;
|
|
|
}
|
|
|
- objectMap.put("taskProcessList", taksKey);
|
|
|
- // 当前用户可以看到流程的所有节点信息
|
|
|
- List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteProcessNodeListLog(objectMap);
|
|
|
- // 循环添加流程的详细信息
|
|
|
- commonEntityList.forEach(item -> {
|
|
|
- // 根据流程key筛选得到当前流程的所有执行过的节点信息
|
|
|
- item.getResultMap().put("nodeLogList",
|
|
|
- bpmExecuteNodeLogList
|
|
|
- .stream()
|
|
|
- .filter(e -> e.getTaskProcessKey().equals(item.getResultMap().get("taskKey").toString()))
|
|
|
- .collect(Collectors.toList()));
|
|
|
- });
|
|
|
- return commonEntityList;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -305,7 +314,18 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
|
|
|
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+/*
|
|
|
+这样我补充一个刚才的需求:
|
|
|
+现在他是复制所有模块下的 jar 包,
|
|
|
+1.请你帮我设置一个开关功能:( true 就复制所有 jar 包,false 就只复制zkqy-admin这个模块下的 jar 包,所有项目都一样)。
|
|
|
+2.并且就像刚才说的,在我执行这个 工具类的时候,
|
|
|
+ 他先去替换所有项目的配置文件中的信息(这个信息只是更改数据库的 ip 以及账号密码,还有 redis 的地址等)
|
|
|
+3.进行打包操作(所有的项目都是 springboot)。
|
|
|
+4.在所有项目打包完成后复制所有的 jar 到指定目录(就像刚才的这个工具类一样的逻辑,我感觉这个工具类的逻辑可以不变)。
|
|
|
+注意替换配置文件的信息的操作 例如:127.0.0.1替换成 192.168.110.59这样的操作,账号密码同理,root 替换 root 密码123456替换 qwe123等
|
|
|
+
|
|
|
+其实就是替换字符这样的一个操作
|
|
|
+ */
|
|
|
|
|
|
|
|
|
|