| | |
| | | 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)); |
| | | } |
| | | |
| | |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 辖区 |
| | | */ |
| | | private String jurisdiction; |
| | | |
| | | |
| | | /** |
| | | * 派遣人数 |
| | | */ |
| | | private Integer num; |
| | | |
| | | } |
| | |
| | | <if test="dispatcher.deptId!=null"> |
| | | and sd.dept_id = #{dispatcher.deptId} |
| | | </if> |
| | | <if test="dispatcher.userIds!=null and dispatcher.userIds!=''"> |
| | | and sd.user_ids like concat('%', #{dispatcher.userIds},'%') |
| | | </if> |
| | | <if test="dispatcher.name!=null and dispatcher.name!=''"> |
| | | and sd.name like concat('%', #{dispatcher.name},'%') |
| | | </if> |
| | |
| | | private Integer qualified; |
| | | |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("user_id") |
| | | private String userId; |
| | | } |