Merge remote-tracking branch 'origin/master'

master
admin 2 years ago
commit 156e740ca6
  1. 25
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  2. 85
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 9
      ant-design-vue-jeecg/src/views/rulex/RulexList.vue
  4. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  5. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  6. 21
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  7. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
  8. 70
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java

@ -100,16 +100,7 @@
</span>
<span slot="action" slot-scope="text, record" v-if="role==2">
<a @click="fabu(record)" v-if="record.workStatus==0">发布</a>
<a v-else="">已发布</a>
<a-divider type="vertical" />
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical" />
<a @click="tijiao(record)">提交</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
@ -137,6 +128,16 @@
<a>删除</a>
</a-popconfirm>
</span>
<span slot="action" slot-scope="text, record" v-else="">
<a @click="fabu(record)" v-if="record.workStatus==0">发布</a>
<a v-else="">已发布</a>
<a-divider type="vertical" />
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical" />
<a @click="tijiao(record)">提交</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
@ -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;
}
})
},

@ -50,46 +50,58 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<!-- 管理 公用部分-->
<span slot="htmlSlot" slot-scope="text, record">
<!-- <div v-html="text"></div>-->
<a @click="functionManage(record)">功能</a>
<a-divider type="vertical"/>
<a @click="tablexManage(record)">实体</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="fuzhiProject(record)">复制</a>
<!--功能 管理员-->
<span slot="actionManage" slot-scope="text, record" v-if="userRole1 === '1'">
<a @click="chehui(record)">撤回</a>
<a-divider type="vertical"/>
<a @click="bugfankui(record)">BUG反馈</a>
<a-divider type="vertical"/>
<a @click="shenhe(record)">审核</a>
</span>
<!--功能 开发者-->
<!--这里只能用v-else-if / v-else v-if -->
<span slot="actionManage" slot-scope="text, record" v-else>
<a @click="fabu(record)">发布</a>
<a-divider type="vertical"/>
<a @click="kaishi(record)">开始</a>
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical"/>
<a @click="tijiao(record)">提交</a>
</span>
<a-divider type="vertical"/>
<a @click="chehui(record)">撤回</a>
<a-divider type="vertical"/>
<a @click="bugfankui(record)">BUG反馈</a>
<a-divider type="vertical"/>
<a @click="shenhe(record)">审核</a>
<!--操作 -->
<span slot="action1" slot-scope="text, record" >
<a @click="fuzhiProject(record)">复制</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
@ -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) {

@ -90,9 +90,7 @@
</a-button>
</template>
<span slot="action" slot-scope="text, record"v-if="role==2">
<a @click="handleDetail(record)">详情</a>
</span>
<span slot="action" slot-scope="text, record"v-if="role==1">
<a @click="fuzhi1(record)">复制</a>
<a-divider type="vertical" />
@ -109,6 +107,9 @@
</a-popconfirm>
</span>
<span slot="action" slot-scope="text, record"v-else="">
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
@ -263,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)=>{

@ -128,6 +128,9 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
// 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");

@ -206,6 +206,7 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
@GetMapping(value = "/loginrole")
public Result<?> loginrole(@RequestParam(name="id",required=true) String id) {
List<String> list=functionxService.findRole(id);
//如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else

@ -58,30 +58,23 @@ public class ModulexController extends JeecgController<Modulex, IModulexService>
}
@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);
}

@ -18,6 +18,8 @@ public interface IModulexService extends IService<Modulex> {
*/
Integer getMaxVersion(Integer verison);
Result<?> fabu(String id);
Result<?> kaishi(String id);
Result<?> tijiao(String id);

@ -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<ModulexMapper, Modulex> implements IModulexService {
@Resource
private FunctionxMapper functionxMapper;
/**
* 得到最大的版本号
*/
@ -30,6 +37,31 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> 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<ModulexMapper, Modulex> 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<ModulexMapper, Modulex> 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<ModulexMapper, Modulex> 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<ModulexMapper, Modulex> impl
this.updateById(byId);
return Result.OK("审核通过");
}
private void handleStatus(String id, Integer a){
//先查字模块 先查询父id 等于 这个 id 的数据
List<Modulex> modulexs = this.list(new LambdaQueryWrapper<Modulex>().eq(Modulex::getPid, id));
if (modulexs.size()>0){
modulexs.forEach(modulex -> {
modulex.setWorkStatus(a);
this.updateById(modulex);
});
}
//再查下属功能
List<Functionx> functionxs = functionxMapper.selectList(new LambdaQueryWrapper<Functionx>().eq(Functionx::getModuleId, id));
if (functionxs.size()>0){
functionxs.forEach(funcx -> {
funcx.setWorkStatus(a);
functionxMapper.updateById(funcx);
});
}
}
}

Loading…
Cancel
Save