任务管理 重构 5.30

master
zhc077 2 years ago
parent 80784dd389
commit 10f3977f36
  1. 415
      ant-design-vue-jeecg/src/views/task/TaskList.vue
  2. 301
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue
  3. 69
      ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue
  4. 169
      ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue
  5. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java
  6. 195
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java
  7. 78
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java
  8. 52
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java

@ -6,8 +6,22 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="任务名称"> <a-form-item label="项目">
<j-input placeholder="" v-model="queryParam.functionTemplateName"></j-input> <!-- <j-input placeholder="" v-model="queryParam.projectId"></j-input>-->
<j-dict-select-tag v-model="queryParam.projectId" placeholder="请选择项目" dict-code="projectx,project_name,id"
style="width: 100%"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="模块">
<!-- <j-input placeholder="" v-model="queryParam.moduleId"></j-input>-->
<j-dict-select-tag v-model="queryParam.moduleId" placeholder="请选择模块" dict-code="modulex,module_name,id"
style="width: 100%"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="类型名称">
<j-input placeholder="" v-model="queryParam.typeName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -27,31 +41,23 @@
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('任务管理')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('任务管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
@change="handleImportExcel"> <!-- <a-button type="primary" icon="import">导入</a-button>-->
<a-button type="primary" icon="import">导入</a-button> <!-- </a-upload>-->
</a-upload> <!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- 高级查询区域 --> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
@handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <a-menu slot="overlay">-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<a-menu slot="overlay"> <!-- </a-menu>-->
<a-menu-item key="1" @click="batchDel"> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<a-icon type="delete"/> <!-- </a-dropdown>-->
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
@ -69,170 +75,195 @@
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <!-- <template slot="htmlSlot" slot-scope="text">-->
<div v-html="text"></div> <!-- <div v-html="text"></div>-->
</template> <!-- </template>-->
<template slot="imgSlot" slot-scope="text"> <!-- <template slot="imgSlot" slot-scope="text">-->
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>-->
<img v-else :src="getImgView(text)" height="25px" alt="" <!-- <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>-->
style="max-width:80px;font-size: 12px;font-style: italic;"/> <!-- </template>-->
</template> <!-- <template slot="fileSlot" slot-scope="text">-->
<template slot="fileSlot" slot-scope="text"> <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>-->
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <!-- <a-button-->
<a-button <!-- v-else-->
v-else <!-- :ghost="true"-->
:ghost="true" <!-- type="primary"-->
type="primary" <!-- icon="download"-->
icon="download" <!-- size="small"-->
size="small" <!-- @click="downloadFile(text)">-->
@click="downloadFile(text)"> <!-- 下载-->
下载 <!-- </a-button>-->
</a-button> <!-- </template>-->
</template>
<!--功能 开发者-->
<!--这里只能用v-else-if / v-else v-if v-if="userRole1 === '1'"-->
<span slot="actionManage" slot-scope="text, record" v-if="userRole1 === '1'">
<a @click="fabu(record)">发布</a>
<a-divider type="vertical"/>
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical"/>
<a @click="tijiao(record)">提交</a>
</span>
<!--功能 管理员-->
<span slot="actionManage" slot-scope="text, record" v-else-if="userRole1=== '2'">
<a @click="chehui(record)">撤回</a>
<a-divider type="vertical"/>
<a @click="bugfankui(record)">反馈</a>
<a-divider type="vertical"/>
<a @click="shenhe(record)">审核</a>
</span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span> </span>
</a-table> </a-table>
</div> </div>
<task-modal ref="modalForm" @ok="modalFormOk"></task-modal> <task-modal ref="modalForm" @ok="modalFormOk"></task-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
</a-card> </a-card>
</template> </template>
<script> <script>
import '@assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TaskModal from './modules/TaskModal' import TaskModal from './modules/TaskModal'
import {getAction} from "@api/manage";
import store from "@/store";
import BugxModal from "@views/task/modules/BugxModal";
export default { export default {
name: 'TaskList', name: 'TaskList',
mixins: [JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
BugxModal,
TaskModal TaskModal
}, },
data() { data () {
return { return {
description: '任务管理管理页面', description: '任务管理管理页面',
userRole1: '', //1 2
// //
columns: [ columns: [
{ {
title: '#', title: '#',
dataIndex: '', dataIndex: '',
key: 'rowIndex', key:'rowIndex',
width: 60, width:60,
align: "center", align:"center",
customRender: function (t, r, index) { customRender:function (t,r,index) {
return parseInt(index) + 1; return parseInt(index)+1;
} }
}, },
{ {
title: '中文名称', title:'中文名称',
align: "center", align:"center",
dataIndex: 'functionTemplateName' dataIndex: 'taskName'
},
{
title:'任务层级',
align:"center",
dataIndex: 'level'
}, },
{ {
title: '责任人', title:'任务类型',
align: "center", align:"center",
dataIndex: 'managerUsers_dictText', dataIndex: 'typeId_dictText'
}, },
{ {
title: '任务等级', title:'关联',
align: "center", align:"center",
dataIndex: 'workLevel_dictText' dataIndex: 'union'
},
// {
// title:'',
// align:"center",
// dataIndex: 'projectId'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'moduleId'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'functionId'
// },
// {
// title:'id',
// align:"center",
// dataIndex: 'ruleId'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'managerUsers'
// },
{
title:'任务等级',
align:"center",
dataIndex: 'workLevel'
}, },
{ {
title: '任务状态', title:'任务状态',
align: "center", align:"center",
dataIndex: 'workStatus_dictText' dataIndex: 'workStatus_dictText'
}, },
{ {
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:'开始时间',
align: "center", align:"center",
dataIndex: 'startTime', dataIndex: 'startTime',
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:'预计结束时间',
align: "center", align:"center",
dataIndex: 'duration' dataIndex: 'expectedEndTime',
}, customRender:function (text) {
{ return !text?"":(text.length>10?text.substr(0,10):text)
title: '创建时间', }
align: "center",
dataIndex: 'createTime'
},
{
title: '管理',
dataIndex: 'actionManage',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'actionManage'},
}, },
// {
// title:'',
// align:"center",
// dataIndex: 'expectedDuration'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'submitTime',
// customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text)
// }
// },
// {
// title:'',
// align:"center",
// dataIndex: 'realDuration'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'taskDescribe'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'taskPic'
// },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align: "center", align:"center",
fixed: "right", fixed:"right",
width: 147, width:147,
scopedSlots: {customRender: 'action'} scopedSlots: { customRender: 'action' }
} }
], ],
url: { url: {
@ -240,109 +271,45 @@ export default {
delete: "/task/task/delete", delete: "/task/task/delete",
deleteBatch: "/task/task/deleteBatch", deleteBatch: "/task/task/deleteBatch",
exportXlsUrl: "/task/task/exportXls", exportXlsUrl: "/task/task/exportXls",
importExcelUrl: "task/task/importExcel",
}, },
dictOptions: {}, dictOptions:{},
superFieldList: [], superFieldList:[],
} }
}, },
created() { created() {
let usercode = store.getters.userInfo.id
//id
this.loginRole(usercode)
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function () { importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
methods: { methods: {
loginRole(id) { // initDictConfig(){
getAction('functionx/functionx/loginrole', {id: id}).then((res) => { // },
if (res.success) { // getSuperFieldList(){
// // let fieldList=[];
this.userRole1 = res.result; // fieldList.push({type:'string',value:'taskName',text:'',dictCode:''})
// console.log('this.userRole1',this.userRole1) // fieldList.push({type:'int',value:'level',text:'',dictCode:''})
//console.log('this.userRole1',this.userRole1) // fieldList.push({type:'string',value:'projectId',text:'id',dictCode:''})
} // fieldList.push({type:'string',value:'moduleId',text:'id',dictCode:''})
}) // fieldList.push({type:'string',value:'functionId',text:'id',dictCode:''})
}, // fieldList.push({type:'string',value:'ruleId',text:'id',dictCode:''})
shenhe(record) { // fieldList.push({type:'string',value:'typeId',text:'id',dictCode:''})
getAction('/task/task/shenhe', {id: record.id}).then((res) => { // fieldList.push({type:'string',value:'managerUsers',text:'',dictCode:''})
if (res.success) { // fieldList.push({type:'int',value:'workLevel',text:'',dictCode:''})
// // fieldList.push({type:'int',value:'workStatus',text:'',dictCode:''})
this.$message.success(res.result); // fieldList.push({type:'date',value:'publishTime',text:''})
this.loadData(); // fieldList.push({type:'date',value:'startTime',text:''})
} else { // fieldList.push({type:'date',value:'expectedEndTime',text:''})
this.$message.warning(res.message); // fieldList.push({type:'double',value:'expectedDuration',text:'',dictCode:''})
} // fieldList.push({type:'date',value:'submitTime',text:''})
}) // fieldList.push({type:'double',value:'realDuration',text:'',dictCode:''})
}, // fieldList.push({type:'Text',value:'taskDescribe',text:'',dictCode:''})
bugfankui: function (record) { // fieldList.push({type:'Text',value:'taskPic',text:'',dictCode:''})
console.log('aaaaaaaaaaaa bugfankui bugfankui bugfankui'); // this.superFieldList = fieldList
this.$refs.BugxModal.add(); // }
this.$refs.BugxModal.title = "BUG反馈";
this.$refs.BugxModal.disableSubmit = false;
},
chehui(record) {
getAction('/task/task/chehui', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
tijiao(record) {
getAction('/task/task/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('/task/task/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('/task/task/fabu', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'functionTemplateName', text: '中文名称', dictCode: ''})
fieldList.push({type: 'string', value: 'managerUsers', text: '责任人', dictCode: ''})
fieldList.push({type: 'int', value: 'workLevel', text: '任务等级', dictCode: ''})
fieldList.push({type: 'int', value: 'workStatus', text: '任务状态', dictCode: ''})
fieldList.push({type: 'date', value: 'publishTime', text: '发布时间'})
fieldList.push({type: 'date', value: 'startTime', text: '开始时间'})
fieldList.push({type: 'string', value: 'duration', text: '任务时长', dictCode: ''})
this.superFieldList = fieldList
}
} }
} }
</script> </script>

@ -4,49 +4,126 @@
<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="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionTemplateName"> <a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">
<a-input v-model="model.functionTemplateName" placeholder="请输入中文名称" ></a-input> <j-dict-select-tag v-model="model.upperId" placeholder="请选择所属上级任务"
dict-code="task,task_name,id" style="width: 100%">
</j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskName">
<a-input v-model="model.taskName" placeholder="请输入中文名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务层级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="level">
<j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"
dict-code="task_type_level" style="width: 100%">
</j-dict-select-tag>
<!-- <j-dict-select-tag v-model="model.level" type="radio" style="width: 100%" dictCode="task_type_level"/>-->
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"
dict-code="task_type,type_name,id"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId">
<j-dict-select-tag v-model="model.projectId" placeholder="请选择项目" dict-code="projectx,project_name,id"
style="width: 100%"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<!-- <a-input v-model="model.moduleId" placeholder="请输入模块" ></a-input>-->
<j-dict-select-tag v-model="model.moduleId" placeholder="请选择模块" dict-code="modulex,module_name,id"
style="width: 100%"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionId">
<!-- <a-input v-model="model.functionId" placeholder="请输入功能id" ></a-input>-->
<j-dict-select-tag v-model="model.functionId" placeholder="请选择功能" dict-code="modulex,module_name,id"
style="width: 100%"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规则" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleId">
<!-- <a-input v-model="model.ruleId" placeholder="请输入规则id" ></a-input>-->
<j-dict-select-tag v-model="model.ruleId" placeholder="请选择规则" dict-code="rulex,rule_no,id"
style="width: 100%"></j-dict-select-tag>
</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="managerUsers"> <a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers">
<!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>--> <!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>-->
<!-- <j-dict-select-tag type="list" v-model="model.managerUsers" placeholder="请选择任务等级"--> <!-- <j-dict-select-tag type="list" v-model="model.managerUsers" placeholder="请选择任务等级"-->
<!-- dict-code="sys_user,realname,id" >--> <!-- dict-code="sys_user,realname,id" >-->
<!-- </j-dict-select-tag>--> <!-- </j-dict-select-tag>-->
<j-multi-select-tag type="list_multi" v-model="model.managerUsers" <j-multi-select-tag type="list_multi" v-model="model.managerUsers"
dictCode="sys_user,realname,id" placeholder="请选择责任人" /> dictCode="sys_user,realname,id" placeholder="请选择责任人"/>
</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="workLevel"> <a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel">
<!-- <a-input-number :min="1" :max="16" v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />--> <!-- <a-input-number :min="1" :max="16" v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />-->
<j-dict-select-tag v-model="model.workLevel" placeholder="请选择任务等级" <j-dict-select-tag v-model="model.workLevel" placeholder="请选择任务等级"
dict-code="task_type_level" style="width: 100%"> dict-code="workLevel" style="width: 100%">
</j-dict-select-tag> </j-dict-select-tag>
</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="workStatus"> <a-form-model-item label="任务状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workStatus">
<!-- <a-input-number :min="1" :max="16" v-model="model.workStatus" placeholder="请输入任务状态" style="width: 100%" />--> <!-- <a-input-number :min="1" :max="16" v-model="model.workStatus" placeholder="请输入任务状态" style="width: 100%" />-->
<j-dict-select-tag v-model="model.workStatus" dict-code="work_status" <j-dict-select-tag v-model="model.workStatus" dict-code="work_status"
placeholder="请输入任务状态" 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="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime"> <a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">
<j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%" /> <j-date placeholder="请选择发布时间" v-model="model.publishTime" 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="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="请选择开始时间" 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="duration"> <a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
<a-input-number :min="0.1" :max="16" :precision="1" v-model="model.duration" placeholder="请输入任务时长" style="width: 100%"></a-input-number> prop="expectedEndTime">
<j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="预计任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedDuration">
<a-input-number v-model="model.expectedDuration" placeholder="请输入预计任务时长" style="width: 100%"/>
</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="realDuration">
<a-input-number v-model="model.realDuration" placeholder="请输入实际任务时长" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskPic">
<!-- <a-input v-model="model.taskPic" placeholder="请输入项目图片"></a-input>-->
<j-image-upload bizPath="scott/pic" v-model="model.taskPic"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="富文本编辑器" style="width: 700px" prop="taskDescribe">
<j-editor v-model="model.taskDescribe"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -57,96 +134,122 @@
<script> <script>
import { httpAction, getAction } from '@api/manage' import {httpAction, getAction} from '@api/manage'
import { validateDuplicateValue } from '@/utils/util' import {validateDuplicateValue} from '@/utils/util'
import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell"; import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell";
import JMultiSelectTag from "@/components/dict/JMultiSelectTag" import JMultiSelectTag from "@/components/dict/JMultiSelectTag"
export default { export default {
name: 'TaskForm', name: 'TaskForm',
components: { components: {
JVxeDateCell, JVxeDateCell,
JMultiSelectTag JMultiSelectTag
}, },
props: { props: {
// //
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,
required: false required: false
} }
}, },
data () { data() {
return { return {
model:{ model: {
workLevel: 2, workLevel: 2,
workStatus: 0, workStatus: 0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/task/task/add",
edit: "/task/task/edit",
queryById: "/task/task/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
}, },
}, labelCol: {
created () { xs: {span: 24},
//model sm: {span: 5},
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
}, },
edit (record) { wrapperCol: {
this.model = Object.assign({}, record); xs: {span: 24},
console.log('this.model-------',this.model) sm: {span: 16},
this.visible = true;
}, },
submitForm () { confirmLoading: false,
const that = this; validatorRules: {
// taskName: [
this.$refs.form.validate(valid => { {required: true, message: '请输入中文名称!'},
if (valid) { {pattern: /^.{2,300}$/, message: '长度不在范围内!'},
that.confirmLoading = true; // {pattern: /^[0-9]{0,100}$/, message: ''}
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;
})
}
}) ],
level: [
{required: true, message: '任务层级不能为空!'},
],
typeId: [
{required: true, message: '任务类型不能为空!'},
],
workLevel: [
{required: true, message: '任务等级不能为空!'},
],
workStatus: [
{required: true, message: '任务状态不能为空!'},
],
expectedDuration: [
{required: true, message: '请输入预计任务时长!'},
{pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的时长!'},
],
realDuration: [
{required: false, message: '请输入实际任务时长!'},
{pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的时长!'},
],
}, },
url: {
add: "/task/task/add",
edit: "/task/task/edit",
queryById: "/task/task/queryById"
}
} }
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
},
edit(record) {
this.model = Object.assign({}, record);
console.log('this.model-------', this.model)
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;
})
}
})
},
} }
}
</script> </script>

