| | |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.common.cache.UserCache; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.flow.core.entity.BladeFlow; |
| | | import org.springblade.modules.application.entity.CarEntity; |
| | | import org.springblade.modules.applicationDelay.entity.ApplicationDelayEntity; |
| | | import org.springblade.modules.applicationDelay.vo.ApplicationDelayVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.applicationCarChange.entity.ApplicationCarChangeEntity; |
| | |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(applicationCarChangeService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | //=======================工作流=================================== |
| | | /** |
| | | * 开始任务 |
| | | * |
| | | * @param entity 车辆变更信息 |
| | | */ |
| | | @PostMapping("start-process") |
| | | public R startProcess(@RequestBody ApplicationCarChangeEntity entity, @RequestBody CarEntity carEntity) { |
| | | return R.status(applicationCarChangeService.startProcess(entity,carEntity)); |
| | | } |
| | | |
| | | /** |
| | | * 完成任务 |
| | | * |
| | | * @param flow 延期信息 |
| | | */ |
| | | @PostMapping("complete-task") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "完成任务", notes = "传入流程信息") |
| | | public R completeTask(@ApiParam("任务信息") @RequestBody BladeFlow flow) { |
| | | return R.status(applicationCarChangeService.completeTask(flow)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param businessId 主键 |
| | | */ |
| | | @GetMapping("/process-detail") |
| | | public R<ApplicationCarChangeVO> detail(Long businessId) { |
| | | ApplicationCarChangeEntity detail = applicationCarChangeService.getById(businessId); |
| | | ApplicationCarChangeVO applicationCarChangeVO = applicationCarChangeService.getVo(detail); |
| | | applicationCarChangeVO.getFlow().setAssigneeName(UserCache.getUser(detail.getCreateUser()).getName()); |
| | | return R.data(applicationCarChangeVO); |
| | | } |
| | | |
| | | } |