Explorar o código

913提交 解决9.6周会提出的样式排版问题

LT32820A hai 2 meses
pai
achega
2d4d447619

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

@@ -1,5 +1,7 @@
 package org.jeecg.modules.system.controller;
 
+import bp.wf.httphandler.WF_Comm;
+import bp.wf.httphandler.WF_MyFlow;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;

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

@@ -0,0 +1,70 @@
+package org.jeecg.modules.system.entity.AppmanageEntity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+
+/**
+ * 功能描述
+ *
+ * @author: scott
+ * @date: 2024年09月12日 AM 9:54
+ */
+@Data
+public class APP_Register_workFlow_FormEntity {
+
+    // 基础信息部分
+    private String id;
+    private String name;
+    private String type;
+    private String status;
+    private String admin;
+    private String businessUser;
+    private String requirementUser;
+    private String developUser;
+    private String operationUser;
+    private String menuInfo;
+    private String descr;
+    private String checkUser;
+    private String checkTime;
+    private String checkTag;
+    private String createBy;
+    private String createTime;
+    private String addType;
+
+    // 文档信息部分
+    private String requirement;
+    private String design;
+    private String dev;
+    private String instructions;
+    private String test;
+    private String other;
+
+    // 应用生产环境信息部分
+    private String Prod_leadingIp;
+    private String Prod_backendIp;
+    private String Prod_backupFrequency;
+    private String Prod_backupLocation;
+    private String Prod_codeUrl;
+    private String Prod_configurationFile;
+    private String Prod_databaseInfo;
+
+    // 应用测试环境信息部分
+    private String Test_leadingIp;
+    private String Test_backendIp;
+    private String Test_backupFrequency;
+    private String Test_backupLocation;
+    private String Test_codeUrl;
+    private String Test_configurationFile;
+    private String Test_databaseInfo;
+
+    // 应用开发环境信息部分
+    private String Dev_leadingIp;
+    private String Dev_backendIp;
+    private String Dev_backupFrequency;
+    private String Dev_backupLocation;
+    private String Dev_codeUrl;
+    private String Dev_configurationFile;
+    private String Dev_databaseInfo;
+}

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

@@ -22,6 +22,10 @@ public interface AppCustomMapper {
     })
     List<String> queryUseridByAppAdminRole(@Param("roleName") String roleName);
 
+    // 通过用户id查询用户真实姓名
+    @Select("SELECT realname FROM sys_user WHERE id = #{userId}")
+    String queryRealnameByUserId(@Param("userId") String userId);
+
     AppBaseInfo queryBaseInfoById(@Param("id") String id);
 
     List<AppUserInfo> queryAppUserByIdList(@Param("ids") List<String> ids);

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

@@ -1,11 +1,14 @@
 package org.jeecg.modules.system.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.apache.poi.ss.formula.functions.T;
 import org.jeecg.modules.system.entity.AppmanageEntity.*;
+import org.jeecg.modules.system.entity.SysRole;
 import org.jeecg.modules.system.entity.SysUserRole;
 
 import java.util.List;
 
