2 次代碼提交 d3985af5ff ... 2f1ecd1b69

作者 SHA1 備註 提交日期
  LT32820A 2f1ecd1b69 928中午 定时备份 2 月之前
  LT32820A ed93b92ecc 926早晨 定时备份 2 月之前
共有 20 個文件被更改,包括 437 次插入239 次删除
  1. 7 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java
  2. 7 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppUserInfoQueryParams.java
  3. 0 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java
  4. 39 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppCustomMapper.java
  5. 2 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppCustomMapper.xml
  6. 2 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/AppmanageService.java
  7. 89 54
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java
  8. 4 3
      jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java
  9. 30 2
      jeecg-boot/jflow-core/src/main/java/bp/wf/Dev2Interface.java
  10. 31 4
      jeecg-boot/jflow-core/src/main/java/bp/wf/httphandler/WF_MyView.java
  11. 153 153
      jeecg-boot/lttc-module-appmanage/src/main/java/cn/lttc/modules/controller/AppmanageController.java
  12. 1 1
      jeecgboot-vue3/src/utils/http/axios/index.ts
  13. 8 0
      jeecgboot-vue3/src/views/appmanage/AppBaseInfo.api.ts
  14. 0 4
      jeecgboot-vue3/src/views/appmanage/AppBaseInfo.data.ts
  15. 1 1
      jeecgboot-vue3/src/views/appmanage/AppInfoList.vue
  16. 47 6
      jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue
  17. 1 0
      jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue
  18. 4 4
      jeecgboot-vue3/src/views/appmanage/addForm/data.tsx
  19. 0 1
      jeecgboot-vue3/src/views/appmanage/addForm/index.vue
  20. 11 0
      jeecgboot-vue3/src/views/integrityAppRegister/Demo.vue

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

@@ -189,4 +189,11 @@ public class AppmanageController {
         System.out.println("应用注册审核通过后续处理:"+formData);
         appInfoService.afterAppCheckPass(appid, formData);
     }
+
+    // 应用注册流程被撤销 后续处理(微服务调用)
+//    @GetMapping("/afterAppCheckPass")
+//    public <T> void afterUnsendAppRegisterFlow(@RequestParam("workID") long workID){
+//        System.out.println("应用注册流程撤销后续处理:"+workID);
+//        appInfoService.afterUnsendAppRegisterFlow(workID);
+//    }
 }

+ 7 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppUserInfoQueryParams.java

