3
0

4 Commits c6b45526ee ... 247520b61e

Autor SHA1 Nachricht Datum
  LT32820A 247520b61e 920 JFlow微服务集成完成补充提交3 vor 2 Monaten
  LT32820A 6b6ba0c250 920 JFlow微服务集成完成补充提交3 vor 2 Monaten
  LT32820A 8f3afdb8de 919 JFlow微服务集成完成补充提交2 vor 2 Monaten
  LT32820A 6b9633857e 919 JFlow微服务集成完成补充提交2 vor 2 Monaten
45 geänderte Dateien mit 270 neuen und 138 gelöschten Zeilen
  1. 0 1
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java
  2. 3 0
      jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
  3. 3 0
      jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java
  4. 0 6
      jeecg-boot/jeecg-module-system/jeecg-system-biz/pom.xml
  5. 18 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/client/AppManage/WorkFlowClient.java
  6. 6 2
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java
  7. 1 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
  8. 2 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/APP_Register_workFlow_FormEntity.java
  9. 1 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppBaseInfo.java
  10. 9 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java
  11. 1 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppBaseInfoMapper.xml
  12. 68 89
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java
  13. 40 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/util/AppManageUtil.java
  14. 0 6
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/pom.xml
  15. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_MySQL.sql
  16. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_Ora.sql
  17. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_PostgreSQL.sql
  18. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/JSLibData/CovertMoneyToDaXie.js
  19. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/MultilingualJS/WF_Todolist.js
  20. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/CCForm.xml
  21. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/DBUrl.xml
  22. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/AttrDesc.xml
  23. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/ConfigEns.xml
  24. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/EnsAppXml/GE.xml
  25. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/EnsAppXml/WF.xml
  26. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/EventList.xml
  27. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/MapExt.xml
  28. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/OneWorkCopy.xml
  29. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/SysDataType.xml
  30. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/XmlDB.xml
  31. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/js/en-us.js
  32. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/load.js
  33. 0 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/xml/Public.xml
  34. 0 5
      jeecg-boot/jeecg-server-cloud/jflow-cloud-start/pom.xml
  35. 10 2
      jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/JeecgJflowCloudApplication.java
  36. 3 1
      jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/config/JFlowConfig.java
  37. 1 0
      jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/resources/jflow.properties
  38. 20 4
      jeecg-boot/jflow-core/pom.xml
  39. 0 1
      jeecg-boot/jflow-core/src/main/java/bp/difference/SystemConfig.java
  40. 15 0
      jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java
  41. 44 6
      jeecg-boot/jflow-core/src/main/java/bp/wf/WorkNode.java
  42. 20 0
      jeecgboot-vue3/src/components/iFrame/index.vue
  43. 1 1
      jeecgboot-vue3/src/store/modules/user.ts
  44. 0 1
      jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue
  45. 4 11
      jeecgboot-vue3/src/views/appmanage/addForm/data.tsx

+ 0 - 1
jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java

@@ -1,7 +1,6 @@
 package org.jeecg.common.api;
 
 import org.jeecg.common.system.vo.*;
-
 import java.util.List;
 import java.util.Map;
 import java.util.Set;

+ 3 - 0
jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java

@@ -792,4 +792,7 @@ public interface ISysBaseAPI extends CommonAPI {
             @RequestParam(value = "fields", required = false) String... fields
     );
 
+    @GetMapping("/sys/applicationInfo/afterAppCheckPass")
+    void afterAppCheckPass(@RequestParam("appid") String appid);
+
 }

+ 3 - 0
jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java

@@ -464,4 +464,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
         return false;
     }
 
+    @Override
+    public void afterAppCheckPass(String appid) {}
+
 }

+ 0 - 6
jeecg-boot/jeecg-module-system/jeecg-system-biz/pom.xml

@@ -43,12 +43,6 @@
 			<artifactId>spring-cloud-openfeign-core</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>org.jeecgframework.boot</groupId>
