master
赵玉瑞 2 years ago
parent af5a9a643c
commit 33cfc36560
  1. 10
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 130
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 81
      ant-design-vue-jeecg/src/views/modulex/modules/BugxForm.vue
  4. 1
      ant-design-vue-jeecg/src/views/modulex/modules/BugxModal.vue
  5. 14
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexForm.vue
  6. 2
      ant-design-vue-jeecg/src/views/projectUserRole/ProjectUserRoleList.vue
  7. 6
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  8. 17
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxForm.vue
  9. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  10. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  11. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/entity/Modulex.java
  12. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
  13. 51
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
  14. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/entity/Projectx.java

@ -95,8 +95,7 @@ export const JeecgListMixin = {
if (res.success) { if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records || res.result; this.dataSource = res.result.records || res.result;
if(res.result.total) if (res.result.total) {
{
this.ipagination.total = res.result.total; this.ipagination.total = res.result.total;
} else { } else {
this.ipagination.total = 0; this.ipagination.total = 0;
@ -291,7 +290,12 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "复制"; this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
fuzhiProject: function (record) {
record.fuzhi = true;
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd: function () { handleAdd: function () {
this.$refs.modalForm.add(); this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";

@ -50,13 +50,38 @@
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <span slot="htmlSlot" slot-scope="text, record">
<div v-html="text"></div> <!-- <div v-html="text"></div>-->
</template> <a @click="functionManage(record)">功能</a>
<a-divider type="vertical"/>
<a @click="tablexManage(record)">实体</a>
</span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="fuzhiProject(record)">复制</a>
<a-divider type="vertical"/>
<a @click="fabu(record)">发布</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="chehui(record)">撤回</a>
<a-divider type="vertical"/>
<a @click="bugfankui(record)">BUG反馈</a>
<a-divider type="vertical"/>
<a @click="shenhe(record)">审核</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
@ -71,6 +96,8 @@
</div> </div>
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal> <modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
</a-card> </a-card>
</template> </template>
@ -81,10 +108,14 @@ import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ModulexModal from './modules/ModulexModal' import ModulexModal from './modules/ModulexModal'
import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal";
export default { export default {
name: 'ModulexList', name: 'ModulexList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
BugxModal,
ModulexModal ModulexModal
}, },
data() { data() {
@ -103,12 +134,12 @@ export default {
} }
}, },
{ {
title: '上级模块id', title: '上级模块',
align: "center", align: "center",
dataIndex: 'pid_dictText' dataIndex: 'pid_dictText'
}, },
{ {
title: '项目id', title: '项目',
align: "center", align: "center",
dataIndex: 'projectId_dictText' dataIndex: 'projectId_dictText'
}, },
@ -151,9 +182,9 @@ export default {
title: '发布时间', title: '发布时间',
align: "center", align: "center",
dataIndex: 'publishTime', dataIndex: 'publishTime',
customRender: function (text) { // customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
} // }
}, },
{ {
title: '任务时长', title: '任务时长',
@ -211,6 +242,14 @@ export default {
align: "center", align: "center",
dataIndex: 'verisonStatus_dictText' dataIndex: 'verisonStatus_dictText'
}, },
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
// width: 147,
scopedSlots: {customRender: 'htmlSlot'}
},
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
@ -221,7 +260,7 @@ export default {
dataIndex: 'action', dataIndex: 'action',
align: "center", align: "center",
fixed: "right", fixed: "right",
width: 147, // width: 147,
scopedSlots: {customRender: 'action'} scopedSlots: {customRender: 'action'}
} }
], ],
@ -246,6 +285,79 @@ export default {
}, },
}, },
methods: { methods: {
shenhe(record) {
getAction('/modulex/modulex/shenhe', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
bugfankui: function (record) {
this.$refs.BugxModal.add(record.id);
this.$refs.BugxModal.title = "BUG反馈";
this.$refs.BugxModal.disableSubmit = false;
},
chehui(record) {
getAction('/modulex/modulex/cehui', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
tijiao(record) {
getAction('/modulex/modulex/tijiao', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
kaishi(record) {
getAction('/modulex/modulex/kaishi', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
fabu(record) {
getAction('/modulex/modulex/fabu', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}
})
},
functionManage(record) {
this.$router.push({
path: '/src/views/functionx/FunctionxList',
query: {
moduleid: record.id
}
// query: {id: '123456'}
})
},
tablexManage(record) {
this.$router.push({
path: '/src/views/tablex/TablexList',
//query: {id: '123456'}
})
},
initDictConfig() { initDictConfig() {
}, },
getSuperFieldList() { getSuperFieldList() {

@ -3,36 +3,13 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="BUG编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugCode">-->
<!-- <a-input v-model="model.bugCode" placeholder="请输入BUG编码" disabled></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> <a-form-model-item label="BUG类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="bug_type" placeholder="请选择BUG类型" disabled/> <j-dict-select-tag type="list" v-model="model.type" dictCode="bug_type" placeholder="请选择BUG类型"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="项目id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId">-->
<!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="对应模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">-->
<!-- <a-input v-model="model.moduleId" placeholder="请输入对应模块id" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="对应功能id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionId">-->
<!-- <a-input v-model="model.functionId" placeholder="请输入对应功能id" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="对应规则id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleId">-->
<!-- <a-input v-model="model.ruleId" placeholder="请输入对应规则id" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugLevel"> <a-form-model-item label="BUG等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugLevel">
<j-dict-select-tag type="list" v-model="model.bugLevel" dictCode="work_level" placeholder="请选择BUG等级"/> <j-dict-select-tag type="list" v-model="model.bugLevel" dictCode="work_level" placeholder="请选择BUG等级"/>
@ -48,41 +25,7 @@
<j-image-upload isMultiple v-model="model.bugPic"></j-image-upload> <j-image-upload isMultiple v-model="model.bugPic"></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">-->
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="提交内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitContent">-->
<!-- <a-input v-model="model.submitContent" placeholder="请输入提交内容" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="提交图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitPic">-->
<!-- <j-image-upload isMultiple v-model="model.submitPic" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers">-->
<!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="BUG状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugStatus">-->
<!-- <j-dict-select-tag type="list" v-model="model.bugStatus" dictCode="" placeholder="请选择BUG状态" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime">-->
<!-- <j-date placeholder="请选择提交时间" v-model="model.submitTime" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="审核时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditTime">-->
<!-- <j-date placeholder="请选择审核时间" v-model="model.auditTime" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
@ -96,8 +39,7 @@
export default { export default {
name: 'BugxForm', name: 'BugxForm',
components: { components: {},
},
props: { props: {
// //
disabled: { disabled: {
@ -111,7 +53,6 @@
model: { model: {
moduleId: '', moduleId: '',
type: 2, type: 2,
}, },
labelCol: { labelCol: {
xs: {span: 24}, xs: {span: 24},
@ -129,15 +70,15 @@
type: [ type: [
{required: true, message: '请输入BUG类型!'}, {required: true, message: '请输入BUG类型!'},
], ],
projectId: [ // projectId: [
{ required: true, message: '请输入项目id!'}, // {required: true, message: 'id!'},
], // ],
bugLevel: [ bugLevel: [
{required: true, message: '请输入BUG等级!'}, {required: true, message: '请输入BUG等级!'},
], ],
publishTime: [ // publishTime: [
{ required: true, message: '请输入发布时间!'}, // {required: true, message: '!'},
], // ],
}, },
url: { url: {
add: "/bugx/bugx/add", add: "/bugx/bugx/add",

@ -31,7 +31,6 @@
methods: { methods: {
add (id) { add (id) {
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(id); this.$refs.realForm.add(id);
}) })

@ -4,14 +4,14 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="上级模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid"> <a-form-model-item label="上级模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<!-- <a-input v-model="model.pid" placeholder="请输入上级模块id" ></a-input>--> <!-- <a-input v-model="model.pid" placeholder="请输入上级模块id" ></a-input>-->
<j-dict-select-tag v-model="model.pid" dict-code="modulex,module_name,id" <j-dict-select-tag v-model="model.pid" dict-code="modulex,module_name,id"
placeholder="请输入上级模块id" style="width: 100%" /> placeholder="请输入上级模块" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId"> <a-form-model-item label="项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId">
<!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>--> <!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>-->
<j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id" <j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id"
placeholder="请输入项目id" style="width: 100%" /> placeholder="请输入项目id" style="width: 100%" />
@ -226,6 +226,14 @@
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
if (this.model.fuzhi){
this.model.id = null;
this.model.moduleName = this.model.moduleName + '+1';
this.model.moduleEnName = this.model.moduleEnName + '+1';
this.model.moduleCode = this.model.moduleCode + '+1';
this.model.createTime = null;
}
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm () {

@ -119,7 +119,7 @@
} }
}, },
{ {
title:'项目id', title:'项目',
align:"center", align:"center",
dataIndex: 'projectId_dictText' dataIndex: 'projectId_dictText'
}, },

@ -82,13 +82,15 @@
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
<!-- <div v-html="text"></div>--> <!-- <div v-html="text"></div>-->
<a @click="rolemanage()">角色管理</a> <a @click="rolemanage()">角色</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="modulemanage()">模块管理</a> <a @click="modulemanage()">模块</a>
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" 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-divider type="vertical"/>

@ -51,12 +51,14 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开始时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.startTime" style="width: 100%" /> <j-date placeholder="请选择开始时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.startTime"
style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completeTime"> <a-form-model-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completeTime">
<j-date placeholder="请选择完成时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.completeTime" style="width: 100%" /> <j-date placeholder="请选择完成时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.completeTime"
style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -80,7 +82,8 @@
<!-- </a-radio>--> <!-- </a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<j-dict-select-tag type="radio" v-model="model.projectStatus" placeholder="请输入项目状态" dict-code="project_status"/> <j-dict-select-tag type="radio" v-model="model.projectStatus" placeholder="请输入项目状态"
dict-code="project_status"/>
<!-- <a-input-number :min="0" v-model="model.projectStatus" placeholder="请输入项目状态" style="width: 100%" />--> <!-- <a-input-number :min="0" v-model="model.projectStatus" placeholder="请输入项目状态" style="width: 100%" />-->
</a-form-model-item> </a-form-model-item>
@ -160,6 +163,14 @@
}, },
edit(record) { edit(record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
if (this.model.fuzhi){
this.model.sourceProjectId = this.model.id;
this.model.id = null;
this.model.projectName = this.model.projectName + '+1';
this.model.projectEnName = this.model.projectEnName + '+1';
this.model.projectCode = this.model.projectCode + '+1';
this.model.createTime = null;
}
this.visible = true; this.visible = true;
}, },
submitForm() { submitForm() {

@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -61,14 +62,15 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class BugxController extends JeecgController<Bugx, IBugxService> { public class BugxController extends JeecgController<Bugx, IBugxService> {
@Autowired @Autowired
private IBugxService bugxService; private IBugxService bugxService;
@Autowired @Resource
FunctionxMapper functionxMapper; FunctionxMapper functionxMapper;
@Autowired @Resource
ProjectxMapper projectxMapper; ProjectxMapper projectxMapper;
@Autowired @Resource
ModulexMapper modulexMapper; ModulexMapper modulexMapper;
@Autowired @Resource
RulexMapper rulexMapper; RulexMapper rulexMapper;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -116,7 +118,7 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
@ApiOperation(value = "BUG管理-添加", notes = "BUG管理-添加") @ApiOperation(value = "BUG管理-添加", notes = "BUG管理-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody Bugx bugx) { public Result<?> add(@RequestBody Bugx bugx) {
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper<Bugx> queryWrapper = new QueryWrapper<>();
String code = null; String code = null;
int a = 0; int a = 0;
//根源是找最终的项目id //根源是找最终的项目id
@ -272,6 +274,7 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
public Result<?> shenhe(@RequestParam(name = "id", required = true) String id) { public Result<?> shenhe(@RequestParam(name = "id", required = true) String id) {
return bugxService.shenhe(id); return bugxService.shenhe(id);
} }
@GetMapping(value = "/bohui") @GetMapping(value = "/bohui")
public Result<?> bohui(@RequestParam(name = "id", required = true) String id) { public Result<?> bohui(@RequestParam(name = "id", required = true) String id) {
return bugxService.bohui(id); return bugxService.bohui(id);

@ -57,6 +57,34 @@ public class ModulexController extends JeecgController<Modulex, IModulexService>
return Result.OK(pageList); return Result.OK(pageList);
} }
@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("发布成功!!");
}
}
@GetMapping(value = "/kaishi")
public Result<?> kaishi(@RequestParam(name="id",required=true) String id) {
return modulexService.kaishi(id);
}
@GetMapping(value = "/tijiao")
public Result<?> tijiao(@RequestParam(name="id",required=true) String id) {
return modulexService.tijiao(id);
}
@GetMapping(value = "/cehui")
public Result<?> cehui(@RequestParam(name="id",required=true) String id) {
return modulexService.cehui(id);
}
@GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) {
return modulexService.shenhe(id);
}
/** /**
* 添加 * 添加
* *

@ -113,9 +113,9 @@ public class Modulex implements Serializable {
@Dict(dicCode = "work_status") @Dict(dicCode = "work_status")
private Integer workStatus; private Integer workStatus;
/**发布时间*/ /**发布时间*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
private Date publishTime; private Date publishTime;
/** /**
@ -126,15 +126,15 @@ public class Modulex implements Serializable {
@ApiModelProperty(value = "任务时长") @ApiModelProperty(value = "任务时长")
private Double duration; private Double duration;
/**开始时间*/ /**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date startTime; private Date startTime;
/**提交时间*/ /**提交时间*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间") @ApiModelProperty(value = "提交时间")
private Date submitTime; private Date submitTime;
/**实际时长*/ /**实际时长*/

@ -2,6 +2,7 @@ package org.jeecg.modules.modulex.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
/** /**
@ -16,4 +17,12 @@ public interface IModulexService extends IService<Modulex> {
* 得到最大的版本号 * 得到最大的版本号
*/ */
Integer getMaxVersion(Integer verison); Integer getMaxVersion(Integer verison);
Result<?> kaishi(String id);
Result<?> tijiao(String id);
Result<?> cehui(String id);
Result<?> shenhe(String id);
} }

@ -1,5 +1,6 @@
package org.jeecg.modules.modulex.service.impl; package org.jeecg.modules.modulex.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.mapper.ModulexMapper; import org.jeecg.modules.modulex.mapper.ModulexMapper;
import org.jeecg.modules.modulex.service.IModulexService; import org.jeecg.modules.modulex.service.IModulexService;
@ -7,6 +8,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -27,4 +29,53 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
public Integer getMaxVersion(Integer verison) { public Integer getMaxVersion(Integer verison) {
return this.list().size(); return this.list().size();
} }
@Override
public Result<?> kaishi(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() != 1) {
return Result.error("当前不处于已发布阶段,无法开始,请先发布");
} else {
byId.setWorkStatus(2);
byId.setStartTime(new Date());
this.updateById(byId);
return Result.OK("任务开始成功");
}
}
@Override
public Result<?> tijiao(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() != 2) {
return Result.error("当前不处于开发中阶段,无法提交");
} else {
byId.setWorkStatus(3);
byId.setSubmitTime(new Date());
this.updateById(byId);
return Result.OK("提交成功!!");
}
}
@Override
public Result<?> cehui(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() == 2) {
return Result.error("正处于开发中");
}
byId.setWorkStatus(2);
this.updateById(byId);
return Result.OK("撤回成功");
}
@Override
public Result<?> shenhe(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() == 4) {
return Result.error("已审核");
}
byId.setWorkStatus(4);
this.updateById(byId);
return Result.OK("审核通过");
}
} }

@ -88,15 +88,15 @@ public class Projectx implements Serializable {
@ApiModelProperty(value = "数据地址") @ApiModelProperty(value = "数据地址")
private String projectDbUrl; private String projectDbUrl;
/**开始时间*/ /**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "开始时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date startTime; private Date startTime;
/**完成时间*/ /**完成时间*/
@Excel(name = "完成时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "完成时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "完成时间") @ApiModelProperty(value = "完成时间")
private Date completeTime; private Date completeTime;
/** /**

Loading…
Cancel
Save