From c947ca74c0c2676fd4463b516e2eccf502295192 Mon Sep 17 00:00:00 2001 From: xiaoyu <316612174@qq.com> Date: Mon, 7 Apr 2025 11:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E8=AE=A1=E5=88=92=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/domain/RollingPlan.java | 17 ++++++++++++++ .../system/service/IRollingPlanService.java | 8 +++++++ .../service/impl/RollingPlanServiceImpl.java | 13 +++++++++++ sql/gss/滚动计划.sql | 22 ++++++++++++++++++- 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RollingPlan.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RollingPlan.java index c7283f8..04f00d3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RollingPlan.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RollingPlan.java @@ -154,5 +154,22 @@ public class RollingPlan extends BaseEntity @Excel(name = "锁定周次") private String lockWeek; + /** 审核状态(0待审核 1已审核 2已驳回) */ + @Excel(name = "审核状态", readConverterExp = "0=待审核,1=已审核,2=已驳回") + private String auditStatus; + + /** 审核人 */ + @Excel(name = "审核人") + private String auditBy; + + /** 审核时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date auditTime; + + /** 审核备注 */ + @Excel(name = "审核备注") + private String auditRemark; + // getter/setter 方法略 } \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRollingPlanService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRollingPlanService.java index af11c17..8a8d0c6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRollingPlanService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRollingPlanService.java @@ -42,6 +42,14 @@ public interface IRollingPlanService */ public int updateRollingPlan(RollingPlan rollingPlan); + /** + * 审核滚动计划 + * + * @param rollingPlan 滚动计划信息 + * @return 结果 + */ + public int auditRollingPlan(RollingPlan rollingPlan); + /** * 批量删除滚动计划 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RollingPlanServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RollingPlanServiceImpl.java index ce17381..c527d31 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RollingPlanServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RollingPlanServiceImpl.java @@ -92,4 +92,17 @@ public class RollingPlanServiceImpl implements IRollingPlanService { return rollingPlanMapper.deleteRollingPlanByPlanId(planId); } + + /** + * 审核滚动计划 + * + * @param rollingPlan 滚动计划信息 + * @return 结果 + */ + @Override + public int auditRollingPlan(RollingPlan rollingPlan) + { + rollingPlan.setAuditTime(DateUtils.getNowDate()); + return rollingPlanMapper.updateRollingPlan(rollingPlan); + } } \ No newline at end of file diff --git a/sql/gss/滚动计划.sql b/sql/gss/滚动计划.sql index 565be66..97e4534 100644 --- a/sql/gss/滚动计划.sql +++ b/sql/gss/滚动计划.sql @@ -75,4 +75,24 @@ values('滚动计划导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'sys -- 修改菜单权限标识 UPDATE sys_menu SET perms = REPLACE(perms, 'system:rollingPlan:', 'system:rolling-plan:') -WHERE perms LIKE 'system:rollingPlan:%'; \ No newline at end of file +WHERE perms LIKE 'system:rollingPlan:%'; + + +------------------------------------------------------------------------- +-- 添加审核相关字段 +ALTER TABLE `rolling_plan` +ADD COLUMN `audit_status` char(1) DEFAULT '0' COMMENT '审核状态(0待审核 1已审核 2已驳回)' AFTER `status`, +ADD COLUMN `audit_by` varchar(64) DEFAULT '' COMMENT '审核人' AFTER `audit_status`, +ADD COLUMN `audit_time` datetime DEFAULT NULL COMMENT '审核时间' AFTER `audit_by`, +ADD COLUMN `audit_remark` varchar(500) DEFAULT NULL COMMENT '审核备注' AFTER `audit_time`; + +-- 添加审核菜单权限 +INSERT INTO sys_menu(menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +VALUES ('滚动计划审核', '3', '1', 'rollingPlanAudit', 'system/rollingPlan/audit', 1, 0, 'C', '0', '0', 'system:rollingPlan:audit', 'audit', 'admin', sysdate(), '', null, ''); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 审核按钮权限 +INSERT INTO sys_menu(menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +VALUES ('滚动计划审核操作', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:rollingPlan:audit:operation', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file