@ -7,7 +7,6 @@
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="类型名称"> <a-form-item label="类型名称">
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
<j-input placeholder="" v-model="queryParam.typeName"></j-input> <j-input placeholder="" v-model="queryParam.typeName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -28,17 +27,17 @@
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('任务类型管理')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('任务类型管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<a-button type="primary" icon="import">导入</a-button> <!-- <a-button type="primary" icon="import">导入</a-button>-->
</a-upload> <!-- </a-upload>-->
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -62,31 +61,31 @@
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <!-- <template slot="htmlSlot" slot-scope="text">-->
<div v-html="text"></div> <!-- <div v-html="text"></div>-->
</template> <!-- </template>-->
<template slot="imgSlot" slot-scope="text"> <!-- <template slot="imgSlot" slot-scope="text">-->
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>-->
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> <!-- <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>-->
</template> <!-- </template>-->
<template slot="fileSlot" slot-scope="text"> <!-- <template slot="fileSlot" slot-scope="text">-->
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>-->
<a-button <!-- <a-button-->
v-else <!-- v-else-->
:ghost="true" <!-- :ghost="true"-->
type="primary" <!-- type="primary"-->
icon="download" <!-- icon="download"-->
size="small" <!-- size="small"-->
@click="downloadFile(text)"> <!-- @click="downloadFile(text)">-->
下载 <!-- 下载-->
</a-button> <!-- </a-button>-->
</template> <!-- </template>-->
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<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>-->
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@ -136,9 +135,9 @@
dataIndex: 'typeName' dataIndex: 'typeName'
}, },
{ {
title:'任务层级', title:'上级类型',
align:"center", align:"upperId",
dataIndex: 'level_dictText' dataIndex: 'upperId_dictText'
}, },
{ {
title:'创建时间', title:'创建时间',

@ -5,14 +5,20 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName"> <a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName">
<a-input v-model="model.typeName" placeholder="请输入类型名称" ></a-input> <a-input v-model="model.typeName" placeholder="请输入类型名称"></a-input>
</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="level"> <a-form-model-item label="上级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">
<j-dict-select-tag v-model="model.level" placeholder="请选择任务层级" <j-tree-select
dict-code="task_type_level"/> ref="treeSelect"
placeholder="请选择上级类型"
v-model="model.upperId"
dict="task_type,type_name,id"
pidField="upper_id"
pidValue=""
>
</j-tree-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -23,90 +29,87 @@
<script> <script>
import { httpAction, getAction } from '@api/manage' import {httpAction, getAction} from '@api/manage'
import { validateDuplicateValue } from '@/utils/util' import {validateDuplicateValue} from '@/utils/util'
export default { export default {
name: 'TaskTypeForm', name: 'TaskTypeForm',
components: { components: {},
}, props: {
props: { //
// disabled: {
disabled: { type: Boolean,
type: Boolean, default: false,
default: false, required: false
required: false }
} },
}, data() {
data () { return {
return { model: {},
model:{ labelCol: {
}, xs: {span: 24},
labelCol: { sm: {span: 5},
xs: { span: 24 }, },
sm: { span: 5 }, wrapperCol: {
}, xs: {span: 24},
wrapperCol: { sm: {span: 16},
xs: { span: 24 }, },
sm: { span: 16 }, confirmLoading: false,
}, validatorRules: {},
confirmLoading: false, url: {
validatorRules: { add: "/taskType/taskType/add",
}, edit: "/taskType/taskType/edit",
url: { queryById: "/taskType/taskType/queryById"
add: "/taskType/taskType/add",
edit: "/taskType/taskType/edit",
queryById: "/taskType/taskType/queryById"
}
} }
}
},
computed: {
formDisabled() {
return this.disabled
}, },
computed: { },
formDisabled(){ created() {
return this.disabled //model
}, this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
}, },
created () { edit(record) {
//model this.model = Object.assign({}, record);
this.modelDefault = JSON.parse(JSON.stringify(this.model)); // console.log('this.model',this.model)
this.visible = true;
}, },
methods: { submitForm() {
add () { const that = this;
this.edit(this.modelDefault); //
}, this.$refs.form.validate(valid => {
edit (record) { if (valid) {
this.model = Object.assign({}, record); that.confirmLoading = true;
// console.log('this.model',this.model) let httpurl = '';
this.visible = true; let method = '';
}, if (!this.model.id) {
submitForm () { httpurl += this.url.add;
const that = this; method = 'post';
// } else {
this.$refs.form.validate(valid => { httpurl += this.url.edit;
if (valid) { method = 'put';
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;
})
} }
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> </script>

@ -1,7 +1,6 @@
package org.jeecg.modules.task.controller; package org.jeecg.modules.task.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -56,7 +55,7 @@ public class TaskController extends JeecgController<Task, ITaskService> {
Page<Task> page = new Page<Task>(pageNo, pageSize); Page<Task> page = new Page<Task>(pageNo, pageSize);
IPage<Task> pageList = taskService.page(page, queryWrapper); IPage<Task> pageList = taskService.page(page, queryWrapper);
//责任人回显 //责任人回显
pageList.getRecords().forEach(task1 -> task1.setManagerUsers_dictText(taskService.getManagerUsers(task1.getManagerUsers()))); // pageList.getRecords().forEach(task1 -> task1.setManagerUsers_dictText(taskService.getManagerUsers(task1.getManagerUsers())));
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -70,7 +69,7 @@ public class TaskController extends JeecgController<Task, ITaskService> {
@ApiOperation(value = "任务管理-添加", notes = "任务管理-添加") @ApiOperation(value = "任务管理-添加", notes = "任务管理-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody Task task) { public Result<?> add(@RequestBody Task task) {
int count = taskService.count(new LambdaQueryWrapper<Task>().eq(Task::getFunctionTemplateName, task.getFunctionTemplateName())); int count =0;// taskService.count(new LambdaQueryWrapper<Task>().eq(Task::getFunctionTemplateName, task.getFunctionTemplateName()));
if (count > 0) { if (count > 0) {
return Result.error("名字不能重复"); return Result.error("名字不能重复");
} }

@ -1,7 +1,6 @@
package org.jeecg.modules.task.entity; package org.jeecg.modules.task.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -15,80 +14,174 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @Description: 任务管理 * @Description: 任务管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-24 * @Date: 2023-05-24
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("task") @TableName("task")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="task对象", description="任务管理") @ApiModel(value = "task对象", description = "任务管理")
public class Task implements Serializable { public class Task implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**
@TableId(type = IdType.ASSIGN_ID) * 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private java.lang.String id;
/**创建人*/ /**
* 创建人
*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private String createBy; private java.lang.String createBy;
/**创建日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 创建日期
@DateTimeFormat(pattern="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 = "创建日期") @ApiModelProperty(value = "创建日期")
private Date createTime; private java.util.Date createTime;
/**更新人*/ /**
* 更新人
*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private String updateBy; private java.lang.String updateBy;
/**更新日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 更新日期
@DateTimeFormat(pattern="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 = "更新日期") @ApiModelProperty(value = "更新日期")
private Date updateTime; private java.util.Date updateTime;
/**上级任务id*/ /**
@Excel(name = "上级任务id", width = 15) * 上级任务id
*/
@Excel(name = "上级任务id", width = 15)
@ApiModelProperty(value = "上级任务id") @ApiModelProperty(value = "上级任务id")
private String upperId; private java.lang.String upperId;
/**中文名称*/ /**
@Excel(name = "中文名称", width = 15) * 中文名称
*/
@Excel(name = "中文名称", width = 15)
@ApiModelProperty(value = "中文名称") @ApiModelProperty(value = "中文名称")
private String functionTemplateName; private java.lang.String taskName;
/**责任人*/ /**
@Excel(name = "责任人", width = 15) * 任务层级
*/
@Excel(name = "任务层级", width = 15)
@ApiModelProperty(value = "任务层级")
private java.lang.Integer level;
/**
* 项目id
*/
@Excel(name = "项目id", width = 15)
@ApiModelProperty(value = "项目id")
private java.lang.String projectId;
/**
* 模块id
*/
@Excel(name = "模块id", width = 15)
@ApiModelProperty(value = "模块id")
private java.lang.String moduleId;
/**
* 功能id
*/
@Excel(name = "功能id", width = 15)
@ApiModelProperty(value = "功能id")
private java.lang.String functionId;
/**
* 规则id
*/
@Excel(name = "规则id", width = 15)
@ApiModelProperty(value = "规则id")
private java.lang.String ruleId;
/**
* 任务类型id
*/
@Excel(name = "任务类型id", width = 15)
@ApiModelProperty(value = "任务类型id")
@Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
private java.lang.String typeId;
/**
* 责任人
*/
@Excel(name = "责任人", width = 15)
@ApiModelProperty(value = "责任人") @ApiModelProperty(value = "责任人")
private String managerUsers; @Dict(dictTable = "sys_user", dicText = "realname",dicCode = "id")
@TableField(exist = false) private java.lang.String managerUsers;
private String managerUsers_dictText; /**
/**任务等级*/ * 任务等级
@Excel(name = "任务等级", width = 15) */
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级") @ApiModelProperty(value = "任务等级")
@Dict(dicCode = "task_type_level") private java.lang.Integer workLevel;
private Integer workLevel; /**
/**任务状态*/ * 任务状态
@Excel(name = "任务状态", width = 15) */
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@Dict(dicCode = "work_status") @Dict(dicCode = "work_status")
private Integer workStatus; private java.lang.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")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
private Date publishTime; private java.util.Date publishTime;
/**开始时间*/ /**
@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")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date startTime; private java.util.Date startTime;
/**任务时长*/ /**
@Excel(name = "任务时长", width = 15) * 预计结束时间
@ApiModelProperty(value = "任务时长") */
private String duration; @Excel(name = "预计结束时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "预计结束时间")
private java.util.Date expectedEndTime;
/**
* 预计任务时长
*/
@Excel(name = "预计任务时长", width = 15)
@ApiModelProperty(value = "预计任务时长")
private java.lang.Double expectedDuration;
/**
* 提交时间
*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "提交时间")
private java.util.Date submitTime;
/**
* 实际任务时长
*/
@Excel(name = "实际任务时长", width = 15)
@ApiModelProperty(value = "实际任务时长")
private java.lang.Double realDuration;
/**
* 项目描述
*/
@Excel(name = "项目描述", width = 15)
@ApiModelProperty(value = "项目描述")
private java.lang.String taskDescribe;
/**
* 项目图片
*/
@Excel(name = "项目图片", width = 15)
@ApiModelProperty(value = "项目图片")
private java.lang.String taskPic;
} }

@ -45,12 +45,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/ */
@Override @Override
public Result<?> chehui(String id) { public Result<?> chehui(String id) {
Task byId = this.getById(id); // Task byId = this.getById(id);
if (byId.getWorkStatus() == 2) { // if (byId.getWorkStatus() == 2) {
return Result.error("正处于开发中"); // return Result.error("正处于开发中");
} // }
byId.setWorkStatus(2); // byId.setWorkStatus(2);
this.updateById(byId); // this.updateById(byId);
return Result.OK("撤回成功"); return Result.OK("撤回成功");
} }
@ -60,12 +60,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/ */
@Override @Override
public Result<?> shenhe(String id) { public Result<?> shenhe(String id) {
Task byId = this.getById(id); // Task byId = this.getById(id);
if (byId.getWorkStatus() == 4) { // if (byId.getWorkStatus() == 4) {
return Result.error("已审核"); // return Result.error("已审核");
} // }
byId.setWorkStatus(4); // byId.setWorkStatus(4);
this.updateById(byId); // this.updateById(byId);
return Result.OK("审核通过"); return Result.OK("审核通过");
} }
@ -76,16 +76,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/ */
@Override @Override
public Result<?> tijiao(String id) { public Result<?> tijiao(String id) {
Task byId = this.getById(id); // Task byId = this.getById(id);
if (byId.getWorkStatus() != 2) { // if (byId.getWorkStatus() != 2) {
return Result.error("当前不处于开发中阶段,无法提交"); // return Result.error("当前不处于开发中阶段,无法提交");
} else { // } else {
byId.setWorkStatus(3); // byId.setWorkStatus(3);
//
this.updateById(byId); // this.updateById(byId);
//
return Result.OK("提交成功!!"); return Result.OK("提交成功!!");
} // }
} }
@ -95,16 +95,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/ */
@Override @Override
public Result<?> kaishi(String id) { public Result<?> kaishi(String id) {
Task byId = this.getById(id); // Task byId = this.getById(id);
if (byId.getWorkStatus() != 1) { // if (byId.getWorkStatus() != 1) {
return Result.error("当前不处于已发布阶段,无法开始,请先发布"); // return Result.error("当前不处于已发布阶段,无法开始,请先发布");
} else { // } else {
byId.setWorkStatus(2); // byId.setWorkStatus(2);
byId.setStartTime(new Date()); // byId.setStartTime(new Date());
this.updateById(byId); // this.updateById(byId);
//
return Result.OK("任务开始成功"); return Result.OK("任务开始成功");
} // }
} }
/** /**
@ -114,15 +114,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/ */
@Override @Override
public Result<?> fabu(String id) { public Result<?> fabu(String id) {
Task byId = this.getById(id); // Task byId = this.getById(id);
if (byId.getWorkStatus() != 0){ // if (byId.getWorkStatus() != 0){
return Result.error("当前功能已发布!!!"); // return Result.error("当前功能已发布!!!");
}else { // }else {
byId.setWorkStatus(1); // byId.setWorkStatus(1);
this.updateById(byId); // this.updateById(byId);
//模块管理下属所有功能状态变为已发布 // //模块管理下属所有功能状态变为已发布
//this.handleStatus(id,1); // //this.handleStatus(id,1);
return Result.OK("发布成功!!"); return Result.OK("发布成功!!");
} // }
} }
} }

@ -20,44 +20,58 @@ import java.util.Date;
/** /**
* @Description: 任务类型管理 * @Description: 任务类型管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-24 * @Date: 2023-05-24
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("task_type") @TableName("task_type")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="task_type对象", description="任务类型管理") @ApiModel(value = "task_type对象", description = "任务类型管理")
public class TaskType implements Serializable { public class TaskType implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**
@TableId(type = IdType.ASSIGN_ID) * 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
/**创建人*/ /**
* 创建人
*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private String createBy; private String createBy;
/**创建日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 创建日期
@DateTimeFormat(pattern="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 = "创建日期") @ApiModelProperty(value = "创建日期")
private Date createTime; private Date createTime;
/**更新人*/ /**
* 更新人
*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private String updateBy; private String updateBy;
/**更新日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 更新日期
@DateTimeFormat(pattern="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 = "更新日期") @ApiModelProperty(value = "更新日期")
private Date updateTime; private Date updateTime;
/**任务层级*/ /**
@Excel(name = "任务层级", width = 15) * 任务层级
@ApiModelProperty(value = "任务层级") */
@Dict(dicCode = "task_type_level") @Excel(name = "上级类型id", width = 15)
private Integer level; @ApiModelProperty(value = "上级类型id")
/**类型名称*/ @Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
@Excel(name = "类型名称", width = 15) private String upperId;
/**
* 类型名称
*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称") @ApiModelProperty(value = "类型名称")
private String typeName; private String typeName;
} }

Loading…
Cancel
Save