流程业务表单1:n配置
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
8875c6d0b3
commit
20319bd2c3
@ -78,5 +78,23 @@
|
||||
<version>2.1.0-jdk8-snapshot</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-bpm-biz</artifactId>
|
||||
<version>2.1.0-jdk8-snapshot</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-bpm-biz</artifactId>
|
||||
<version>2.1.0-jdk8-snapshot</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-bpm-biz</artifactId>
|
||||
<version>2.1.0-jdk8-snapshot</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -54,14 +54,6 @@ public class QjglSaveReqVO {
|
||||
@Schema(description = "部门名称", example = "IT 部")
|
||||
private String deptName;
|
||||
|
||||
// @Schema(description = "流程实例的编号", example = "24108")
|
||||
// private String processInstanceId;
|
||||
//
|
||||
// @Schema(description = "申请人的用户编号", example = "14417")
|
||||
// private Long userId;
|
||||
//
|
||||
// @Schema(description = "审批状态", example = "2")
|
||||
// private Integer status;
|
||||
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
||||
private Map<String, List<Long>> startUserSelectAssignees;
|
||||
|
||||
@ -69,4 +61,10 @@ public class QjglSaveReqVO {
|
||||
public boolean isEndTimeValid() {
|
||||
return !getEndTime().isBefore(getStartTime());
|
||||
}
|
||||
|
||||
@Schema(description = "流程定义key")
|
||||
private String processDefinitionKey;
|
||||
|
||||
@Schema(description = "当前创建路径")
|
||||
private String curfullpath;
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.home.service.qjgl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.processinstancetodo.ProcessInstanceTodoDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.mysql.processinstancetodo.ProcessInstanceTodoMapper;
|
||||
import cn.iocoder.yudao.module.home.controller.admin.qjgl.vo.*;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.qjgl.QjglDO;
|
||||
import cn.iocoder.yudao.module.home.dal.mysql.qjgl.QjglMapper;
|
||||
@ -27,14 +29,18 @@ import static cn.iocoder.yudao.module.home.enums.ErrorCodeConstants.*;
|
||||
@Validated
|
||||
public class QjglServiceImpl implements QjglService {
|
||||
|
||||
public static final String PROCESS_KEY = "pch-qjgl-001";
|
||||
public static String PROCESS_KEY = "";
|
||||
@Resource
|
||||
private QjglMapper qjglMapper;
|
||||
|
||||
@Resource
|
||||
private BpmProcessInstanceApi processInstanceApi;
|
||||
|
||||
@Resource
|
||||
private ProcessInstanceTodoMapper processInstanceTodoMapper;
|
||||
@Override
|
||||
public Long createQjgl(Long userId,QjglSaveReqVO createReqVO) {
|
||||
PROCESS_KEY = createReqVO.getProcessDefinitionKey();
|
||||
// 插入
|
||||
QjglDO qjgl = BeanUtils.toBean(createReqVO, QjglDO.class)
|
||||
.setUserId(userId).setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
@ -49,6 +55,15 @@ public class QjglServiceImpl implements QjglService {
|
||||
|
||||
// 将工作流的编号,更新到 OA 请假单中
|
||||
qjglMapper.updateById(new QjglDO().setId(qjgl.getId()).setProcessInstanceId(processInstanceId));
|
||||
|
||||
//同步更新流程待办库
|
||||
ProcessInstanceTodoDO todo = new ProcessInstanceTodoDO();
|
||||
todo.setTitle( createReqVO.getTitle() );
|
||||
todo.setProcessKey( PROCESS_KEY );
|
||||
todo.setProcessInstanceId( processInstanceId );
|
||||
todo.setFormCustomCreatePath( createReqVO.getCurfullpath() );
|
||||
todo.setStatus( 0 );
|
||||
processInstanceTodoMapper.insert(todo);
|
||||
// 返回
|
||||
return qjgl.getId();
|
||||
}
|
||||
|
@ -182,7 +182,8 @@ public class CodegenEngine {
|
||||
config.setResourceMode(TemplateConfig.ResourceMode.CLASSPATH);
|
||||
this.templateEngine = new VelocityEngine(config);
|
||||
// 设置 javaxEnable,按照是否使用 JDK17 来判断
|
||||
this.jakartaEnable = SystemUtil.getJavaInfo().isJavaVersionAtLeast(1700); // 17.00 * 100
|
||||
//this.jakartaEnable = SystemUtil.getJavaInfo().isJavaVersionAtLeast(1700); // 17.00 * 100
|
||||
this.jakartaEnable = false;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
|
Loading…
Reference in New Issue
Block a user