| | |
| | | |
| | | /** |
| | | * 班制表(主表)-分页查询 |
| | | * |
| | | * @param mdcShift |
| | | * @param pageNo |
| | | * @param pageSize |
| | |
| | | @GetMapping("/queryPageList") |
| | | public Result<?> queryPageList(MdcShift mdcShift, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){ |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | Page page = new Page(pageNo, pageSize); |
| | | IPage<MdcShift> mdcShiftIPage = mdcShiftService.queryPageList(page, mdcShift); |
| | | return Result.OK(mdcShiftIPage); |
| | |
| | | |
| | | /** |
| | | * 班制表(主表)-新增(班制名重复校验/状态默认为启用) |
| | | * |
| | | * @param mdcShift |
| | | * @return |
| | | */ |
| | | @AutoLog("班制表(主表)-新增") |
| | | @ApiOperation(value = "班制表(主表)-新增(班制名重复校验/状态默认为启用)", notes = "班制表(主表)-新增(班制名重复校验/状态默认为启用)") |
| | | @PostMapping("/addShift") |
| | | public Result<?> addShift(@RequestBody MdcShift mdcShift){ |
| | | public Result<?> addShift(@RequestBody MdcShift mdcShift) { |
| | | Boolean flag = mdcShiftService.addShift(mdcShift); |
| | | return flag ? Result.OK("新增成功") : Result.error("班制名重复"); |
| | | } |
| | | |
| | | /** |
| | | * 班制表(主表)-修改 |
| | | * |
| | | * @param mdcShift |
| | | * @return |
| | | */ |
| | | @AutoLog("班制表(主表)-修改") |
| | | @ApiOperation(value = "班制表(主表)-修改", notes = "班制表(主表)-修改") |
| | | @PutMapping("/editShift") |
| | | public Result<?> editShift(@RequestBody MdcShift mdcShift){ |
| | | public Result<?> editShift(@RequestBody MdcShift mdcShift) { |
| | | Boolean flag = mdcShiftService.editShift(mdcShift); |
| | | return flag ? Result.OK("修改成功") : Result.error("数据库无该数据"); |
| | | } |
| | | |
| | | /** |
| | | * 根据id修改 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @AutoLog("班制表(主表)-根据id修改状态") |
| | | @ApiOperation(value = "班制表(主表)-根据id修改状态", notes = "班制表(主表)-根据id修改状态") |
| | | @PutMapping("/changeStatus") |
| | | public Result<?> changeStatus(@RequestBody JSONObject jsonObject){ |
| | | public Result<?> changeStatus(@RequestBody JSONObject jsonObject) { |
| | | Boolean flag = mdcShiftService.changeStatus(jsonObject); |
| | | return flag ? Result.OK("修改成功") : Result.error("数据库无该数据"); |
| | | } |
| | | |
| | | /** |
| | | * 班制表(主表)-根据id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog("班制表(主表)-根据id删除") |
| | | @ApiOperation(value = "班制表(主表)-根据id删除", notes = "班制表(主表)-根据id删除") |
| | | @DeleteMapping("/deleteShift") |
| | | public Result<?> deleteShift(@RequestParam(name = "id", required = true) String id){ |
| | | public Result<?> deleteShift(@RequestParam(name = "id", required = true) String id) { |
| | | return mdcShiftService.deleteShift(id); |
| | | } |
| | | |
| | |
| | | */ |
| | | @AutoLog("班制表(主表)-加载班制下拉选项") |
| | | @ApiOperation(value = "班制表(主表)-加载班制下拉选项", notes = "班制表(主表)-加载班制下拉选项") |
| | | @GetMapping("/deleteShift") |
| | | @GetMapping("/initShiftList") |
| | | public Result<List<Map<String, String>>> initShiftList() { |
| | | List<Map<String, String>> result = mdcShiftService.initShiftList(); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | /** |
| | | * 设置默认班制 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog("班制表(主表)-设置默认班制") |
| | | @ApiOperation(value = "班制表(主表)-设置默认班制", notes = "班制表(主表)-设置默认班制") |
| | | @PostMapping("/changeDefaultShift") |
| | | public Result<?> changeDefaultShift(@RequestParam(name = "id", required = true) String id) { |
| | | boolean result = mdcShiftService.changeDefaultShift(id); |
| | | return result ? Result.OK("设置成功!") : Result.error("设置失败!"); |
| | | } |
| | | } |