任务管理 重构 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-col :md="6" :sm="12">
<a-form-item label="任务名称">
<j-input placeholder="" v-model="queryParam.functionTemplateName"></j-input>
<a-form-item label="项目">
<!-- <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-col>
@ -27,31 +41,23 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</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-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@ -69,170 +75,195 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<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;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</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>
<!-- <template slot="htmlSlot" slot-scope="text">-->
<!-- <div v-html="text"></div>-->
<!-- </template>-->
<!-- <template slot="imgSlot" slot-scope="text">-->
<!-- <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;"/>-->
<!-- </template>-->
<!-- <template slot="fileSlot" slot-scope="text">-->
<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>-->
<!-- <a-button-->
<!-- v-else-->
<!-- :ghost="true"-->
<!-- type="primary"-->
<!-- icon="download"-->
<!-- size="small"-->
<!-- @click="downloadFile(text)">-->
<!-- 下载-->
<!-- </a-button>-->
<!-- </template>-->
<span slot="action" slot-scope="text, record">
<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>
</a-table>
</div>
<task-modal ref="modalForm" @ok="modalFormOk"></task-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
</a-card>
</template>
<script>
import '@assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TaskModal from './modules/TaskModal'
import {getAction} from "@api/manage";
import store from "@/store";
import BugxModal from "@views/task/modules/BugxModal";
export default {
name: 'TaskList',
mixins: [JeecgListMixin, mixinDevice],
mixins:[JeecgListMixin, mixinDevice],
components: {
BugxModal,
TaskModal
},
data() {
data () {
return {
description: '任务管理管理页面',
userRole1: '', //1 2
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '中文名称',
align: "center",
dataIndex: 'functionTemplateName'
title:'中文名称',
align:"center",
dataIndex: 'taskName'
},
{
title:'任务层级',
align:"center",
dataIndex: 'level'
},
{
title: '责任人',
align: "center",
dataIndex: 'managerUsers_dictText',
title:'任务类型',
align:"center",
dataIndex: 'typeId_dictText'
},
{
title: '任务等级',
align: "center",
dataIndex: 'workLevel_dictText'
title:'关联',
align:"center",
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: '任务状态',
align: "center",
title:'任务状态',
align:"center",
dataIndex: 'workStatus_dictText'
},
{
title: '发布时间',
align: "center",
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: '开始时间',
align: "center",
title:'开始时间',
align:"center",
dataIndex: 'startTime',
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: '任务时长',
align: "center",
dataIndex: 'duration'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '管理',
dataIndex: 'actionManage',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'actionManage'},
title:'预计结束时间',
align:"center",
dataIndex: 'expectedEndTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
// {
// 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: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
@ -240,109 +271,45 @@ export default {
delete: "/task/task/delete",
deleteBatch: "/task/task/deleteBatch",
exportXlsUrl: "/task/task/exportXls",
importExcelUrl: "task/task/importExcel",
},
dictOptions: {},
superFieldList: [],
dictOptions:{},
superFieldList:[],
}
},
created() {
let usercode = store.getters.userInfo.id
//id
this.loginRole(usercode)
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
loginRole(id) {
getAction('functionx/functionx/loginrole', {id: id}).then((res) => {
if (res.success) {
//
this.userRole1 = res.result;
// console.log('this.userRole1',this.userRole1)
//console.log('this.userRole1',this.userRole1)
}
})
},
shenhe(record) {
getAction('/task/task/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) {
console.log('aaaaaaaaaaaa bugfankui bugfankui bugfankui');
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
}
// initDictConfig(){
// },
// getSuperFieldList(){
// let fieldList=[];
// fieldList.push({type:'string',value:'taskName',text:'',dictCode:''})
// fieldList.push({type:'int',value:'level',text:'',dictCode:''})
// 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:''})
// fieldList.push({type:'string',value:'typeId',text:'id',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:'date',value:'expectedEndTime',text:''})
// 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:''})
// fieldList.push({type:'Text',value:'taskPic',text:'',dictCode:''})
// this.superFieldList = fieldList
// }
}
}
</script>

@ -4,49 +4,126 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionTemplateName">
<a-input v-model="model.functionTemplateName" placeholder="请输入中文名称" ></a-input>
<a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">
<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-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>-->
<!-- <j-dict-select-tag type="list" v-model="model.managerUsers" placeholder="请选择任务等级"-->
<!-- dict-code="sys_user,realname,id" >-->
<!-- </j-dict-select-tag>-->
<!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>-->
<!-- <j-dict-select-tag type="list" v-model="model.managerUsers" placeholder="请选择任务等级"-->
<!-- dict-code="sys_user,realname,id" >-->
<!-- </j-dict-select-tag>-->
<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-col>
<a-col :span="24">
<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="请选择任务等级"
dict-code="task_type_level" style="width: 100%">
dict-code="workLevel" 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="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"
placeholder="请输入任务状态" style="width: 100%" />
placeholder="请输入任务状态" style="width: 100%"/>
</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%" />
<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="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-col>
<a-col :span="24">
<a-form-model-item label="任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration">
<a-input-number :min="0.1" :max="16" :precision="1" v-model="model.duration" placeholder="请输入任务时长" style="width: 100%"></a-input-number>
<a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
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-col>
</a-row>
@ -57,96 +134,122 @@
<script>
import { httpAction, getAction } from '@api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell";
import JMultiSelectTag from "@/components/dict/JMultiSelectTag"
import {httpAction, getAction} from '@api/manage'
import {validateDuplicateValue} from '@/utils/util'
import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell";
import JMultiSelectTag from "@/components/dict/JMultiSelectTag"
export default {
name: 'TaskForm',
components: {
JVxeDateCell,
JMultiSelectTag
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
workLevel: 2,
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
export default {
name: 'TaskForm',
components: {
JVxeDateCell,
JMultiSelectTag
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {
workLevel: 2,
workStatus: 0,
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
edit (record) {
this.model = Object.assign({}, record);
console.log('this.model-------',this.model)
this.visible = true;
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
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;
})
}
confirmLoading: false,
validatorRules: {
taskName: [
{required: true, message: '请输入中文名称!'},
{pattern: /^.{2,300}$/, message: '长度不在范围内!'},
// {pattern: /^[0-9]{0,100}$/, message: ''}
})
],
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>

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

@ -5,14 +5,20 @@
<a-row>
<a-col :span="24">
<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-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"/>
<a-form-model-item label="上级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">
<j-tree-select
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-col>
</a-row>
@ -23,90 +29,87 @@
<script>
import { httpAction, getAction } from '@api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@api/manage'
import {validateDuplicateValue} from '@/utils/util'
export default {
name: 'TaskTypeForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/taskType/taskType/add",
edit: "/taskType/taskType/edit",
queryById: "/taskType/taskType/queryById"
}
export default {
name: 'TaskTypeForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {},
url: {
add: "/taskType/taskType/add",
edit: "/taskType/taskType/edit",
queryById: "/taskType/taskType/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);
// console.log('this.model',this.model)
this.visible = true;
},
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;
})
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>

@ -1,7 +1,6 @@
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.metadata.IPage;
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);
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);
}
@ -70,7 +69,7 @@ public class TaskController extends JeecgController<Task, ITaskService> {
@ApiOperation(value = "任务管理-添加", notes = "任务管理-添加")
@PostMapping(value = "/add")
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) {
return Result.error("名字不能重复");
}

