| | |
| | | import org.springblade.modules.dispatcher.service.IDispatcherService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入dispatcher") |
| | | public R<Dispatcher> detail(Dispatcher dispatcher) { |
| | | Dispatcher detail = dispatcherService.getOne(Condition.getQueryWrapper(dispatcher)); |
| | | public R<DispatcherVO> detail(Dispatcher dispatcher) { |
| | | DispatcherVO detail = dispatcherService.getDispatcherInfo(dispatcher); |
| | | return R.data(detail); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入dispatcher") |
| | | public R submit(@Valid @RequestBody Dispatcher dispatcher) { |
| | | if (null!=dispatcher.getUserIds() && dispatcher.getUserIds()!=""){ |
| | | //计算派遣人数 |
| | | dispatcher.setNum(Arrays.asList(dispatcher.getUserIds().split(",")).size()); |
| | | } |
| | | return R.status(dispatcherService.saveOrUpdate(dispatcher)); |
| | | } |
| | | |