diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.java index e39a0747f..ed7b2f719 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa; import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.BpmOALeaveCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveRespVO; -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.controller.oa.vo.BpmOALeavePageReqVO; +import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.BpmOALeaveRespVO; +import cn.iocoder.yudao.adminserver.modules.bpm.convert.oa.BpmOALeaveConvert; +import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.BpmOALeaveDO; import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.BpmOALeaveService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -43,27 +43,19 @@ public class BpmOALeaveController { return success(leaveService.createLeave(getLoginUserId(), createReqVO)); } - @DeleteMapping("/cancel") - @ApiOperation("取消请假申请") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) - public CommonResult cancelLeave(@RequestParam("id") Long id) { - leaveService.cancelLeave(id); - return success(true); - } - @GetMapping("/get") @ApiOperation("获得请假申请") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) - public CommonResult getLeave(@RequestParam("id") Long id) { - OALeaveDO leave = leaveService.getLeave(id); - return success(OALeaveConvert.INSTANCE.convert(leave)); + public CommonResult getLeave(@RequestParam("id") Long id) { + BpmOALeaveDO leave = leaveService.getLeave(id); + return success(BpmOALeaveConvert.INSTANCE.convert(leave)); } @GetMapping("/page") @ApiOperation("获得请假申请分页") - public CommonResult> getLeavePage(@Valid OALeavePageReqVO pageVO) { - PageResult pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); - return success(OALeaveConvert.INSTANCE.convertPage(pageResult)); + public CommonResult> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { + PageResult pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); + return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); } } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeavePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeavePageReqVO.java similarity index 95% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeavePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeavePageReqVO.java index 7e83258e6..7b81455a2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeavePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeavePageReqVO.java @@ -12,7 +12,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class OALeavePageReqVO extends PageParam { +public class BpmOALeavePageReqVO extends PageParam { @ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") private Integer result; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeaveRespVO.java similarity index 94% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeaveRespVO.java index 19292b7c9..2b386d8ce 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/OALeaveRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/vo/BpmOALeaveRespVO.java @@ -13,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class OALeaveRespVO extends BpmOALeaveBaseVO { +public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { @ApiModelProperty(value = "请假表单主键", required = true, example = "1024") private Long id; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/OALeaveConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/BpmOALeaveConvert.java similarity index 55% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/OALeaveConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/BpmOALeaveConvert.java index 3c5ae82eb..8c7c1d8bf 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/OALeaveConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/oa/BpmOALeaveConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.adminserver.modules.bpm.convert.oa; import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.BpmOALeaveCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveRespVO; -import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO; +import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.BpmOALeaveRespVO; +import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.BpmOALeaveDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -15,16 +15,16 @@ import java.util.List; * @author 芋艿 */ @Mapper -public interface OALeaveConvert { +public interface BpmOALeaveConvert { - OALeaveConvert INSTANCE = Mappers.getMapper(OALeaveConvert.class); + BpmOALeaveConvert INSTANCE = Mappers.getMapper(BpmOALeaveConvert.class); - OALeaveDO convert(BpmOALeaveCreateReqVO bean); + BpmOALeaveDO convert(BpmOALeaveCreateReqVO bean); - OALeaveRespVO convert(OALeaveDO bean); + BpmOALeaveRespVO convert(BpmOALeaveDO bean); - List convertList(List list); + List convertList(List list); - PageResult convertPage(PageResult page); + PageResult convertPage(PageResult page); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/OALeaveDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/BpmOALeaveDO.java similarity index 97% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/OALeaveDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/BpmOALeaveDO.java index e8b0e94d2..53f8b7d75 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/OALeaveDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/BpmOALeaveDO.java @@ -22,7 +22,7 @@ import org.activiti.engine.runtime.ProcessInstance; @Builder @NoArgsConstructor @AllArgsConstructor -public class OALeaveDO extends BaseDO { +public class BpmOALeaveDO extends BaseDO { /** * 请假表单主键 diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/package-info.java deleted file mode 100644 index 23ebef9c5..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/leave/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * TODO 芋艿:实现请假流程,接入工作流 - */ -package cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/oa/BpmOALeaveMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/oa/BpmOALeaveMapper.java index f16bc6edf..1941744e6 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/oa/BpmOALeaveMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/oa/BpmOALeaveMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO; +import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.BpmOALeavePageReqVO; +import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.BpmOALeaveDO; 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.LambdaQueryWrapperX; @@ -14,16 +14,16 @@ import org.apache.ibatis.annotations.Mapper; * @author 芋道源码 */ @Mapper -public interface BpmOALeaveMapper extends BaseMapperX { +public interface BpmOALeaveMapper extends BaseMapperX { - default PageResult selectPage(Long userId, OALeavePageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(OALeaveDO::getUserId, userId) - .eqIfPresent(OALeaveDO::getResult, reqVO.getResult()) - .eqIfPresent(OALeaveDO::getType, reqVO.getType()) - .likeIfPresent(OALeaveDO::getReason, reqVO.getReason()) - .betweenIfPresent(OALeaveDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(OALeaveDO::getId)); + default PageResult selectPage(Long userId, BpmOALeavePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BpmOALeaveDO::getUserId, userId) + .eqIfPresent(BpmOALeaveDO::getResult, reqVO.getResult()) + .eqIfPresent(BpmOALeaveDO::getType, reqVO.getType()) + .likeIfPresent(BpmOALeaveDO::getReason, reqVO.getReason()) + .betweenIfPresent(BpmOALeaveDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(BpmOALeaveDO::getId)); } } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/BpmOALeaveService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/BpmOALeaveService.java index 11d5d9fb7..62d991d84 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/BpmOALeaveService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/BpmOALeaveService.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa; 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.adminserver.modules.bpm.dal.dataobject.leave.BpmOALeaveDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import javax.validation.Valid; @@ -32,20 +32,13 @@ public interface BpmOALeaveService { */ void updateLeaveResult(Long id, Integer result); - /** - * 删除请假申请 - * - * @param id 编号 - */ - void cancelLeave(Long id); - /** * 获得请假申请 * * @param id 编号 * @return 请假申请 */ - OALeaveDO getLeave(Long id); + BpmOALeaveDO getLeave(Long id); /** * 获得请假申请分页 @@ -54,6 +47,6 @@ public interface BpmOALeaveService { * @param pageReqVO 分页查询 * @return 请假申请分页 */ - PageResult getLeavePage(Long userId, OALeavePageReqVO pageReqVO); + PageResult getLeavePage(Long userId, BpmOALeavePageReqVO pageReqVO); } 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/BpmOALeaveServiceImpl.java similarity index 76% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/OALeaveServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/impl/BpmOALeaveServiceImpl.java index bde8ea620..f55836d6e 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/BpmOALeaveServiceImpl.java @@ -2,14 +2,13 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa.impl; 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.convert.oa.BpmOALeaveConvert; +import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.BpmOALeaveDO; import cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa.BpmOALeaveMapper; import cn.iocoder.yudao.adminserver.modules.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.BpmOALeaveService; import cn.iocoder.yudao.adminserver.modules.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.adminserver.modules.bpm.service.task.dto.BpmProcessInstanceCreateReqDTO; -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -29,7 +28,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Validated -public class OALeaveServiceImpl implements BpmOALeaveService { +public class BpmOALeaveServiceImpl implements BpmOALeaveService { /** * OA 请假对应的流程定义 KEY @@ -47,7 +46,7 @@ public class OALeaveServiceImpl implements BpmOALeaveService { public Long createLeave(Long userId, BpmOALeaveCreateReqVO createReqVO) { // 插入 OA 请假单 long day = DateUtil.betweenDay(createReqVO.getStartTime(), createReqVO.getEndTime(), false); - OALeaveDO leave = OALeaveConvert.INSTANCE.convert(createReqVO).setUserId(userId).setDay(day) + BpmOALeaveDO leave = BpmOALeaveConvert.INSTANCE.convert(createReqVO).setUserId(userId).setDay(day) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); leaveMapper.insert(leave); @@ -59,22 +58,13 @@ public class OALeaveServiceImpl implements BpmOALeaveService { .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(leave.getId()))); // 将工作流的编号,更新到 OA 请假单中 - leaveMapper.updateById(new OALeaveDO().setId(leave.getId()).setProcessInstanceId(processInstanceId)); + leaveMapper.updateById(new BpmOALeaveDO().setId(leave.getId()).setProcessInstanceId(processInstanceId)); return leave.getId(); } @Override public void updateLeaveResult(Long id, Integer result) { - leaveMapper.updateById(new OALeaveDO().setId(id).setResult(result)); - } - - @Override - public void cancelLeave(Long id) { - // TODO 需要重新实现 - // 校验存在 - this.validateLeaveExists(id); - // 删除 - leaveMapper.deleteById(id); + leaveMapper.updateById(new BpmOALeaveDO().setId(id).setResult(result)); } private void validateLeaveExists(Long id) { @@ -84,12 +74,12 @@ public class OALeaveServiceImpl implements BpmOALeaveService { } @Override - public OALeaveDO getLeave(Long id) { + public BpmOALeaveDO getLeave(Long id) { return leaveMapper.selectById(id); } @Override - public PageResult getLeavePage(Long userId, OALeavePageReqVO pageReqVO) { + public PageResult getLeavePage(Long userId, BpmOALeavePageReqVO pageReqVO) { return leaveMapper.selectPage(userId, pageReqVO); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/listener/BpmOALeaveResultListener.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/listener/BpmOALeaveResultListener.java index 2450fee0a..fcc716db9 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/listener/BpmOALeaveResultListener.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/oa/listener/BpmOALeaveResultListener.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.oa.listener; import cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.event.BpmProcessInstanceResultEvent; import cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.event.BpmProcessInstanceResultEventListener; import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.BpmOALeaveService; -import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.impl.OALeaveServiceImpl; +import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.impl.BpmOALeaveServiceImpl; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -21,7 +21,7 @@ public class BpmOALeaveResultListener extends BpmProcessInstanceResultEventListe @Override protected String getProcessDefinitionKey() { - return OALeaveServiceImpl.PROCESS_KEY; + return BpmOALeaveServiceImpl.PROCESS_KEY; } @Override diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmProcessInstanceServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmProcessInstanceServiceImpl.java index d43b6c9d4..7c87142d0 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmProcessInstanceServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmProcessInstanceServiceImpl.java @@ -255,7 +255,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService } // 需要主动查询,因为 instance 只有 id 属性 - ProcessInstance processInstance = getProcessInstance(instance.getId()); + // 另外,此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance + HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); // 更新拓展表 BpmProcessInstanceExtDO instanceExtDO = BpmProcessInstanceConvert.INSTANCE.convert(instance) .setEndTime(new Date()) // 由于 ProcessInstance 里没有办法拿到 endTime,所以这里设置 diff --git a/yudao-admin-ui/src/api/oa/leave.js b/yudao-admin-ui/src/api/bpm/leave.js similarity index 77% rename from yudao-admin-ui/src/api/oa/leave.js rename to yudao-admin-ui/src/api/bpm/leave.js index 3ff4040b7..758389c88 100644 --- a/yudao-admin-ui/src/api/oa/leave.js +++ b/yudao-admin-ui/src/api/bpm/leave.js @@ -9,14 +9,6 @@ export function createLeave(data) { }) } -// 删除请假申请 -export function deleteLeave(id) { - return request({ - url: '/oa/leave/delete?id=' + id, - method: 'delete' - }) -} - // 获得请假申请 export function getLeave(id) { return request({ diff --git a/yudao-admin-ui/src/api/oa/flow.js b/yudao-admin-ui/src/api/oa/flow.js deleted file mode 100644 index 3c28cb418..000000000 --- a/yudao-admin-ui/src/api/oa/flow.js +++ /dev/null @@ -1,9 +0,0 @@ -import request from '@/utils/request' - - -export function getStartForm(processKey) { - return request({ - url: '/workflow/process/definition/getStartForm?processKey='+processKey, - method: 'get' - }) -} diff --git a/yudao-admin-ui/src/api/oa/todo.js b/yudao-admin-ui/src/api/oa/todo.js deleted file mode 100644 index 1a8bc26ab..000000000 --- a/yudao-admin-ui/src/api/oa/todo.js +++ /dev/null @@ -1,91 +0,0 @@ -import request from '@/utils/request' - -// 创建请假申请 -export function createLeave(data) { - return request({ - url: '/oa/leave/create', - method: 'post', - data: data - }) -} - -// 更新请假申请 -export function updateLeave(data) { - return request({ - url: '/oa/leave/update', - method: 'put', - data: data - }) -} - -// 删除请假申请 -export function deleteLeave(id) { - return request({ - url: '/oa/leave/delete?id=' + id, - method: 'delete' - }) -} - -// 获得请假申请 -export function getLeave(id) { - return request({ - url: '/oa/leave/get?id=' + id, - method: 'get' - }) -} - -// 获得待办任务分页 -export function getTodoTaskPage(query) { - return request({ - url: '/workflow/task/todo/page', - method: 'get', - params: query - }) -} - -// 签收任务 -export function claimTask(id) { - return request({ - url: '/workflow/task/claim?id=' + id, - method: 'get' - }) -} - -export function completeTask(data) { - return request({ - url: '/workflow/task/complete', - method: 'post', - data: data - }) -} - -export function taskSteps(data) { - return request({ - url: '/workflow/task/task-steps', - method: 'post', - data: data - }) -} - -export function getTaskFormKey(data) { - return request({ - url: '/workflow/task/formKey', - method: 'post', - data: data - }) -} - -export function processHistorySteps(id) { - return request({ - url: '/workflow/task/process/history-steps?id='+id, - method: 'get' - }) -} - - -export function getHighlightImg(id) { - return request({ - url: '/workflow/task/process/highlight-img?processInstanceId='+id, - method: 'get' - }) -} diff --git a/yudao-admin-ui/src/views/bpm/oa/leave/create.vue b/yudao-admin-ui/src/views/bpm/oa/leave/create.vue index 53a43ef21..4292fe22a 100644 --- a/yudao-admin-ui/src/views/bpm/oa/leave/create.vue +++ b/yudao-admin-ui/src/views/bpm/oa/leave/create.vue @@ -26,8 +26,9 @@