| | |
| | | import org.springblade.modules.dispatcher.service.IDispatcherService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | |
| | | @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)); |
| | | } |
| | | |