From aed64ecf84f628253c8cc6008e3804f6f2237a5b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 09 四月 2024 08:20:56 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
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