| | |
| | | package com.xiaopeng.maintenance.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | 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.security.service.TokenService; |
| | | import com.xiaopeng.maintenance.dto.VerifyRangeDTO; |
| | | import com.xiaopeng.maintenance.model.query.XpShiftQuery; |
| | | import com.xiaopeng.maintenance.service.IXpClockInService; |
| | | import com.xiaopeng.maintenance.service.IXpShiftService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2026-02-06 |
| | | */ |
| | | @Api(tags = "班次管理") |
| | | @RestController |
| | | @RequestMapping("/xp-shift") |
| | | public class XpShiftController { |
| | | |
| | | @Autowired |
| | | private IXpShiftService xpShiftService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @ApiOperation(value = "班次管理分页列表", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/pageList") |
| | | public R<PageInfo<XpShift>> pageList(@RequestBody XpShiftQuery query) { |
| | | PageInfo<XpShift> pageInfo = xpShiftService.pageList(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次管理新增", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/add") |
| | | public R<String> add(@RequestBody XpShift dto) { |
| | | xpShiftService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次管理编辑", tags = "管理后台-运维执行") |
| | | @PostMapping("/api/v1/shift/edit") |
| | | public R<String> edit(@RequestBody XpShift dto) { |
| | | xpShiftService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "班次管理删除", tags = "管理后台-运维执行") |
| | | @DeleteMapping("/api/v1/shift/deleteById") |
| | | public R<String> deleteById(@RequestParam Long id) { |
| | | xpShiftService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |