From bb0b796649f1addc2bc593fb91fbb35b692ace8b Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期五, 19 四月 2024 15:50:11 +0800 Subject: [PATCH] 去除后台不需要的打印 --- north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java | 84 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java new file mode 100644 index 0000000..7e2580d --- /dev/null +++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java @@ -0,0 +1,84 @@ +package com.example.erp.controller.pp; + +import com.example.erp.common.Constants; +import com.example.erp.common.Result; +import com.example.erp.exception.ServiceException; +import com.example.erp.service.pp.DeviceMaintenanceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.sql.Date; +import java.util.Map; + +@RestController + +@Api(value="璁惧淇濆吇缁翠慨controller",tags={"璁惧淇濆吇缁翠慨鎿嶄綔鎺ュ彛"}) +@RequestMapping("/maintenance") +public class DeviceMaintenanceController { + @Autowired + DeviceMaintenanceService deviceMaintenanceService; + + @ApiOperation("璁惧鏂板鎺ュ彛") + @PostMapping("/saveMachine") + public Result saveTeamGroup( @RequestBody Map<String,Object> object){ + if(deviceMaintenanceService.saveMachineSv(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触"); + + } + } + @ApiOperation("鏌ヨ涓嬫媺妗嗘暟鎹帴鍙�") + @PostMapping ("/selectData") + public Result selectData() { + return Result.seccess(deviceMaintenanceService.selectDataSv()); + } + + @ApiOperation("淇濆吇缁翠慨鏂板鎺ュ彛") + @PostMapping("/saveMaintenanceAndRepair") + public Result saveMaintenanceAndRepair( @RequestBody Map<String,Object> object){ + if(deviceMaintenanceService.saveMaintenanceAndRepairSv(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触"); + + } + } + + @ApiOperation("鏌ヨ缁翠慨淇濆吇鏁版嵁鎺ュ彛") + @PostMapping ("/selectMaintenance/{selectTime1}/{selectTime2}") + public Result selectMaintenance( + @PathVariable Date selectTime1, + @PathVariable Date selectTime2 + ) { + return Result.seccess(deviceMaintenanceService.selectMaintenanceSv(selectTime1,selectTime2)); + } + + + @ApiOperation("鍒犻櫎缁翠慨淇濆吇璁板綍鎺ュ彛") + @PostMapping("/deleteMaintenance/{id}") + public Result deleteMaintenance(@PathVariable String id){ + if(deviceMaintenanceService.deleteMaintenanceSv(id)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触锛�"); + + } + } + + @ApiOperation("鏌ヨ璁惧绠$悊鎺ュ彛") + @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)); + + } +} -- Gitblit v1.8.0