@@ -5,7 +5,7 @@ import lombok.Data;
 import java.util.List;
 
 /**
- * 功能描述
+ * 功能描述 : 查询应用用户信息参数
  *
  * @author: scott
  * @date: 2024年08月14日 PM 5:22
@@ -14,13 +14,17 @@ import java.util.List;
 public class AppUserInfoQueryParams {
     // 需过滤的用户id集合
     private List<String> filteruserids;
+    // 应用id
     private String appid;
+    // 部门(虽然是List,但是一般只有单个部门id)
     private List<String> dept;
+    // 角色(暂放)
     private String role;
+    // 用户名
     private List<String> realname;
     private List<String> username;
+    // 页码
     private Integer pageNo;
-
-    // 直接通过用户id集合查询用户信息集合(给注册应用信息时,表单一与表单四数据联动用)
+    // 直接通过用户id集合查询用户信息集合(暂放)
     private List<String> userids;
 }

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

@@ -33,9 +33,6 @@ public interface AppBaseInfoMapper extends BaseMapper<AppBaseInfo> {
     @Select("SELECT username from sys_user where id = #{id}")
     String queryUsernameById(@Param("id") String id);
 
-    // 真删除基础信息(非逻辑删除)
-    @Delete("delete from app_base_info where id = #{id}")
-    void deleteAppInfoNotLogic(@Param("id") String id);
 
     @Update("<script>" +
             "UPDATE app_base_info " +

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

@@ -1,10 +1,12 @@
 package org.jeecg.modules.system.mapper;
 
+import org.apache.ibatis.annotations.Delete;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppUserInfo;
+import org.jeecg.modules.system.entity.SysPermission;
 
 import java.util.List;
 
@@ -34,5 +36,42 @@ public interface AppCustomMapper {
 
     String queryDepartIdByUserId(@Param("userId") String userId);
 
+    // 查询菜单是否已存在
+    @Select("SELECT * FROM sys_permission WHERE url = #{menuInfo}")
+    SysPermission queryUrlByUrl(@Param("menuInfo") String menuInfo);
 
+    // 真删除基础信息(非逻辑删除)
+    @Delete("delete from app_base_info where id = #{appid}")
+    void deleteAppBaseInfoNotLogic(@Param("appid") String appid);
+
+    // 真删除文档信息(非逻辑删除)
+    @Delete("delete from app_doc_info where appid = #{appid}")
+    void deleteAppDocInfoNotLogic(@Param("appid") String appid);
+
+    // 真删除环境信息(非逻辑删除)
+    @Delete("delete from app_env_info where appid = #{appid}")
+    void deleteAppEnvInfoNotLogic(@Param("appid") String appid);
+
+    // 真删除应用用户信息(非逻辑删除)
+    @Delete("delete from app_env_info where appid = #{appid}")
+    void deleteAppUserInfoNotLogic(@Param("appid") String appid);
+
+    @Select({
+            "SELECT CASE",
+            "WHEN FK_Flow = '021' THEN (",
+            "SELECT id FROM app_base_info_flow WHERE OID = #{workID}",
+            ")",
+            "WHEN FK_Flow = '022' THEN (",
+            "SELECT id FROM app_detail_info_workflow WHERE OID = #{workID}",
+            ")",
+            "ELSE NULL",
+            "END AS result",
+            "FROM wf_generworkflow",
+            "WHERE workID = #{workID}"
+    })
+    String getAppidByWorkID(@Param("workID") long workID);
+
+    // 通过应用id获取该应用注册类型
+    @Select("SELECT add_type FROM app_base_info WHERE id = #{appid}")
+    String queryAppRegisterTypeByAppid(@Param("appid") String appid);
 }

+ 2 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppCustomMapper.xml

@@ -50,4 +50,6 @@
     <select id="queryDepartIdByUserId" resultType="java.lang.String">
         SELECT dep_id FROM sys_user_depart WHERE user_id = #{userId}
     </select>
+
+
 </mapper>

+ 2 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/AppmanageService.java

@@ -67,5 +67,7 @@ public interface AppmanageService  {
     boolean isAppAdminOrDevOrOpe(String appid);
 
     <T> void afterAppCheckPass(String appid, T formData);
+
+    void afterUnsendAppRegisterFlow(long workID);
 }
 

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

@@ -91,8 +91,6 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Autowired
     private AppManageUtil appManageUtil;
 
-
-
     private final ReentrantLock lock = new ReentrantLock();
     private final String UNCHECK_TAG_BASE_PATH = "AppInfouncheckTag:";
 
@@ -117,7 +115,7 @@ public class AppmanageServiceImpl implements AppmanageService {
         appBaseInfo.setDelFlag(1);
         baseInfoMapper.insert(appBaseInfo);
 
-        // 提交至工作流的表单信息(将用户id换成用户账号,字典值换成字典文本
+        // 提交至工作流的表单信息(将用户id换成用户账号)
         AppBaseInfo sendCheck_appBaseInfo = appBaseInfo;
         sendCheck_appBaseInfo.setAdmin(customMapper.queryUsernameByUserId(appBaseInfo.getAdmin()));
         if (appBaseInfo.getDevelopUser()!=null)
@@ -128,19 +126,17 @@ public class AppmanageServiceImpl implements AppmanageService {
             sendCheck_appBaseInfo.setRequirementUser(customMapper.queryUsernameByUserId(appBaseInfo.getRequirementUser()));
         if (appBaseInfo.getBusinessUser()!=null)
             sendCheck_appBaseInfo.setBusinessUser(customMapper.queryUsernameByUserId(appBaseInfo.getBusinessUser()));
-//        sendCheck_appBaseInfo.setType(sysDictService.queryDictTextByKey("app_type", appBaseInfo.getType()));
-//        sendCheck_appBaseInfo.setStatus(sysDictService.queryDictTextByKey("app_status", appBaseInfo.getStatus()));
         AppDocInfo appDocInfo = appInfo.getAppDocInfoDTO();
         boolean hasEnvInfo = false;
         if (appInfo.getAppEnvInfoDTO()!=null) hasEnvInfo = appInfo.getAppEnvInfoDTO().size()>0;
+        boolean tag; // 流程发送结果标志
+        String appid = appBaseInfo.getId();
         // 简易注册模式下添加基础信息即可
         if (appBaseInfo.getAddType().equals("easy")){
-            boolean tag = appManageUtil.sendCheckWordFlow(sendCheck_appBaseInfo, "021", loginUser.getUsername(), "admin");
+             tag = appManageUtil.sendCheckWordFlow(sendCheck_appBaseInfo, "021", loginUser.getUsername(), "admin");
             // 发起流程失败则删除数据库内数据
-            if (tag){
-                return "提交成功";
-            } else {
-                baseInfoMapper.deleteAppInfoNotLogic(appBaseInfo.getId());
+            if (!tag){
+                customMapper.deleteAppBaseInfoNotLogic(appid);
                 return "提交失败";
             }
         }else {
@@ -152,17 +148,25 @@ public class AppmanageServiceImpl implements AppmanageService {
                 AppManageUtil appManageUtil = new AppManageUtil();
                 appRegisterWorkFlowFormEntity = appManageUtil.TransitionEnvInfoToAppRegisterWorkFlowForm(appRegisterWorkFlowFormEntity, appInfo.getAppEnvInfoDTO());
             }
-            appManageUtil.sendCheckWordFlow(appRegisterWorkFlowFormEntity, "022",loginUser.getUsername(),"admin");
+            tag = appManageUtil.sendCheckWordFlow(appRegisterWorkFlowFormEntity, "022", loginUser.getUsername(), "admin");
+            // 发起流程失败则删除数据库内数据
+            if (!tag){
+                customMapper.deleteAppBaseInfoNotLogic(appid);
+                customMapper.deleteAppDocInfoNotLogic(appid);
+                customMapper.deleteAppEnvInfoNotLogic(appid);
+                customMapper.deleteAppUserInfoNotLogic(appid);
+                return "提交失败";
+            }
         }
-        String appid = appBaseInfo.getId();
-
         // 添加应用用户信息
-        appInfo.getUserInfo().forEach(userid -> {
-            AppUserInfo userInfo = new AppUserInfo();
-            userInfo.setAppid(appid);
-            userInfo.setUserid(userid);
-            userInfoMapper.insert(userInfo);
-        });
+        if (appInfo.getUserInfo()!=null){
+            appInfo.getUserInfo().forEach(userid -> {
+                AppUserInfo userInfo = new AppUserInfo();
+                userInfo.setAppid(appid);
+                userInfo.setUserid(userid);
+                userInfoMapper.insert(userInfo);
+            });
+        }
 
         // 添加应用环境信息
         if (hasEnvInfo){
@@ -172,9 +176,10 @@ public class AppmanageServiceImpl implements AppmanageService {
             }
         }
         // 添加应用文档信息
-        appDocInfo.setAppid(appid);
-        docInfoMapper.insert(appDocInfo);
-
+        if (appDocInfo!=null){
+            appDocInfo.setAppid(appid);
+            docInfoMapper.insert(appDocInfo);
+        }
         return "提交成功";
     }
 
@@ -183,6 +188,7 @@ public class AppmanageServiceImpl implements AppmanageService {
      * @param ids 应用id集合
      * @return
      */