-			<artifactId>jflow-core</artifactId>
-			<version>1.1.0</version>
-			<scope>compile</scope>
-		</dependency>
-        <dependency>
             <groupId>io.github.openfeign</groupId>
             <artifactId>feign-core</artifactId>
         </dependency>

+ 18 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/client/AppManage/WorkFlowClient.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.client.AppManage;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.Hashtable;
+
+@FeignClient(value = "jflow-cloud", configuration = FeignClientConfig.class)
+public interface WorkFlowClient {
+
+    @PostMapping("/WF/API/startFlow")
+    void startFlow(@RequestParam("flowNo") String flowNo,
+                   @RequestParam("username") String username,
+                   @RequestBody Hashtable<String, String> hashtable);
+}

+ 6 - 2
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java

@@ -9,8 +9,6 @@ import org.jeecg.modules.system.entity.AppmanageEntity.*;
 import org.jeecg.modules.system.service.AppmanageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
 
@@ -168,4 +166,10 @@ public class AppmanageController {
     public Result<Boolean> isAppAdminOrDevOrOpe(String appid){
         return Result.ok(appInfoService.isAppAdminOrDevOrOpe(appid));
     }
+
+    // 应用注册审核通过后续处理(微服务调用)
+    @GetMapping("/afterAppCheckPass")
+    public void afterAppCheckPass(@RequestParam("appid")String appid){
+        appInfoService.afterAppCheckPass(appid);
+    }
 }

+ 1 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java