@ -1,7 +1,6 @@
package org.jeecg.modules.task.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -15,80 +14,174 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("task")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="task对象", description="任务管理")
@ApiModel(value = "task对象", description = "任务管理")
public class Task implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
private java.lang.String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.lang.String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
private java.util.Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.lang.String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**上级任务id*/
@Excel(name = "上级任务id", width = 15)
private java.util.Date updateTime;
/**
* 上级任务id
*/
@Excel(name = "上级任务id", width = 15)
@ApiModelProperty(value = "上级任务id")
private String upperId;
/**中文名称*/
@Excel(name = "中文名称", width = 15)
private java.lang.String upperId;
/**
* 中文名称
*/
@Excel(name = "中文名称", width = 15)
@ApiModelProperty(value = "中文名称")
private String functionTemplateName;
/**责任人*/
@Excel(name = "责任人", width = 15)
private java.lang.String taskName;
/**
* 任务层级
*/
@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 = "责任人")
private String managerUsers;
@TableField(exist = false)
private String managerUsers_dictText;
/**任务等级*/
@Excel(name = "任务等级", width = 15)
@Dict(dictTable = "sys_user", dicText = "realname",dicCode = "id")
private java.lang.String managerUsers;
/**
* 任务等级
*/
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级")
@Dict(dicCode = "task_type_level")
private Integer workLevel;
/**任务状态*/
@Excel(name = "任务状态", width = 15)
private java.lang.Integer workLevel;
/**
* 任务状态
*/
@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")
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")
@ApiModelProperty(value = "发布时间")
private Date publishTime;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
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")
@ApiModelProperty(value = "开始时间")
private Date startTime;
/**任务时长*/
@Excel(name = "任务时长", width = 15)
@ApiModelProperty(value = "任务时长")
private String duration;
private java.util.Date startTime;
/**
* 预计结束时间
*/
@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
public Result<?> chehui(String id) {
Task byId = this.getById(id);
if (byId.getWorkStatus() == 2) {
return Result.error("正处于开发中");
}
byId.setWorkStatus(2);
this.updateById(byId);
// Task byId = this.getById(id);
// if (byId.getWorkStatus() == 2) {
// return Result.error("正处于开发中");
// }
// byId.setWorkStatus(2);
// this.updateById(byId);
return Result.OK("撤回成功");
}
@ -60,12 +60,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/
@Override
public Result<?> shenhe(String id) {
Task byId = this.getById(id);
if (byId.getWorkStatus() == 4) {
return Result.error("已审核");
}
byId.setWorkStatus(4);
this.updateById(byId);
// Task byId = this.getById(id);
// if (byId.getWorkStatus() == 4) {
// return Result.error("已审核");
// }
// byId.setWorkStatus(4);
// this.updateById(byId);
return Result.OK("审核通过");
}
@ -76,16 +76,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/
@Override
public Result<?> tijiao(String id) {
Task byId = this.getById(id);
if (byId.getWorkStatus() != 2) {
return Result.error("当前不处于开发中阶段,无法提交");
} else {
byId.setWorkStatus(3);
this.updateById(byId);
// Task byId = this.getById(id);
// if (byId.getWorkStatus() != 2) {
// return Result.error("当前不处于开发中阶段,无法提交");
// } else {
// byId.setWorkStatus(3);
//
// this.updateById(byId);
//
return Result.OK("提交成功!!");
}
// }
}
@ -95,16 +95,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/
@Override
public Result<?> kaishi(String id) {
Task byId = this.getById(id);
if (byId.getWorkStatus() != 1) {
return Result.error("当前不处于已发布阶段,无法开始,请先发布");
} else {
byId.setWorkStatus(2);
byId.setStartTime(new Date());
this.updateById(byId);
// Task 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("任务开始成功");
}
// }
}
/**
@ -114,15 +114,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
*/
@Override
public Result<?> fabu(String id) {
Task byId = this.getById(id);
if (byId.getWorkStatus() != 0){
return Result.error("当前功能已发布!!!");
}else {
byId.setWorkStatus(1);
this.updateById(byId);
//模块管理下属所有功能状态变为已发布
//this.handleStatus(id,1);
// Task byId = this.getById(id);
// if (byId.getWorkStatus() != 0){
// return Result.error("当前功能已发布!!!");
// }else {
// byId.setWorkStatus(1);
// this.updateById(byId);
// //模块管理下属所有功能状态变为已发布
// //this.handleStatus(id,1);
return Result.OK("发布成功!!");
}
// }
}
}

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

Loading…
Cancel
Save