+    @Transactional
     @Override
     public Boolean deleteAppInfo(String[] ids) {
         // 需先判断用户是否拥有所删除的应用信息的权限(平台管理员-应用管理员)
@@ -238,7 +244,7 @@ public class AppmanageServiceImpl implements AppmanageService {
      * @return
      */
     @Override
-    public Boolean editBaseInfo(AppBaseInfo baseInfo) throws Exception {
+    public Boolean editBaseInfo(AppBaseInfo baseInfo) {
 
         int i = baseInfoMapper.updateById(baseInfo);
         // 保存成功解除反审核状态
@@ -246,6 +252,11 @@ public class AppmanageServiceImpl implements AppmanageService {
         return i>0;
     }
 
+    /**
+     * 修改应用环境信息
+     * @param editEnvInfoEntity
+     * @return
+     */
     @Transactional
     @Override
     public Boolean editEnvInfo(AppEditEnvInfoEntity editEnvInfoEntity) {
@@ -350,7 +361,7 @@ public class AppmanageServiceImpl implements AppmanageService {
      * @param key 模糊查询关键字
      * @param type 应用类型
      * @param status 应用状态
-     * @param userid 用户id
+     * @param userid 用户id (暂放)
      * @return 应用基础信息集合
      */
 
@@ -372,7 +383,6 @@ public class AppmanageServiceImpl implements AppmanageService {
             appBaseInfoS.add(baseInfo);
         });
         redisUtil.set("appManagerInfo", appManagerInfo, 60*60*24);
-        // 使用 Collections.sort() 方法进行排序
 
         return appBaseInfoS;
 //        if(userid!=null){
@@ -409,9 +419,10 @@ public class AppmanageServiceImpl implements AppmanageService {
      */
     @Override
     public List<AppEnvInfo> queryEnvInfoByAppId(String appid) {
+        // 该用户是否可以查看当前应用的应用信息
         List<AppEnvInfo> envInfos = envInfoMapper.
-                selectList(new QueryWrapper<AppEnvInfo>().eq("appid", appid));
-        return envInfos;
+                    selectList(new QueryWrapper<AppEnvInfo>().eq("appid", appid));
+            return envInfos;
     }
 
     @Override
@@ -429,7 +440,6 @@ public class AppmanageServiceImpl implements AppmanageService {
      * 应用用户查询功能
      * @return
      */
-
     @Override
     public AppEditUserInfoEntity queryAppUser(AppUserInfoQueryParams queryParams) {
         List<Map<String, Object>> appUserInfos = new ArrayList<>();
@@ -454,15 +464,15 @@ public class AppmanageServiceImpl implements AppmanageService {
 
                 // 判断当前用户是否可进行编辑操作
                 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-                String managerId = "";
-                Map<String, String> appManagerInfo = new HashMap<>();
-                appManagerInfo = (Map<String, String>) redisUtil.get("appManagerInfo");
+                String managerId;
+                Map<String, String> appManagerUserInfo; // 应用管理员信息
                 // 先从 redis 查询应用管理员信息,如果为空,则查询数据库
-                if (appManagerInfo == null) {
+                appManagerUserInfo = (Map<String, String>) redisUtil.get("appManagerInfo");
+                if (appManagerUserInfo == null) {
                     AppBaseInfo baseInfoPO = baseInfoMapper.selectById(queryParams.getAppid());
                     managerId = baseInfoPO.getAdmin();
                 }else {
-                    managerId = appManagerInfo.get(queryParams.getAppid());
+                    managerId = appManagerUserInfo.get(queryParams.getAppid());
                 }
                 editUserInfoEntity.setIsEdit(loginUser.getId().equals(managerId));
                 AppBaseInfo appBaseInfo = baseInfoMapper.selectById(queryParams.getAppid());
@@ -470,12 +480,12 @@ public class AppmanageServiceImpl implements AppmanageService {
                 appUserInfos.forEach(map -> {
                     String roleNameInfo = appManageUtil.baseInfoToUserInfoRoles(appBaseInfo, (String) map.get("id"));
                     List<String> roleIds = sysUserRoleService.listByAppId(queryParams.getAppid(), (String) map.get("id"));
-
+                    // 查询角色名信息
                     if (!roleIds.isEmpty()){
-                        // 查询角色名信息
                         QueryWrapper<SysRole> sysRoleQueryWrapper = new QueryWrapper<>();
                         sysRoleQueryWrapper.select("role_name").in("id", roleIds);
                         List<SysRole> sysRoles = sysRoleMapper.selectList(sysRoleQueryWrapper);
+                        // 角色信息拼接
                         if (!sysRoles.isEmpty()&&!roleNameInfo.isEmpty()){
                             roleNameInfo =roleNameInfo +", "+ sysRoles.stream()
                                     .map(SysRole::getRoleName)
@@ -489,7 +499,7 @@ public class AppmanageServiceImpl implements AppmanageService {
                     map.put("roles", roleNameInfo);
                 });
             }
-        }else { // 作为添加表单时的查询(查询全部用户), 角色分配用户时亦使用
+        }else { // 作为添加表单时的查询(查询全部用户)
             appUserInfos = sysUserService.userComplexCondition(queryParams.getUserids(),
                     queryParams.getUsername(),
                     queryParams.getRealname(),
@@ -497,7 +507,7 @@ public class AppmanageServiceImpl implements AppmanageService {
                     queryParams.getFilteruserids(),
                     queryParams.getPageNo());
         }
-        // 如果查询到的用户不为空,则取appUserInfos最后一个值为total值,并将appUserInfos最后一个值删除
+        // 如果查询到的用户不为空,则取appUserInfos最后一个值为total值(分页使用),并将appUserInfos最后一个值删除
         if (!appUserInfos.isEmpty()){
             editUserInfoEntity.setTotal((Integer) appUserInfos.get(appUserInfos.size()-1).get("total"));
             appUserInfos.remove(appUserInfos.size()-1);
@@ -609,6 +619,8 @@ public class AppmanageServiceImpl implements AppmanageService {
     public boolean isAppAdminOrDevOrOpe(String appid) {
         // 获取当前登录用户
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        // 如果是平台管理员
+        if (loginUser.getUsername().equals("admin")) return true;
         AppBaseInfo baseInfo = baseInfoMapper.selectById(appid);
         if (baseInfo!=null){
             if (baseInfo.getAdmin().equals(loginUser.getId())) return true;
@@ -619,10 +631,12 @@ public class AppmanageServiceImpl implements AppmanageService {
         return false;
     }
 
-    // 判断当前用户是否有编辑当前信息的权限
+    // 判断当前用户是否为当前应用的应用管理员
     public boolean hasEditCurrentInfoPermission(String appid){
         // 获取当前登录用户
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        // 如果是平台管理员
+        if (loginUser.getUsername().equals("admin")) return true;
         // 查询基础信息的应用管理员id,比较是否和当前登录用户一致
         QueryWrapper<AppBaseInfo> baseInfoPOQueryWrapper = new QueryWrapper<>();
         baseInfoPOQueryWrapper.select("admin").eq("id", appid);
@@ -654,7 +668,7 @@ public class AppmanageServiceImpl implements AppmanageService {
     }
 
 
-    // 应用审核通过后一系列创建应用一级菜单、默认角色、授权操作(完整注册时)
+    // 应用审核通过后续处理
     public <T> void afterAppCheckPass(String appid, T formData) {
         AppBaseInfo appBaseInfo = baseInfoMapper.queryAppBaseInfoById(appid);
         appManageUtil.CompareOldAppBaseInfoAndNewAppBaseInfo(appBaseInfo, formData);
@@ -670,12 +684,12 @@ public class AppmanageServiceImpl implements AppmanageService {
         // 设置消息模板编码
         message.setTemplateCode("app_examineAndapprove");
         Map<String, String> templateParam = new HashMap<>();
-        templateParam.put("resultText","通过");
+        templateParam.put("resultText","应用"+appBaseInfo.getName()+"注册审核通过");
         message.setTemplateParam(templateParam);
         sysBaseApi.sendTemplateAnnouncement(message);
 
 
-        // 判断该信息是否为完整注册
+        // 该信息为完整注册时,通过审核后添加默认角色、菜单权限、菜单信息
         if (appBaseInfo.getAddType().equals("full")){
             // 添加默认角色信息
             SysRole role = new SysRole();
@@ -683,6 +697,7 @@ public class AppmanageServiceImpl implements AppmanageService {
             role.setRoleCode("default");  // 设置角色编码
             role.setAppName(appBaseInfo.getName()) ;  // 设置角色的应用名称
             role.setRoleName(appBaseInfo.getName()+"_默认用户角色");  // 设置角色名
+            role.setDescription(appBaseInfo.getName()+"默认角色");  // 设置备注
             sysRoleService.save(role);  // 添加角色
 
             // 获取角色编码
@@ -701,19 +716,39 @@ public class AppmanageServiceImpl implements AppmanageService {
             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(),"");
+            // 首先判断菜单是否已存在
+            SysPermission hassysPermission = customMapper.queryUrlByUrl(appBaseInfo.getMenuInfo());
+            if (hassysPermission == null){
+                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(),"");
+            }else {
+                // 授予应用默认角色访问一级菜单权限
+                sysRolePermissionService.saveRolePermission(roleid, hassysPermission.getId(),"");
+            }
+        }
+    }
+
+    // 应用注册 撤销后续处理(删除插入的数据)
+    @Override
+    public void afterUnsendAppRegisterFlow(long workID) {
+        // 通过workID获取应用id
+        String appid = customMapper.getAppidByWorkID(workID);
+        String addType = customMapper.queryAppRegisterTypeByAppid(appid);
+        customMapper.deleteAppBaseInfoNotLogic(appid);
+        if (addType.equals("full")){
+            customMapper.deleteAppDocInfoNotLogic(appid);
+            customMapper.deleteAppEnvInfoNotLogic(appid);
+            customMapper.deleteAppUserInfoNotLogic(appid);
         }
     }
 }

+ 4 - 3
jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java

@@ -1,10 +1,7 @@
 package bp.difference.client;
 
-import org.apache.poi.ss.formula.functions.T;
 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")
@@ -14,4 +11,8 @@ public interface SystemClient {
     @GetMapping("/sys/applicationInfo/afterAppCheckPass")
     <T> void afterAppCheckPass(@RequestParam("appid") String appid,
                            @RequestParam("formData") T formData);
+
+    // 注册应用流程撤销 后续处理的微服务调用
+    @GetMapping("/sys/applicationInfo/afterUnsendAppRegisterFlow")
+    void afterUnsendAppRegisterFlow(@RequestParam("workID") long workID);
 }

+ 30 - 2
jeecg-boot/jflow-core/src/main/java/bp/wf/Dev2Interface.java

@@ -1,6 +1,7 @@
 package bp.wf;
 
 import bp.da.*;
+import bp.difference.client.SystemClient;
 import bp.en.*;
 import bp.port.*;
 import bp.port.Dept;
@@ -11,6 +12,11 @@ import bp.wf.template.*;
 import bp.difference.*;
 import bp.wf.template.sflow.*;
 import bp.wf.port.*;
+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.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
@@ -5894,10 +5900,9 @@ c	*/
 			}
 			unSendToNode = DBAccess.RunSQLReturnValInt(currNode, 0);
 		}
-
+		MicroserviceCall(workID);
 		WorkUnSend unSend = new WorkUnSend(flowNo, workID, unSendToNode, fid);
 		unSend.UnSendToNode = unSendToNode;
-
 		return unSend.DoUnSend();
 	}
 
@@ -15037,4 +15042,27 @@ c	*/
 
 		return tk.getMyPK();
 	}
+
+	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 static void MicroserviceCall(long workID){
+		String fk_flow = DBAccess.RunSQLReturnString("SELECT FK_Flow FROM wf_generworkflow WHERE WorkID = "+workID);
+		UserTokenContext.setToken(getTemporaryToken());
+		SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
+		System.out.println("拿到的流程编号:"+fk_flow);
+		if (fk_flow.equals("021")||fk_flow.equals("022")){
+			System.out.println("应用注册流程微服务调用");
+//			systemClient.afterUnsendAppRegisterFlow(workID);
+		}
+		UserTokenContext.remove();
+	}
 }

+ 31 - 4
jeecg-boot/jflow-core/src/main/java/bp/wf/httphandler/WF_MyView.java

@@ -1,6 +1,7 @@
 package bp.wf.httphandler;
 
 import bp.da.*;
+import bp.difference.client.SystemClient;
 import bp.sys.*;
 import bp.web.*;
 import bp.port.*;
@@ -9,6 +10,11 @@ import bp.wf.template.*;
 import bp.difference.*;
 import bp.*;
 import bp.wf.*;
+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 java.net.URLEncoder;
 import java.util.*;
@@ -596,6 +602,8 @@ public class WF_MyView extends bp.difference.handler.DirectoryPageBase
 				gwl.SetPara("ToEmps", "");
 				gwl.Update();
 			}
+			// 撤销后续处理
+
 			return "撤销成功";
 		}
 		//获取用户当前所在的节点
@@ -703,11 +711,7 @@ public class WF_MyView extends bp.difference.handler.DirectoryPageBase
 				return true;
 			}
 		}
-
-
 			///#endregion 基本权限控制.
-
-
 			///#region 按照部门控制.
 		//本部门可见.
 		if (viewEn.getPMyDept() == true)
@@ -1672,5 +1676,28 @@ public class WF_MyView extends bp.difference.handler.DirectoryPageBase
 			return "err@" + ex.getMessage();
 		}
 	}
+	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, this.rptGe.getRow());
+//				break;
+//		}
+//		UserTokenContext.remove();
+//	}
 
 }

+ 153 - 153
jeecg-boot/lttc-module-appmanage/src/main/java/cn/lttc/modules/controller/AppmanageController.java

@@ -1,153 +1,153 @@
-package cn.lttc.modules.controller;
-
-import cn.lttc.modules.dto.*;
-import cn.lttc.modules.dto.queryParamsDTO.AppUserInfoQueryParamsDTO;
-import cn.lttc.modules.entity.EditEnvInfoEntity;
-import cn.lttc.modules.entity.EditUserInfoEntity;
-import cn.lttc.modules.service.AppmanageService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 功能描述
- * @author: scott
- * @date: 2024年07月31日 AM 8:29
- */
-
-//@Slf4j
-//@Api(tags = "应用管理")
-//@RestController
-//@RequestMapping("/applicationInfo")
-public class AppmanageController {
-
-//    @Autowired
-//    private AppmanageService appInfoService;
-//
-//    @ApiOperation("注册应用信息")
-//    @PostMapping("/add")
-//    public Result<String> addAppInfo(@RequestBody AppInfoDTO appInfo) throws Exception {
-//        System.out.println(appInfo.toString());
-//        String message = appInfoService.addAppInfo(appInfo);
-//        return Result.OK(message);
-//    }
-//
-//    @ApiOperation("删除应用信息")
-//    @PostMapping("/delete")
-//    public Result<String> deleteAppInfo(@RequestBody String[] infos){
-//        System.out.println("来到删除信息:"+ Arrays.toString(infos));
-//        String message = appInfoService.deleteAppInfo(infos);
-//        return Result.ok(message);
-//    }
-//
-//    @ApiOperation("修改应用基础信息")
-//    @PostMapping("/editBaseInfo")
-//    public Result<Boolean> editBaseInfo(@RequestBody AppBaseInfoDTO baseInfoDTO) throws Exception {
-//        return Result.ok(appInfoService.editBaseInfo(baseInfoDTO));
-//    }
-//
-//    @ApiOperation("修改应用环境信息")
-//    @PostMapping("/editEnvInfo")
-//    public Result<Boolean> editEnvInfo(@RequestBody EditEnvInfoEntity editEnvInfoEntity){
-//        System.out.println("看看能不能拿到appid:"+editEnvInfoEntity.getAppid());
-//        return Result.ok(appInfoService.editEnvInfo(editEnvInfoEntity));
-//    }
-//
-//    @ApiOperation("修改应用文档信息")
-//    @PostMapping("/editDocInfo")
-//    public Result<Boolean> editDocInfo(@RequestBody AppDocInfoDTO docInfoDTO){
-//        return Result.ok(appInfoService.editDocInfo(docInfoDTO));
-//    }
-//
-//    @ApiOperation("修改应用用户信息")
-//    @PostMapping("/editUserInfo")
-//    public Result<Boolean> editUserInfo(@RequestBody UpdataUserInfoDTO updataUserInfoDTO){
-//        Boolean tag = appInfoService.editUserInfo(updataUserInfoDTO);
-//        return Result.ok(tag);
-//    }
-//
-//    @ApiOperation("查询应用信息列表")
-//    @GetMapping("/query")
-//    public Result<List<AppBaseInfoDTO>> queryAppInfoList(
-//            @RequestParam(name = "appname", required = false) String appname,
-//            @RequestParam(name = "apptype", required = false) String apptype,
-//            @RequestParam(name = "appstatus", required = false) String appstatus,
-//            @RequestParam(name = "user", required = false) String userid){
-//        List<AppBaseInfoDTO> appbaseInfos = appInfoService.queryBaseInfo(appname, apptype, appstatus, userid);
-//        return Result.ok(appbaseInfos);
-//    }
-//
-//    @ApiOperation("查询应用基础信息")
-//    @GetMapping("/queryBaseInfoById")
-//    public Result<AppBaseInfoDTO> queryBaseInfoById(String id){
-//        AppBaseInfoDTO appbaseInfo = appInfoService.queryBaseInfoById(id);
-//        return Result.ok(appbaseInfo);
-//    }
-//
-//    @ApiOperation("查询应用环境信息")
-//    @GetMapping("/queryEnvInfoById")
-//    public Result<List<AppEnvInfoDTO>> queryEnvInfoById(String appid){
-//        List<AppEnvInfoDTO> appenvInfos = appInfoService.queryEnvInfoByAppId(appid);
-//        return Result.ok(appenvInfos);
-//    }
-//
-//    // 查看应用文档信息
-//    @GetMapping("/queryDocInfoById")
-//    public Result<AppDocInfoDTO> queryDocInfoById(String id){
-//        AppDocInfoDTO appdocInfo = appInfoService.queryDocInfoById(id);
-//        return Result.ok(appdocInfo);
-//    }
-//
-//    /**
-//     * @return 用户集合
-//     */
-//    @ApiOperation("查询应用用户列表")
-//    @PostMapping("/user/query")
-//    public Result<EditUserInfoEntity> queryAppUser(@RequestBody AppUserInfoQueryParamsDTO queryParams) {
-//        System.out.println("查询应用用户列表:"+queryParams.getPageNo());
-//        if (queryParams.getPageNo() == null) queryParams.setPageNo(1);
-//        return Result.ok(appInfoService.queryAppUser(queryParams));
-//    }
-//
-//    @GetMapping("/queryAppInfoDetail")
-//    public Result<AppInfoDetailDTO> queryAppInfoDetail(String appid){
-//        AppInfoDetailDTO appDetailInfoDTO = appInfoService.queryAppInfodetail(appid);
-//        return Result.ok(appDetailInfoDTO);
-//    }
-//
-//    // 反审核
-//    @GetMapping("/getLock")
-//    public Result<Boolean> checkLock(String key){
-//        System.out.println("访问到了:"+key);
-//        return Result.ok(appInfoService.checkLock(key));
-//    }
-//
-//    @GetMapping("/getAppuserids")
-//    public Result<List<String>> getAppUserids(String appid){
-//        return Result.ok(appInfoService.getAppuserids(appid));
-//    }
-//
-//    @GetMapping("/test")
-//    public String test(){
-//        return "应用管理测试接口";
-//    }
-//
-//    // 解除反审核
-//    @GetMapping("/unLock")
-//    public Result<Boolean> uncheckLock(String key){
-//        return Result.ok(appInfoService.uncheckLock(key));
-//    }
-//
-//
-//    // 判断当前登录用户是否为信息部用户
-//    @GetMapping("/isInfoUser")
-//    public Result<Boolean> isInfoUser(){
-//        return Result.ok(appInfoService.isInfoUser());
-//    }
-}
+//package cn.lttc.modules.controller;
+//
+//import cn.lttc.modules.dto.*;
+//import cn.lttc.modules.dto.queryParamsDTO.AppUserInfoQueryParamsDTO;
+//import cn.lttc.modules.entity.EditEnvInfoEntity;
+//import cn.lttc.modules.entity.EditUserInfoEntity;
+//import cn.lttc.modules.service.AppmanageService;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import lombok.extern.slf4j.Slf4j;
+//import org.jeecg.common.api.vo.Result;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//import java.util.Arrays;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * 功能描述
+// * @author: scott
+// * @date: 2024年07月31日 AM 8:29
+// */
+//
+////@Slf4j
+////@Api(tags = "应用管理")
+////@RestController
+////@RequestMapping("/applicationInfo")
+//public class AppmanageController {
+//
+////    @Autowired
+////    private AppmanageService appInfoService;
+////
+////    @ApiOperation("注册应用信息")
+////    @PostMapping("/add")
+////    public Result<String> addAppInfo(@RequestBody AppInfoDTO appInfo) throws Exception {
+////        System.out.println(appInfo.toString());
+////        String message = appInfoService.addAppInfo(appInfo);
+////        return Result.OK(message);
+////    }
+////
+////    @ApiOperation("删除应用信息")
+////    @PostMapping("/delete")
+////    public Result<String> deleteAppInfo(@RequestBody String[] infos){
+////        System.out.println("来到删除信息:"+ Arrays.toString(infos));
+////        String message = appInfoService.deleteAppInfo(infos);
+////        return Result.ok(message);
+////    }
+////
+////    @ApiOperation("修改应用基础信息")
+////    @PostMapping("/editBaseInfo")
+////    public Result<Boolean> editBaseInfo(@RequestBody AppBaseInfoDTO baseInfoDTO) throws Exception {
+////        return Result.ok(appInfoService.editBaseInfo(baseInfoDTO));
+////    }
+////
+////    @ApiOperation("修改应用环境信息")
+////    @PostMapping("/editEnvInfo")
+////    public Result<Boolean> editEnvInfo(@RequestBody EditEnvInfoEntity editEnvInfoEntity){
+////        System.out.println("看看能不能拿到appid:"+editEnvInfoEntity.getAppid());
+////        return Result.ok(appInfoService.editEnvInfo(editEnvInfoEntity));
+////    }
+////
+////    @ApiOperation("修改应用文档信息")
+////    @PostMapping("/editDocInfo")
+////    public Result<Boolean> editDocInfo(@RequestBody AppDocInfoDTO docInfoDTO){
+////        return Result.ok(appInfoService.editDocInfo(docInfoDTO));
+////    }
+////
+////    @ApiOperation("修改应用用户信息")
+////    @PostMapping("/editUserInfo")
+////    public Result<Boolean> editUserInfo(@RequestBody UpdataUserInfoDTO updataUserInfoDTO){
+////        Boolean tag = appInfoService.editUserInfo(updataUserInfoDTO);
+////        return Result.ok(tag);
+////    }
+////
+////    @ApiOperation("查询应用信息列表")
+////    @GetMapping("/query")
+////    public Result<List<AppBaseInfoDTO>> queryAppInfoList(
+////            @RequestParam(name = "appname", required = false) String appname,
+////            @RequestParam(name = "apptype", required = false) String apptype,
+////            @RequestParam(name = "appstatus", required = false) String appstatus,
+////            @RequestParam(name = "user", required = false) String userid){
+////        List<AppBaseInfoDTO> appbaseInfos = appInfoService.queryBaseInfo(appname, apptype, appstatus, userid);
+////        return Result.ok(appbaseInfos);
+////    }
+////
+////    @ApiOperation("查询应用基础信息")
+////    @GetMapping("/queryBaseInfoById")
+////    public Result<AppBaseInfoDTO> queryBaseInfoById(String id){
+////        AppBaseInfoDTO appbaseInfo = appInfoService.queryBaseInfoById(id);
+////        return Result.ok(appbaseInfo);
+////    }
+////
+////    @ApiOperation("查询应用环境信息")
+////    @GetMapping("/queryEnvInfoById")
+////    public Result<List<AppEnvInfoDTO>> queryEnvInfoById(String appid){
+////        List<AppEnvInfoDTO> appenvInfos = appInfoService.queryEnvInfoByAppId(appid);
+////        return Result.ok(appenvInfos);
+////    }
+////
+////    // 查看应用文档信息
+////    @GetMapping("/queryDocInfoById")
+////    public Result<AppDocInfoDTO> queryDocInfoById(String id){
+////        AppDocInfoDTO appdocInfo = appInfoService.queryDocInfoById(id);
+////        return Result.ok(appdocInfo);
+////    }
+////
+////    /**
+////     * @return 用户集合
+////     */
+////    @ApiOperation("查询应用用户列表")
+////    @PostMapping("/user/query")
+////    public Result<EditUserInfoEntity> queryAppUser(@RequestBody AppUserInfoQueryParamsDTO queryParams) {
+////        System.out.println("查询应用用户列表:"+queryParams.getPageNo());
+////        if (queryParams.getPageNo() == null) queryParams.setPageNo(1);
+////        return Result.ok(appInfoService.queryAppUser(queryParams));
+////    }
+////
+////    @GetMapping("/queryAppInfoDetail")
+////    public Result<AppInfoDetailDTO> queryAppInfoDetail(String appid){
+////        AppInfoDetailDTO appDetailInfoDTO = appInfoService.queryAppInfodetail(appid);
+////        return Result.ok(appDetailInfoDTO);
+////    }
+////
+////    // 反审核
+////    @GetMapping("/getLock")
+////    public Result<Boolean> checkLock(String key){
+////        System.out.println("访问到了:"+key);
+////        return Result.ok(appInfoService.checkLock(key));
+////    }
+////
+////    @GetMapping("/getAppuserids")
+////    public Result<List<String>> getAppUserids(String appid){
+////        return Result.ok(appInfoService.getAppuserids(appid));
+////    }
+////
+////    @GetMapping("/test")
+////    public String test(){
+////        return "应用管理测试接口";
+////    }
+////
+////    // 解除反审核
+////    @GetMapping("/unLock")
+////    public Result<Boolean> uncheckLock(String key){
+////        return Result.ok(appInfoService.uncheckLock(key));
+////    }
+////
+////
+////    // 判断当前登录用户是否为信息部用户
+////    @GetMapping("/isInfoUser")
+////    public Result<Boolean> isInfoUser(){
+////        return Result.ok(appInfoService.isInfoUser());
+////    }
+//}

+ 1 - 1
jeecgboot-vue3/src/utils/http/axios/index.ts

@@ -261,7 +261,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
         // authenticationScheme: 'Bearer',
         authenticationScheme: '',
         //接口超时设置
-        timeout: 10 * 1000,
+        timeout: 50 * 1000,
         // 基础接口地址
         // baseURL: globSetting.apiUrl,
         headers: { 'Content-Type': ContentTypeEnum.JSON },

+ 8 - 0
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.api.ts

@@ -26,6 +26,7 @@ enum Api {
     unLock = '/sys/applicationInfo/unLock',
     editUserInfo = '/sys/applicationInfo/editUserInfo',
     selectUserByDept = '/sys/sysDepart/getUsersByDepartId',
+    getUserListByRoleId = '/sys/user/getUserListByRoleId',
     getAppuserids = '/sys/applicationInfo/getAppuserids',
     isInfoUser = '/sys/applicationInfo/isInfoUser',
     isAppAdminOrDevOrOpe = '/sys/applicationInfo/isAppAdminOrDevOrOpe',
@@ -71,6 +72,13 @@ export const getAppuserids = (params) =>{
 export const selectUserByDept = (params) =>{
   return defHttp.get({url: Api.selectUserByDept+"?id="+params})
 }
+
+// 根据角色获取用户信息(应用管理员下拉框使用)
+export const getUserListByRoleId = (params) =>{
+  return defHttp.get({url: Api.getUserListByRoleId+"?roleId="+params})
+}
+
+
 /**
  * 导出api
  * @param params

+ 0 - 4
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.data.ts

@@ -476,10 +476,6 @@ export const listColumns2 =[
         title: '操作',
         key: 'action',
     },
-    {
-      title: '',
-      key: 'addType'
-    },
   // 非信息部用户看到的列
     {
       title: '业务对接人',

+ 1 - 1
jeecgboot-vue3/src/views/appmanage/AppInfoList.vue

@@ -43,7 +43,7 @@
               cancel-text="简易注册"
               @confirm="handleAdd('full')"
               @cancel="handleAdd('easy')">
-              <a-button type="primary" v-if="isInfoDeptUserTag" preIcon="ant-design:plus-outlined" style="margin-left: 320px">注 册</a-button>
+              <a-button type="primary" v-if="isInfoDeptUserTag" preIcon="ant-design:plus-outlined" style="margin-left: 60%">注 册</a-button>
             </a-popconfirm>
           </a-form-item>
         </a-form>

+ 47 - 6
jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue

@@ -15,6 +15,22 @@
             @change="handleChange"
           ></a-select>
         </template>
+
+        <!-- 应用管理员信息从应用管理员角色已分配用户中获取 -->
+        <template #UserInfoByAppAdminRole="{model, field}">
+          <a-select
+            v-model:value="model[field]"
+            show-search
+            placeholder="选择用户"
+            style="width: 183px"
+            :options="appAdminUseroptions"
+            :filter-option="filterOption"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            @change="handleChange"
+          ></a-select>
+        </template>
+
       </BasicForm>
       <div class="addFromButton">
         <a-button type="primary" @click="uncheck" v-if="!isFormType&&baseFormData?.isEdit" v-show="unCheckTag">反审核</a-button>
@@ -48,7 +64,14 @@ import {BasicForm, useForm} from '/@/components/Form';
 import {step1Schemas} from './data';
 import {Divider, Input, message, Select, SelectProps} from 'ant-design-vue';
 import {string} from "vue-types";
-import {editBaseInfo, getLock, saveOrUpdate, selectUserByDept, unLock} from '../AppBaseInfo.api'
+import {
+  editBaseInfo,
+  getLock,
+  getUserListByRoleId,
+  saveOrUpdate,
+  selectUserByDept,
+  unLock
+} from '../AppBaseInfo.api'
 import {useUserStore} from '@/store/modules/user'
 
 //设置变量储存登陆人信息
@@ -69,6 +92,7 @@ const [register, {setFieldsValue, getFieldsValue, validate }]  = useForm({
 const isFormType = ref(true)
 const unCheckTag = ref(true)
 const infoDeptUseroptions = ref<SelectProps['options']>([]);
+const appAdminUseroptions = ref<SelectProps['options']>([]);
   export default defineComponent({
     props: {
       addType: string,
@@ -139,8 +163,6 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         if (this.formType === 'isAdd'){  // 处于添加表单下的关闭事件,需收集表单已填数据进行存储
           if (tag === 'filling'){  // 填写过程中关闭表单,需要保存草稿数据
             obj.data = getFieldsValue()
-            console.log("注册过程填写数据关闭事件")
-            console.dir(obj.data)
             if ((obj.data as any).type === '') delete obj.data?.type
           }
         }else { // 处于编辑表单下的关闭事件
@@ -152,6 +174,12 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           }
           obj.type = 'isBaseFrom'
         }
+        console.log("表单一关闭时打印一下obj:")
+        console.dir(obj)
+        if((obj.data as any).name === "") delete (obj.data as any).name;
+        if((obj.data as any).status === undefined) delete (obj.data as any).status;
+        if((obj.data as any).type === undefined) delete (obj.data as any).type;
+        if((obj.data as any).admin === "") delete (obj.data as any).admin;
         this.$emit('closeModal',obj);
       },
 
@@ -170,6 +198,20 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           })
           infoDeptUseroptions.value = infoUserData
         })
+
+        // 设置应用管理员数据
+        await getUserListByRoleId('1828328255173709825').then(res => {
+          let infoUserData = []
+          res.forEach(item=>{
+            const obj = {
+              label: item.realname,
+              value: item.id
+            }
+            infoUserData.push(obj)
+          })
+          appAdminUseroptions.value = infoUserData
+        })
+
         let formData = {...this.baseFormData}
         // 作为新增表单的初始化
         if (this.formType === "isAdd"){
@@ -196,12 +238,10 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
 
       // 反审核按钮
       async uncheck(){
-        console.log("反审核:"+this.appid)
         await getLock("AppbaseInfo:"+this.appid).then((res: boolean) =>{
           res? message.error('当前信息处于反审核状态!') : message.success('反审核成功')
           unCheckTag.value = res
         })
-        console.log("反审核状态:"+unCheckTag)
       },
 
       // 退出反审核按钮
@@ -242,7 +282,8 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         handleBlur,
         handleFocus,
         handleChange,
-        infoDeptUseroptions
+        infoDeptUseroptions,
+        appAdminUseroptions
       };
     },
 

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

@@ -576,6 +576,7 @@ export default defineComponent({
      emit('add', addForm_newlyUserData.value)
      modalVisible.value=false
      data.value = []
+     addForm_newlyUserData.value = []
    }
 
     /**

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

@@ -82,7 +82,7 @@ export const step1Schemas: FormSchema[] = [
     component: 'UserSelect',
     label: '应用管理员',
     required: true,
-    slot: 'UserInfoByInfoDept',
+    slot: 'UserInfoByAppAdminRole',
     defaultValue:'',
     colProps: {
       span: 8,
@@ -242,7 +242,7 @@ export const step2Schemas: FormSchema[] = [
     },
   },
   {
-    field: 'dataBaseInfo',
+    field: 'databaseInfo',
     component: 'Input',
     label: '数据库信息',
     colProps: {
@@ -362,7 +362,7 @@ export const step2_1Schemas: FormSchema[] = [
     },
   },
   {
-    field: 'dataBaseInfo',
+    field: 'databaseInfo',
     component: 'Input',
     label: '数据库信息',
     colProps: {
@@ -482,7 +482,7 @@ export const step2_2Schemas: FormSchema[] = [
     },
   },
   {
-    field: 'dataBaseInfo',
+    field: 'databaseInfo',
     component: 'Input',
     label: '数据库信息',
     colProps: {

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

@@ -216,6 +216,5 @@ import {any, array, string} from "vue-types";
   }
 
   .mt-5{
-
   }
 </style>

+ 11 - 0
jeecgboot-vue3/src/views/integrityAppRegister/Demo.vue

@@ -0,0 +1,11 @@
+<script setup lang="ts">
+
+</script>
+
+<template>
+  <h1>完整应用注册示例一页面</h1>
+</template>
+
+<style scoped lang="less">
+
+</style>