master
赵玉瑞 2 years ago
parent af5a9a643c
commit 33cfc36560
  1. 178
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 134
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 261
      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. 243
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxForm.vue
  9. 397
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  10. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  11. 20
      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. 53
      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

@ -3,27 +3,27 @@
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
*/
import { filterObj } from '@/utils/util';
import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage'
import {filterObj} from '@/utils/util';
import {deleteAction, getAction, downFile, getFileAccessHttpUrl} from '@/api/manage'
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import {ACCESS_TOKEN, TENANT_ID} from "@/store/mutation-types"
import store from '@/store'
import {Modal} from 'ant-design-vue'
export const JeecgListMixin = {
data(){
data() {
return {
pagedOld:{
record:{},
title:"",
pagedOld: {
record: {},
title: "",
},
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
queryParam: {},
/* 数据源 */
dataSource:[],
dataSource: [],
/* 分页参数 */
ipagination:{
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
@ -35,22 +35,22 @@ export const JeecgListMixin = {
total: 0
},
/* 排序参数 */
isorter:{
isorter: {
column: 'createTime',
order: 'desc',
},
/* 筛选参数 */
filters: {},
/* table加载状态 */
loading:false,
loading: false,
/* table选中keys*/
selectedRowKeys: [],
/* table选中records*/
selectionRows: [],
/* 查询折叠 */
toggleSearchStatus:false,
toggleSearchStatus: false,
/* 高级查询条件生效状态 */
superQueryFlag:false,
superQueryFlag: false,
/* 高级查询条件 */
superQueryParams: '',
/** 高级查询拼接方式 */
@ -58,30 +58,30 @@ export const JeecgListMixin = {
}
},
created() {
if(!this.disableMixinCreated){
console.log(' -- mixin created -- ')
this.loadData();
//初始化字典配置 在自己页面定义
this.initDictConfig();
}
if (!this.disableMixinCreated) {
console.log(' -- mixin created -- ')
this.loadData();
//初始化字典配置 在自己页面定义
this.initDictConfig();
}
this.$bus.$on('getInfo', (oldFunction) => {
oldFunction(this.pagedOld)
})
},
computed: {
//token header
tokenHeader(){
tokenHeader() {
let head = {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)}
let tenantid = Vue.ls.get(TENANT_ID)
if(tenantid){
if (tenantid) {
head['tenant-id'] = tenantid
}
return head;
}
},
methods:{
methods: {
loadData(arg) {
if(!this.url.list){
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
@ -94,32 +94,31 @@ export const JeecgListMixin = {
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result;
if(res.result.total)
{
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
}else{
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if(res.code===510){
if (res.code === 510) {
this.$message.warning(res.message)
}
this.loading = false;
})
},
initDictConfig(){
initDictConfig() {
console.log("--这是一个假的方法!")
},
handleSuperQuery(params, matchType) {
//高级查询方法
if(!params){
this.superQueryParams=''
if (!params) {
this.superQueryParams = ''
this.superQueryFlag = false
}else{
} else {
this.superQueryFlag = true
this.superQueryParams=JSON.stringify(params)
this.superQueryParams = JSON.stringify(params)
this.superQueryMatchType = matchType
}
this.loadData(1)
@ -127,11 +126,11 @@ export const JeecgListMixin = {
getQueryParams() {
//获取查询条件
let sqp = {}
if(this.superQueryParams){
sqp['superQueryParams']=encodeURI(this.superQueryParams)
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
@ -165,7 +164,7 @@ export const JeecgListMixin = {
this.loadData(1);
},
batchDel: function () {
if(!this.url.deleteBatch){
if (!this.url.deleteBatch) {
this.$message.error("请设置url.deleteBatch属性!")
return
}
@ -225,7 +224,7 @@ export const JeecgListMixin = {
}
},
handleDelete: function (id) {
if(!this.url.delete){
if (!this.url.delete) {
this.$message.error("请设置url.delete属性!")
return
}
@ -242,7 +241,7 @@ export const JeecgListMixin = {
});
},
startorstop: function (id) {
if(!this.url.update){
if (!this.url.update) {
this.$message.error("请设置url.update属性!")
return
}
@ -258,40 +257,45 @@ export const JeecgListMixin = {
}
});
},
reCalculatePage(count){
reCalculatePage(count) {
//总数量-count
let total=this.ipagination.total-count;
let total = this.ipagination.total - count;
//获取删除后的分页数
let currentIndex=Math.ceil(total/this.ipagination.pageSize);
let currentIndex = Math.ceil(total / this.ipagination.pageSize);
//删除后的分页数<所在当前页
if(currentIndex<this.ipagination.current){
this.ipagination.current=currentIndex;
if (currentIndex < this.ipagination.current) {
this.ipagination.current = currentIndex;
}
console.log('currentIndex',currentIndex)
console.log('currentIndex', currentIndex)
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
},
fuzhi: function(record){
record.id=''
record.functionName1=record.functionName+1
record.functionEnName1=record.functionEnName+1
record.functionCode1=record.functionCode+1
fuzhi: function (record) {
record.id = ''
record.functionName1 = record.functionName + 1
record.functionEnName1 = record.functionEnName + 1
record.functionCode1 = record.functionCode + 1
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false;
},
fuzhi1: function(record){
record.id=''
record.rule_no=''
record.rule_code=''
fuzhi1: function (record) {
record.id = ''
record.rule_no = ''
record.rule_code = ''
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制";
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 () {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
@ -308,11 +312,11 @@ export const JeecgListMixin = {
this.ipagination = pagination;
this.loadData();
},
handleToggleSearch(){
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus;
},
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
getPopupField(fields){
getPopupField(fields) {
return fields.split(',')[0]
},
modalFormOk() {
@ -321,39 +325,39 @@ export const JeecgListMixin = {
//清空列表选中
this.onClearSelected()
},
handleDetail:function(record){
handleDetail: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title="详情";
this.$refs.modalForm.title = "详情";
this.$refs.modalForm.disableSubmit = true;
},
/* 导出 */
handleExportXls2(){
handleExportXls2() {
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`;
window.location.href = url;
},
handleExportXls(fileName){
if(!fileName || typeof fileName != "string"){
handleExportXls(fileName) {
if (!fileName || typeof fileName != "string") {
fileName = "导出文件"
}
let param = this.getQueryParams();
if(this.selectedRowKeys && this.selectedRowKeys.length>0){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param['selections'] = this.selectedRowKeys.join(",")
}
console.log("导出参数",param)
downFile(this.url.exportXlsUrl,param).then((data)=>{
console.log("导出参数", param)
downFile(this.url.exportXlsUrl, param).then((data) => {
if (!data) {
this.$message.warning("文件下载失败")
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
}else{
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
window.navigator.msSaveBlob(new Blob([data], {type: 'application/vnd.ms-excel'}), fileName + '.xls')
} else {
let url = window.URL.createObjectURL(new Blob([data], {type: 'application/vnd.ms-excel'}))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName+'.xls')
link.setAttribute('download', fileName + '.xls')
document.body.appendChild(link)
link.click()
document.body.removeChild(link); //下载完成移除元素
@ -361,28 +365,28 @@ export const JeecgListMixin = {
}
})
},
daochu(fileName){
if(!fileName || typeof fileName != "string"){
daochu(fileName) {
if (!fileName || typeof fileName != "string") {
fileName = "导出文件"
}
let param = this.getQueryParams();
if(this.selectedRowKeys && this.selectedRowKeys.length>0){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param['selections'] = this.selectedRowKeys.join(",")
}
console.log("导出参数",param)
downFile(this.url.standards,param).then((data)=>{
console.log("导出参数", param)
downFile(this.url.standards, param).then((data) => {
if (!data) {
this.$message.warning("文件下载失败")
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
}else{
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
window.navigator.msSaveBlob(new Blob([data], {type: 'application/vnd.ms-excel'}), fileName + '.xls')
} else {
let url = window.URL.createObjectURL(new Blob([data], {type: 'application/vnd.ms-excel'}))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName+'.xls')
link.setAttribute('download', fileName + '.xls')
document.body.appendChild(link)
link.click()
document.body.removeChild(link); //下载完成移除元素
@ -391,7 +395,7 @@ export const JeecgListMixin = {
})
},
/* 导入 */
handleImportExcel(info){
handleImportExcel(info) {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
@ -399,7 +403,7 @@ export const JeecgListMixin = {
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
let { message, result: { msg, fileUrl, fileName } } = info.file.response
let {message, result: {msg, fileUrl, fileName}} = info.file.response
let href = window._CONFIG['domianURL'] + fileUrl
this.$warning({
title: message,
@ -440,21 +444,21 @@ export const JeecgListMixin = {
}
},
/* 图片预览 */
getImgView(text){
if(text && text.indexOf(",")>0){
text = text.substring(0,text.indexOf(","))
getImgView(text) {
if (text && text.indexOf(",") > 0) {
text = text.substring(0, text.indexOf(","))
}
return getFileAccessHttpUrl(text)
},
/* 文件下载 */
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
downloadFile(text){
if(!text){
downloadFile(text) {
if (!text) {
this.$message.warning("未知的文件")
return;
}
if(text.indexOf(",")>0){
text = text.substring(0,text.indexOf(","))
if (text.indexOf(",") > 0) {
text = text.substring(0, text.indexOf(","))
}
let url = getFileAccessHttpUrl(text)
window.open(url);

@ -50,13 +50,38 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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>
<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-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
@ -71,6 +96,8 @@
</div>
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
</a-card>
</template>
@ -81,10 +108,14 @@ import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ModulexModal from './modules/ModulexModal'
import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal";
export default {
name: 'ModulexList',
mixins: [JeecgListMixin, mixinDevice],
components: {
BugxModal,
ModulexModal
},
data() {
@ -103,12 +134,12 @@ export default {
}
},
{
title: '上级模块id',
title: '上级模块',
align: "center",
dataIndex: 'pid_dictText'
},
{
title: '项目id',
title: '项目',
align: "center",
dataIndex: 'projectId_dictText'
},
@ -151,9 +182,9 @@ export default {
title: '发布时间',
align: "center",
dataIndex: 'publishTime',
customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
}
// customRender: function (text) {
// return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
// }
},
{
title: '任务时长',
@ -187,8 +218,8 @@ export default {
// dataIndex: 'userRole'
// },
{
title:'关联实体',
align:"center",
title: '关联实体',
align: "center",
dataIndex: 'relatedBean_dictText'
},
// {
@ -211,6 +242,14 @@ export default {
align: "center",
dataIndex: 'verisonStatus_dictText'
},
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
// width: 147,
scopedSlots: {customRender: 'htmlSlot'}
},
// {
// title:'',
// align:"center",
@ -221,7 +260,7 @@ export default {
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
// width: 147,
scopedSlots: {customRender: 'action'}
}
],
@ -246,6 +285,79 @@ export default {
},
},
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() {
},
getSuperFieldList() {

@ -3,86 +3,29 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<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-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-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-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等级"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc">
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述" ></a-input>
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic">
<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-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-form-model>
</j-form-container>
@ -91,108 +34,106 @@
<script>
import { httpAction, getAction } from '@api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'BugxForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
moduleId:'',
type:2,
import {httpAction, getAction} from '@api/manage'
import {validateDuplicateValue} from '@/utils/util'
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
bugCode: [
{ required: true, message: '请输入BUG编码!'},
],
type: [
{ required: true, message: '请输入BUG类型!'},
],
projectId: [
{ required: true, message: '请输入项目id!'},
],
bugLevel: [
{ required: true, message: '请输入BUG等级!'},
],
publishTime: [
{ required: true, message: '请输入发布时间!'},
],
},
url: {
add: "/bugx/bugx/add",
edit: "/bugx/bugx/edit",
queryById: "/bugx/bugx/queryById",
sort:'/bugx/bugx/sort'
}
export default {
name: 'BugxForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {
moduleId: '',
type: 2,
},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
bugCode: [
{required: true, message: '请输入BUG编码!'},
],
type: [
{required: true, message: '请输入BUG类型!'},
],
// projectId: [
// {required: true, message: 'id!'},
// ],
bugLevel: [
{required: true, message: '请输入BUG等级!'},
],
// publishTime: [
// {required: true, message: '!'},
// ],
},
url: {
add: "/bugx/bugx/add",
edit: "/bugx/bugx/edit",
queryById: "/bugx/bugx/queryById",
sort: '/bugx/bugx/sort'
}
}
},
computed: {
formDisabled() {
return this.disabled
},
computed: {
formDisabled(){
return this.disabled
},
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add(id) {
this.model.moduleId = id;
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
methods: {
add (id) {
this.model.moduleId=id;
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.result);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.result);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
})
},
}
}
</script>

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

@ -4,14 +4,14 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<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>-->
<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-col>
<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>-->
<j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id"
placeholder="请输入项目id" style="width: 100%" />
@ -226,6 +226,14 @@
},
edit (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;
},
submitForm () {

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

@ -82,13 +82,15 @@
<template slot="htmlSlot" slot-scope="text">
<!-- <div v-html="text"></div>-->
<a @click="rolemanage()">角色管理</a>
<a @click="rolemanage()">角色</a>
<a-divider type="vertical"/>
<a @click="modulemanage()">模块管理</a>
<a @click="modulemanage()">模块</a>
</template>
<span slot="action" slot-scope="text, record">
<a @click="fuzhiProject(record)">复制</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>

@ -5,63 +5,65 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="项目中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectName">
<a-input v-model="model.projectName" placeholder="请输入项目中文名称" ></a-input>
<a-input v-model="model.projectName" placeholder="请输入项目中文名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectEnName">
<a-input v-model="model.projectEnName" placeholder="请输入项目英文名称" ></a-input>
<a-input v-model="model.projectEnName" placeholder="请输入项目英文名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCode">
<a-input v-model="model.projectCode" placeholder="请输入项目编码" ></a-input>
<a-input v-model="model.projectCode" placeholder="请输入项目编码"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe">
<a-input v-model="model.pmDescribe" placeholder="请输入项目描述" ></a-input>
<a-input v-model="model.pmDescribe" placeholder="请输入项目描述"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectPic">
<!-- <a-input v-model="model.projectPic" placeholder="请输入项目图片" ></a-input>-->
<j-image-upload isMultiple v-model="model.projectPic" ></j-image-upload>
<!-- <a-input v-model="model.projectPic" placeholder="请输入项目图片" ></a-input>-->
<j-image-upload isMultiple v-model="model.projectPic"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目网址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectUrl">
<a-input v-model="model.projectUrl" placeholder="请输入项目网址" ></a-input>
<a-input v-model="model.projectUrl" placeholder="请输入项目网址"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="源码地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCodeUrl">
<a-input v-model="model.projectCodeUrl" placeholder="请输入源码地址" ></a-input>
<a-input v-model="model.projectCodeUrl" placeholder="请输入源码地址"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数据库名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbName">
<a-input v-model="model.projectDbName" placeholder="请输入数据库名" ></a-input>
<a-input v-model="model.projectDbName" placeholder="请输入数据库名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数据地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbUrl">
<a-input v-model="model.projectDbUrl" placeholder="请输入数据地址" ></a-input>
<a-input v-model="model.projectDbUrl" placeholder="请输入数据地址"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<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-col>
<a-col :span="24">
<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-col>
<a-col :span="24">
<a-form-model-item label="复制来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sourceProjectId">
<!-- <a-input v-model="model.sourceProjectId" placeholder="请输入复制来源" ></a-input>-->
<!-- <a-input v-model="model.sourceProjectId" placeholder="请输入复制来源" ></a-input>-->
<j-dict-select-tag v-model="model.sourceProjectId" placeholder="请输入复制来源"
dict-code="projectx,project_name,id"/>
</a-form-model-item>
@ -70,19 +72,20 @@
<a-form-model-item label="项目状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectStatus">
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">-->
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" >-->
<!-- <a-radio value="1">-->
<!-- -->
<!-- </a-radio>-->
<!-- <a-radio value="2">-->
<!-- -->
<!-- </a-radio>-->
<!-- </a-radio-group>-->
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">-->
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" >-->
<!-- <a-radio value="1">-->
<!-- -->
<!-- </a-radio>-->
<!-- <a-radio value="2">-->
<!-- -->
<!-- </a-radio>-->
<!-- </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-col>
</a-row>
@ -93,104 +96,112 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JVxeRadioCell from "@comp/JVxeCells/JVxeRadioCell";
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import JVxeRadioCell from "@comp/JVxeCells/JVxeRadioCell";
export default {
name: 'ProjectxForm',
components: {
JVxeRadioCell
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
projectStatus: 1,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
projectName: [
{ required: true, message: '请输入项目中文名称!'},
],
projectEnName: [
{ required: true, message: '请输入项目英文名称!'},
],
projectCode: [
{ required: true, message: '请输入项目编码!'},
],
projectStatus: [
{ required: true, message: '请输入项目状态!'},
],
},
url: {
add: "/projectx/projectx/add",
edit: "/projectx/projectx/edit",
queryById: "/projectx/projectx/queryById"
}
export default {
name: 'ProjectxForm',
components: {
JVxeRadioCell
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {
projectStatus: 1,
},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
projectName: [
{required: true, message: '请输入项目中文名称!'},
],
projectEnName: [
{required: true, message: '请输入项目英文名称!'},
],
projectCode: [
{required: true, message: '请输入项目编码!'},
],
projectStatus: [
{required: true, message: '请输入项目状态!'},
],
},
url: {
add: "/projectx/projectx/add",
edit: "/projectx/projectx/edit",
queryById: "/projectx/projectx/queryById"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
computed: {
formDisabled(){
return this.disabled
},
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(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;
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
})
},
}
}
</script>

@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -48,234 +49,236 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: BUG管理
* @Author: jeecg-boot
* @Date: 2023-04-11
* @Date: 2023-04-11
* @Version: V1.0
*/
@Api(tags="BUG管理")
@Api(tags = "BUG管理")
@RestController
@RequestMapping("/bugx/bugx")
@Slf4j
public class BugxController extends JeecgController<Bugx, IBugxService> {
@Autowired
private IBugxService bugxService;
@Autowired
FunctionxMapper functionxMapper;
@Autowired
ProjectxMapper projectxMapper;
@Autowired
ModulexMapper modulexMapper;
@Autowired
RulexMapper rulexMapper;
/**
* 分页列表查询
*
* @param bugx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "BUG管理-分页列表查询")
@ApiOperation(value="BUG管理-分页列表查询", notes="BUG管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Bugx bugx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<Bugx> queryWrapper = QueryGenerator.initQueryWrapper(bugx, req.getParameterMap());
QueryWrapper<Bugx> queryWrapper=new QueryWrapper<>();
queryWrapper.orderByDesc("bug_level");
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
}else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId());
}
if(bugx.getType()!=null){
queryWrapper.eq("type",bugx.getType());
}
if(bugx.getBugStatus()!=null){
queryWrapper.eq("bug_status",bugx.getBugStatus());
}
Page<Bugx> page = new Page<Bugx>(pageNo, pageSize);
IPage<Bugx> pageList = bugxService.page(page, queryWrapper);
return Result.OK(pageList);
}
@Autowired
private IBugxService bugxService;
@Resource
FunctionxMapper functionxMapper;
@Resource
ProjectxMapper projectxMapper;
@Resource
ModulexMapper modulexMapper;
@Resource
RulexMapper rulexMapper;
/**
* 添加
*
* @param bugx
* @return
*/
@AutoLog(value = "BUG管理-添加")
@ApiOperation(value="BUG管理-添加", notes="BUG管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Bugx bugx) {
QueryWrapper queryWrapper=new QueryWrapper();
String code=null;
int a=0;
//根源是找最终的项目id
/**
* 分页列表查询
*
* @param bugx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "BUG管理-分页列表查询")
@ApiOperation(value = "BUG管理-分页列表查询", notes = "BUG管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Bugx bugx,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<Bugx> queryWrapper = QueryGenerator.initQueryWrapper(bugx, req.getParameterMap());
QueryWrapper<Bugx> queryWrapper = new QueryWrapper<>();
queryWrapper.orderByDesc("bug_level");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) {
} else {
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users", user.getId());
}
if (bugx.getType() != null) {
queryWrapper.eq("type", bugx.getType());
}
if (bugx.getBugStatus() != null) {
queryWrapper.eq("bug_status", bugx.getBugStatus());
}
Page<Bugx> page = new Page<Bugx>(pageNo, pageSize);
IPage<Bugx> pageList = bugxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param bugx
* @return
*/
@AutoLog(value = "BUG管理-添加")
@ApiOperation(value = "BUG管理-添加", notes = "BUG管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Bugx bugx) {
QueryWrapper<Bugx> queryWrapper = new QueryWrapper<>();
String code = null;
int a = 0;
//根源是找最终的项目id
// if(bugx.getProjectId()!=null){
// queryWrapper.eq("project_id",bugx.getProjectId());
// a=bugxService.count(queryWrapper);
// code=bugxService.sort(bugx.getProjectId());
// projectxMapper.upDeBug(bugx.getProjectId());
// }else
if(bugx.getModuleId()!=null){
queryWrapper.eq("module_id",bugx.getModuleId());
queryWrapper.isNull("function_id");
a=bugxService.count(queryWrapper);
Modulex modulex = modulexMapper.selectById(bugx.getModuleId());
code=bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(modulex.getManagerUsers());
rulexMapper.upMstatus(bugx.getModuleId());
}else if(bugx.getFunctionId()!=null){
queryWrapper.eq("function_id",bugx.getFunctionId());
queryWrapper.isNull("rule_id");
a=bugxService.count(queryWrapper);
Functionx functionx = functionxMapper.selectById(bugx.getFunctionId());
Modulex modulex = modulexMapper.selectById(functionx.getModuleId());
code=bugxService.sort(modulex.getProjectId());
bugx.setModuleId(functionx.getModuleId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(functionx.getManagerUsers());
rulexMapper.upFstatus(bugx.getFunctionId());
}else{
queryWrapper.eq("rule_id",bugx.getRuleId());
a=bugxService.count(queryWrapper);
Rulex rulex = rulexMapper.selectById(bugx.getRuleId());
Modulex modulex = modulexMapper.selectById(rulex.getModuleId());
bugx.setModuleId(rulex.getModuleId());
bugx.setFunctionId(rulex.getFunctionId());
code=bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(rulex.getManagerUsers());
rulexMapper.upRstatus(bugx.getRuleId());
}
if(a>=1){
return Result.error("当前BUG以提出!!");
}
//设置BUG编码
if(code==null){
bugx.setBugCode("E00001");
}else{
int i = Integer.parseInt(code.substring(1));
i++;
String s = Integer.toString(i);
while(s.length()<5){
s="0"+s;
}
bugx.setBugCode("E"+s);
}
bugx.setPublishTime(new Date());
bugxService.save(bugx);
return Result.OK("提交BUG成功!");
}
if (bugx.getModuleId() != null) {
queryWrapper.eq("module_id", bugx.getModuleId());
queryWrapper.isNull("function_id");
a = bugxService.count(queryWrapper);
Modulex modulex = modulexMapper.selectById(bugx.getModuleId());
code = bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(modulex.getManagerUsers());
rulexMapper.upMstatus(bugx.getModuleId());
} else if (bugx.getFunctionId() != null) {
queryWrapper.eq("function_id", bugx.getFunctionId());
queryWrapper.isNull("rule_id");
a = bugxService.count(queryWrapper);
Functionx functionx = functionxMapper.selectById(bugx.getFunctionId());
Modulex modulex = modulexMapper.selectById(functionx.getModuleId());
code = bugxService.sort(modulex.getProjectId());
bugx.setModuleId(functionx.getModuleId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(functionx.getManagerUsers());
rulexMapper.upFstatus(bugx.getFunctionId());
} else {
queryWrapper.eq("rule_id", bugx.getRuleId());
a = bugxService.count(queryWrapper);
Rulex rulex = rulexMapper.selectById(bugx.getRuleId());
Modulex modulex = modulexMapper.selectById(rulex.getModuleId());
bugx.setModuleId(rulex.getModuleId());
bugx.setFunctionId(rulex.getFunctionId());
code = bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(rulex.getManagerUsers());
rulexMapper.upRstatus(bugx.getRuleId());
}
if (a >= 1) {
return Result.error("当前BUG以提出!!");
}
//设置BUG编码
if (code == null) {
bugx.setBugCode("E00001");
} else {
int i = Integer.parseInt(code.substring(1));
i++;
String s = Integer.toString(i);
while (s.length() < 5) {
s = "0" + s;
}
bugx.setBugCode("E" + s);
}
bugx.setPublishTime(new Date());
bugxService.save(bugx);
return Result.OK("提交BUG成功!");
}
/**
* 编辑
*
* @param bugx
* @return
*/
@AutoLog(value = "BUG管理-编辑")
@ApiOperation(value="BUG管理-编辑", notes="BUG管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Bugx bugx) {
if(bugx.getBugStatus()==4){
return Result.error("已提交过!!");
}
if(bugx.getBugStatus()==2)
return Result.error("当前BUG已解决!!");
//提交时就相当于xiugai
bugx.setSubmitTime(new Date());
bugx.setBugStatus(4);
bugxService.updateById(bugx);
return Result.OK("提交成功!");
}
/**
* 编辑
*
* @param bugx
* @return
*/
@AutoLog(value = "BUG管理-编辑")
@ApiOperation(value = "BUG管理-编辑", notes = "BUG管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Bugx bugx) {
if (bugx.getBugStatus() == 4) {
return Result.error("已提交过!!");
}
if (bugx.getBugStatus() == 2)
return Result.error("当前BUG已解决!!");
//提交时就相当于xiugai
bugx.setSubmitTime(new Date());
bugx.setBugStatus(4);
bugxService.updateById(bugx);
return Result.OK("提交成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "BUG管理-通过id删除")
@ApiOperation(value="BUG管理-通过id删除", notes="BUG管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
bugxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "BUG管理-通过id删除")
@ApiOperation(value = "BUG管理-通过id删除", notes = "BUG管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
bugxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "BUG管理-批量删除")
@ApiOperation(value="BUG管理-批量删除", notes="BUG管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.bugxService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "BUG管理-批量删除")
@ApiOperation(value = "BUG管理-批量删除", notes = "BUG管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.bugxService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "BUG管理-通过id查询")
@ApiOperation(value="BUG管理-通过id查询", notes="BUG管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Bugx bugx = bugxService.getById(id);
if(bugx==null) {
return Result.error("未找到对应数据");
}
return Result.OK(bugx);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "BUG管理-通过id查询")
@ApiOperation(value = "BUG管理-通过id查询", notes = "BUG管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Bugx bugx = bugxService.getById(id);
if (bugx == null) {
return Result.error("未找到对应数据");
}
return Result.OK(bugx);
}
/**
* 导出excel
*
* @param request
* @param bugx
*/
* 导出excel
*
* @param request
* @param bugx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Bugx bugx) {
return super.exportXls(request, bugx, Bugx.class, "BUG管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Bugx.class);
}
@GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) {
return bugxService.shenhe(id);
}
@GetMapping(value = "/bohui")
public Result<?> bohui(@RequestParam(name="id",required=true) String id) {
return bugxService.bohui(id);
}
@GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name = "id", required = true) String id) {
return bugxService.shenhe(id);
}
@GetMapping(value = "/bohui")
public Result<?> bohui(@RequestParam(name = "id", required = true) String id) {
return bugxService.bohui(id);
}
}
}

@ -57,7 +57,35 @@ public class ModulexController extends JeecgController<Modulex, IModulexService>
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);
}
/**
* 添加
*
* @param modulex

@ -106,16 +106,16 @@ public class Modulex implements Serializable {
private Integer workLevel;
/**
* 任务状态
* 未发布0已发布1开发中2已完成3已审核4DEBUG9默认0
* 未发布0已发布1开发中2已完成3已审核4DEBUG 9默认 0
*/
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态")
@Dict(dicCode = "work_status")
private Integer workStatus;
/**发布时间*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "发布时间")
private Date publishTime;
/**
@ -126,15 +126,15 @@ public class Modulex implements Serializable {
@ApiModelProperty(value = "任务时长")
private Double duration;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间")
private Date startTime;
/**提交时间*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间")
private Date submitTime;
/**实际时长*/

@ -2,6 +2,7 @@ package org.jeecg.modules.modulex.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex;
/**
@ -16,4 +17,12 @@ public interface IModulexService extends IService<Modulex> {
* 得到最大的版本号
*/
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;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.mapper.ModulexMapper;
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 java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@ -14,7 +16,7 @@ import java.util.stream.Collectors;
/**
* @Description: 模块管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
@Service
@ -27,4 +29,53 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
public Integer getMaxVersion(Integer verison) {
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 = "数据地址")
private String projectDbUrl;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "开始时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "开始时间")
private Date startTime;
/**完成时间*/
@Excel(name = "完成时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "完成时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "完成时间")
private Date completeTime;
/**

Loading…
Cancel
Save