| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.exception.ServiceException; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | DeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @ApiOperation("设备新增接口") |
| | | @SaCheckPermission("AddMachine.add") |
| | | @PostMapping("/saveMachine") |
| | | public Result saveTeamGroup( @RequestBody Map<String,Object> object){ |
| | | if(deviceMaintenanceService.saveMachineSv(object)){ |
| | |
| | | } |
| | | |
| | | @ApiOperation("保养维修新增接口") |
| | | @SaCheckPermission("AddMaintenanceAndRepair.add") |
| | | @PostMapping("/saveMaintenanceAndRepair") |
| | | public Result saveMaintenanceAndRepair( @RequestBody Map<String,Object> object){ |
| | | if(deviceMaintenanceService.saveMaintenanceAndRepairSv(object)){ |
| | |
| | | } |
| | | |
| | | @ApiOperation("查询维修保养数据接口") |
| | | @PostMapping ("/selectMaintenance") |
| | | public Result selectMaintenance() { |
| | | return Result.seccess(deviceMaintenanceService.selectMaintenanceSv()); |
| | | @PostMapping ("/selectMaintenance/{selectTime1}/{selectTime2}") |
| | | public Result selectMaintenance( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2 |
| | | ) { |
| | | return Result.seccess(deviceMaintenanceService.selectMaintenanceSv(selectTime1,selectTime2)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("删除维修保养记录接口") |
| | | @SaCheckPermission("MaintenanceAndRepair.delete") |
| | | @PostMapping("/deleteMaintenance/{id}") |
| | | public Result deleteMaintenance(@PathVariable String id){ |
| | | if(deviceMaintenanceService.deleteMaintenanceSv(id)){ |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("查询设备管理接口") |
| | | @SaCheckPermission("SelectMachine.search") |
| | | @PostMapping ("/selectMachine") |
| | | public Result selectMachine() { |
| | | return Result.seccess(deviceMaintenanceService.selectMachineSv()); |
| | | } |
| | | |
| | | @ApiOperation("根据Id查询对应数据接口") |
| | | @PostMapping ("/openSelectId/{id}") |
| | | public Result openSelectId( |
| | | @PathVariable String id){ |
| | | return Result.seccess(deviceMaintenanceService.openSelectIdSv(id)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("设备保养维修修改接口") |
| | | @PostMapping("/updateMaintenance") |
| | | public Result deleteOrderWork( |
| | | @RequestBody Map<String,Object> object |
| | | ){ |
| | | return Result.seccess(deviceMaintenanceService.updateMaintenance(object)); |
| | | } |
| | | } |