考勤管理
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
99ae44c567
commit
a23f96ca98
@ -27,6 +27,9 @@ public class KqglPageReqVO extends PageParam {
|
||||
@Schema(description = "用户名字", example = "李四")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "标题", example = "李四")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "部门id", example = "18108")
|
||||
private Long deptId;
|
||||
|
||||
|
@ -31,6 +31,10 @@ public class KqglRespVO {
|
||||
@ExcelProperty("用户名字")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "标题", example = "李四")
|
||||
@ExcelProperty("标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18108")
|
||||
@ExcelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
@ -11,6 +11,12 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class KqglSaveReqVO {
|
||||
|
||||
@Schema(description = "流程定义key")
|
||||
private String processDefinitionKey;
|
||||
|
||||
@Schema(description = "当前创建路径")
|
||||
private String curfullpath;
|
||||
|
||||
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
||||
private Map<String, List<Long>> startUserSelectAssignees;
|
||||
|
||||
@ -24,6 +30,10 @@ public class KqglSaveReqVO {
|
||||
@Schema(description = "用户名字", example = "李四")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "标题", example = "李四")
|
||||
@NotNull(message = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18108")
|
||||
@NotNull(message = "部门id不能为空")
|
||||
private Long deptId;
|
||||
|
@ -52,6 +52,10 @@ public class KqglDO extends BaseDO {
|
||||
* 用户名字
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
|
@ -20,6 +20,7 @@ public interface KqglMapper extends BaseMapperX<KqglDO> {
|
||||
default PageResult<KqglDO> selectPage(KqglPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<KqglDO>()
|
||||
.eqIfPresent(KqglDO::getId, reqVO.getId())
|
||||
.eqIfPresent(KqglDO::getTitle, reqVO.getTitle())
|
||||
.eqIfPresent(KqglDO::getUserId, reqVO.getUserId())
|
||||
.likeIfPresent(KqglDO::getUserName, reqVO.getUserName())
|
||||
.eqIfPresent(KqglDO::getDeptId, reqVO.getDeptId())
|
||||
@ -31,6 +32,7 @@ public interface KqglMapper extends BaseMapperX<KqglDO> {
|
||||
default PageResult<KqglDO> selectPage(Long userId, KqglPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<KqglDO>()
|
||||
.eqIfPresent(KqglDO::getId, reqVO.getId())
|
||||
.eqIfPresent(KqglDO::getTitle, reqVO.getTitle())
|
||||
.eqIfPresent(KqglDO::getUserId, userId)
|
||||
.likeIfPresent(KqglDO::getUserName, reqVO.getUserName())
|
||||
.eqIfPresent(KqglDO::getDeptId, reqVO.getDeptId())
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.home.service.kqgl;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.processinstancetodo.ProcessInstanceTodoService;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.clgl.ClglDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
@ -30,14 +31,19 @@ import static cn.iocoder.yudao.module.home.enums.ErrorCodeConstants.*;
|
||||
@Service
|
||||
@Validated
|
||||
public class KqglServiceImpl implements KqglService {
|
||||
public static final String PROCESS_KEY = "kqgl-001";
|
||||
// public static final String PROCESS_KEY = "kqgl-001";
|
||||
public static String PROCESS_KEY = "";
|
||||
|
||||
@Resource
|
||||
private KqglMapper kqglMapper;
|
||||
@Resource
|
||||
private BpmProcessInstanceApi processInstanceApi;
|
||||
@Resource
|
||||
private ProcessInstanceTodoService processInstanceTodoService;
|
||||
|
||||
@Override
|
||||
public Long createKqgl(Long userId, KqglSaveReqVO createReqVO) {
|
||||
PROCESS_KEY = createReqVO.getProcessDefinitionKey();
|
||||
// 插入
|
||||
KqglDO kqgl = BeanUtils.toBean(createReqVO, KqglDO.class)
|
||||
.setUserId(userId).setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
@ -49,6 +55,13 @@ public class KqglServiceImpl implements KqglService {
|
||||
.setStartUserSelectAssignees(createReqVO.getStartUserSelectAssignees()));
|
||||
// 将工作流的编号,更新到 OA 请假单中
|
||||
kqglMapper.updateById(new KqglDO().setId(kqgl.getId()).setProcessInstanceId(processInstanceId));
|
||||
|
||||
processInstanceTodoService.oaCreateProcessInstanceTodo(
|
||||
createReqVO.getTitle(),
|
||||
PROCESS_KEY,
|
||||
processInstanceId,
|
||||
createReqVO.getCurfullpath());
|
||||
|
||||
// 返回
|
||||
return kqgl.getId();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user