From f92b34bc3554e3f88b9cbe1968661cd2ccb3ee17 Mon Sep 17 00:00:00 2001 From: ZhiJian <18625010203@163.com> Date: Sun, 11 Aug 2024 17:28:33 +0800 Subject: [PATCH] base1 --- ggpx/pom.xml | 20 + .../ruoyi/ggpx/controller/TaskController.java | 104 +++++ .../main/java/com/ruoyi/ggpx/domain/Task.java | 97 +++++ .../com/ruoyi/ggpx/mapper/TaskMapper.java | 61 +++ .../com/ruoyi/ggpx/service/ITaskService.java | 61 +++ .../ggpx/service/impl/TaskServiceImpl.java | 96 +++++ .../main/resources/mapper/ggpx/TaskMapper.xml | 87 ++++ ruoyi-ui/src/api/ggpx/submit.js | 44 ++ ruoyi-ui/src/api/ggpx/task.js | 44 ++ ruoyi-ui/src/utils/dict/DictData.js | 1 + ruoyi-ui/src/views/ggpx/submit/form.vue | 112 +++++ ruoyi-ui/src/views/ggpx/submit/index.vue | 306 ++++++++++++++ ruoyi-ui/src/views/ggpx/task/index.vue | 332 +++++++++++++++ ruoyi-ui/src/views/ggpx/task/task1.vue | 393 ++++++++++++++++++ ruoyi-ui/src/views/ggpx/task/task2.vue | 210 ++++++++++ ruoyi-ui/src/views/system/user/index.vue | 150 ++++--- sql/ggpx.sql | 0 17 files changed, 2058 insertions(+), 60 deletions(-) create mode 100644 ggpx/pom.xml create mode 100644 ggpx/src/main/java/com/ruoyi/ggpx/controller/TaskController.java create mode 100644 ggpx/src/main/java/com/ruoyi/ggpx/domain/Task.java create mode 100644 ggpx/src/main/java/com/ruoyi/ggpx/mapper/TaskMapper.java create mode 100644 ggpx/src/main/java/com/ruoyi/ggpx/service/ITaskService.java create mode 100644 ggpx/src/main/java/com/ruoyi/ggpx/service/impl/TaskServiceImpl.java create mode 100644 ggpx/src/main/resources/mapper/ggpx/TaskMapper.xml create mode 100644 ruoyi-ui/src/api/ggpx/submit.js create mode 100644 ruoyi-ui/src/api/ggpx/task.js create mode 100644 ruoyi-ui/src/views/ggpx/submit/form.vue create mode 100644 ruoyi-ui/src/views/ggpx/submit/index.vue create mode 100644 ruoyi-ui/src/views/ggpx/task/index.vue create mode 100644 ruoyi-ui/src/views/ggpx/task/task1.vue create mode 100644 ruoyi-ui/src/views/ggpx/task/task2.vue create mode 100644 sql/ggpx.sql diff --git a/ggpx/pom.xml b/ggpx/pom.xml new file mode 100644 index 00000000..78b1a70c --- /dev/null +++ b/ggpx/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.ruoyi + ruoyi + 3.8.8 + + + ggpx + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/ggpx/src/main/java/com/ruoyi/ggpx/controller/TaskController.java b/ggpx/src/main/java/com/ruoyi/ggpx/controller/TaskController.java new file mode 100644 index 00000000..d1e62c21 --- /dev/null +++ b/ggpx/src/main/java/com/ruoyi/ggpx/controller/TaskController.java @@ -0,0 +1,104 @@ +package com.ruoyi.ggpx.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.ggpx.domain.Task; +import com.ruoyi.ggpx.service.ITaskService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 任务列表Controller + * + * @author Jian + * @date 2024-08-11 + */ +@RestController +@RequestMapping("/ggpx/task") +public class TaskController extends BaseController +{ + @Autowired + private ITaskService taskService; + + /** + * 查询任务列表列表 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:list')") + @GetMapping("/list") + public TableDataInfo list(Task task) + { + startPage(); + List list = taskService.selectTaskList(task); + return getDataTable(list); + } + + /** + * 导出任务列表列表 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:export')") + @Log(title = "任务列表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Task task) + { + List list = taskService.selectTaskList(task); + ExcelUtil util = new ExcelUtil(Task.class); + util.exportExcel(response, list, "任务列表数据"); + } + + /** + * 获取任务列表详细信息 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(taskService.selectTaskById(id)); + } + + /** + * 新增任务列表 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:add')") + @Log(title = "任务列表", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Task task) + { + return toAjax(taskService.insertTask(task)); + } + + /** + * 修改任务列表 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:edit')") + @Log(title = "任务列表", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Task task) + { + return toAjax(taskService.updateTask(task)); + } + + /** + * 删除任务列表 + */ + @PreAuthorize("@ss.hasPermi('ggpx:task:remove')") + @Log(title = "任务列表", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(taskService.deleteTaskByIds(ids)); + } +} diff --git a/ggpx/src/main/java/com/ruoyi/ggpx/domain/Task.java b/ggpx/src/main/java/com/ruoyi/ggpx/domain/Task.java new file mode 100644 index 00000000..40319c93 --- /dev/null +++ b/ggpx/src/main/java/com/ruoyi/ggpx/domain/Task.java @@ -0,0 +1,97 @@ +package com.ruoyi.ggpx.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 任务列表对象 ggpx_task + * + * @author Jian + * @date 2024-08-11 + */ +public class Task extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 任务名称 */ + @Excel(name = "任务名称") + private String name; + + /** 任务类型 */ + @Excel(name = "任务类型") + private Integer type; + + /** 填报标准 */ + @Excel(name = "填报标准") + private String base; + + /** 状态 */ + @Excel(name = "状态") + private Integer status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setType(Integer type) + { + this.type = type; + } + + public Integer getType() + { + return type; + } + public void setBase(String base) + { + this.base = base; + } + + public String getBase() + { + return base; + } + public void setStatus(Integer status) + { + this.status = status; + } + + public Integer getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("type", getType()) + .append("base", getBase()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ggpx/src/main/java/com/ruoyi/ggpx/mapper/TaskMapper.java b/ggpx/src/main/java/com/ruoyi/ggpx/mapper/TaskMapper.java new file mode 100644 index 00000000..663c60c3 --- /dev/null +++ b/ggpx/src/main/java/com/ruoyi/ggpx/mapper/TaskMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.ggpx.mapper; + +import java.util.List; +import com.ruoyi.ggpx.domain.Task; + +/** + * 任务列表Mapper接口 + * + * @author Jian + * @date 2024-08-11 + */ +public interface TaskMapper +{ + /** + * 查询任务列表 + * + * @param id 任务列表主键 + * @return 任务列表 + */ + public Task selectTaskById(Long id); + + /** + * 查询任务列表列表 + * + * @param task 任务列表 + * @return 任务列表集合 + */ + public List selectTaskList(Task task); + + /** + * 新增任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + public int insertTask(Task task); + + /** + * 修改任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + public int updateTask(Task task); + + /** + * 删除任务列表 + * + * @param id 任务列表主键 + * @return 结果 + */ + public int deleteTaskById(Long id); + + /** + * 批量删除任务列表 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTaskByIds(Long[] ids); +} diff --git a/ggpx/src/main/java/com/ruoyi/ggpx/service/ITaskService.java b/ggpx/src/main/java/com/ruoyi/ggpx/service/ITaskService.java new file mode 100644 index 00000000..adb1b286 --- /dev/null +++ b/ggpx/src/main/java/com/ruoyi/ggpx/service/ITaskService.java @@ -0,0 +1,61 @@ +package com.ruoyi.ggpx.service; + +import java.util.List; +import com.ruoyi.ggpx.domain.Task; + +/** + * 任务列表Service接口 + * + * @author Jian + * @date 2024-08-11 + */ +public interface ITaskService +{ + /** + * 查询任务列表 + * + * @param id 任务列表主键 + * @return 任务列表 + */ + public Task selectTaskById(Long id); + + /** + * 查询任务列表列表 + * + * @param task 任务列表 + * @return 任务列表集合 + */ + public List selectTaskList(Task task); + + /** + * 新增任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + public int insertTask(Task task); + + /** + * 修改任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + public int updateTask(Task task); + + /** + * 批量删除任务列表 + * + * @param ids 需要删除的任务列表主键集合 + * @return 结果 + */ + public int deleteTaskByIds(Long[] ids); + + /** + * 删除任务列表信息 + * + * @param id 任务列表主键 + * @return 结果 + */ + public int deleteTaskById(Long id); +} diff --git a/ggpx/src/main/java/com/ruoyi/ggpx/service/impl/TaskServiceImpl.java b/ggpx/src/main/java/com/ruoyi/ggpx/service/impl/TaskServiceImpl.java new file mode 100644 index 00000000..4ad8619e --- /dev/null +++ b/ggpx/src/main/java/com/ruoyi/ggpx/service/impl/TaskServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.ggpx.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.ggpx.mapper.TaskMapper; +import com.ruoyi.ggpx.domain.Task; +import com.ruoyi.ggpx.service.ITaskService; + +/** + * 任务列表Service业务层处理 + * + * @author Jian + * @date 2024-08-11 + */ +@Service +public class TaskServiceImpl implements ITaskService +{ + @Autowired + private TaskMapper taskMapper; + + /** + * 查询任务列表 + * + * @param id 任务列表主键 + * @return 任务列表 + */ + @Override + public Task selectTaskById(Long id) + { + return taskMapper.selectTaskById(id); + } + + /** + * 查询任务列表列表 + * + * @param task 任务列表 + * @return 任务列表 + */ + @Override + public List selectTaskList(Task task) + { + return taskMapper.selectTaskList(task); + } + + /** + * 新增任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + @Override + public int insertTask(Task task) + { + task.setCreateTime(DateUtils.getNowDate()); + return taskMapper.insertTask(task); + } + + /** + * 修改任务列表 + * + * @param task 任务列表 + * @return 结果 + */ + @Override + public int updateTask(Task task) + { + task.setUpdateTime(DateUtils.getNowDate()); + return taskMapper.updateTask(task); + } + + /** + * 批量删除任务列表 + * + * @param ids 需要删除的任务列表主键 + * @return 结果 + */ + @Override + public int deleteTaskByIds(Long[] ids) + { + return taskMapper.deleteTaskByIds(ids); + } + + /** + * 删除任务列表信息 + * + * @param id 任务列表主键 + * @return 结果 + */ + @Override + public int deleteTaskById(Long id) + { + return taskMapper.deleteTaskById(id); + } +} diff --git a/ggpx/src/main/resources/mapper/ggpx/TaskMapper.xml b/ggpx/src/main/resources/mapper/ggpx/TaskMapper.xml new file mode 100644 index 00000000..4c40946f --- /dev/null +++ b/ggpx/src/main/resources/mapper/ggpx/TaskMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + select id, name, type, base, status, create_by, create_time, update_by, update_time from ggpx_task + + + + + + and name like concat('%', #{name}, '%') + and type = #{type} + and base = #{base} + and status = #{status} + + + + + + where id = #{id} + + + + insert into ggpx_task + + name, + type, + base, + status, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{type}, + #{base}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update ggpx_task + + name = #{name}, + type = #{type}, + base = #{base}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from ggpx_task where id = #{id} + + + + delete from ggpx_task where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/ggpx/submit.js b/ruoyi-ui/src/api/ggpx/submit.js new file mode 100644 index 00000000..8e2e4577 --- /dev/null +++ b/ruoyi-ui/src/api/ggpx/submit.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询任务填报列表 +export function listSubmit(query) { + return request({ + url: '/ggpx/submit/list', + method: 'get', + params: query + }) +} + +// 查询任务填报详细 +export function getSubmit(id) { + return request({ + url: '/ggpx/submit/' + id, + method: 'get' + }) +} + +// 新增任务填报 +export function addSubmit(data) { + return request({ + url: '/ggpx/submit', + method: 'post', + data: data + }) +} + +// 修改任务填报 +export function updateSubmit(data) { + return request({ + url: '/ggpx/submit', + method: 'put', + data: data + }) +} + +// 删除任务填报 +export function delSubmit(id) { + return request({ + url: '/ggpx/submit/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/ggpx/task.js b/ruoyi-ui/src/api/ggpx/task.js new file mode 100644 index 00000000..c23712e7 --- /dev/null +++ b/ruoyi-ui/src/api/ggpx/task.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询任务列表列表 +export function listTask(query) { + return request({ + url: '/ggpx/task/list', + method: 'get', + params: query + }) +} + +// 查询任务列表详细 +export function getTask(id) { + return request({ + url: '/ggpx/task/' + id, + method: 'get' + }) +} + +// 新增任务列表 +export function addTask(data) { + return request({ + url: '/ggpx/task', + method: 'post', + data: data + }) +} + +// 修改任务列表 +export function updateTask(data) { + return request({ + url: '/ggpx/task', + method: 'put', + data: data + }) +} + +// 删除任务列表 +export function delTask(id) { + return request({ + url: '/ggpx/task/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/utils/dict/DictData.js b/ruoyi-ui/src/utils/dict/DictData.js index 37a60d5c..8028d33b 100644 --- a/ruoyi-ui/src/utils/dict/DictData.js +++ b/ruoyi-ui/src/utils/dict/DictData.js @@ -8,6 +8,7 @@ export default class DictData { constructor(label, value, raw) { this.label = label this.value = value + this.remark = raw.remark this.raw = raw } } diff --git a/ruoyi-ui/src/views/ggpx/submit/form.vue b/ruoyi-ui/src/views/ggpx/submit/form.vue new file mode 100644 index 00000000..e06cb930 --- /dev/null +++ b/ruoyi-ui/src/views/ggpx/submit/form.vue @@ -0,0 +1,112 @@ + + + + + + + + + {{ item.label }} + + + 满分{{ child.maxScore }} + + + + + + + + + + + + + + + 提交 + + + + + + + + + + + + + + + 提交 + + + + + + + + + + diff --git a/ruoyi-ui/src/views/ggpx/submit/index.vue b/ruoyi-ui/src/views/ggpx/submit/index.vue new file mode 100644 index 00000000..283f5684 --- /dev/null +++ b/ruoyi-ui/src/views/ggpx/submit/index.vue @@ -0,0 +1,306 @@ + + + {{ taskData ? taskData.name : '' }} + + + + + + + + + + + + + + + + + + + + + + + + + 新增 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + 关闭 + + + + + + + + + + + + + + + + 修改 + + 删除 + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/ggpx/task/index.vue b/ruoyi-ui/src/views/ggpx/task/index.vue new file mode 100644 index 00000000..786dd5ce --- /dev/null +++ b/ruoyi-ui/src/views/ggpx/task/index.vue @@ -0,0 +1,332 @@ + + + + + + + + 搜索 + 重置 + + + + + + 添加 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + + + {{ scope.row.name }} + + + + + + + 启用 + 禁用 + + + + + 修改 + + 启用 + + 禁用 + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + 任务类型1 + 任务类型2 + + + + + + + + + + diff --git a/ruoyi-ui/src/views/ggpx/task/task1.vue b/ruoyi-ui/src/views/ggpx/task/task1.vue new file mode 100644 index 00000000..f5d3e0fa --- /dev/null +++ b/ruoyi-ui/src/views/ggpx/task/task1.vue @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + 指标体系 + + + {{ node.label }} + + + {{ node.data.isTotal === 1 ? '+' : '' }}{{ node.data.maxScore }} + + + 编辑 + + + 添加 + + + 删除 + + + + + + 其他: {{ totalOtherScore }} + +总分: {{ totalMaxScore }} + 全部: {{ totalOtherScore + totalMaxScore }} + + + 添加1级指标 + + + 保存任务 + + + + + {{ this.isChild ? 2 : 1 }}级指标 + + + + + + + + + + 是 + 否 + + + + + + + + 取 消 + 确 定 + + + + + + + + diff --git a/ruoyi-ui/src/views/ggpx/task/task2.vue b/ruoyi-ui/src/views/ggpx/task/task2.vue new file mode 100644 index 00000000..256907d2 --- /dev/null +++ b/ruoyi-ui/src/views/ggpx/task/task2.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + 字段列表 + + + + + + + + + + + + + + + 添加字段 + + + + 保存任务 + + + + + + + + + diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index ff798945..120a1f3e 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -29,7 +29,8 @@ - + 新增 + >新增 + 修改 + >修改 + 删除 + >删除 + 导入 + >导入 + 导出 + >导出 + - - - - - - + + + + + + 修改 + >修改 + 删除 - handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']"> + >删除 + + handleCommand(command, scope.row)" + v-hasPermi="['system:user:resetPwd', 'system:user:edit']"> 更多 重置密码 + v-hasPermi="['system:user:resetPwd']">重置密码 + 分配角色 + v-hasPermi="['system:user:edit']">分配角色 + @@ -208,36 +223,37 @@ - + - + - + - + - + - + @@ -261,7 +277,8 @@ v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value" - >{{dict.label}} + >{{ dict.label }} + @@ -326,10 +343,13 @@ 将文件拖到此处,或点击上传 - 是否更新已经存在的用户数据 + + 是否更新已经存在的用户数据 仅允许导入xls、xlsx格式文件。 - 下载模板 + 下载模板 +