From 110cf37e66ad349e205890c0d5965ccc5fffd140 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 18 八月 2023 17:27:26 +0800
Subject: [PATCH] MOM系统-8-18计量管理版本一修改
---
standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java | 69 ++++++++++++++++++++++++++++++++--
1 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
index 7a1724a..f980a60 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
@@ -5,6 +5,7 @@
import com.yuanchu.mom.service.DeviceService;
import com.yuanchu.mom.service.RawInsProductService;
import com.yuanchu.mom.service.UserService;
+import com.yuanchu.mom.utils.MyUtil;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -65,13 +66,14 @@
return Result.success(maps);
}
- @ApiOperation(value = "浜岀骇鏍�", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @ApiOperation(value = "浜岀骇鏍�:榛樿鐢熶骇璁惧", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
@ApiImplicitParams(value = {
- @ApiImplicitParam(name = "type", value = "绫诲瀷", dataTypeClass = String.class)
+ @ApiImplicitParam(name = "type", value = "绫诲瀷", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "search_class", value = "鎼滅储妗嗗唴瀹�", dataTypeClass = String.class)
})
@GetMapping("/two_tree")
- public Result<?> deviceTwoTree(@RequestParam(defaultValue = "1") Integer type){
- List<Map<String, Object>> mapList= deviceService.deviceTwoTree(type);
+ public Result<?> deviceTwoTree(@RequestParam(defaultValue = "1") Integer type, String search_class){
+ List<Map<String, Object>> mapList= deviceService.deviceTwoTree(type, search_class);
return Result.success(mapList);
}
@@ -93,4 +95,63 @@
IPage<Map<String, Object>> mapList = rawInsProductService.selectPageDevice(pageNo, pageSize, codeOrNameOrModel);
return Result.success(mapList);
}
+
+ @ApiOperation(value = "鏂板浠櫒璁惧锛氭牴鎹楠岄」鐩甀D鏌ヨ鏁版嵁", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "inspectId", value = "妫�楠岄」鐩甀d", dataTypeClass = Integer.class, required = true)
+ })
+ @GetMapping("/inspectId")
+ public Result<?> inspectIdSelect(Integer inspectId){
+ Map<String, Object> map = rawInsProductService.inspectIdSelect(inspectId);
+ return Result.success(map);
+ }
+
+ @ApiOperation(value = "鏂板浠櫒璁惧锛氭煡璇㈢埗绾у垎绫�", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @GetMapping("/parent_classification")
+ public Result<?> parentClassification(){
+ List<Map<String, Object>> map = rawInsProductService.parentClassification();
+ return Result.success(map);
+ }
+
+ @ApiOperation(value = "瀹為獙瀹ゆā鍧楄〃鏍兼暟鎹�", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "type", value = "绫诲瀷:榛樿鐢熶骇璁惧", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "codeNameModel", value = "缂栧彿鍚嶇О瑙勬牸鍨嬪彿", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "deviceStatue", value = "璁惧鐘舵��", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "deviceId", value = "璁惧Id", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "fatherName", value = "鐖剁骇鍒嗙被", dataTypeClass = String.class)
+ })
+ @GetMapping("/table_list")
+ public Result<?> tableData(String codeNameModel, @RequestParam(defaultValue = "1") Integer type, Integer deviceStatue, Integer deviceId, String fatherName){
+ List<Map<String, Object>> map = deviceService.DevicePageList(codeNameModel, type, deviceStatue, deviceId, fatherName);
+ return Result.success(map);
+ }
+
+ @ApiOperation(value = "鍒犻櫎瀹為獙瀹ゆā鍧楁暟鎹�", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "deviceId", value = "鏍规嵁璁惧Id鍒犻櫎", dataTypeClass = Integer.class)
+ })
+ @DeleteMapping("/delete")
+ public Result<?> deviceDelete(Integer deviceId){
+ Integer map = deviceService.deviceDelete(deviceId);
+ if (map == 1){
+ return Result.success("鍒犻櫎鎴愬姛锛�");
+ }
+ return Result.fail("鍒犻櫎澶辫触锛�");
+ }
+
+ @ApiOperation(value = "鍒犻櫎鏍戞ā鍧楁暟鎹�", tags = "QMS绠$悊-->瀹為獙瀹ょ鐞�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "鏍规嵁璁惧Id鍒犻櫎", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "type", value = "璁惧绫诲瀷", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "deviceFather", value = "鏍规嵁璁惧鍒嗙被鍒犻櫎", dataTypeClass = String.class)
+ })
+ @DeleteMapping("/deleteIdorFather")
+ public Result<?> deviceDeleteIdOrFather(Integer id, Integer type, String deviceFather){
+ Integer map = deviceService.deviceDeleteIdOrFather(id, type, deviceFather);
+ if (map >= 1){
+ return Result.success("鍒犻櫎鎴愬姛锛�");
+ }
+ return Result.fail("鍒犻櫎澶辫触锛�");
+ }
}
--
Gitblit v1.9.3