|
|
@ -2,6 +2,9 @@ package com.hnac.hzims.operational.duty.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; |
|
|
|
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; |
|
|
|
import com.hnac.hzims.operational.duty.service.IImsDutyMainService; |
|
|
|
import com.hnac.hzims.operational.duty.service.IImsDutyMainService; |
|
|
|
import com.hnac.hzims.operational.duty.vo.ChangeDutyMainVo; |
|
|
|
import com.hnac.hzims.operational.duty.vo.ChangeDutyMainVo; |
|
|
@ -34,75 +37,75 @@ import java.util.List; |
|
|
|
@Api(value = "值班信息主表controller", tags = "值班信息主表相关操作") |
|
|
|
@Api(value = "值班信息主表controller", tags = "值班信息主表相关操作") |
|
|
|
public class ImsDutyMainController extends BladeController { |
|
|
|
public class ImsDutyMainController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
private final IImsDutyMainService imsDutyMainService; |
|
|
|
private final IImsDutyMainService imsDutyMainService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 详情 |
|
|
|
* 详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@GetMapping("/detail") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity") |
|
|
|
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity") |
|
|
|
public R<ImsDutyMainEntity> detail(ImsDutyMainEntity imsDutyMain) { |
|
|
|
public R<ImsDutyMainEntity> detail(ImsDutyMainEntity imsDutyMain) { |
|
|
|
ImsDutyMainEntity detail = imsDutyMainService.getOne(Condition.getQueryWrapper(imsDutyMain)); |
|
|
|
ImsDutyMainEntity detail = imsDutyMainService.getOne(Condition.getQueryWrapper(imsDutyMain)); |
|
|
|
return R.data(detail); |
|
|
|
return R.data(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页 代码自定义代号 |
|
|
|
* 分页 代码自定义代号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@GetMapping("/list") |
|
|
|
@GetMapping("/list") |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "分页", notes = "传入imsDutyMain") |
|
|
|
@ApiOperation(value = "分页", notes = "传入imsDutyMain") |
|
|
|
public R<IPage<ImsDutyMainEntity>> list(ImsDutyMainEntity imsDutyMain, Query query) { |
|
|
|
public R<IPage<ImsDutyMainEntity>> list(ImsDutyMainEntity imsDutyMain, Query query) { |
|
|
|
IPage<ImsDutyMainEntity> pages = imsDutyMainService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyMain)); |
|
|
|
IPage<ImsDutyMainEntity> pages = imsDutyMainService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyMain)); |
|
|
|
return R.data(pages); |
|
|
|
return R.data(pages); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 根据时间查询所有值班信息列表(不分页) |
|
|
|
* 根据时间查询所有值班信息列表(不分页) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@GetMapping("/getList") |
|
|
|
@GetMapping("/getList") |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain") |
|
|
|
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain") |
|
|
|
public R getlists(@ApiParam(value = "值班时间") @Valid @RequestParam("dutyDate") String dutyDate, @ApiParam(value = "申请人ID") Long personId) { |
|
|
|
public R getlists(@ApiParam(value = "值班时间") @Valid @RequestParam("dutyDate") String dutyDate, @ApiParam(value = "申请人ID") Long personId) { |
|
|
|
return imsDutyMainService.getByDateListAll(dutyDate, personId); |
|
|
|
return imsDutyMainService.getByDateListAll(dutyDate, personId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新增或修改 代码自定义代号 |
|
|
|
* 新增或修改 代码自定义代号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/submit") |
|
|
|
@PostMapping("/submit") |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain") |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain") |
|
|
|
public R submit(@Valid @RequestBody ImsDutyMainEntity imsDutyMain) { |
|
|
|
public R submit(@Valid @RequestBody ImsDutyMainEntity imsDutyMain) { |
|
|
|
return imsDutyMainService.saveOrUpdateImsDutyMain(imsDutyMain); |
|
|
|
return imsDutyMainService.saveOrUpdateImsDutyMain(imsDutyMain); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除 代码自定义代号 |
|
|
|
* 删除 代码自定义代号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/remove") |
|
|
|
@PostMapping("/remove") |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
return imsDutyMainService.deleteV2(Func.toLongList(ids)); |
|
|
|
return imsDutyMainService.deleteV2(Func.toLongList(ids)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 排班管理 |
|
|
|
* 排班管理 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/scheduling") |
|
|
|
@PostMapping("/scheduling") |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
@ApiOperation(value = "排班管理", notes = "") |
|
|
|
@ApiOperation(value = "排班管理", notes = "") |
|
|
|
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) { |
|
|
|
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) { |
|
|
|
if (null == imsSchedulingVo.getCreateDept()) { |
|
|
|
if (null == imsSchedulingVo.getCreateDept()) { |
|
|
|
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId())); |
|
|
|
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId())); |
|
|
|
} |
|
|
|
} |
|
|
|
return imsDutyMainService.getSchedulingV2(imsSchedulingVo); |
|
|
|
return imsDutyMainService.getSchedulingV2(imsSchedulingVo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
// /**
|
|
|
|
// * 排班管理
|
|
|
|
// * 排班管理
|
|
|
@ -116,81 +119,89 @@ public class ImsDutyMainController extends BladeController { |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return imsDutyMainService.getScheduling(imsSchedulingVo);
|
|
|
|
// return imsDutyMainService.getScheduling(imsSchedulingVo);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
/** |
|
|
|
|
|
|
|
* 查询排班 |
|
|
|
/** |
|
|
|
*/ |
|
|
|
* 查询排班 |
|
|
|
@PostMapping("/scheduling/list") |
|
|
|
*/ |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
@PostMapping("/scheduling/list") |
|
|
|
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month") |
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
public R schedulingList(@Valid @ApiParam(value = "年份", required = true) @RequestParam int year, |
|
|
|
@OperationAnnotation(moduleName = "值班管理", title = "排班计划", |
|
|
|
@ApiParam(value = "月份", required = true) @RequestParam int month, |
|
|
|
operatorType = OperatorType.MOBILE, |
|
|
|
@ApiParam(value = "机构Id", required = true) Long deptId) { |
|
|
|
businessType = BusinessType.GENCODE, action = "查询排班") |
|
|
|
if (null == deptId) { |
|
|
|
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month") |
|
|
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
|
|
|
public R schedulingList(@Valid @ApiParam(value = "年份", required = true) @RequestParam int year, |
|
|
|
} |
|
|
|
@ApiParam(value = "月份", required = true) @RequestParam int month, |
|
|
|
return imsDutyMainService.getSchedulingListV2(year, month, deptId); |
|
|
|
@ApiParam(value = "机构Id", required = true) Long deptId) { |
|
|
|
} |
|
|
|
if (null == deptId) { |
|
|
|
|
|
|
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
|
|
|
/** |
|
|
|
} |
|
|
|
* 根据值班id查询值班人员 |
|
|
|
return imsDutyMainService.getSchedulingListV2(year, month, deptId); |
|
|
|
*/ |
|
|
|
} |
|
|
|
@PostMapping("/person") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
/** |
|
|
|
@ApiOperation(value = "根据值班id查询人员", notes = "传id") |
|
|
|
* 根据值班id查询值班人员 |
|
|
|
public R person(@ApiParam(value = "值班Id", required = true) @RequestParam Long id) { |
|
|
|
*/ |
|
|
|
return imsDutyMainService.getMainIdByPersonV2(id); |
|
|
|
@PostMapping("/person") |
|
|
|
} |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
|
|
|
@ApiOperation(value = "根据值班id查询人员", notes = "传id") |
|
|
|
/** |
|
|
|
public R person(@ApiParam(value = "值班Id", required = true) @RequestParam Long id) { |
|
|
|
* 数据清理 |
|
|
|
return imsDutyMainService.getMainIdByPersonV2(id); |
|
|
|
*/ |
|
|
|
} |
|
|
|
@PostMapping("/dataDelete") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
/** |
|
|
|
@ApiOperation(value = "数据清理", notes = "传id") |
|
|
|
* 数据清理 |
|
|
|
public R dataDelete(@ApiParam(value = "机构ID", required = true) @RequestParam Long deptId, |
|
|
|
*/ |
|
|
|
@ApiParam(value = "开始时间", required = true) @RequestParam String startDate, |
|
|
|
@PostMapping("/dataDelete") |
|
|
|
@ApiParam(value = "结束时间", required = true) @RequestParam String endDate) { |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
return imsDutyMainService.dataDelete(deptId, startDate, endDate); |
|
|
|
@ApiOperation(value = "数据清理", notes = "传id") |
|
|
|
} |
|
|
|
public R dataDelete(@ApiParam(value = "机构ID", required = true) @RequestParam Long deptId, |
|
|
|
|
|
|
|
@ApiParam(value = "开始时间", required = true) @RequestParam String startDate, |
|
|
|
|
|
|
|
@ApiParam(value = "结束时间", required = true) @RequestParam String endDate) { |
|
|
|
/** |
|
|
|
return imsDutyMainService.dataDelete(deptId, startDate, endDate); |
|
|
|
* 根据值班id查询值班人员 |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
@GetMapping("/getHomePageDutyInfo") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
/** |
|
|
|
@ApiOperation(value = "获取首页值班数据", notes = "传id") |
|
|
|
* 根据值班id查询值班人员 |
|
|
|
public R<List<HomePageDutyMainInfoVo>> getHomePageDutyInfo(Long deptId) { |
|
|
|
*/ |
|
|
|
return R.data(imsDutyMainService.getHomePageDutyInfo(deptId)); |
|
|
|
@GetMapping("/getHomePageDutyInfo") |
|
|
|
} |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
|
|
|
@ApiOperation(value = "获取首页值班数据", notes = "传id") |
|
|
|
/** |
|
|
|
public R<List<HomePageDutyMainInfoVo>> getHomePageDutyInfo(Long deptId) { |
|
|
|
* 返回对应部门所有人员 |
|
|
|
return R.data(imsDutyMainService.getHomePageDutyInfo(deptId)); |
|
|
|
*/ |
|
|
|
} |
|
|
|
@GetMapping("/getAllPersonInfo") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
/** |
|
|
|
@ApiOperation(value = "返回对应部门所有人员", notes = "") |
|
|
|
* 返回对应部门所有人员 |
|
|
|
public R getAllPersonInfo(Long deptId) { |
|
|
|
*/ |
|
|
|
return R.data(imsDutyMainService.getAllPersonInfo(deptId)); |
|
|
|
@GetMapping("/getAllPersonInfo") |
|
|
|
} |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
|
|
|
@ApiOperation(value = "返回对应部门所有人员", notes = "") |
|
|
|
/** |
|
|
|
@OperationAnnotation(moduleName = "值班管理", title = "调班管理", |
|
|
|
* 值班人员ID对应班次信息 |
|
|
|
operatorType = OperatorType.MOBILE, |
|
|
|
*/ |
|
|
|
businessType = BusinessType.GENCODE, |
|
|
|
@GetMapping("/getDutyMainInfoVoById") |
|
|
|
action = "返回对应部门所有人员") |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
public R getAllPersonInfo(Long deptId) { |
|
|
|
@ApiOperation(value = "值班人员ID对应班次信息", notes = "") |
|
|
|
return R.data(imsDutyMainService.getAllPersonInfo(deptId)); |
|
|
|
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId,@ApiParam(value = "申请人ID") Long personId) { |
|
|
|
} |
|
|
|
return imsDutyMainService.getDutyEmergencyEntityById(deptId,personId); |
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
|
|
|
|
* 值班人员ID对应班次信息 |
|
|
|
/** |
|
|
|
*/ |
|
|
|
*灵活调入,调出 |
|
|
|
@GetMapping("/getDutyMainInfoVoById") |
|
|
|
*/ |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
@PostMapping("/updateDutyMainInfoVoById") |
|
|
|
@ApiOperation(value = "值班人员ID对应班次信息", notes = "") |
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId, @ApiParam(value = "申请人ID") Long personId) { |
|
|
|
@ApiOperation(value = "灵活调入,调出", notes = "") |
|
|
|
return imsDutyMainService.getDutyEmergencyEntityById(deptId, personId); |
|
|
|
public R updateDutyMainInfoVoById(@RequestBody ChangeDutyMainVo changeDutyMainVo) { |
|
|
|
} |
|
|
|
return imsDutyMainService.updateDutyMainInfoVoById(changeDutyMainVo); |
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
|
|
|
|
* 灵活调入,调出 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@PostMapping("/updateDutyMainInfoVoById") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
|
|
|
@ApiOperation(value = "灵活调入,调出", notes = "") |
|
|
|
|
|
|
|
public R updateDutyMainInfoVoById(@RequestBody ChangeDutyMainVo changeDutyMainVo) { |
|
|
|
|
|
|
|
return imsDutyMainService.updateDutyMainInfoVoById(changeDutyMainVo); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|