From 10f3977f369d3bd87d9bdd855925a6b57015d00f Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Tue, 30 May 2023 18:26:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E9=87=8D=E6=9E=84=205.30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/task/TaskList.vue | 415 ++++++++---------- .../src/views/task/modules/TaskForm.vue | 301 ++++++++----- .../src/views/taskType/TaskTypeList.vue | 69 ++- .../views/taskType/modules/TaskTypeForm.vue | 169 +++---- .../task/controller/TaskController.java | 5 +- .../org/jeecg/modules/task/entity/Task.java | 195 +++++--- .../task/service/impl/TaskServiceImpl.java | 78 ++-- .../modules/taskType/entity/TaskType.java | 52 ++- 8 files changed, 731 insertions(+), 553 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/task/TaskList.vue b/ant-design-vue-jeecg/src/views/task/TaskList.vue index 94e76bf..0614dc2 100644 --- a/ant-design-vue-jeecg/src/views/task/TaskList.vue +++ b/ant-design-vue-jeecg/src/views/task/TaskList.vue @@ -6,8 +6,22 @@ - - + + + + + + + + + + + + + + @@ -27,31 +41,23 @@
新增 导出 - - 导入 - - - - - - - - 删除 - - - 批量操作 - - - + + + + + + + + + + +
@@ -69,170 +75,195 @@ class="j-table-force-nowrap" @change="handleTableChange"> - - - - - - - - - - 发布 - - - 开始 - - - 提交 - - - - - - - 撤回 - - - 反馈 - - - 审核 - + + + + + + + + + + + + + + + + + + + - 编辑 - - - 详情 - - - - 删除 - + + + 更多 + + + 详情 + + + + 删除 + + + +
- diff --git a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue index 5c8dec2..9eecb96 100644 --- a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue +++ b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue @@ -4,49 +4,126 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + dictCode="sys_user,realname,id" placeholder="请选择责任人"/> - + + dict-code="workLevel" style="width: 100%"> - + + placeholder="请输入任务状态" style="width: 100%"/> - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -57,96 +134,122 @@ \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue b/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue index 7d7887e..31a5086 100644 --- a/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue +++ b/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue @@ -7,7 +7,6 @@ - @@ -28,17 +27,17 @@
新增 导出 - - 导入 - + + + - - - - 删除 - - 批量操作 - + + + + + + +
@@ -62,31 +61,31 @@ class="j-table-force-nowrap" @change="handleTableChange"> - - - + + + + + + + + + + + + + + + + + + + 编辑 - - 详情 + + @@ -136,9 +135,9 @@ dataIndex: 'typeName' }, { - title:'任务层级', - align:"center", - dataIndex: 'level_dictText' + title:'上级类型', + align:"upperId", + dataIndex: 'upperId_dictText' }, { title:'创建时间', diff --git a/ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue b/ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue index 70b91ed..0159968 100644 --- a/ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue @@ -5,14 +5,20 @@ - + - - - + + + @@ -23,90 +29,87 @@ \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java index b0b11c3..df5ec73 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java @@ -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 { Page page = new Page(pageNo, pageSize); IPage 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 { @ApiOperation(value = "任务管理-添加", notes = "任务管理-添加") @PostMapping(value = "/add") public Result add(@RequestBody Task task) { - int count = taskService.count(new LambdaQueryWrapper().eq(Task::getFunctionTemplateName, task.getFunctionTemplateName())); + int count =0;// taskService.count(new LambdaQueryWrapper().eq(Task::getFunctionTemplateName, task.getFunctionTemplateName())); if (count > 0) { return Result.error("名字不能重复"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java index e4f20ce..bb1d70d 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java @@ -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; } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java index 024748a..ac7724e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java @@ -45,12 +45,12 @@ public class TaskServiceImpl extends ServiceImpl 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 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 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 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 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("发布成功!!"); - } +// } } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java index d220fe8..ae6b00b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java @@ -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; }