| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.query.TErpMaintenanceReminderQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.service.TErpMaintenanceReminderService; |
| | | import com.ruoyi.system.service.TErpProcurementService; |
| | | import com.ruoyi.system.vo.TErpMaintenanceReminderDetailVo; |
| | | import com.ruoyi.system.vo.TErpMaintenanceReminderListVo; |
| | | import com.ruoyi.system.vo.TErpProcurementVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-erp-maintenance-reminder") |
| | | @Api(tags = "erp保养提醒") |
| | | public class TErpMaintenanceReminderController { |
| | | |
| | | private final TErpMaintenanceReminderService erpMaintenanceReminderService; |
| | | private final TokenService tokenService; |
| | | |
| | | @Autowired |
| | | public TErpMaintenanceReminderController(TErpMaintenanceReminderService erpMaintenanceReminderService, TokenService tokenService) { |
| | | this.erpMaintenanceReminderService = erpMaintenanceReminderService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * erp保养提醒分页列表 |
| | | */ |
| | | @ApiOperation(value = "erp保养提醒分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TErpMaintenanceReminderListVo>> pageList(@RequestBody TErpMaintenanceReminderQuery query) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpMaintenanceReminderService.pageList(query,user)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * erp保养提醒详情 |
| | | */ |
| | | @ApiOperation(value = "erp保养提醒详情") |
| | | @GetMapping(value = "/detail/{id}") |
| | | public R<TErpMaintenanceReminderDetailVo> detail(@PathVariable String id) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpMaintenanceReminderService.detail(id,user)); |
| | | } |
| | | |
| | | } |
| | | |