From af1a961e1d714f6f3ab714d7b7a790275cc799e4 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 11 四月 2024 09:25:59 +0800
Subject: [PATCH] 发货修改

---
 north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 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..68d768e
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java
@@ -0,0 +1,67 @@
+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.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")
+    public Result selectMaintenance()  {
+        return  Result.seccess(deviceMaintenanceService.selectMaintenanceSv());
+    }
+
+
+    @ApiOperation("鍒犻櫎缁翠慨淇濆吇璁板綍鎺ュ彛")
+    @PostMapping("/deleteMaintenance/{id}")
+    public Result deleteMaintenance(@PathVariable String id){
+        if(deviceMaintenanceService.deleteMaintenanceSv(id)){
+            return Result.seccess();
+        }else {
+            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触锛�");
+
+        }
+    }
+
+}

--
Gitblit v1.8.0