Prechádzať zdrojové kódy

928中午 定时备份

LT32820A 1 mesiac pred
rodič
commit
2f1ecd1b69

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

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

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

@@ -159,12 +159,14 @@ public class AppmanageServiceImpl implements AppmanageService {
             }
         }
         // 添加应用用户信息
-        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){
@@ -174,8 +176,10 @@ public class AppmanageServiceImpl implements AppmanageService {
             }
         }
         // 添加应用文档信息
-        appDocInfo.setAppid(appid);
-        docInfoMapper.insert(appDocInfo);
+        if (appDocInfo!=null){
+            appDocInfo.setAppid(appid);
+            docInfoMapper.insert(appDocInfo);
+        }
         return "提交成功";
     }
 

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

@@ -15060,7 +15060,8 @@ c	*/
 		SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
 		System.out.println("拿到的流程编号:"+fk_flow);
 		if (fk_flow.equals("021")||fk_flow.equals("022")){
-			systemClient.afterUnsendAppRegisterFlow(workID);
+			System.out.println("应用注册流程微服务调用");
+//			systemClient.afterUnsendAppRegisterFlow(workID);
 		}
 		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());
+////    }
+//}

+ 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 - 1
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,

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

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