| | |
| | | import com.xiaopeng.api.model.maintenance.XpShift; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.maintenance.dto.VerifyRangeDTO; |
| | | import com.xiaopeng.maintenance.model.query.XpShiftQuery; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private IXpShiftService xpShiftService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "班次管理分页列表", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/pageList") |
| | | public R<PageInfo<XpShift>> pageList(@RequestBody XpShiftQuery query) { |
| | |
| | | |
| | | @ApiOperation(value = "班次管理新增", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/add") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.SHIFT_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "新增班次", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> add(@RequestBody XpShift dto) { |
| | | xpShiftService.save(dto); |
| | | return R.ok(); |
| | | return xpShiftService.add(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次管理编辑", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/edit") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.SHIFT_MANAGEMENT, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑班次", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> edit(@RequestBody XpShift dto) { |
| | | xpShiftService.updateById(dto); |
| | | return R.ok(); |
| | | return xpShiftService.edit(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次管理删除", tags = "管理后台-运维执行") |
| | | @DeleteMapping("/api/v1/shift/deleteById") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.SHIFT_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | contentExpression = "'删除班次,id=' + #p0", |
| | | appendRequestData = false |
| | | ) |
| | | public R<String> deleteById(@RequestParam Long id) { |
| | | xpShiftService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "排班考勤-排班计划管理-获取所有班次数据", tags = "管理后台-运维执行") |