mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-29 22:56:40 +08:00
add 添加请假申请示例,添加流程定义文件部署,添加sql菜单
This commit is contained in:
parent
8b1c89da37
commit
b3f40fddb2
@ -97,16 +97,21 @@
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-websocket</artifactId>
|
||||
</dependency>
|
||||
<!-- 短信 用哪个导入哪个依赖 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.aliyun</groupId>-->
|
||||
<!-- <artifactId>dysmsapi20170525</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.tencentcloudapi</groupId>-->
|
||||
<!-- <artifactId>tencentcloud-sdk-java-sms</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-workflow</artifactId>
|
||||
</dependency>
|
||||
<!-- 短信 用哪个导入哪个依赖 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.aliyun</groupId>-->
|
||||
<!-- <artifactId>dysmsapi20170525</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.tencentcloudapi</groupId>-->
|
||||
<!-- <artifactId>tencentcloud-sdk-java-sms</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.demo.domain.vo.TestLeaveVo;
|
||||
import org.dromara.demo.domain.bo.TestLeaveBo;
|
||||
import org.dromara.demo.service.ITestLeaveService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 请假
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/demo/leave")
|
||||
public class TestLeaveController extends BaseController {
|
||||
|
||||
private final ITestLeaveService testLeaveService;
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TestLeaveVo> list(TestLeaveBo bo, PageQuery pageQuery) {
|
||||
return testLeaveService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出请假列表
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:export")
|
||||
@Log(title = "请假", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TestLeaveBo bo, HttpServletResponse response) {
|
||||
List<TestLeaveVo> list = testLeaveService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "请假", TestLeaveVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请假详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TestLeaveVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(testLeaveService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增请假
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:add")
|
||||
@Log(title = "请假", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<TestLeave> add(@Validated(AddGroup.class) @RequestBody TestLeaveBo bo) {
|
||||
return R.ok(testLeaveService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改请假
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:edit")
|
||||
@Log(title = "请假", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<TestLeave> edit(@Validated(EditGroup.class) @RequestBody TestLeaveBo bo) {
|
||||
return R.ok(testLeaveService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除请假
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("demo:leave:remove")
|
||||
@Log(title = "请假", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(testLeaveService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package org.dromara.demo.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 请假对象 test_leave
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("test_leave")
|
||||
public class TestLeave extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 请假天数
|
||||
*/
|
||||
private Integer leaveDays;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package org.dromara.demo.domain.bo;
|
||||
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 请假业务对象 test_leave
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TestLeave.class, reverseConvertGenerate = false)
|
||||
public class TestLeaveBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 请假天数
|
||||
*/
|
||||
@NotNull(message = "请假天数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer leaveDays;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.demo.domain.vo;
|
||||
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.workflow.domain.vo.ProcessInstanceVo;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 请假视图对象 test_leave
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TestLeave.class)
|
||||
public class TestLeaveVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 请假天数
|
||||
*/
|
||||
@ExcelProperty(value = "请假天数")
|
||||
private Integer leaveDays;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 流程实例对象
|
||||
*/
|
||||
private ProcessInstanceVo processInstanceVo;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.demo.mapper;
|
||||
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import org.dromara.demo.domain.vo.TestLeaveVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 请假Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
public interface TestLeaveMapper extends BaseMapperPlus<TestLeave, TestLeaveVo> {
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package org.dromara.demo.service;
|
||||
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import org.dromara.demo.domain.vo.TestLeaveVo;
|
||||
import org.dromara.demo.domain.bo.TestLeaveBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请假Service接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
public interface ITestLeaveService {
|
||||
|
||||
/**
|
||||
* 查询请假
|
||||
*/
|
||||
TestLeaveVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
*/
|
||||
TableDataInfo<TestLeaveVo> queryPageList(TestLeaveBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
*/
|
||||
List<TestLeaveVo> queryList(TestLeaveBo bo);
|
||||
|
||||
/**
|
||||
* 新增请假
|
||||
*/
|
||||
TestLeave insertByBo(TestLeaveBo bo);
|
||||
|
||||
/**
|
||||
* 修改请假
|
||||
*/
|
||||
TestLeave updateByBo(TestLeaveBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除请假信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
package org.dromara.demo.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.workflow.utils.WorkflowUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.demo.domain.bo.TestLeaveBo;
|
||||
import org.dromara.demo.domain.vo.TestLeaveVo;
|
||||
import org.dromara.demo.domain.TestLeave;
|
||||
import org.dromara.demo.mapper.TestLeaveMapper;
|
||||
import org.dromara.demo.service.ITestLeaveService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 请假Service业务层处理
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TestLeaveServiceImpl implements ITestLeaveService {
|
||||
|
||||
private final TestLeaveMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询请假
|
||||
*/
|
||||
@Override
|
||||
public TestLeaveVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TestLeaveVo> queryPageList(TestLeaveBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TestLeave> lqw = buildQueryWrapper(bo);
|
||||
Page<TestLeaveVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
TableDataInfo<TestLeaveVo> build = TableDataInfo.build(result);
|
||||
List<TestLeaveVo> rows = build.getRows();
|
||||
if(CollUtil.isNotEmpty(rows)){
|
||||
List<String> ids = StreamUtils.toList(rows, e -> String.valueOf(e.getId()));
|
||||
WorkflowUtils.setProcessInstanceListVo(rows,ids,"id");
|
||||
}
|
||||
return build;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
*/
|
||||
@Override
|
||||
public List<TestLeaveVo> queryList(TestLeaveBo bo) {
|
||||
LambdaQueryWrapper<TestLeave> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TestLeave> buildQueryWrapper(TestLeaveBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TestLeave> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), TestLeave::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getLeaveDays() != null, TestLeave::getLeaveDays, bo.getLeaveDays());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增请假
|
||||
*/
|
||||
@Override
|
||||
public TestLeave insertByBo(TestLeaveBo bo) {
|
||||
TestLeave add = MapstructUtils.convert(bo, TestLeave.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return add;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改请假
|
||||
*/
|
||||
@Override
|
||||
public TestLeave updateByBo(TestLeaveBo bo) {
|
||||
TestLeave update = MapstructUtils.convert(bo, TestLeave.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0 ? update : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TestLeave entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除请假
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.demo.mapper.TestLeaveMapper">
|
||||
|
||||
</mapper>
|
@ -52,4 +52,11 @@ public interface FlowConstant {
|
||||
*/
|
||||
String LOOP_COUNTER = "loopCounter";
|
||||
|
||||
String ZIP = "ZIP";
|
||||
|
||||
/**
|
||||
* 流程实例对象
|
||||
*/
|
||||
String PROCESS_INSTANCE_VO = "processInstanceVo";
|
||||
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import org.dromara.workflow.domain.vo.ProcessDefinitionVo;
|
||||
import org.dromara.workflow.service.IActProcessDefinitionService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -124,4 +125,16 @@ public class ActProcessDefinitionController extends BaseController {
|
||||
public R<Void> convertToModel(@NotEmpty(message = "流程定义id不能为空") @PathVariable String processDefinitionId) {
|
||||
return toAjax(iActProcessDefinitionService.convertToModel(processDefinitionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过zip或xml部署流程定义
|
||||
*
|
||||
* @param file 文件
|
||||
* @param categoryCode 分类
|
||||
*/
|
||||
@Log(title = "流程定义管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/deployByFile")
|
||||
public R<Void> deployByFile(@RequestParam("file") MultipartFile file, @RequestParam("categoryCode") String categoryCode) {
|
||||
return toAjax(iActProcessDefinitionService.deployByFile(file, categoryCode));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,151 @@
|
||||
package org.dromara.workflow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 流程实例对象 act_hi_procinst
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("act_hi_procinst")
|
||||
public class ActHiProcinst implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "ID_")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "REV_")
|
||||
private Long rev;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "PROC_INST_ID_")
|
||||
private String procInstId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "BUSINESS_KEY_")
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "PROC_DEF_ID_")
|
||||
private String procDefId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "START_TIME_")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "END_TIME_")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "DURATION_")
|
||||
private Long duration;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "START_USER_ID_")
|
||||
private String startUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "START_ACT_ID_")
|
||||
private String startActId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "END_ACT_ID_")
|
||||
private String endActId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "SUPER_PROCESS_INSTANCE_ID_")
|
||||
private String superProcessInstanceId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "DELETE_REASON_")
|
||||
private String deleteReason;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "TENANT_ID_")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "NAME_")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "CALLBACK_ID_")
|
||||
private String callbackId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "CALLBACK_TYPE_")
|
||||
private String callbackType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "REFERENCE_ID_")
|
||||
private String referenceId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "REFERENCE_TYPE_")
|
||||
private String referenceType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "PROPAGATED_STAGE_INST_ID_")
|
||||
private String propagatedStageInstId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(value = "BUSINESS_STATUS_")
|
||||
private String businessStatus;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 流程实例Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-22
|
||||
*/
|
||||
public interface ActHiProcinstMapper extends BaseMapperPlus<ActHiProcinst, ActHiProcinst> {
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package org.dromara.workflow.service;
|
||||
|
||||
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程实例Service接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-22
|
||||
*/
|
||||
public interface IActHiProcinstService {
|
||||
|
||||
/**
|
||||
* 按照业务id查询
|
||||
*
|
||||
* @param businessKeys 业务id
|
||||
* @return 结果
|
||||
*/
|
||||
List<ActHiProcinst> selectByBusinessKeyIn(List<String> businessKeys);
|
||||
|
||||
/**
|
||||
* 按照业务id查询
|
||||
*
|
||||
* @param businessKey 业务id
|
||||
* @return 结果
|
||||
*/
|
||||
ActHiProcinst selectByBusinessKey(String businessKey);
|
||||
}
|
@ -4,6 +4,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.workflow.domain.bo.ProcessDefinitionBo;
|
||||
import org.dromara.workflow.domain.vo.ProcessDefinitionVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -78,4 +79,13 @@ public interface IActProcessDefinitionService {
|
||||
* @return 结果
|
||||
*/
|
||||
boolean convertToModel(String processDefinitionId);
|
||||
|
||||
/**
|
||||
* 通过zip或xml部署流程定义
|
||||
*
|
||||
* @param file 文件
|
||||
* @param categoryCode 分类
|
||||
* @return 结果
|
||||
*/
|
||||
boolean deployByFile(MultipartFile file, String categoryCode);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.workflow.service;
|
||||
|
||||
import org.dromara.workflow.domain.WfCategory;
|
||||
import org.dromara.workflow.domain.vo.WfCategoryVo;
|
||||
import org.dromara.workflow.domain.bo.WfCategoryBo;
|
||||
|
||||
@ -39,4 +40,12 @@ public interface IWfCategoryService {
|
||||
* 校验并批量删除流程分类信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 按照类别编码查询
|
||||
*
|
||||
* @param categoryCode 分类比吗
|
||||
* @return 结果
|
||||
*/
|
||||
WfCategory queryByCategoryCode(String categoryCode);
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package org.dromara.workflow.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.workflow.mapper.ActHiProcinstMapper;
|
||||
import org.dromara.workflow.service.IActHiProcinstService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 流程实例Service业务层处理
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-22
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ActHiProcinstServiceImpl implements IActHiProcinstService {
|
||||
|
||||
private final ActHiProcinstMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 按照业务id查询
|
||||
*
|
||||
* @param businessKeys 业务id
|
||||
*/
|
||||
@Override
|
||||
public List<ActHiProcinst> selectByBusinessKeyIn(List<String> businessKeys) {
|
||||
return TenantHelper.ignore(() ->
|
||||
baseMapper.selectList(new LambdaQueryWrapper<ActHiProcinst>()
|
||||
.in(ActHiProcinst::getBusinessKey, businessKeys)
|
||||
.eq(ActHiProcinst::getTenantId, TenantHelper.getTenantId()))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照业务id查询
|
||||
*
|
||||
* @param businessKey 业务id
|
||||
*/
|
||||
@Override
|
||||
public ActHiProcinst selectByBusinessKey(String businessKey) {
|
||||
return TenantHelper.ignore(() ->
|
||||
baseMapper.selectOne(new LambdaQueryWrapper<ActHiProcinst>()
|
||||
.eq(ActHiProcinst::getBusinessKey, businessKey)
|
||||
.eq(ActHiProcinst::getTenantId, TenantHelper.getTenantId()))
|
||||
);
|
||||
}
|
||||
}
|
@ -15,6 +15,8 @@ import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.workflow.common.constant.FlowConstant;
|
||||
import org.dromara.workflow.domain.WfCategory;
|
||||
import org.dromara.workflow.domain.bo.ProcessDefinitionBo;
|
||||
import org.dromara.workflow.domain.vo.ProcessDefinitionVo;
|
||||
import org.dromara.workflow.service.IActProcessDefinitionService;
|
||||
@ -28,6 +30,7 @@ import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.flowable.engine.repository.ProcessDefinitionQuery;
|
||||
import org.flowable.task.api.history.HistoricTaskInstance;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -35,6 +38,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
/**
|
||||
* 流程定义 服务层实现
|
||||
@ -51,6 +55,8 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
|
||||
private final ProcessMigrationService processMigrationService;
|
||||
|
||||
private final WfCategoryServiceImpl wfCategoryService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -290,4 +296,55 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过zip或xml部署流程定义
|
||||
*
|
||||
* @param file 文件
|
||||
* @param categoryCode 分类
|
||||
*/
|
||||
@Override
|
||||
public boolean deployByFile(MultipartFile file, String categoryCode) {
|
||||
try {
|
||||
|
||||
WfCategory wfCategory = wfCategoryService.queryByCategoryCode(categoryCode);
|
||||
if (wfCategory == null) {
|
||||
throw new ServiceException("流程分类不存在");
|
||||
}
|
||||
// 文件名 = 流程名称-流程key
|
||||
String filename = file.getOriginalFilename();
|
||||
assert filename != null;
|
||||
String[] splitFilename = filename.substring(0, filename.lastIndexOf(".")).split("-");
|
||||
if (splitFilename.length < 2) {
|
||||
throw new ServiceException("流程分类不能为空(文件名 = 流程名称-流程key)");
|
||||
}
|
||||
//流程名称
|
||||
String processName = splitFilename[0];
|
||||
//流程key
|
||||
String processKey = splitFilename[1];
|
||||
// 文件后缀名
|
||||
String suffix = filename.substring(filename.lastIndexOf(".") + 1).toUpperCase();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Deployment deployment;
|
||||
if (FlowConstant.ZIP.equals(suffix)) {
|
||||
// zip
|
||||
deployment = repositoryService.createDeployment()
|
||||
.tenantId(TenantHelper.getTenantId())
|
||||
.addZipInputStream(new ZipInputStream(inputStream)).name(processName).key(processKey).category(categoryCode).deploy();
|
||||
} else {
|
||||
// xml 或 bpmn
|
||||
deployment = repositoryService.createDeployment()
|
||||
.tenantId(TenantHelper.getTenantId())
|
||||
.addInputStream(filename, inputStream).name(processName).key(processKey).category(categoryCode).deploy();
|
||||
}
|
||||
// 更新分类
|
||||
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult();
|
||||
repositoryService.setProcessDefinitionCategory(definition.getId(), categoryCode);
|
||||
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("部署失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ import org.dromara.workflow.mapper.WfCategoryMapper;
|
||||
import org.dromara.workflow.service.IWfCategoryService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
@ -32,7 +31,7 @@ public class WfCategoryServiceImpl implements IWfCategoryService {
|
||||
* 查询流程分类
|
||||
*/
|
||||
@Override
|
||||
public WfCategoryVo queryById(Long id){
|
||||
public WfCategoryVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@ -80,7 +79,7 @@ public class WfCategoryServiceImpl implements IWfCategoryService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WfCategory entity){
|
||||
private void validEntityBeforeSave(WfCategory entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -89,9 +88,19 @@ public class WfCategoryServiceImpl implements IWfCategoryService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照类别编码查询
|
||||
*
|
||||
* @param categoryCode 分类比吗
|
||||
*/
|
||||
@Override
|
||||
public WfCategory queryByCategoryCode(String categoryCode) {
|
||||
return baseMapper.selectOne(new LambdaQueryWrapper<WfCategory>().eq(WfCategory::getCategoryCode, categoryCode));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.workflow.utils;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@ -7,9 +8,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.dromara.common.core.enums.UserStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.core.utils.reflect.ReflectUtils;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
@ -17,9 +20,13 @@ import org.dromara.system.domain.SysUserRole;
|
||||
import org.dromara.system.mapper.SysUserMapper;
|
||||
import org.dromara.system.mapper.SysUserRoleMapper;
|
||||
import org.dromara.workflow.common.constant.FlowConstant;
|
||||
import org.dromara.workflow.common.enums.BusinessStatusEnum;
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
import org.dromara.workflow.domain.vo.MultiInstanceVo;
|
||||
import org.dromara.workflow.domain.vo.ParticipantVo;
|
||||
import org.dromara.workflow.domain.vo.ProcessInstanceVo;
|
||||
import org.dromara.workflow.flowable.cmd.UpdateHiTaskInstCmd;
|
||||
import org.dromara.workflow.service.IActHiProcinstService;
|
||||
import org.flowable.bpmn.converter.BpmnXMLConverter;
|
||||
import org.flowable.bpmn.model.*;
|
||||
import org.flowable.common.engine.api.delegate.Expression;
|
||||
@ -42,6 +49,8 @@ import java.rmi.ServerException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.dromara.workflow.common.constant.FlowConstant.PROCESS_INSTANCE_VO;
|
||||
|
||||
/**
|
||||
* 工作流工具
|
||||
*
|
||||
@ -55,6 +64,7 @@ public class WorkflowUtils {
|
||||
private static final ProcessEngine PROCESS_ENGINE = SpringUtils.getBean(ProcessEngine.class);
|
||||
private static final SysUserMapper SYS_USER_MAPPER = SpringUtils.getBean(SysUserMapper.class);
|
||||
private static final SysUserRoleMapper SYS_USER_ROLE_MAPPER = SpringUtils.getBean(SysUserRoleMapper.class);
|
||||
private static final IActHiProcinstService I_ACT_HI_PROCINST_SERVICE = SpringUtils.getBean(IActHiProcinstService.class);
|
||||
|
||||
/**
|
||||
* bpmnModel转为xml
|
||||
@ -272,6 +282,61 @@ public class WorkflowUtils {
|
||||
HistoricTaskInstance historicTaskInstance = PROCESS_ENGINE.getHistoryService().createHistoricTaskInstanceQuery().taskId(taskId).taskTenantId(TenantHelper.getTenantId()).singleResult();
|
||||
HistoricProcessInstance historicProcessInstance = PROCESS_ENGINE.getHistoryService().createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(historicTaskInstance.getProcessInstanceId()).processInstanceTenantId(TenantHelper.getTenantId()).singleResult();
|
||||
|
||||
return historicProcessInstance.getBusinessStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置流程实例对象
|
||||
*
|
||||
* @param obj 业务对象
|
||||
* @param businessKey 业务id
|
||||
*/
|
||||
public static void setProcessInstanceVo(Object obj, String businessKey) {
|
||||
ActHiProcinst actHiProcinst = I_ACT_HI_PROCINST_SERVICE.selectByBusinessKey(businessKey);
|
||||
if (actHiProcinst == null) {
|
||||
ProcessInstanceVo processInstanceVo = new ProcessInstanceVo();
|
||||
processInstanceVo.setBusinessStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||
ReflectUtils.invokeSetter(obj, PROCESS_INSTANCE_VO, processInstanceVo);
|
||||
return;
|
||||
}
|
||||
ProcessInstanceVo processInstanceVo = BeanUtil.toBean(actHiProcinst, ProcessInstanceVo.class);
|
||||
processInstanceVo.setBusinessStatusName(BusinessStatusEnum.getEumByStatus(processInstanceVo.getBusinessStatus()));
|
||||
ReflectUtils.invokeSetter(obj, PROCESS_INSTANCE_VO, processInstanceVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置流程实例对象
|
||||
*
|
||||
* @param obj 业务对象
|
||||
* @param idList 业务id
|
||||
* @param fieldName 主键属性名称
|
||||
*/
|
||||
public static void setProcessInstanceListVo(Object obj, List<String> idList, String fieldName) {
|
||||
List<ActHiProcinst> actHiProcinstList = I_ACT_HI_PROCINST_SERVICE.selectByBusinessKeyIn(idList);
|
||||
if (obj instanceof Collection) {
|
||||
Collection<?> collection = (Collection<?>) obj;
|
||||
for (Object o : collection) {
|
||||
if (o != null) {
|
||||
try {
|
||||
String fieldValue = ReflectUtils.invokeGetter(o, fieldName).toString();
|
||||
ActHiProcinst actHiProcinst = actHiProcinstList.stream().filter(e -> e.getBusinessKey().equals(fieldValue)).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotEmpty(actHiProcinst)) {
|
||||
ProcessInstanceVo processInstanceVo = BeanUtil.toBean(actHiProcinst, ProcessInstanceVo.class);
|
||||
processInstanceVo.setBusinessStatusName(BusinessStatusEnum.getEumByStatus(processInstanceVo.getBusinessStatus()));
|
||||
ReflectUtils.invokeSetter(o, PROCESS_INSTANCE_VO, processInstanceVo);
|
||||
} else {
|
||||
ProcessInstanceVo processInstanceVo = new ProcessInstanceVo();
|
||||
processInstanceVo.setBusinessStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||
processInstanceVo.setBusinessStatusName(BusinessStatusEnum.getEumByStatus(processInstanceVo.getBusinessStatus()));
|
||||
ReflectUtils.invokeSetter(o, PROCESS_INSTANCE_VO, processInstanceVo);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.workflow.mapper.ActHiProcinstMapper">
|
||||
|
||||
</mapper>
|
@ -37,6 +37,22 @@ CREATE TABLE test_tree
|
||||
PRIMARY KEY (id) USING BTREE
|
||||
) ENGINE = InnoDB COMMENT = '测试树表';
|
||||
|
||||
DROP TABLE if EXISTS test_leave;
|
||||
create table test_leave
|
||||
(
|
||||
id bigint not null comment '主键',
|
||||
title varchar(255) not null comment '标题',
|
||||
leave_days int(10) not null comment '请假天数',
|
||||
remark varchar(255) null comment '备注',
|
||||
create_dept bigint null comment '创建部门',
|
||||
create_by bigint null comment '创建者',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by bigint null comment '更新者',
|
||||
update_time datetime null comment '更新时间',
|
||||
tenant_id varchar(20) default '000000' null comment '租户编号',
|
||||
PRIMARY KEY (id) USING BTREE
|
||||
) ENGINE = InnoDB COMMENT = '请假表';
|
||||
|
||||
INSERT INTO sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, '000000', 108, 'test', '本部门及以下 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 3, sysdate(), NULL);
|
||||
INSERT INTO sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, '000000', 102, 'test1', '仅本人 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 4, sysdate(), NULL);
|
||||
|
||||
@ -56,6 +72,13 @@ INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component,
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1510, '测试树表删除', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1511, '测试树表导出', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1638, '请假申请', 5, 1, 'leave', 'demo/leave/index', 1, 0, 'C', '0', '0', 'demo:leave:list', '#', 103, 1, sysdate(), NULL, NULL, '请假申请菜单');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1639, '请假申请查询', 1638, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:query', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1640, '请假申请新增', 1638, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:add', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1641, '请假申请修改', 1638, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:edit', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1642, '请假申请删除', 1638, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1643, '请假申请导出', 1638, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:export', '#', 103, 1, sysdate(), NULL, NULL, '');
|
||||
|
||||
INSERT INTO sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, '000000', '本部门及以下', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL);
|
||||
INSERT INTO sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, '000000', '仅本人', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user