diff --git a/sql/ruoyi-vue-pro.sql b/sql/ruoyi-vue-pro.sql index 939382327..b05d99db3 100644 --- a/sql/ruoyi-vue-pro.sql +++ b/sql/ruoyi-vue-pro.sql @@ -269,12 +269,6 @@ CREATE TABLE `oa_leave` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='请假申请表'; --- ---------------------------- --- Records of oa_leave --- ---------------------------- -BEGIN; -INSERT INTO `oa_leave` VALUES (1, '659d1c4f-3943-11ec-854f-3e6e3d9df205', 2, 'admin', '2021-10-01 00:00:00', '2021-10-30 00:00:00', '1', NULL, '2021-10-12 00:00:00', '1', '2021-10-30 13:36:57', '1', '2021-10-30 13:41:53', b'0'); -COMMIT; -- ---------------------------- -- Table structure for pay_app @@ -842,9 +836,10 @@ INSERT INTO `sys_dict_data` VALUES (85, 202, '强制登出', '202', 'sys_login_t INSERT INTO `sys_dict_data` VALUES (86, 0, '病假', '1', 'oa_leave_type', 0, NULL, '1', '2021-09-21 22:35:28', '1', '2021-09-21 14:59:27', b'0'); INSERT INTO `sys_dict_data` VALUES (87, 1, '事假', '2', 'oa_leave_type', 0, NULL, '1', '2021-09-21 22:36:11', '1', '2021-09-21 14:59:27', b'0'); INSERT INTO `sys_dict_data` VALUES (88, 2, '婚假', '3', 'oa_leave_type', 0, NULL, '1', '2021-09-21 22:36:38', '1', '2021-09-21 14:59:27', b'0'); -INSERT INTO `sys_dict_data` VALUES (89, 0, '处理中', '1', 'oa_leave_status', 0, NULL, '1', '2021-09-21 22:46:46', '1', '2021-10-12 22:12:20', b'0'); -INSERT INTO `sys_dict_data` VALUES (90, 1, '流程结束', '2', 'oa_leave_status', 0, NULL, '1', '2021-09-21 22:47:03', '1', '2021-10-12 22:12:58', b'0'); -INSERT INTO `sys_dict_data` VALUES (91, 2, '完成', '3', 'oa_leave_status', 0, NULL, '1', '2021-09-21 22:47:25', '1', '2021-10-12 14:13:06', b'1'); +INSERT INTO `sys_dict_data` VALUES (89, 0, '处理中', '1', 'flow_status', 0, NULL, '1', '2021-09-21 22:46:46', '1', '2021-10-12 22:12:20', b'0'); +INSERT INTO `sys_dict_data` VALUES (90, 1, '审批通过', '2', 'flow_status', 0, NULL, '1', '2021-09-21 22:47:03', '1', '2021-10-12 22:12:58', b'0'); +INSERT INTO `sys_dict_data` VALUES (91, 2, '完成', '3', 'flow_status', 0, NULL, '1', '2021-09-21 22:47:25', '1', '2021-10-12 14:13:06', b'1'); +INSERT INTO `sys_dict_data` VALUES (92, 2, '审批未通过', '3', 'flow_status', 0, NULL, '1', '2021-09-21 22:47:25', '1', '2021-10-12 14:13:06', b'0'); COMMIT; -- ---------------------------- @@ -894,7 +889,7 @@ INSERT INTO `sys_dict_type` VALUES (114, '短信接收状态', 'sys_sms_receive_ INSERT INTO `sys_dict_type` VALUES (115, '错误码的类型', 'sys_error_code_type', 0, NULL, '1', '2021-04-21 00:06:30', '1', '2021-04-13 22:07:12', b'0'); INSERT INTO `sys_dict_type` VALUES (116, '登陆日志的类型', 'sys_login_type', 0, '登陆日志的类型', '1', '2021-10-06 00:50:46', '1', '2021-10-06 00:50:46', b'0'); INSERT INTO `sys_dict_type` VALUES (117, '请假类型', 'oa_leave_type', 0, NULL, '1', '2021-09-21 22:34:33', '1', '2021-09-21 15:00:38', b'0'); -INSERT INTO `sys_dict_type` VALUES (118, '请假流程状态', 'oa_leave_status', 0, NULL, '1', '2021-09-21 22:46:04', '1', '2021-09-21 15:00:38', b'0'); +INSERT INTO `sys_dict_type` VALUES (118, '流程状态', 'flow_status', 0, NULL, '1', '2021-09-21 22:46:04', '1', '2021-09-21 15:00:38', b'0'); COMMIT; -- ---------------------------- @@ -1191,14 +1186,14 @@ INSERT INTO `sys_menu` VALUES (1113, '错误码更新', 'system:error-code:updat INSERT INTO `sys_menu` VALUES (1114, '错误码删除', 'system:error-code:delete', 3, 4, 1110, '', '', '', 0, '', '2021-04-13 21:46:42', '', '2021-04-13 22:09:51', b'0'); INSERT INTO `sys_menu` VALUES (1115, '错误码导出', 'system:error-code:export', 3, 5, 1110, '', '', '', 0, '', '2021-04-13 21:46:42', '', '2021-04-13 22:09:55', b'0'); INSERT INTO `sys_menu` VALUES (1116, '日志中心', '', 2, 8, 2, 'log-center', 'log', 'infra/skywalking/log', 0, '1', '2021-04-26 22:35:45', '1', '2021-04-26 22:37:25', b'0'); -INSERT INTO `sys_menu` VALUES (1118, '请假查询', '', 2, 0, 5, 'oa/leave', 'user', 'oa/leave/index', 0, '', '2021-09-20 08:51:03', '1', '2021-10-12 22:19:02', b'0'); +INSERT INTO `sys_menu` VALUES (1118, '我的请假', '', 2, 0, 5, 'oa/leave', 'user', 'oa/leave/index', 0, '', '2021-09-20 08:51:03', '1', '2021-10-12 22:19:02', b'0'); INSERT INTO `sys_menu` VALUES (1119, '请假申请查询', 'oa:leave:query', 3, 1, 1118, '', '', '', 0, '', '2021-09-20 08:51:03', '', '2021-09-20 08:51:03', b'0'); INSERT INTO `sys_menu` VALUES (1120, '请假申请创建', 'oa:leave:create', 3, 2, 1118, '', '', '', 0, '', '2021-09-20 08:51:03', '', '2021-09-20 08:51:03', b'0'); INSERT INTO `sys_menu` VALUES (1121, '请假申请更新', 'oa:leave:update', 3, 3, 1118, '', '', '', 0, '', '2021-09-20 08:51:03', '', '2021-09-20 08:51:03', b'0'); INSERT INTO `sys_menu` VALUES (1122, '请假申请删除', 'oa:leave:delete', 3, 4, 1118, '', '', '', 0, '', '2021-09-20 08:51:03', '', '2021-09-20 08:51:03', b'0'); INSERT INTO `sys_menu` VALUES (1123, '请假申请导出', 'oa:leave:export', 3, 5, 1118, '', '', '', 0, '', '2021-09-20 08:51:03', '', '2021-09-20 08:51:03', b'0'); -INSERT INTO `sys_menu` VALUES (1124, '待办任务', '', 2, 2, 5, 'todo', 'edit', 'oa/todo/index', 0, '1', '2021-09-20 22:10:09', '1', '2021-09-21 23:17:12', b'0'); -INSERT INTO `sys_menu` VALUES (1125, '流程申请', '', 2, 3, 5, 'flow', 'form', 'oa/flow/index', 0, '1', '2021-10-23 22:10:09', '1', '2021-10-23 23:17:12', b'0'); +INSERT INTO `sys_menu` VALUES (1124, '待办请假', '', 2, 2, 5, 'todo', 'edit', 'oa/todo/index', 0, '1', '2021-09-20 22:10:09', '1', '2021-09-21 23:17:12', b'0'); +INSERT INTO `sys_menu` VALUES (1125, '已办请假', '', 2, 3, 5, 'flow', 'form', 'oa/flow/index', 0, '1', '2021-10-23 22:10:09', '1', '2021-10-23 23:17:12', b'0'); COMMIT; -- ---------------------------- @@ -1290,10 +1285,11 @@ CREATE TABLE `sys_post` ( -- ---------------------------- BEGIN; INSERT INTO `sys_post` VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2021-03-14 20:39:03', b'0'); -INSERT INTO `sys_post` VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2021-03-14 20:39:05', b'0'); +INSERT INTO `sys_post` VALUES (2, 'pm', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2021-03-14 20:39:05', b'0'); INSERT INTO `sys_post` VALUES (3, 'hr', '人力资源', 3, 0, '', 'admin', '2021-01-05 17:03:48', '', '2021-01-05 17:03:48', b'0'); INSERT INTO `sys_post` VALUES (4, 'user', '普通员工', 4, 0, '', 'admin', '2021-01-05 17:03:48', '', '2021-01-05 17:03:48', b'0'); INSERT INTO `sys_post` VALUES (5, 'test', '测试岗位', 0, 1, '132', '', '2021-01-07 15:07:44', '', '2021-01-07 15:10:35', b'1'); +INSERT INTO `sys_post` VALUES (6, 'bm', '部门经理', 0, 1, '部门经理', '', '2021-01-07 15:07:44', '', '2021-01-07 15:10:35', b'0'); COMMIT; -- ---------------------------- @@ -1721,6 +1717,9 @@ INSERT INTO `sys_user` VALUES (103, 'yuanma', '', '源码', NULL, 100, NULL, 'yu INSERT INTO `sys_user` VALUES (104, 'test', '$2a$10$.TOFpaIiI3PzEwkGrNq0Eu6Cc3rOqJMxTb1DqeSEM8StxaGPBRKoi', '测试号', NULL, 100, '[]', '', '15601691200', 1, '', 0, '', NULL, '', '2021-01-21 02:13:53', '1', '2021-03-14 22:36:38', b'0'); INSERT INTO `sys_user` VALUES (105, 'hradmin', '$2a$10$JEhJOL25X1eMnFfR3PILo.MoAljf29YukpL2w6H9GvVGjmqOCuh.O', 'hr-mgr', 'hr 管理员', 100, '[3]', '', '', 1, '', 0, '127.0.0.1', '2021-10-30 13:41:04', '1', '2021-09-25 16:50:41', NULL, '2021-10-30 13:41:04', b'0'); INSERT INTO `sys_user` VALUES (106, 'zhijiantianya', '$2a$10$Y0hSfV2udA8quqMeWukhTuHEoKpQ5tDhclG8WUWSOH7o/MGw185Ti', '芋道源码', '', NULL, NULL, '', '', 3, 'https://portrait.gitee.com/uploads/avatars/user/0/176_zhijiantianya_1578913741.png', 0, '', NULL, NULL, '2021-09-28 09:40:59', NULL, '2021-09-28 09:40:59', b'0'); +INSERT INTO `sys_user` VALUES (107, 'projectmgr', '$2a$10$Ky9dvdSU9xWCJYzPL8/pk.Tyx2WkDlxVFTSJWOYGCYqT6x1cTsIU2', 'project-mgr', '项目经理', 100, '[2]', '', '', 1, '', 0, '127.0.0.1', '2021-10-30 13:41:04', '1', '2021-09-25 16:50:41', NULL, '2021-10-30 13:41:04', b'0'); +INSERT INTO `sys_user` VALUES (108, 'depmgr', '$2a$10$q/w2v.3pnjjERehoOvHCYOl0I0MvAEw54Bt5ch09IUuwPVsIr3.oa', 'bm', '部门经理', 100, '[6]', '', '', 1, '', 0, '127.0.0.1', '2021-10-30 13:41:04', '1', '2021-09-25 16:50:41', NULL, '2021-10-30 13:41:04', b'0'); +INSERT INTO `sys_user` VALUES (109, 'normal', '$2a$10$q3lIAjzzaNWuTGN2kIURfOzTkc2iPXvAM1n425sNcE5w3asymw2hK', 'general', '普通用户', 100, '[4]', '', '', 1, '', 0, '127.0.0.1', '2021-10-30 13:41:04', '1', '2021-09-25 16:50:41', NULL, '2021-10-30 13:41:04', b'0'); COMMIT; -- ---------------------------- @@ -1752,6 +1751,9 @@ INSERT INTO `sys_user_role` VALUES (6, 100, 2, '', NULL, '', NULL, b'0'); INSERT INTO `sys_user_role` VALUES (7, 104, 101, '', NULL, '', NULL, b'0'); INSERT INTO `sys_user_role` VALUES (8, 106, 1, NULL, '2021-09-28 09:40:59', NULL, '2021-09-28 09:40:59', b'0'); INSERT INTO `sys_user_role` VALUES (9, 105, 1, '1', '2021-10-30 13:40:48', '1', '2021-10-30 13:40:48', b'0'); +INSERT INTO `sys_user_role` VALUES (10, 107, 1, '1', '2021-10-30 13:40:48', '1', '2021-10-30 13:40:48', b'0'); +INSERT INTO `sys_user_role` VALUES (11, 108, 1, '1', '2021-10-30 13:40:48', '1', '2021-10-30 13:40:48', b'0'); +INSERT INTO `sys_user_role` VALUES (12, 109, 1, '1', '2021-10-30 13:40:48', '1', '2021-10-30 13:40:48', b'0'); COMMIT; -- ---------------------------- diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/OALeaveController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/OALeaveController.java index 0b741384f..0c8861a28 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/OALeaveController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/OALeaveController.java @@ -36,25 +36,21 @@ public class OALeaveController { @Resource private OALeaveService leaveService; - @PostMapping("/create") - @ApiOperation("创建请假申请") - @PreAuthorize("@ss.hasPermission('oa:leave:create')") - public CommonResult createLeave(@Valid @RequestBody OALeaveCreateReqVO createReqVO) { - // TODO @芋艿:processKey 自己去理解下。不过得把 leave 变成枚举 - // TODO @芋艿 该方法没有用到, 是前一个版本的, 可以删掉。 - createReqVO.setProcessKey("leave"); - return success(leaveService.createLeave(createReqVO)); - } + @PostMapping("/form-key/create") @ApiOperation("创建外置请假申请") public CommonResult createFormKeyLeave(@Valid @RequestBody OALeaveCreateReqVO createReqVO) { - // TODO @芋艿:processKey 自己去理解下。不过得把 formkey 变成枚举 - // TODO @芋艿 : processKey 是 bpmn 中定义的id, 提交业务表单时候, 需要启动流程, 或许从前台传更合适 - createReqVO.setProcessKey("leave-formkey"); + // processKey 前台传入 return success(leaveService.createLeave(createReqVO)); } + @GetMapping("/getLeaveApplyMembers") + @ApiOperation("获取本人请假申请流程中审批人员,可先检查这些人员是否存在") + public CommonResult getLeaveApplyMembers() { + return success(leaveService.getLeaveApplyMembers()); + } + @PutMapping("/update") @ApiOperation("更新请假申请") @PreAuthorize("@ss.hasPermission('oa:leave:update')") diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveApplyMembersVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveApplyMembersVO.java new file mode 100644 index 000000000..448f4f6fb --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveApplyMembersVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@ApiModel("请假申请审批人员 Response VO") +@Data +@Builder +@EqualsAndHashCode +@ToString +public class OALeaveApplyMembersVO { + + @ApiModelProperty(value = "部门的hr") + private String hr; + + @ApiModelProperty(value = "部门的项目经理") + private String pm; + + @ApiModelProperty(value = "部门的部门经理") + private String bm; +} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveCreateReqVO.java index 28df3344c..6cb5538f3 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveCreateReqVO.java @@ -3,11 +3,21 @@ package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo; import lombok.*; import io.swagger.annotations.*; +import java.util.Map; + @ApiModel("请假申请创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OALeaveCreateReqVO extends OALeaveBaseVO { + /** + * 对应 bpmn 文件 的 id + */ + @ApiModelProperty(value = "流程key") private String processKey; + + + @ApiModelProperty(value = "流程用户任务的变量") + private Map taskVariables; } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/FlowStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/FlowStatusEnum.java new file mode 100644 index 000000000..68f10fe2d --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/FlowStatusEnum.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.adminserver.modules.bpm.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 流程状态 + */ +@Getter +@AllArgsConstructor +public enum FlowStatusEnum { + + HANDLE(1, "处理中"), + + PASS(2, "审批通过"), + + REJECTED(3, "审批不通过"); + + /** + * 状态 + */ + private final Integer status; + + + /** + * 描述 + */ + private final String desc; +} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/oa/OAErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/oa/OAErrorCodeConstants.java index 33495c13d..9dbc4fc1b 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/oa/OAErrorCodeConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/enums/oa/OAErrorCodeConstants.java @@ -10,4 +10,10 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; */ public interface OAErrorCodeConstants { ErrorCode LEAVE_NOT_EXISTS = new ErrorCode(1003001001, "请假申请不存在"); + ErrorCode PM_POST_NOT_EXISTS = new ErrorCode(1003001002, "项目经理岗位未设置"); + ErrorCode DEPART_PM_POST_NOT_EXISTS = new ErrorCode(1003001003, "部门的项目经理不存在"); + ErrorCode BM_POST_NOT_EXISTS = new ErrorCode(1003001004, "部门经理岗位未设置"); + ErrorCode DEPART_BM_POST_NOT_EXISTS = new ErrorCode(1003001005, "部门的部门经理不存在"); + ErrorCode HR_POST_NOT_EXISTS = new ErrorCode(1003001006, "HR岗位未设置"); + ErrorCode DAY_LEAVE_ERROR = new ErrorCode(1003001007, "请假天数必须大于0"); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/ReportBackEndProcessor.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/LeaveApplyEndProcessor.java similarity index 61% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/ReportBackEndProcessor.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/LeaveApplyEndProcessor.java index 2966c5e7e..bfdbcae2c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/ReportBackEndProcessor.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/LeaveApplyEndProcessor.java @@ -2,16 +2,21 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa; import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO; import cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa.OALeaveMapper; +import cn.iocoder.yudao.adminserver.modules.bpm.enums.FlowStatusEnum; import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.ExecutionListener; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.Objects; -// TODO @jason:类注释 + +/** + * 请假流程结束流程监听处理服务, 根据请假申请审批通过,还是未通过, 更新请假表单 + */ @Component -public class ReportBackEndProcessor implements ExecutionListener { +public class LeaveApplyEndProcessor implements ExecutionListener { @Resource private OALeaveMapper leaveMapper; @@ -20,10 +25,14 @@ public class ReportBackEndProcessor implements ExecutionListener { @Transactional(rollbackFor = Exception.class) public void notify(DelegateExecution delegateExecution) { final String businessKey = delegateExecution.getProcessInstanceBusinessKey(); + final Object approved = delegateExecution.getVariable("approved"); OALeaveDO updateDo = new OALeaveDO(); updateDo.setId(Long.valueOf(businessKey)); - // TODO @json:status 要枚举起来,不要出现 magic number - updateDo.setStatus(2); + if (Objects.equals(approved, true)) { + updateDo.setStatus(FlowStatusEnum.PASS.getStatus()); + }else{ + updateDo.setStatus(FlowStatusEnum.REJECTED.getStatus()); + } leaveMapper.updateById(updateDo); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/OALeaveService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/OALeaveService.java index 21c75eaea..e3590d43d 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/OALeaveService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/OALeaveService.java @@ -1,10 +1,7 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExportReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO; +import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.*; import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -73,4 +70,11 @@ public interface OALeaveService { */ List getLeaveList(OALeaveExportReqVO exportReqVO); + + + /** + * 获取本人请假申请流程中审批人员 + * @return 包括,本人部门的项目经理, 部门经理, HR + */ + OALeaveApplyMembersVO getLeaveApplyMembers(); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/OALeaveServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/OALeaveServiceImpl.java index 7627f9d8d..42c5840c4 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/OALeaveServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/OALeaveServiceImpl.java @@ -1,13 +1,19 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa.impl; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExportReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; +import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.*; import cn.iocoder.yudao.adminserver.modules.bpm.convert.oa.OALeaveConvert; import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO; import cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa.OALeaveMapper; +import cn.iocoder.yudao.adminserver.modules.bpm.enums.FlowStatusEnum; import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.OALeaveService; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserBaseVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept.SysPostMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user.SysUserMapper; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import org.activiti.api.task.model.Task; @@ -20,9 +26,11 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import javax.validation.constraints.NotNull; import java.util.*; -import static cn.iocoder.yudao.adminserver.modules.bpm.enums.oa.OAErrorCodeConstants.LEAVE_NOT_EXISTS; +import static cn.iocoder.yudao.adminserver.modules.bpm.enums.oa.OAErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.POST_CODE_DUPLICATE; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -46,23 +54,33 @@ public class OALeaveServiceImpl implements OALeaveService { @Resource private TaskRuntime taskRuntime; + @Resource + private SysPostMapper sysPostMapper; + + @Resource + private SysUserMapper sysUserMapper; + @Override @Transactional(rollbackFor = Exception.class) public Long createLeave(OALeaveCreateReqVO createReqVO) { // 插入 OA 请假单 OALeaveDO leave = OALeaveConvert.INSTANCE.convert(createReqVO); - leave.setStatus(1); + leave.setStatus(FlowStatusEnum.HANDLE.getStatus()); // TODO @jason:应该是存储 userId?? leave.setUserId(SecurityFrameworkUtils.getLoginUser().getUsername()); leaveMapper.insert(leave); - + Date startTime = createReqVO.getStartTime(); + Date endTime = createReqVO.getEndTime(); + long day = DateUtil.betweenDay(startTime, endTime, false); + if (day <= 0) { + throw ServiceExceptionUtil.exception(DAY_LEAVE_ERROR); + } + Map taskVariables = createReqVO.getTaskVariables(); + taskVariables.put("day", day); // 创建工作流 - Map variables = new HashMap<>(); - // 如何得到部门领导人,暂时写死 - variables.put("deptLeader", "admin"); // TODO @芋艿:需要部门的负责人 Long id = leave.getId(); String businessKey = String.valueOf(id); - ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(createReqVO.getProcessKey(), businessKey, variables); + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(createReqVO.getProcessKey(), businessKey, taskVariables); String processInstanceId = processInstance.getProcessInstanceId(); // 将工作流的编号,更新到 OA 请假单中 @@ -104,9 +122,6 @@ public class OALeaveServiceImpl implements OALeaveService { this.validateLeaveExists(id); // 删除 leaveMapper.deleteById(id); - // TODO @jason:需要调用 runtimeService 的 delete 方法,删除??? - // TOTO @芋道源码 目前页面暂时没有实现基于业务表单的删除, 该代码自动生成的。 - // TODO @芋道源码 我理解提交流程后,是不允许删除的? , 只能在流程处理中作废流程 } private void validateLeaveExists(Long id) { @@ -135,4 +150,64 @@ public class OALeaveServiceImpl implements OALeaveService { return leaveMapper.selectList(exportReqVO); } + + /** + * 获取本人请假申请流程中审批人员 + * @return 包括,本人部门的项目经理, 部门经理, hr + */ + @Override + public OALeaveApplyMembersVO getLeaveApplyMembers() { + final Long id = SecurityFrameworkUtils.getLoginUser().getId(); + //项目经理 + //TODO jason 定义enum + SysPostDO pmPostDO = sysPostMapper.selectByCode("pm"); + if (Objects.isNull(pmPostDO)) { + throw ServiceExceptionUtil.exception(PM_POST_NOT_EXISTS); + } + SysUserDO userDO = sysUserMapper.selectById(id); + Set postIds = new HashSet<>(8); + postIds.add( pmPostDO.getId()); + SysUserBaseVO baseVO = new SysUserBaseVO(); + baseVO.setDeptId(userDO.getDeptId()) + .setPostIds(postIds); + final List pmUsers = sysUserMapper.selectListByBaseVO(baseVO); + if (CollUtil.isEmpty(pmUsers)) { + throw ServiceExceptionUtil.exception(DEPART_PM_POST_NOT_EXISTS); + } + + //部门经理 + SysPostDO bmPostDO = sysPostMapper.selectByCode("bm"); + if (Objects.isNull(bmPostDO)) { + throw ServiceExceptionUtil.exception(BM_POST_NOT_EXISTS); + } + userDO = sysUserMapper.selectById(id); + postIds = new HashSet<>(8); + postIds.add( bmPostDO.getId()); + baseVO = new SysUserBaseVO(); + baseVO.setDeptId(userDO.getDeptId()) + .setPostIds(postIds); + final List bmUsers = sysUserMapper.selectListByBaseVO(baseVO); + if (CollUtil.isEmpty(bmUsers)) { + throw ServiceExceptionUtil.exception(DEPART_BM_POST_NOT_EXISTS); + } + //人事 + SysPostDO hrPostDO = sysPostMapper.selectByCode("hr"); + if (Objects.isNull(hrPostDO)) { + throw ServiceExceptionUtil.exception(HR_POST_NOT_EXISTS); + } + userDO = sysUserMapper.selectById(id); + postIds = new HashSet<>(8); + postIds.add( hrPostDO.getId()); + baseVO = new SysUserBaseVO(); + baseVO.setDeptId(userDO.getDeptId()) + .setPostIds(postIds); + final List hrUsers = sysUserMapper.selectListByBaseVO(baseVO); + if (CollUtil.isEmpty(hrUsers)) { + throw ServiceExceptionUtil.exception(DEPART_BM_POST_NOT_EXISTS); + } + return OALeaveApplyMembersVO.builder().pm(pmUsers.get(0).getUsername()) + .bm(bmUsers.get(0).getUsername()) + .hr(hrUsers.get(0).getUsername()).build(); + } + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/TaskService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/TaskService.java index 5fb06e996..c358d8706 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/TaskService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/TaskService.java @@ -6,22 +6,50 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import javax.servlet.http.HttpServletResponse; import java.util.List; -// TODO @芋艿:前缀,注释 -// TODO @json:类和方法的注释。咱是开源项目,有注释,大家才能更容易读懂 + +/** + * 用户任务服务接口 + */ public interface TaskService { + + /** + * 获取当前用户的待办任务, 分页 + */ PageResult getTodoTaskPage(TodoTaskPageReqVO pageReqVO); + + /** + * 签收任务 + * @param taskId 用户任务id + */ void claimTask(String taskId); + /** + * 办理完成用户任务 + * @param taskReq 任务参数, 包含任务的参数,和 评论 + */ void completeTask(TaskReqVO taskReq); -// void flowImage(String taskId, HttpServletResponse response); + + /** + * 根据任务id, 查询已经完成的用户任务,未完成的用户任务 + * @param taskQuery 查询参数 一般 taskId + */ TaskHandleVO getTaskSteps(TaskQueryReqVO taskQuery); + /** + * 根据流程实例id, 查询历史用户任务,包括已完成,未完成 + * @param processInstanceId 流程实例id + */ List getHistorySteps(String processInstanceId); + + /** + * 获取用户任务的 formKey, 对应外置表单, 需要根据formKey 对应业务表单 + * @param taskQuery 查询参数 ,一般taskId + */ TodoTaskRespVO getTaskFormKey(TaskQueryReqVO taskQuery); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/impl/TaskServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/impl/TaskServiceImpl.java index 399033000..70c29e866 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/impl/TaskServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/workflow/impl/TaskServiceImpl.java @@ -89,7 +89,7 @@ public class TaskServiceImpl implements TaskService { /** * 工作流,完成 userTask, 完成用户任务 一般传入参数 1。是否同意(variables). 2. 评论(comment) * variables 变量名 和 评论 由前台传入 - * @param taskReq + * @param taskReq 任务参数 */ @Override @Transactional @@ -103,25 +103,7 @@ public class TaskServiceImpl implements TaskService { .build()); } -// @Override -// public void flowImage(String taskId, HttpServletResponse response) { -// -// final Task task = taskRuntime.task(taskId); -// BpmnModel bpmnModel = repositoryService.getBpmnModel(task.getProcessDefinitionId()); -// final Process process = bpmnModel.getMainProcess(); -// ProcessDefinitionEntity processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult(); -// List activeActivityIds = runtimeService.getActiveActivityIds(executionId); -// List highLightedFlows = getHighLightedFlows(processDefinition, processInstance.getId()); -// ProcessDiagramGenerator diagramGenerator = processEngineConfiguration.getProcessDiagramGenerator(); -// InputStream imageStream =diagramGenerator.generateDiagram(bpmnModel, "png", activeActivityIds, highLightedFlows); -// -// // 输出资源内容到相应对象 -// byte[] b = new byte[1024]; -// int len; -// while ((len = imageStream.read(b, 0, 1024)) != -1) { -// response.getOutputStream().write(b, 0, len); -// } -// } + @Override public TaskHandleVO getTaskSteps(TaskQueryReqVO taskQuery) { @@ -148,8 +130,7 @@ public class TaskServiceImpl implements TaskService { // TODO @jason:可以考虑把 comments 读取后,在统一调用 convert 拼接。另外 Comment 是废弃的类,有没其它可以使用的哈? List comments = activitiTaskService.getTaskComments(instance.getTaskId()); if (!CollUtil.isEmpty(comments)) { - // TODO @jason:IDEA 在 t.getFullMessage() 有提示告警,可以解决下。 - stepVO.setComment(Optional.ofNullable(comments.get(0)).map(t->t.getFullMessage()).orElse("")); + stepVO.setComment(Optional.ofNullable(comments.get(0)).map(Comment::getFullMessage).orElse("")); } steps.add(stepVO); }); @@ -188,45 +169,11 @@ public class TaskServiceImpl implements TaskService { return respVO; } -// private List getHighLightedFlows(ProcessDefinitionEntity processDefinition, String processInstanceId) { -// -// List highLightedFlows = new ArrayList(); -// List historicActivityInstances = historyService -// .createHistoricActivityInstanceQuery() -// .processInstanceId(processInstanceId) -// .orderByHistoricActivityInstanceStartTime().asc().list(); -// -// List historicActivityInstanceList = new ArrayList(); -// for (HistoricActivityInstance hai : historicActivityInstances) { -// historicActivityInstanceList.add(hai.getActivityId()); -// } - -// // add current activities to list -// List highLightedActivities = runtimeService.getActiveActivityIds(processInstanceId); -// historicActivityInstanceList.addAll(highLightedActivities); - - // activities and their sequence-flows -// for (ActivityImpl activity : processDefinition.getActivities()) { -// int index = historicActivityInstanceList.indexOf(activity.getId()); -// -// if (index >= 0 && index + 1 < historicActivityInstanceList.size()) { -// List pvmTransitionList = activity -// .getOutgoingTransitions(); -// for (PvmTransition pvmTransition : pvmTransitionList) { -// String destinationFlowId = pvmTransition.getDestination().getId(); -// if (destinationFlowId.equals(historicActivityInstanceList.get(index + 1))) { -// highLightedFlows.add(pvmTransition.getId()); -// } -// } -// } -// } -// return highLightedFlows; -// } - @Override public void getHighlightImg(String processInstanceId, HttpServletResponse response) { // 查询历史 + //TODO 云扬四海 貌似流程结束后,点击审批进度会报错 HistoricProcessInstance hpi = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); // 如果有结束时间 if (hpi == null) { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java index 548352e2b..0b0a6dbe2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserBaseVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; @@ -8,9 +10,11 @@ import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUs import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserPageReqVO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.logging.log4j.util.Strings; import java.util.Collection; import java.util.List; +import java.util.Optional; @Mapper public interface SysUserMapper extends BaseMapperX { @@ -52,5 +56,13 @@ public interface SysUserMapper extends BaseMapperX { return selectList(new QueryWrapperX().like("username", username)); } + default List selectListByBaseVO(SysUserBaseVO reqVO) { + return selectList(new QueryWrapperX().likeIfPresent("username", reqVO.getUsername()) + .likeIfPresent("nickname", reqVO.getNickname()) + .eq("status", CommonStatusEnum.ENABLE.getStatus()) + .eq("dept_id", reqVO.getDeptId()) + .likeIfPresent("post_ids", Optional.ofNullable(reqVO.getPostIds()).map(t -> Strings.join(t, ',')).orElse(""))); + } + } diff --git a/yudao-admin-server/src/main/resources/mybatis-config/mybatis-config.xml b/yudao-admin-server/src/main/resources/mybatis-config/mybatis-config.xml index 4f290bc98..1359ff321 100644 --- a/yudao-admin-server/src/main/resources/mybatis-config/mybatis-config.xml +++ b/yudao-admin-server/src/main/resources/mybatis-config/mybatis-config.xml @@ -6,6 +6,7 @@ + diff --git a/yudao-admin-server/src/main/resources/processes/leave-formkey.bpmn b/yudao-admin-server/src/main/resources/processes/leave-formkey.bpmn deleted file mode 100644 index d14ce9ba3..000000000 --- a/yudao-admin-server/src/main/resources/processes/leave-formkey.bpmn +++ /dev/null @@ -1,152 +0,0 @@ - - - - 外置表单 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 请求被驳回后员工可以选择继续申请,或者取消本次申请 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/yudao-admin-server/src/main/resources/processes/leave-update.bpmn b/yudao-admin-server/src/main/resources/processes/leave-update.bpmn new file mode 100644 index 000000000..fcaa1fcb4 --- /dev/null +++ b/yudao-admin-server/src/main/resources/processes/leave-update.bpmn @@ -0,0 +1,177 @@ + + + + + + + + + + ${day>3} + + + ${day<=3} + + + + + + + + + + ${approved =='false'} + + + + + + + ${approved =='false'} + + + + ${approved =='true'} + + + ${approved =='true'} + + + + + + + + ${approved =='false'} + + + + + + ${approved =='true'} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yudao-admin-ui/src/api/oa/leave.js b/yudao-admin-ui/src/api/oa/leave.js index afb4e03d9..b6a8eb00b 100644 --- a/yudao-admin-ui/src/api/oa/leave.js +++ b/yudao-admin-ui/src/api/oa/leave.js @@ -51,6 +51,13 @@ export function createFormKeyLeave(data) { }) } +export function getLeaveApplyMembers() { + return request({ + url: '/oa/leave/getLeaveApplyMembers', + method: 'get' + }) +} + // 导出请假申请 Excel export function exportLeaveExcel(query) { return request({ diff --git a/yudao-admin-ui/src/router/index.js b/yudao-admin-ui/src/router/index.js index 5b24fa503..518f8e82a 100644 --- a/yudao-admin-ui/src/router/index.js +++ b/yudao-admin-ui/src/router/index.js @@ -133,8 +133,8 @@ export const constantRoutes = [ { path: 'leave/apply', component: (resolve) => require(['@/views/oa/leave/apply/index'], resolve), - name: '请假表单', - meta: { title: '请假表单', icon: 'form' } + name: '请假表单-申请', + meta: { title: '请假表单-申请', icon: 'form' } } ] }, @@ -145,52 +145,10 @@ export const constantRoutes = [ redirect: 'noredirect', children: [ { - path: 'leave/approve-leader', - component: (resolve) => require(['@/views/oa/leave/approve-leader/index'], resolve), - name: '请假表单-部门领导审批', - meta: { title: '请假表单-部门领导审批', icon: 'form' } - } - ] - }, - { - path: '/flow', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'leave/approve-hr', - component: (resolve) => require(['@/views/oa/leave/approve-hr/index'], resolve), - name: '请假表单-人事审批', - meta: { title: '请假表单-人事审批', icon: 'form' } - } - ] - }, - { - path: '/flow', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'leave/confirm', - component: (resolve) => require(['@/views/oa/leave/confirm/index'], resolve), - name: '请假表单-确认', - meta: { title: '请假表单-确认', icon: 'form' } - } - ] - }, - { - path: '/flow', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'leave/modify', - component: (resolve) => require(['@/views/oa/leave/modify/index'], resolve), - name: '请假表单-修改', - meta: { title: '请假表单-修改', icon: 'form' } + path: 'leave/approve', + component: (resolve) => require(['@/views/oa/leave/approve/index'], resolve), + name: '请假表单-审批', + meta: { title: '请假表单-审批', icon: 'form' } } ] } diff --git a/yudao-admin-ui/src/utils/dict.js b/yudao-admin-ui/src/utils/dict.js index f57cb396d..83d99ed05 100644 --- a/yudao-admin-ui/src/utils/dict.js +++ b/yudao-admin-ui/src/utils/dict.js @@ -31,7 +31,7 @@ export const DICT_TYPE = { TOOL_CODEGEN_TEMPLATE_TYPE: 'tool_codegen_template_type', - OA_LEAVE_STATUS: 'oa_leave_status', + OA_LEAVE_STATUS: 'flow_status', OA_LEAVE_TYPE: 'oa_leave_type' } diff --git a/yudao-admin-ui/src/views/oa/flow/index.vue b/yudao-admin-ui/src/views/oa/flow/index.vue index b0fb8f51e..1551bf567 100644 --- a/yudao-admin-ui/src/views/oa/flow/index.vue +++ b/yudao-admin-ui/src/views/oa/flow/index.vue @@ -1,7 +1,7 @@ @@ -25,12 +25,12 @@ export default { }, methods: { - leave() { - getStartForm('leave-formkey').then(response => { - const route = response.data; - this.$router.replace(route); - }); - } + // leave() { + // getStartForm('leave-formkey').then(response => { + // const route = response.data; + // this.$router.replace(route); + // }); + // } } }; diff --git a/yudao-admin-ui/src/views/oa/leave/apply/index.vue b/yudao-admin-ui/src/views/oa/leave/apply/index.vue index 41a3bd93a..6a9752e9e 100644 --- a/yudao-admin-ui/src/views/oa/leave/apply/index.vue +++ b/yudao-admin-ui/src/views/oa/leave/apply/index.vue @@ -38,7 +38,7 @@ diff --git a/yudao-admin-ui/src/views/oa/leave/approve-hr/index.vue b/yudao-admin-ui/src/views/oa/leave/approve/index.vue similarity index 92% rename from yudao-admin-ui/src/views/oa/leave/approve-hr/index.vue rename to yudao-admin-ui/src/views/oa/leave/approve/index.vue index 45fd4adb8..0857fb1ae 100644 --- a/yudao-admin-ui/src/views/oa/leave/approve-hr/index.vue +++ b/yudao-admin-ui/src/views/oa/leave/approve/index.vue @@ -62,11 +62,11 @@ diff --git a/yudao-admin-ui/src/views/oa/leave/index.vue b/yudao-admin-ui/src/views/oa/leave/index.vue index bb46460bc..70ae3fd92 100644 --- a/yudao-admin-ui/src/views/oa/leave/index.vue +++ b/yudao-admin-ui/src/views/oa/leave/index.vue @@ -49,6 +49,9 @@ + + 新增 + @@ -155,7 +158,7 @@