From da4e304e70f0650a165ee681c2e50f6ade18e536 Mon Sep 17 00:00:00 2001
From: mors <3067699729@qq.com>
Date: Wed, 12 Apr 2023 10:01:21 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/modulex/ModulexList.vue | 85 ++++++++++++++-----
.../controller/FunctionxController.java | 1 +
2 files changed, 64 insertions(+), 22 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
index c28604d..561330d 100644
--- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
+++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
@@ -50,46 +50,58 @@
class="j-table-force-nowrap"
@change="handleTableChange">
+
-
功能
+
实体
-
- 复制
+
+
+ 撤回
+
+ BUG反馈
+
+ 审核
+
+
+
+
+
+
+
发布
- 开始
+ 开始
+
提交
+
-
- 撤回
-
- BUG反馈
-
- 审核
+
+
+ 复制
- 编辑
+ 编辑
- 详情
+ 详情
+
handleDelete(record.id)">
删除
-
@@ -110,6 +122,7 @@ import ModulexModal from './modules/ModulexModal'
import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal";
+import store from "@/store";
export default {
name: 'ModulexList',
@@ -242,26 +255,40 @@ export default {
align: "center",
dataIndex: 'verisonStatus_dictText'
},
+
+ // {
+ // title:'版本号',
+ // align:"center",
+ // dataIndex: 'verison'
+ // },
+ // {
+ // title: '创建时间',
+ // align: "center",
+ // dataIndex: 'createTime'
+ // },
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
- // width: 147,
+ width:98,
scopedSlots: {customRender: 'htmlSlot'}
},
- // {
- // title:'版本号',
- // align:"center",
- // dataIndex: 'verison'
- // },
+ {
+ title: '功能',
+ dataIndex: 'actionManage',
+ align: "center",
+ fixed: "right",
+ width:147,
+ scopedSlots: {customRender: 'actionManage'}
+ },
{
title: '操作',
- dataIndex: 'action',
+ dataIndex: 'action1',
align: "center",
fixed: "right",
- // width: 147,
- scopedSlots: {customRender: 'action'}
+ width:147,
+ scopedSlots: {customRender: 'action1'}
}
],
url: {
@@ -274,9 +301,14 @@ export default {
},
dictOptions: {},
superFieldList: [],
+ userRole1: '', //管理员是1 其他是2
}
},
created() {
+ let usercode = store.getters.userInfo.id
+ //根据id获得当前登录用户角色
+ this.loginRole(usercode)
+ //console.log('userole1',this.userRole1)
this.getSuperFieldList();
},
computed: {
@@ -285,6 +317,15 @@ export default {
},
},
methods: {
+ loginRole(id){
+ getAction('functionx/functionx/loginrole',{id:id}).then((res)=>{
+ if (res.success) {
+ //重新计算分页问题
+ this.userRole1 = res.result;
+ //console.log('this.userRole1',this.userRole1)
+ }
+ })
+ },
shenhe(record) {
getAction('/modulex/modulex/shenhe', {id: record.id}).then((res) => {
if (res.success) {
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
index bad0dfe..a00e64e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
@@ -206,6 +206,7 @@ public class FunctionxController extends JeecgController loginrole(@RequestParam(name="id",required=true) String id) {
List list=functionxService.findRole(id);
+ //如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else
From 5f5c21006412fc9554ab9a8873454fd35c439a1f Mon Sep 17 00:00:00 2001
From: YTD <1158283261@qq.com>
Date: Wed, 12 Apr 2023 10:17:58 +0800
Subject: [PATCH 2/4] 2023-4-12
---
.../src/views/functionx/FunctionxList.vue | 25 ++++++++++---------
.../src/views/rulex/RulexList.vue | 7 +++---
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
index 768d4b2..3ba73d4 100644
--- a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
+++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
@@ -100,16 +100,7 @@
-
- 发布
- 已发布
-
- 开始
-
- 提交
-
- 详情
-
+
@@ -137,6 +128,16 @@
删除
+
+ 发布
+ 已发布
+
+ 开始
+
+ 提交
+
+ 详情
+
@@ -390,11 +391,11 @@
})
},
loginrole(id){
+ let that = this
getAction(this.url.loginrole,{id:id}).then((res)=>{
if (res.success) {
//重新计算分页问题
- this.role=res.result;
-
+ that.role=res.result;
}
})
},
diff --git a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
index 814360b..0c3f51a 100644
--- a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
+++ b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
@@ -90,9 +90,7 @@
-
- 详情
-
+
复制
@@ -109,6 +107,9 @@
+
+ 详情
+
From abdf830ccdfabfb1b2c16fcb319cc3438fd1be37 Mon Sep 17 00:00:00 2001
From: YTD <1158283261@qq.com>
Date: Wed, 12 Apr 2023 11:21:01 +0800
Subject: [PATCH 3/4] 2023-4-12
---
ant-design-vue-jeecg/src/views/rulex/RulexList.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
index 0c3f51a..790c463 100644
--- a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
+++ b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
@@ -264,7 +264,7 @@
},
methods: {
ziduan(){
- this.field="fieldx,field_name,id,table_id="+this.model.tableId;
+ this.field="fieldx,field_name,id,table_id="+this.queryParam.tableId;
},
loginrole(id){
getAction(this.url.loginrole,{id:id}).then((res)=>{
From a97678f2bd88de9bd40aa93a2be8b026ec081b8c Mon Sep 17 00:00:00 2001
From: mors <3067699729@qq.com>
Date: Wed, 12 Apr 2023 14:44:33 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../demo/bugx/controller/BugxController.java | 3 +
.../modulex/controller/ModulexController.java | 21 ++----
.../modulex/service/IModulexService.java | 2 +
.../service/impl/ModulexServiceImpl.java | 70 +++++++++++++++++++
4 files changed, 82 insertions(+), 14 deletions(-)
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
index 1428624..11f67c8 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
@@ -128,6 +128,9 @@ public class BugxController extends JeecgController {
// code=bugxService.sort(bugx.getProjectId());
// projectxMapper.upDeBug(bugx.getProjectId());
// }else
+// //
+ // BUG反馈:项目负责人(管理员)使用,点击BUG反馈,状态变为DEBUG,下属功能状态不变,
+ // BUG管理增加一条记录,记录BUG内容。
if (bugx.getModuleId() != null) {
queryWrapper.eq("module_id", bugx.getModuleId());
queryWrapper.isNull("function_id");
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
index 1f2c9ce..51af5c1 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
@@ -58,30 +58,23 @@ public class ModulexController extends JeecgController
}
@GetMapping(value = "/fabu")
- public Result> fabu(@RequestParam(name="id",required=true) String id) {
- Modulex byId = modulexService.getById(id);
- if (byId.getWorkStatus() != 0){
- return Result.error("当前功能已发布!!!");
- }else {
- byId.setWorkStatus(1);
- modulexService.updateById(byId);
- return Result.OK("发布成功!!");
- }
- }
+ public Result> fabu(@RequestParam(name="id") String id) {
+ return modulexService.fabu(id);
+ }
@GetMapping(value = "/kaishi")
- public Result> kaishi(@RequestParam(name="id",required=true) String id) {
+ public Result> kaishi(@RequestParam(name="id") String id) {
return modulexService.kaishi(id);
}
@GetMapping(value = "/tijiao")
- public Result> tijiao(@RequestParam(name="id",required=true) String id) {
+ public Result> tijiao(@RequestParam(name="id") String id) {
return modulexService.tijiao(id);
}
@GetMapping(value = "/cehui")
- public Result> cehui(@RequestParam(name="id",required=true) String id) {
+ public Result> cehui(@RequestParam(name="id") String id) {
return modulexService.cehui(id);
}
@GetMapping(value = "/shenhe")
- public Result> shenhe(@RequestParam(name="id",required=true) String id) {
+ public Result> shenhe(@RequestParam(name="id") String id) {
return modulexService.shenhe(id);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
index 23ce969..708401c 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
@@ -18,6 +18,8 @@ public interface IModulexService extends IService {
*/
Integer getMaxVersion(Integer verison);
+ Result> fabu(String id);
+
Result> kaishi(String id);
Result> tijiao(String id);
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
index f03310c..e09c4ce 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
@@ -1,6 +1,9 @@
package org.jeecg.modules.modulex.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.demo.functionx.entity.Functionx;
+import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.mapper.ModulexMapper;
import org.jeecg.modules.modulex.service.IModulexService;
@@ -8,6 +11,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -22,6 +26,9 @@ import java.util.stream.Collectors;
@Service
public class ModulexServiceImpl extends ServiceImpl implements IModulexService {
+ @Resource
+ private FunctionxMapper functionxMapper;
+
/**
* 得到最大的版本号
*/
@@ -30,6 +37,31 @@ public class ModulexServiceImpl extends ServiceImpl impl
return this.list().size();
}
+ /**
+ * 发布:点击发布按钮,状态变成已发布,
+ * 任务责任人(即开发者)可以操作开始、提交等功能;
+ * 模块管理下属所有功能状态变为已发布。
+ * @param id modulex表的主键id
+ */
+ @Override
+ public Result> fabu(String id) {
+ Modulex byId = this.getById(id);
+ if (byId.getWorkStatus() != 0){
+ return Result.error("当前功能已发布!!!");
+ }else {
+ byId.setWorkStatus(1);
+ this.updateById(byId);
+ //模块管理下属所有功能状态变为已发布
+ this.handleStatus(id,1);
+ return Result.OK("发布成功!!");
+ }
+ }
+
+ /**
+ * 开始:任务责任人(即开发者)使用的功能,点击开始按钮,状态变为开发中,
+ * 表示任务开始,开始时间设置为当前时间。
+ * @param id modulex表的主键id
+ */
@Override
public Result> kaishi(String id) {
Modulex byId = this.getById(id);
@@ -39,10 +71,17 @@ public class ModulexServiceImpl extends ServiceImpl impl
byId.setWorkStatus(2);
byId.setStartTime(new Date());
this.updateById(byId);
+
return Result.OK("任务开始成功");
}
}
+ /**
+ * 提交:任务责任人(即开发者)使用的功能,点击提交按钮,表示任务完成,状态变为已提交,
+ * 提交时间设置为当前时间,并自动计算实际时长。
+ * 模块管理下属所有功能状态变成已完成才能点击提交按钮。
+ * @param id modulex表的主键id
+ */
@Override
public Result> tijiao(String id) {
Modulex byId = this.getById(id);
@@ -52,11 +91,17 @@ public class ModulexServiceImpl extends ServiceImpl impl
byId.setWorkStatus(3);
byId.setSubmitTime(new Date());
this.updateById(byId);
+
+ this.handleStatus(id,3);
return Result.OK("提交成功!!");
}
}
+ /**
+ * 撤回:项目负责人(管理员)使用,点击撤回,状态变为开发中。
+ * @param id modulex表的主键id
+ */
@Override
public Result> cehui(String id) {
Modulex byId = this.getById(id);
@@ -68,6 +113,11 @@ public class ModulexServiceImpl extends ServiceImpl impl
return Result.OK("撤回成功");
}
+ /**
+ * BUG反馈:项目负责人(管理员)使用,点击BUG反馈,状态变为DEBUG,下属功能状态不变,BUG管理增加一条记录,记录BUG内容。
+ * 审核:项目负责人(管理员)使用,点击完成,状态变为已审核。
+ * @param id modulex表的主键id
+ */
@Override
public Result> shenhe(String id) {
Modulex byId = this.getById(id);
@@ -78,4 +128,24 @@ public class ModulexServiceImpl extends ServiceImpl impl
this.updateById(byId);
return Result.OK("审核通过");
}
+
+
+ private void handleStatus(String id, Integer a){
+ //先查字模块 先查询父id 等于 这个 id 的数据
+ List modulexs = this.list(new LambdaQueryWrapper().eq(Modulex::getPid, id));
+ if (modulexs.size()>0){
+ modulexs.forEach(modulex -> {
+ modulex.setWorkStatus(a);
+ this.updateById(modulex);
+ });
+ }
+ //再查下属功能
+ List functionxs = functionxMapper.selectList(new LambdaQueryWrapper().eq(Functionx::getModuleId, id));
+ if (functionxs.size()>0){
+ functionxs.forEach(funcx -> {
+ funcx.setWorkStatus(a);
+ functionxMapper.updateById(funcx);
+ });
+ }
+ }
}