-public interface AppmanageService {
+public interface AppmanageService  {
 
     // 注册应用信息
     String addAppInfo(AppInfo appInfoDTO) throws Exception;
@@ -59,5 +62,6 @@ public interface AppmanageService {
     // 是否为应用管理员或开发负责人、运维负责人
     boolean isAppAdminOrDevOrOpe(String appid);
 
+    void afterAppCheckPass(String appid);
 }
 

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

@@ -1,6 +1,7 @@
 package org.jeecg.modules.system.service.impl;
 
-import cn.hutool.system.UserInfo;
+import bp.wf.Dev2Interface;
+import java.lang.reflect.Field;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.apache.shiro.SecurityUtils;
@@ -13,16 +14,16 @@ import org.jeecg.modules.system.entity.*;
 import org.jeecg.modules.system.entity.AppmanageEntity.*;
 import org.jeecg.modules.system.mapper.*;
 import org.jeecg.modules.system.service.*;
+import org.jeecg.modules.system.util.AppManageUtil;
 import org.jeecg.modules.system.vo.SysUserRoleVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-
 import javax.annotation.Resource;
 import java.util.*;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.stream.Collectors;
-
+import org.apache.commons.beanutils.BeanUtils;
 /**
  * 功能描述
  *
@@ -32,6 +33,10 @@ import java.util.stream.Collectors;
 @Service
 public class AppmanageServiceImpl implements AppmanageService {
 
+    // 简单查询用户信息
+    @Autowired
+    private ISysUserService sysUserService;
+
     @Autowired
     private BaseCommonService baseCommonService;
 
@@ -75,26 +80,12 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Autowired
     private ISysDictService sysDictService;
 
-    @Autowired
-    private ISysUserService sysUserService;
-
     @Autowired
     private RedisUtil redisUtil;
 
     private final ReentrantLock lock = new ReentrantLock();
     private final String UNCHECK_TAG_BASE_PATH = "AppInfouncheckTag:";
 
-    // 判断当前用户是否有编辑当前信息的权限
-    private boolean hasEditCurrentInfoPermission(String appid){
-        // 获取当前登录用户
-        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        // 查询基础信息的应用管理员id,比较是否和当前登录用户一致
-        QueryWrapper<AppBaseInfo> baseInfoPOQueryWrapper = new QueryWrapper<>();
-        baseInfoPOQueryWrapper.select("admin").eq("id", appid);
-        AppBaseInfo baseInfo = baseInfoMapper.selectOne(baseInfoPOQueryWrapper);
-        return loginUser.getId().equals(baseInfo.getAdmin());
-    }
-
     /**
      * 注册应用信息 简易注册与完整注册
      * @param appInfo
@@ -102,89 +93,69 @@ public class AppmanageServiceImpl implements AppmanageService {
      */
     @Override
     @Transactional
-    public String addAppInfo(AppInfo appInfo) {
-        // 创建人
-        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        // 先行添加应用基础信息。获得appid
-        AppBaseInfo appBaseInfo = appInfo.getAppBaseInfoDTO();
+    public String addAppInfo(AppInfo appInfo) throws Exception {
         // 查询有无相同的应用名
+        AppBaseInfo appBaseInfo = appInfo.getAppBaseInfoDTO();
         QueryWrapper<AppBaseInfo> appBaseInfoQueryWrapper = new QueryWrapper<>();
         appBaseInfoQueryWrapper.eq("name", appBaseInfo.getName());
         if (baseInfoMapper.selectOne(appBaseInfoQueryWrapper) != null) return "应用名称已存在";
-
+        // 创建人
+        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         appBaseInfo.setCreateBy(loginUser.getId());
         appBaseInfo.setAddType(appInfo.getAddType());
+        appBaseInfo.setDelFlag(1);
         baseInfoMapper.insert(appBaseInfo);
+        // 提交至工作流的表单信息(需要将用户id换成真名,字典值换成字典文本)
+        AppBaseInfo sendCheck_appBaseInfo = appBaseInfo;
+        sendCheck_appBaseInfo.setAdmin(customMapper.queryRealnameByUserId(appBaseInfo.getAdmin()));
+        if (appBaseInfo.getDevelopUser()!=null)
+            sendCheck_appBaseInfo.setDevelopUser(customMapper.queryRealnameByUserId(appBaseInfo.getDevelopUser()));
+        if (appBaseInfo.getOperationUser()!=null)
+            sendCheck_appBaseInfo.setOperationUser(customMapper.queryRealnameByUserId(appBaseInfo.getOperationUser()));
+        if (appBaseInfo.getRequirementUser()!=null)
+            sendCheck_appBaseInfo.setRequirementUser(customMapper.queryRealnameByUserId(appBaseInfo.getRequirementUser()));
+        if (appBaseInfo.getBusinessUser()!=null)
+            sendCheck_appBaseInfo.setBusinessUser(customMapper.queryRealnameByUserId(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 = appInfo.getAppEnvInfoDTO().size()>0;
         // 简易注册模式下添加基础信息即可
-        if (appBaseInfo.getAddType().equals("easy")) return "提交成功";
+        if (appBaseInfo.getAddType().equals("easy")){
+            sendCheckWordFlow(sendCheck_appBaseInfo, "021",loginUser.getUsername());
+            return "提交成功";
+        }else {
+            APP_Register_workFlow_FormEntity appRegisterWorkFlowFormEntity = new APP_Register_workFlow_FormEntity();
+            BeanUtils.copyProperties(appRegisterWorkFlowFormEntity, appDocInfo);
+            // 基础信息最后一个复制,避免id为null
+            BeanUtils.copyProperties(appRegisterWorkFlowFormEntity, sendCheck_appBaseInfo);
+            if (hasEnvInfo){
+                AppManageUtil appManageUtil = new AppManageUtil();
+                appRegisterWorkFlowFormEntity = appManageUtil.TransitionEnvInfoToAppRegisterWorkFlowForm(appRegisterWorkFlowFormEntity, appInfo.getAppEnvInfoDTO());
+            }
+            sendCheckWordFlow(appRegisterWorkFlowFormEntity, "022",loginUser.getUsername());
+        }
         String appid = appBaseInfo.getId();
 
-        // 添加默认角色信息
-        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();
-        ArrayList<String> useridlist = new ArrayList<>();
         // 添加应用用户信息
         appInfo.getUserInfo().forEach(userid -> {
             AppUserInfo userInfo = new AppUserInfo();
             userInfo.setAppid(appid);
             userInfo.setUserid(userid);
-            useridlist.add(userid);
             userInfoMapper.insert(userInfo);
         });
 
-        // 给应用默认角色分配用户
-        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.setPerms("sys:appmanage:enter:"+sysPermission.getName());
-        // 设置菜单路径
-        sysPermission.setUrl(appBaseInfo.getMenuInfo());
-        // 设置组件(即 菜单路径去掉第一个 "/")
-        String component = sysPermission.getUrl().replaceFirst("^/", "");
-        sysPermission.setComponent(component);
-        // 设置菜单类型 (0: 一级菜单)
-        sysPermission.setMenuType(0);
-        // 是否路由
-        sysPermission.setRoute(true);
-        sysPermissionService.addPermission(sysPermission);
-
-        // 授予应用默认角色访问一级菜单权限
-        try {
-            sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId(),"");
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-
-        // 走审核流 (暂放)
-
         // 添加应用环境信息
-        if (!appInfo.getAppEnvInfoDTO().isEmpty()){
-            System.out.println("环境信息不为空");
+        if (hasEnvInfo){
             for (AppEnvInfo appEnvInfo : appInfo.getAppEnvInfoDTO()){
                 appEnvInfo.setAppid(appid);
                 envInfoMapper.insert(appEnvInfo);
             }
         }
         // 添加应用文档信息
-        AppDocInfo appDocInfo = appInfo.getAppDocInfoDTO();
         appDocInfo.setAppid(appid);
         docInfoMapper.insert(appDocInfo);
+
         return "提交成功";
     }
 
@@ -204,8 +175,9 @@ public class AppmanageServiceImpl implements AppmanageService {
             // 不能删除基础平台的应用信息
             if (id.equals("0")) return false;
             AppBaseInfo appBaseInfo = baseInfoMapper.selectById(id);
-            if (!(appBaseInfo.getAdmin().equals(loginUser.getId()))) return false;
-
+            if (!loginUser.getUsername().equals("admin")){
+                if (!(appBaseInfo.getAdmin().equals(loginUser.getId()))) return false;
+            }
             // 删除所属该应用的基础信息、环境信息、文档信息、用户信息
             baseInfoMapper.deleteById(id);
             envInfoMapper.delete(new QueryWrapper<AppEnvInfo>().eq("appid", id));
@@ -221,10 +193,11 @@ public class AppmanageServiceImpl implements AppmanageService {
             query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
             query.eq(SysPermission::getAppId, id);
             List<SysPermission> list = sysPermissionService.list(query);
-            for (SysPermission sysPermission : list){
-                sysPermissionService.deletePermission(sysPermission.getId());
+            if (list.size() != 0){
+                for (SysPermission sysPermission : list){
+                    sysPermissionService.deletePermission(sysPermission.getId());
+                }
             }
-
             // 删除该应用下所创建的角色信息
             String[] Approleids = sysRoleService.listRoleIdsByAppId(id);
             if (Approleids!=null){
@@ -336,11 +309,22 @@ public class AppmanageServiceImpl implements AppmanageService {
                 userInfoMapper.insert(userInfoPO);
             });
         }
+
         // 解除反审核状态
         uncheckLock("AppuserInfo"+updataUserInfo.getAppid());
         return true;
     }
 
+    /**
+     *  默认角色与应用用户强绑定
+     */
+    public Boolean appDefaultRoleSyncappUser(List<String> userids, String appid) {
+        QueryWrapper<AppUserInfo> appUserInfoQueryWrapper = new QueryWrapper<>();
+        appUserInfoQueryWrapper.eq("appid", appid);
+        return true;
+    }
+
+
     /**
      * 组合条件查询应用基础信息
      * @param key 模糊查询关键字
@@ -359,7 +343,6 @@ public class AppmanageServiceImpl implements AppmanageService {
         Map<String, String> appManagerInfo = new HashMap<>();
         baseInfos.forEach(baseInfo -> {
             appManagerInfo.put(baseInfo.getId(), baseInfo.getAdminid());
-
             // 查询字典
             String typeText = sysDictService.queryDictTextByKey("app_type", baseInfo.getType());
             String statusText = sysDictService.queryDictTextByKey("app_status", baseInfo.getStatus());
@@ -386,7 +369,6 @@ public class AppmanageServiceImpl implements AppmanageService {
 //        }
 //        return baseInfos;
     }
-
     /**
      * 根据id查询应用基础信息
      * @param id
@@ -564,6 +546,7 @@ public class AppmanageServiceImpl implements AppmanageService {
         return true;
     }
 
+    // 获取某个应用用户id集合
     @Override
     public List<String> getAppuserids(String appid) {
         QueryWrapper<AppUserInfo> userInfoQueryWrapper = new QueryWrapper<>();
@@ -577,6 +560,7 @@ public class AppmanageServiceImpl implements AppmanageService {
         return null;
     }
 
+    // 是否为信息部用户
     @Override
     public boolean isInfoUser() {
         String deptId = customMapper.queryDepartIdByDepartName("信息部");
@@ -649,5 +633,88 @@ public class AppmanageServiceImpl implements AppmanageService {
         return roleNameInfo;
     }
 
+    // 加入流程
+    private <T> void sendCheckWordFlow(T object, String flowNo, String username) throws Exception {
+        Hashtable<String, String> hashtable = new Hashtable<>();
+        Class<?> clazz = object.getClass();
+        // 获取所有字段
+        Field[] fields = clazz.getDeclaredFields();
+        // 遍历所有字段
+        for (Field field : fields) {
+            // 设置访问权限
+            field.setAccessible(true);
+            try {
+                Object value = field.get(object);
+                if (value != null) {
+                    // 将值转换为字符串
+                    String stringValue = value.toString();
+                    hashtable.put(field.getName(), stringValue);
+                }
+            } catch (IllegalAccessException e) {
+                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);
+    }
+
+    // 判断当前用户是否有编辑当前信息的权限
+    private boolean hasEditCurrentInfoPermission(String appid){
+        // 获取当前登录用户
+        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        // 查询基础信息的应用管理员id,比较是否和当前登录用户一致
+        QueryWrapper<AppBaseInfo> baseInfoPOQueryWrapper = new QueryWrapper<>();
+        baseInfoPOQueryWrapper.select("admin").eq("id", appid);
+        AppBaseInfo baseInfo = baseInfoMapper.selectOne(baseInfoPOQueryWrapper);
+        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(),"");
+    }
+
+//    // 根据用户id查询用户姓名,先从redis数据库中查询,若没有再从数据库中查询
+//    private String queryUserNameByUserId(String userid){
+//
+//    }
 }

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

@@ -0,0 +1,48 @@
+package org.jeecg.modules.system.util;
+
+import org.jeecg.modules.system.entity.AppmanageEntity.APP_Register_workFlow_FormEntity;
+import org.jeecg.modules.system.entity.AppmanageEntity.AppEnvInfo;
+
+import java.util.List;
+
+/**
+ * 功能描述 应用管理工具类
+ *
+ * @author: scott
+ * @date: 2024年09月12日 AM 11:52
+ */
+public class AppManageUtil {
+
+    public APP_Register_workFlow_FormEntity TransitionEnvInfoToAppRegisterWorkFlowForm(APP_Register_workFlow_FormEntity appRegisterWorkFlowForm, List<AppEnvInfo> appEnvInfoList){
+        for (AppEnvInfo appEnvInfo : appEnvInfoList){
+            if (appEnvInfo.getEnv().equals("prod")){
+                appRegisterWorkFlowForm.setProd_leadingIp(appEnvInfo.getLeadingIp());
+                appRegisterWorkFlowForm.setProd_backendIp(appEnvInfo.getBackendIp());
+                appRegisterWorkFlowForm.setProd_backupFrequency(appEnvInfo.getBackupFrequency());
+                appRegisterWorkFlowForm.setProd_backupLocation(appEnvInfo.getBackupLocation());
+                appRegisterWorkFlowForm.setProd_codeUrl(appEnvInfo.getCodeUrl());
+                appRegisterWorkFlowForm.setProd_configurationFile(appEnvInfo.getConfigurationFile());
+                appRegisterWorkFlowForm.setProd_databaseInfo(appEnvInfo.getDatabaseInfo());
+            }
+            if (appEnvInfo.getEnv().equals("test")){
+                appRegisterWorkFlowForm.setTest_leadingIp(appEnvInfo.getLeadingIp());
+                appRegisterWorkFlowForm.setTest_backendIp(appEnvInfo.getBackendIp());
+                appRegisterWorkFlowForm.setTest_backupFrequency(appEnvInfo.getBackupFrequency());
+                appRegisterWorkFlowForm.setTest_backupLocation(appEnvInfo.getBackupLocation());
+                appRegisterWorkFlowForm.setTest_codeUrl(appEnvInfo.getCodeUrl());
+                appRegisterWorkFlowForm.setTest_configurationFile(appEnvInfo.getConfigurationFile());
+                appRegisterWorkFlowForm.setTest_databaseInfo(appEnvInfo.getDatabaseInfo());
+            }
+            if (appEnvInfo.getEnv().equals("dev")){
+                appRegisterWorkFlowForm.setDev_leadingIp(appEnvInfo.getLeadingIp());
+                appRegisterWorkFlowForm.setDev_backendIp(appEnvInfo.getBackendIp());
+                appRegisterWorkFlowForm.setDev_backupFrequency(appEnvInfo.getBackupFrequency());
+                appRegisterWorkFlowForm.setDev_backupLocation(appEnvInfo.getBackupLocation());
+                appRegisterWorkFlowForm.setDev_codeUrl(appEnvInfo.getCodeUrl());
+                appRegisterWorkFlowForm.setDev_configurationFile(appEnvInfo.getConfigurationFile());
+                appRegisterWorkFlowForm.setDev_databaseInfo(appEnvInfo.getDatabaseInfo());
+            }
+        }
+        return appRegisterWorkFlowForm;
+    }
+}

+ 0 - 2
jeecg-boot/lttc-module-appmanage/src/main/java/cn/lttc/modules/service/Impl/AppmanageServiceImpl.java

@@ -103,8 +103,6 @@ public class AppmanageServiceImpl implements AppmanageService {
         return loginUser.getId().equals(baseInfoPO.getAdmin());
     }
 
-
-
     /**
      * 注册应用信息 简易注册与完整注册
      * @param appInfoDTO

+ 10 - 2
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.api.ts

@@ -3,7 +3,6 @@ import {defHttp} from '/src/utils/http/axios';
 // @ts-ignore
 import { useMessage } from "/src/hooks/web/useMessage";
 
-
 const { createConfirm } = useMessage();
 
 enum Api {
@@ -31,7 +30,16 @@ enum Api {
     isInfoUser = '/sys/applicationInfo/isInfoUser',
     isAppAdminOrDevOrOpe = '/sys/applicationInfo/isAppAdminOrDevOrOpe',
     isAppAdmin = '/sys/applicationInfo/isAppAdmin',
-    checkMenuInfoisExist = '/sys/permission/checkPermDuplication'
+    checkMenuInfoisExist = '/sys/permission/checkPermDuplication',
+    workFlowTest1 = '/sys/applicationInfo/test1',
+    workFlowTest2 = '/sys/applicationInfo/test2'
+}
+export const JFlow_Test2=()=>{
+  return defHttp.get({url: Api.workFlowTest2})
+}
+
+export const JFlow_Test1=()=>{
+  return defHttp.get({url: Api.workFlowTest1})
 }
 export const checkMenuInfoisExist=(params)=>{
     return defHttp.get({url: Api.checkMenuInfoisExist+"?url="+params+"&alwaysShow="+false},  { errorMessageMode: false, successMessageMode: false })

+ 48 - 53
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.data.ts

@@ -2,6 +2,7 @@ import { BasicColumn, FormSchema } from '/src/components/Table';
 import {DescItem} from "@/components/Description";
 
 // 详情页组件数据
+// @ts-ignore
 export const Appdescschema: DescItem[] = [
     {
         field: 'appBaseInfoDTO.admin',
@@ -63,23 +64,18 @@ export const Appdescschema: DescItem[] = [
         label: '应用描述',
         span: 4
     },
-    {
-        field: '',
-        label: '应用环境信息',
-        span: 4
-    },
-
-    {
-        field: '',
-        label: '生产环境',
-        span: 4,
-        show: (data)=>{
-            return (data.hasProdInfo as boolean)
-        }
-    },
+    // {
+    //     field: '',
+    //     label: '生产环境',
+    //     span: 0,
+    //
+    //     show: (data)=>{
+    //         return (data.hasProdInfo as boolean)
+    //     }
+    // },
     {
         field: 'prodEnvInfo.leadingIp',
-        label: '前端IP',
+        label: '生产-前端IP',
         span: 1,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -87,7 +83,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.backendIp',
-        label: '后端IP',
+        label: '生产-后端IP',
         span: 1,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -95,7 +91,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.configurationFile',
-        label: '配置文件',
+        label: '生产-配置文件',
         span: 2,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -103,7 +99,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.codeUrl',
-        label: '源码位置',
+        label: '生产-源码位置',
         span: 2,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -111,7 +107,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.backupLocation',
-        label: '备份位置',
+        label: '生产-备份位置',
         span: 1,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -119,7 +115,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.backupFrequency',
-        label: '备份频率',
+        label: '生产-备份频率',
         span: 1,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
@@ -127,24 +123,25 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'prodEnvInfo.descr',
-        label: '其它信息',
+        label: '生产-其它信息',
         span: 4,
         show: (data)=>{
             return (data.hasProdInfo as boolean)
         }
     },
 
-    {
-        field: '',
-        label: '开发环境',
-        span: 4,
-        show: (data)=>{
-            return (data.hasDevInfo as boolean)
-        }
-    },
+    // {
+    //     field: '',
+    //     label: '开发环境',
+    //     span: 0,
+    //     labelStyle: { width: '100%', display: 'block' }, // 设置 labelStyle
+    //     show: (data)=>{
+    //         return (data.hasDevInfo as boolean)
+    //     }
+    // },
     {
         field: 'devEnvInfo.leadingIp',
-        label: '前端IP',
+        label: '开发-前端IP',
         span: 1,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -152,7 +149,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.backendIp',
-        label: '后端IP',
+        label: '开发-后端IP',
         span: 1,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -160,7 +157,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.configurationFile',
-        label: '配置文件',
+        label: '开发-配置文件',
         span: 2,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -168,7 +165,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.codeUrl',
-        label: '源码位置',
+        label: '开发-源码位置',
         span: 2,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -176,7 +173,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.backupLocation',
-        label: '备份位置',
+        label: '开发-备份位置',
         span: 1,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -184,7 +181,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.backupFrequency',
-        label: '备份频率',
+        label: '开发-备份频率',
         span: 1,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
@@ -192,24 +189,24 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'devEnvInfo.descr',
-        label: '其它信息',
+        label: '开发-其它信息',
         span: 4,
         show: (data)=>{
             return (data.hasDevInfo as boolean)
         }
     },
 
-    {
-        field: '',
-        label: '测试环境',
-        span: 4,
-        show: (data)=>{
-            return (data.hasTestInfo as boolean)
-        }
-    },
+    // {
+    //     field: '',
+    //     label: '测试环境',
+    //     span: 4,
+    //     show: (data)=>{
+    //         return (data.hasTestInfo as boolean)
+    //     }
+    // },
     {
         field: 'testEnvInfo.leadingIp',
-        label: '前端IP',
+        label: '测试-前端IP',
         span: 1,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -217,7 +214,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.backendIp',
-        label: '后端IP',
+        label: '测试-后端IP',
         span: 1,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -225,7 +222,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.configurationFile',
-        label: '配置文件',
+        label: '测试-配置文件',
         span: 2,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -233,7 +230,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.codeUrl',
-        label: '源码位置',
+        label: '测试-源码位置',
         span: 2,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -241,7 +238,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.backupLocation',
-        label: '备份位置',
+        label: '测试-备份位置',
         span: 1,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -249,7 +246,7 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.backupFrequency',
-        label: '备份频率',
+        label: '测试-备份频率',
         span: 1,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
@@ -257,14 +254,12 @@ export const Appdescschema: DescItem[] = [
     },
     {
         field: 'testEnvInfo.descr',
-        label: '其它信息',
+        label: '测试-其它信息',
         span: 4,
         show: (data)=>{
             return (data.hasTestInfo as boolean)
         }
     },
-
-
 ];
 
 //列表数据

+ 40 - 21
jeecgboot-vue3/src/views/appmanage/AppInfoList.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="container">
-
     <!-- 顶部条件筛选区-->
     <div class="topForm">
       <div class="topForm_inter">
-        <a-form :model="formState" name="horizontal_login" layout="inline" autocomplete="off" @finish="onFinish" @finishFailed="onFinishFailed">
+        <a-form :model="formState" layout="inline" autocomplete="off" @finish="onFinish" @finishFailed="onFinishFailed" class="topQueryForm">
           <span>应用名称:</span>
           <a-form-item name="appname">
             <a-input v-model:value="formState.appname">
@@ -36,19 +35,20 @@
             <a-button @click="resetAppInfo">重 置
             </a-button>
           </a-form-item>
+
+          <a-form-item>
+            <a-popconfirm
+              title="请选择注册方式"
+              ok-text="完整注册"
+              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-popconfirm>
+          </a-form-item>
         </a-form>
       </div>
-    </div>
-    <div class="buttonTag" v-if="isInfoDeptUserTag&&showAddAppInfoButtonTag">
-        <a-popconfirm
-                title="请选择注册方式"
-                ok-text="完整注册"
-                cancel-text="简易注册"
-                @confirm="handleAdd('full')"
-                @cancel="handleAdd('easy')">
-          <a-button type="primary" preIcon="ant-design:plus-outlined">注 册</a-button>
-        </a-popconfirm>
-<!--      <a-button @click="batchDelete" :disabled="!batchDeleteAvailable" > 批量删除</a-button>-->
+        <!--      <a-button @click="batchDelete" :disabled="!batchDeleteAvailable" > 批量删除</a-button>-->
     </div>
 
     <!-- 添加事件弹出对话框表单 -->
@@ -135,8 +135,10 @@
         v-model:visible="infoDetailVisible"
         :title="`${appname}详情信息`"
         :footer="null"
-        :width="1000">
-      <Description @register="descriPtionregister" class="detail" :column="4" :data="this.appInfoData" layout="vertical"/>
+        :width="1200">
+      <div style="padding: 10px">
+        <Description @register="descriPtionregister" class="detail" :column="4" :data="this.appInfoData" />
+      </div>
     </a-modal>
 
     <!-- 应用信息列表 -->
@@ -229,9 +231,10 @@ import { SmileOutlined,
   ExclamationCircleOutlined} from '@ant-design/icons-vue';
 import {computed, reactive, toRefs, ref, defineComponent, createVNode} from 'vue';
 import { listColumns2,Appdescschema} from './AppBaseInfo.data';
-import {list, getDictItem, lookBaseInforeq, lookEnvInforeq, lookDocInforeq, deleteOne,
+import {
+  list, getDictItem, lookBaseInforeq, lookEnvInforeq, lookDocInforeq, deleteOne,
   lookAppInfoDetail,
-  isInfoUser, isAppAdminOrDevOrOpe, isAppAdmin
+  isInfoUser, isAppAdminOrDevOrOpe, isAppAdmin, JFlow_Test1
 } from './AppBaseInfo.api'
 import FormStepPage from "@/views/appmanage/addForm/index.vue"
 import BaseInfoFrom from '@/views/appmanage/addForm/Step1.vue'
@@ -362,6 +365,16 @@ export default defineComponent({
   },
 
   methods:{
+    async test(){
+      try {
+        let userInfo = await JFlow_Test1()
+        console.log("看看拿到的userInfo:")
+        console.dir(userInfo)
+      }catch (e){
+       console.log("错误:"+e)
+      }
+    },
+
     // 关闭对话框事件
     closeModal(value){
       console.log("主页面关闭")
@@ -690,25 +703,31 @@ export default defineComponent({
 }
 
 .topForm{
-  width: 100%;
+  width: auto;
   height: auto;
   background-color: white;
   border: 1px silver solid;
 
 }
 .topForm_inter{
-  width: 90%;
+  width: 95%;
   margin-bottom: 15px;
   margin-top: 15px;
   margin-left: 20px;
 }
+
+.topQueryForm{
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
 .long-text-cell {
   white-space: pre-wrap; /* 或者使用 word-wrap: break-word; */
 }
 
 .buttonTag{
-  display: flex;
-  gap: 15px;
+  margin-left: 15px;
 }
 
 .detail{