From 527cbd85e37842d93d081f33916dca5c6f7156e0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期日, 24 九月 2023 09:53:58 +0800
Subject: [PATCH] 修改 9.22
---
inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java
index fed0cf2..9964a0f 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java
@@ -2,6 +2,7 @@
import com.yuanchu.mom.pojo.dto.InspectionItemDto;
import com.yuanchu.mom.pojo.dto.UpdateInspectionItemDto;
+import com.yuanchu.mom.service.DeviceService;
import com.yuanchu.mom.service.InspectionItemService;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.utils.Jwt;
@@ -11,6 +12,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -31,6 +33,9 @@
@Autowired
private InspectionItemService inspectionItemService;
+ @Resource
+ DeviceService deviceService;
+
@Autowired
private Jwt jwt;
@@ -42,22 +47,17 @@
})
@GetMapping("/list_user")
public Result<?> selectInspectionItem(Integer id, Integer type) {
- List<InspectionItemDto> inspectionItemDto = inspectionItemService.selectInspectionItem(id,type);
+ List<InspectionItemDto> inspectionItemDto = inspectionItemService.selectInspectionItem(id, type);
return Result.success(inspectionItemDto);
}
- @ApiOperation(value = "鏂板妫�楠屽崟-->閫夋嫨璁惧")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "technologyId", value = "鍏宠仈鐨勫伐鑹鸿矾绾縤d", dataTypeClass = Integer.class, required = true),
- @ApiImplicitParam(name = "father", value = "椤圭洰鐖跺悕绉�", dataTypeClass = String.class, required = true),
- @ApiImplicitParam(name = "name", value = "椤圭洰鍚嶇О", dataTypeClass = String.class, required = true)
- })
+ @ApiOperation(value = "鏂板妫�楠屽崟-->閫夋嫨妫�楠岃澶�")
@GetMapping("/chooseDev")
- public Result<?> chooseDev(Integer technologyId, String father, String name) {
- return Result.success(inspectionItemService.chooseDev(technologyId,father,name));
+ public Result<?> chooseDev() {
+ return Result.success(deviceService.chooseDevice());
}
- @ApiOperation(value = "鏂板鎸夐挳-->2銆佹楠岄」鐩殑妫�楠屽��-->澶卞幓鐒︾偣鍙戣捣璇ヨ姹�")
+ @ApiOperation(value = "妫�楠岄」鐩殑妫�楠屽��-->澶卞幓鐒︾偣鍙戣捣璇ヨ姹�")
@PostMapping("/lose_focus_update")
public Result<?> addInspectionItem(@RequestHeader("token") String token, @RequestBody UpdateInspectionItemDto updateInspectionItemDto) throws Exception {
Map<String, String> usernameMessage = jwt.readJWT(token);
@@ -70,4 +70,16 @@
return Result.success(map);
}
+ @ApiOperation(value = "鏇存敼璁惧")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "妫�楠屽崟Id", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "type", value = "绫诲瀷", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "DevId", value = "璁惧id", dataTypeClass = Integer.class, required = true)
+ })
+ @PostMapping("/updateDevByInsId")
+ public Result updateDevByInsId(Integer id, Integer type, Integer devId) {
+ inspectionItemService.updateDevByInsId(id, type, devId);
+ return Result.success();
+ }
+
}
--
Gitblit v1.9.3