@@ -500,6 +500,7 @@ public class SysPermissionController {
 	@RequestMapping(value = "/checkPermDuplication", method = RequestMethod.GET)
 	public Result<String> checkPermDuplication(@RequestParam(name = "id", required = false) String id,@RequestParam(name = "url") String url,@RequestParam(name = "alwaysShow") Boolean alwaysShow) {
 		Result<String> result = new Result<>();
+		if (url.equals("undefined")) return Result.error("请输入访问路径!");
 		try {
 			boolean check=sysPermissionService.checkPermDuplication(id,url,alwaysShow);
 			if(check){

+ 2 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/APP_Register_workFlow_FormEntity.java

@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
 import lombok.Data;
 
 /**
- * 功能描述
+ * 功能描述 应用信息注册流程实体类
  *
  * @author: scott
  * @date: 2024年09月12日 AM 9:54
@@ -32,6 +32,7 @@ public class APP_Register_workFlow_FormEntity {
     private String createBy;
     private String createTime;
     private String addType;
+    private int info_status;
 
     // 文档信息部分
     private String requirement;

+ 1 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppBaseInfo.java

@@ -39,6 +39,7 @@ public class AppBaseInfo {
     private String createBy;
     private String createTime;
     private String addType;
+    private int info_status;
     @TableLogic
     private int delFlag;
     // 用于当前用户是否可以编辑该条信息

+ 9 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 
 import java.util.List;
@@ -19,4 +21,11 @@ public interface AppBaseInfoMapper extends BaseMapper<AppBaseInfo> {
     List<AppBaseInfo> queryAppInfoList(@Param("key") String key,
                                           @Param("type") String type,
                                           @Param("status") String status);
+
+    @Update("update app_base_info set del_flag = 0, info_status = 1 where id = #{appid}")
+    void recoverAppInfo(@Param("appid") String appid);
+
+    // 从用户表找到用户账号
+    @Select("SELECT username from sys_user where id = #{id}")
+    String queryUsernameById(@Param("id") String id);
 }

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppBaseInfoMapper.xml

@@ -11,7 +11,7 @@
         LEFT JOIN sys_user suserC ON app.business_user = suserC.id
         LEFT JOIN sys_user suserD ON app.requirement_user = suserD.id
         LEFT JOIN sys_user suserE ON app.operation_user = suserE.id
-        WHERE 1=1 and app.del_flag = 0
+        WHERE 1=1 and app.del_flag = 0 and info_status != 0
         <if test="key != null and key != ''">
             AND app.name LIKE CONCAT('%', #{key}, '%')
         </if>

+ 68 - 89
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java

@@ -2,12 +2,11 @@ package org.jeecg.modules.system.service.impl;
 
 //import bp.wf.Dev2Interface;
 import java.lang.reflect.Field;
-
-import bp.wf.Dev2Interface;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.apache.http.HttpRequest;
 import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.dto.message.TemplateMessageDTO;
 import org.jeecg.common.config.mqtoken.UserTokenContext;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.vo.LoginUser;
@@ -39,6 +38,10 @@ import org.apache.commons.beanutils.BeanUtils;
 @Service
 public class AppmanageServiceImpl implements AppmanageService {
 
+    // 发送消息
+    @Autowired
+    private SysBaseApiImpl sysBaseApi;
+
     // 简单查询用户信息
     @Autowired
     private ISysUserService sysUserService;
@@ -89,6 +92,9 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Autowired
     private RedisUtil redisUtil;
 
+    @Autowired
+    private AppManageUtil appManageUtil;
+
     @Autowired
     private WorkFlowClient workFlowClient;
 
@@ -458,7 +464,7 @@ public class AppmanageServiceImpl implements AppmanageService {
                 AppBaseInfo appBaseInfo = baseInfoMapper.selectById(queryParams.getAppid());
                 // 查询用户角色信息
                 appUserInfos.forEach(map -> {
-                    String roleNameInfo = baseInfoToUserInfoRoles(appBaseInfo, (String) map.get("id"));
+                    String roleNameInfo = appManageUtil.baseInfoToUserInfoRoles(appBaseInfo, (String) map.get("id"));
                     List<String> roleIds = sysUserRoleService.listByAppId(queryParams.getAppid(), (String) map.get("id"));
 
                     if (!roleIds.isEmpty()){
@@ -607,42 +613,6 @@ public class AppmanageServiceImpl implements AppmanageService {
     }
 
 
-    private String baseInfoToUserInfoRoles(AppBaseInfo appBaseInfo, String userid){
-        String roleNameInfo = "";
-        if (appBaseInfo.getAdmin()!=null&&appBaseInfo.getAdmin().equals(userid)){
-            roleNameInfo = "应用管理员";
-        }
-        if (appBaseInfo.getDevelopUser()!=null&&appBaseInfo.getDevelopUser().equals(userid)){
-            if (roleNameInfo.isEmpty()){
-                roleNameInfo = "开发负责人";
-            }else {
-                roleNameInfo = roleNameInfo+", "+"开发负责人";
-            }
-        }
-        if (appBaseInfo.getOperationUser()!=null&&appBaseInfo.getOperationUser().equals(userid)){
-            if (roleNameInfo.isEmpty()){
-                roleNameInfo = "运维负责人";
-            }else {
-                roleNameInfo = roleNameInfo+","+"运维负责人";
-            }
-        }
-        if(appBaseInfo.getBusinessUser()!=null&&appBaseInfo.getBusinessUser().equals(userid)){
-            if (roleNameInfo.isEmpty()){
-                roleNameInfo = "业务对接人";
-            }else {
-                roleNameInfo = roleNameInfo+","+"业务对接人";
-            }
-        }
-        if(appBaseInfo.getRequirementUser()!=null&&appBaseInfo.getRequirementUser().equals(userid)){
-            if (roleNameInfo.isEmpty()){
-                roleNameInfo = "需求对接人";
-            }else {
-                roleNameInfo = roleNameInfo+","+"需求对接人";
-            }
-        }
-        return roleNameInfo;
-    }
-
     // 加入流程
     private <T> void sendCheckWordFlow(T object, String flowNo, String username) throws Exception {
         Hashtable<String, String> hashtable = new Hashtable<>();
@@ -664,14 +634,9 @@ public class AppmanageServiceImpl implements AppmanageService {
                 throw new RuntimeException("Failed to access field: " + field.getName(), e);
             }
         }
-//        直接系统调用
-//        Dev2Interface dev2Interface = new Dev2Interface();
-//        long workID = dev2Interface.Node_CreateBlankWork(flowNo, username);
-//        if (hashtable.size() > 0) {
-//            dev2Interface.Node_SendWork(flowNo, workID, hashtable);
-//        }
 
-//      微服务调用
+
+//      微服务调用 审核加入流程
         workFlowClient.startFlow(flowNo, username, hashtable);
     }
 
@@ -686,51 +651,65 @@ public class AppmanageServiceImpl implements AppmanageService {
         return loginUser.getId().equals(baseInfo.getAdmin());
     }
 
+
     // 应用审核通过后一系列创建应用一级菜单、默认角色、授权操作(完整注册时)
     public void afterAppCheckPass(String appid) {
-        AppBaseInfo appBaseInfo = baseInfoMapper.selectById(appid);
-
-        // 添加默认角色信息
-        SysRole role = new SysRole();
-        role.setAppId(appid);  // 设置角色所属应用信息
-        role.setRoleCode("default");  // 设置角色编码
-        role.setAppName(appBaseInfo.getName()) ;  // 设置角色的应用名称
-        role.setRoleName(appBaseInfo.getName()+"_默认用户角色");  // 设置角色名
-        sysRoleService.save(role);  // 添加角色
 
-        // 获取角色编码
-        String roleid = role.getId();
-
-        // 查询应用用户id集合
-        QueryWrapper<AppUserInfo> appUserInfoQueryWrapper = new QueryWrapper<>();
-        appUserInfoQueryWrapper.select("userid").eq("appid", appid);
-        List<AppUserInfo> appUserInfos = userInfoMapper.selectList(appUserInfoQueryWrapper);
-        List<String> useridlist = appUserInfos.stream().map(AppUserInfo::getUserid).collect(Collectors.toList());
-
-        // 应用默认角色分配给应用用户
-        SysUserRoleVO sysUserRoleVO = new SysUserRoleVO();
-        sysUserRoleVO.setRoleId(roleid);
-        sysUserRoleVO.setUserIdList(useridlist);
-        sysUserController.addSysUserRole(sysUserRoleVO);
-
-        // 创建该应用的一级菜单
-        SysPermission sysPermission = new SysPermission();
-        sysPermission.setName(appBaseInfo.getName());
-        sysPermission.setAppId(appid);
-        sysPermission.setUrl(appBaseInfo.getMenuInfo());
-        // 设置组件(即 菜单路径去掉第一个 "/")
-        String component = sysPermission.getUrl().replaceFirst("^/", "");
-        sysPermission.setComponent(component);
-        sysPermission.setMenuType(0);
-        sysPermission.setRoute(true);
-        sysPermissionService.addPermission(sysPermission);
-
-        // 授予应用默认角色访问一级菜单权限
-        sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId(),"");
+        System.out.println("审核完成后续处理:"+appid);
+        // 将基础信息删除标志位恢复
+        baseInfoMapper.recoverAppInfo(appid);
+        // 查询该应用信息
+        AppBaseInfo appBaseInfo = baseInfoMapper.selectById(appid);
+        String toUser = baseInfoMapper.queryUsernameById(appBaseInfo.getCreateBy());
+        //给申请注册应用信息的用户发送系统消息
+        TemplateMessageDTO message = new TemplateMessageDTO();
+        message.setAppId("0");
+        message.setToUser(toUser);
+        message.setTemplateCode("app_examineAndapprove");
+        Map<String, String> templateParam = new HashMap<>();
+        templateParam.put("resultText","通过");
+        message.setTemplateParam(templateParam);
+        sysBaseApi.sendTemplateAnnouncement(message);
+
+        // 判断该信息是否为完整注册
+        if (appBaseInfo.getAddType().equals("full")){
+            // 添加默认角色信息
+            SysRole role = new SysRole();
+            role.setAppId(appid);  // 设置角色所属应用信息
+            role.setRoleCode("default");  // 设置角色编码
+            role.setAppName(appBaseInfo.getName()) ;  // 设置角色的应用名称
+            role.setRoleName(appBaseInfo.getName()+"_默认用户角色");  // 设置角色名
+            sysRoleService.save(role);  // 添加角色
+
+            // 获取角色编码
+            String roleid = role.getId();
+
+            // 查询应用用户id集合
+            QueryWrapper<AppUserInfo> appUserInfoQueryWrapper = new QueryWrapper<>();
+            appUserInfoQueryWrapper.select("userid").eq("appid", appid);
+            List<AppUserInfo> appUserInfos = userInfoMapper.selectList(appUserInfoQueryWrapper);
+            List<String> useridlist = appUserInfos.stream().map(AppUserInfo::getUserid).collect(Collectors.toList());
+
+            // 应用默认角色分配给应用用户
+            SysUserRoleVO sysUserRoleVO = new SysUserRoleVO();
+            sysUserRoleVO.setRoleId(roleid);
+            sysUserRoleVO.setUserIdList(useridlist);
+            sysUserController.addSysUserRole(sysUserRoleVO);
+
+            // 创建该应用的一级菜单
+            SysPermission sysPermission = new SysPermission();
+            sysPermission.setName(appBaseInfo.getName());
+            sysPermission.setAppId(appid);
+            sysPermission.setUrl(appBaseInfo.getMenuInfo());
+            // 设置组件(即 菜单路径去掉第一个 "/")
+            String component = sysPermission.getUrl().replaceFirst("^/", "");
+            sysPermission.setComponent(component);
+            sysPermission.setMenuType(0);
+            sysPermission.setRoute(true);
+            sysPermissionService.addPermission(sysPermission);
+
+            // 授予应用默认角色访问一级菜单权限
+            sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId(),"");
+        }
     }
-
-//    // 根据用户id查询用户姓名,先从redis数据库中查询,若没有再从数据库中查询
-//    private String queryUserNameByUserId(String userid){
-//
-//    }
 }

+ 40 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/util/AppManageUtil.java

@@ -5,7 +5,9 @@ import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.SpringContextUtils;
 import org.jeecg.modules.system.entity.AppmanageEntity.APP_Register_workFlow_FormEntity;
+import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppEnvInfo;
+import org.springframework.stereotype.Component;
 
 import java.util.List;
 
@@ -15,6 +17,7 @@ import java.util.List;
  * @author: scott
  * @date: 2024年09月12日 AM 11:52
  */
+@Component
 public class AppManageUtil {
 
     public APP_Register_workFlow_FormEntity TransitionEnvInfoToAppRegisterWorkFlowForm(APP_Register_workFlow_FormEntity appRegisterWorkFlowForm, List<AppEnvInfo> appEnvInfoList){
@@ -61,4 +64,41 @@ public class AppManageUtil {
         return token;
     }
 
+    // 应用信息中的角色信息
+    public String baseInfoToUserInfoRoles(AppBaseInfo appBaseInfo, String userid){
+        String roleNameInfo = "";
+        if (appBaseInfo.getAdmin()!=null&&appBaseInfo.getAdmin().equals(userid)){
+            roleNameInfo = "应用管理员";
+        }
+        if (appBaseInfo.getDevelopUser()!=null&&appBaseInfo.getDevelopUser().equals(userid)){
+            if (roleNameInfo.isEmpty()){
+                roleNameInfo = "开发负责人";
+            }else {
+                roleNameInfo = roleNameInfo+", "+"开发负责人";
+            }
+        }
+        if (appBaseInfo.getOperationUser()!=null&&appBaseInfo.getOperationUser().equals(userid)){
+            if (roleNameInfo.isEmpty()){
+                roleNameInfo = "运维负责人";
+            }else {
+                roleNameInfo = roleNameInfo+","+"运维负责人";
+            }
+        }
+        if(appBaseInfo.getBusinessUser()!=null&&appBaseInfo.getBusinessUser().equals(userid)){
+            if (roleNameInfo.isEmpty()){
+                roleNameInfo = "业务对接人";
+            }else {
+                roleNameInfo = roleNameInfo+","+"业务对接人";
+            }
+        }
+        if(appBaseInfo.getRequirementUser()!=null&&appBaseInfo.getRequirementUser().equals(userid)){
+            if (roleNameInfo.isEmpty()){
+                roleNameInfo = "需求对接人";
+            }else {
+                roleNameInfo = roleNameInfo+","+"需求对接人";
+            }
+        }
+        return roleNameInfo;
+    }
+
 }

+ 0 - 6
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/pom.xml

@@ -37,12 +37,6 @@
             </exclusions>
         </dependency>
 
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jflow-core</artifactId>
-            <version>1.1.0</version>
-            <scope>compile</scope>
-        </dependency>
 
 <!--        <dependency>-->
 <!--            <groupId>cn.lttc</groupId>-->

+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_MySQL.sql


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_Ora.sql


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/Install/SQLScript/InitView_PostgreSQL.sql


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/JSLibData/CovertMoneyToDaXie.js


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/MultilingualJS/WF_Todolist.js


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/CCForm.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/DBUrl.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/AttrDesc.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/ConfigEns.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/EnsAppXml/GE.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/Ens/EnsAppXml/WF.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/EventList.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/MapExt.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/OneWorkCopy.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/SysDataType.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/XML/XmlDB.xml


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/js/en-us.js


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/load.js


+ 0 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/resources/Data/lang/xml/Public.xml


+ 0 - 5
jeecg-boot/jeecg-server-cloud/jflow-cloud-start/pom.xml

@@ -18,11 +18,6 @@
             <groupId>org.jeecgframework.boot</groupId>
             <artifactId>jeecg-boot-starter-cloud</artifactId>
         </dependency>
-        <!--system cloud api-->
-        <dependency>
-            <groupId>org.jeecgframework.boot</groupId>
-            <artifactId>jeecg-system-cloud-api</artifactId>
-        </dependency>
 
         <dependency>
             <groupId>org.jeecgframework.boot</groupId>

+ 10 - 2
jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/JeecgJflowCloudApplication.java

@@ -7,18 +7,26 @@ import org.springframework.boot.CommandLineRunner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication
-@EnableFeignClients
+@EnableFeignClients(basePackages = {"bp.difference.client"})
 @EnableScheduling
 public class JeecgJflowCloudApplication implements CommandLineRunner {
     @Autowired
     private RedisTemplate<String, Object> redisTemplate;
 
     public static void main(String[] args) {
-        SpringApplication.run(JeecgJflowCloudApplication.class, args);
+        ApplicationContext context = SpringApplication.run(JeecgJflowCloudApplication.class, args);
+
+        String[] beanNames = context.getBeanDefinitionNames();
+        for (String beanName : beanNames) {
+            System.out.println(beanName);
+        }
+        System.out.println("lalalala");
     }
 
     /**

+ 3 - 1
jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/config/JFlowConfig.java

@@ -3,6 +3,7 @@ package org.jeecg.config;
 import bp.difference.ContextHolderUtils;
 import bp.difference.SystemConfig;
 import bp.difference.redis.RedisUtils;
+import bp.wf.WorkNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,7 +19,7 @@ import javax.sql.DataSource;
 import java.util.Hashtable;
 
 @Configuration
-@ComponentScan(basePackages = {"bp.difference"})
+@ComponentScan(basePackages = {"bp.difference","bp.wf"})
 public class JFlowConfig {
 
     private static final Logger logger = LoggerFactory.getLogger(JFlowConfig.class);
@@ -26,6 +27,7 @@ public class JFlowConfig {
     private static ApplicationContext applicationContext;
 
     private Environment env;
+
     @Autowired
     public void setEnv(Environment env) {
         this.env = env;

+ 1 - 0
jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/resources/jflow.properties

@@ -11,6 +11,7 @@ APIHostURL=http://127.0.0.1:8089/jflow-web
 #JY\u7EDF\u4E00\u8EAB\u4EFD\u8BA4\u8BC1
 AppID=c1b3708d853f4b7b
 AppSecret=b03b42e192b8e5f5
+AppCenterDBType=mysql
 
 #\u83B7\u53D6\u670D\u52A1\u5668\u7684\u7EDD\u5BF9\u5730\u5740\u5982D:/SpringBoot
 #ServicePath=E:/jflow-web/

+ 20 - 4
jeecg-boot/jflow-core/pom.xml

@@ -50,10 +50,6 @@
 		<okhttp.version>4.10.0</okhttp.version>
 	</properties>
 	<dependencies>
-<!--		<dependency>-->
-<!--			<groupId>org.jeecgframework.boot</groupId>-->
-<!--			<artifactId>jeecg-boot-base-core</artifactId>-->
-<!--		</dependency>-->
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>
@@ -290,6 +286,26 @@
             <groupId>com.sun.mail</groupId>
             <artifactId>jakarta.mail</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-openfeign-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-boot-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-boot-base-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.github.openfeign</groupId>
+            <artifactId>feign-core</artifactId>
+        </dependency>
     </dependencies>
 
 	<build>

+ 0 - 1
jeecg-boot/jflow-core/src/main/java/bp/difference/SystemConfig.java

@@ -8,7 +8,6 @@ import org.apache.commons.io.IOUtils;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.system.ApplicationHome;
 import org.springframework.stereotype.Component;
-
 import javax.servlet.http.HttpServletRequest;
 import java.io.*;
 import java.util.Hashtable;

+ 15 - 0
jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java

@@ -0,0 +1,15 @@
+package bp.difference.client;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(value = "jeecg-system")
+public interface SystemClient {
+
+    // 应用注册审核结束,对应用相关信息的后续处理
+    @GetMapping("/sys/applicationInfo/afterAppCheckPass")
+    void afterAppCheckPass(@RequestParam("appid") String appid);
+}

+ 44 - 6
jeecg-boot/jflow-core/src/main/java/bp/wf/WorkNode.java

@@ -1,5 +1,6 @@
 package bp.wf;
 
+import bp.difference.client.SystemClient;
 import bp.en.*;
 import bp.da.*;
 import bp.port.*;
@@ -10,6 +11,15 @@ import bp.web.WebUser;
 import bp.wf.template.*;
 import bp.wf.data.*;
 import bp.wf.template.sflow.*;
+import cn.hutool.jwt.JWTUtil;
+import org.jeecg.common.config.mqtoken.UserTokenContext;
+import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.util.JwtUtil;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.SpringContextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
 import java.util.*;
 import java.math.*;
 
@@ -20,11 +30,16 @@ import java.math.*;
  工作的信息.
  流程的信息.
 */
-public class WorkNode
-{
+@Component
+public class WorkNode {
 
-		///#region 身份.
+	//#region 身份.
 	private WebUserCopy _webUserCopy = null;
+
+	public WorkNode() {
+
+	}
+
 	public final WebUserCopy getWebUser() throws Exception {
 		if (_webUserCopy == null)
 		{
@@ -9652,10 +9667,8 @@ public class WorkNode
 		// 如果结束流程,就增加如下信息 翻译.
 		this.getHisGenerWorkFlow().setSender(getWebUser().getNo() + "," + getWebUser().getName() +";");
 		this.getHisGenerWorkFlow().setSendDT(DataType.getCurrentDateTime());
-
 		this.rptGe.setFlowEnder(WebUser.getNo());
 		this.rptGe.setFlowEnderRDT(DataType.getCurrentDateTime());
-
 		this.setStopFlow(false);
 		if (this.getHisNode().getItIsEndNode())
 		{
@@ -9668,7 +9681,7 @@ public class WorkNode
 				this.setStopFlow(true);
 				this.getHisGenerWorkFlow().setWFState(WFState.Complete);
 				this.rptGe.setWFState(WFState.Complete);
-
+				MicroserviceCall(); // 流程结束需要进行后续处理调用的微服务
 				String msg = this.getHisWorkFlow().DoFlowOver(ActionType.FlowOver, "流程已经走到最后一个节点,流程成功结束。", this.getHisNode(), this.rptGe);
 				this.addMsg(SendReturnMsgFlag.End, msg);
 			}
@@ -10520,5 +10533,30 @@ public class WorkNode
 		return wn;
 	}
 
+	public static String getTemporaryToken() {
+		RedisUtil redisUtil = SpringContextUtils.getBean(RedisUtil.class);
+		//模拟登录生成临时Token
+		//参数说明:第一个参数是用户名、第二个参数是密码的加密串
+		String token = JwtUtil.sign("??", "??");
+		// 设置Token缓存有效时间为 5 分钟
+		redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
+		redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 5 * 60 * 1000);
+		return token;
+	}
+
+	private void MicroserviceCall(){
+		UserTokenContext.setToken(getTemporaryToken());
+		String tag = this.rptGe.getRow().GetValStrByKey("workFlowType");
+		switch (tag){
+			case "App_Register":  // 应用注册审批流程
+				SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
+				String appid = this.rptGe.getRow().GetValStrByKey("id");
+				systemClient.afterAppCheckPass(appid);
+				break;
+		}
+		UserTokenContext.remove();
+	}
+
+
 		///#endregion
 }

+ 20 - 0
jeecgboot-vue3/src/components/iFrame/index.vue

@@ -0,0 +1,20 @@
+<template>
+  <div v-loading="loading" :style="'height:' + height">
+    <iframe :src="src" frameborder="no" style="width: 100%; height: 100%" scrolling="auto"></iframe>
+  </div>
+</template>
+<script lang="ts" setup>
+  import { ref, onMounted } from 'vue';
+  const loading = ref(true);
+  const height = ref();
+  defineProps({ src: String });
+  onMounted(() => {
+    setTimeout(() => {
+      loading.value = false;
+      height.value = window.innerHeight - 94.5 + 'px';
+    }, 300);
+    window.onresize = function temp() {
+      height.value = window.innerHeight - 94.5 + 'px';
+    };
+  });
+</script>

+ 1 - 1
jeecgboot-vue3/src/store/modules/user.ts

@@ -203,7 +203,7 @@ export const useUserStore = defineStore({
         // save token
         this.setToken(token);
         this.setTenant(userInfo.loginTenantId);
-        await this.loginToJFlow(userInfo.username, mode);
+        // await this.loginToJFlow(userInfo.username, mode);
         return this.afterLoginAction(goHome, data);
       } catch (error) {
         return Promise.reject(error);

+ 0 - 1
jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue

@@ -504,7 +504,6 @@ export default defineComponent({
         newlyUserData.value = []
         // 判断是不是处于反审核状态下的关闭
         if (!uncheckTag.value){
-          console.log("表单四处于反审核状态下的关闭事件")
           this.quiteuncheck()
         }
         const obj = {

+ 4 - 11
jeecgboot-vue3/src/views/appmanage/addForm/data.tsx

@@ -31,20 +31,13 @@ const isValidIpAddress = (ip) => {
 export const checkMenuInfo = async (_rule, value, callback) => {
   console.log("菜单信息:"+value)
   const res = await checkMenuInfoisExist(value)
-  console.dir(res)
-  if (value === undefined){
-    callback(new Error('菜单信息不能为空')); // 校验失败
-  }else {
-
-    if (res === '该值可用!') {
-      callback(); // 校验通过
-    } else {
-      callback(new Error(res)); // 校验失败
-    }
+  if (res === '该值可用!') {
+    callback(); // 校验通过
+  } else {
+    callback(new Error(res)); // 校验失败
   }
 };
 
-
 export const step1Schemas: FormSchema[] = [
   {
     field: 'name',