From 19b596d3c05b1ca7ff80d8b802e7f6e03ad77dad Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 11 九月 2023 18:02:17 +0800
Subject: [PATCH] 修改 9.11
---
inspect-server/src/main/java/com/yuanchu/mom/controller/InspectionItemController.java | 43 +++++++++++++++++++++++++++++++------------
1 files changed, 31 insertions(+), 12 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 e77f84b..d08c2a8 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
@@ -17,13 +17,13 @@
/**
* <p>
- * 鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
* </p>
*
* @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
* @since 2023-08-01
*/
-@Api(tags = "QMS绠$悊-->鎴愬搧妫�楠�")
+@Api(tags = "QMS绠$悊-->鎴愬搧杩囩▼妫�楠岄」鐩�")
@RestController
@RequestMapping("/inspection-item")
public class InspectionItemController {
@@ -31,22 +31,35 @@
@Autowired
private InspectionItemService inspectionItemService;
+
@Autowired
private Jwt jwt;
@ApiOperation(value = "鏂板鎸夐挳-->2銆佹煡璇㈡墍鏈夋楠岄」鐩�")
@ApiImplicitParams(value = {
- @ApiImplicitParam(name = "finishInspectId",value = "鎴愬搧妫�楠屽崟Id",dataTypeClass = Integer.class,required = true)
+ @ApiImplicitParam(name = "id", value = "妫�楠屽崟Id", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "type", value = "绫诲瀷", dataTypeClass = Integer.class, required = true)
})
@GetMapping("/list_user")
- public Result<?> selectInspectionItem(Integer finishInspectId){
- List<InspectionItemDto> inspectionItemDto = inspectionItemService.selectInspectionItem(finishInspectId);
+ public Result<?> selectInspectionItem(Integer id, Integer type) {
+ List<InspectionItemDto> inspectionItemDto = inspectionItemService.selectInspectionItem(id, type);
return Result.success(inspectionItemDto);
}
- @ApiOperation(value = "鏂板鎸夐挳-->2銆佹楠岄」鐩�-->澶卞幓鐒︾偣鍙戣捣璇ヨ姹�")
+ @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)
+ })
+ @GetMapping("/chooseDev")
+ public Result<?> chooseDev(Integer technologyId, String father, String name) {
+ return Result.success(inspectionItemService.chooseDev(technologyId, father, name));
+ }
+
+ @ApiOperation(value = "妫�楠岄」鐩殑妫�楠屽��-->澶卞幓鐒︾偣鍙戣捣璇ヨ姹�")
@PostMapping("/lose_focus_update")
- public Result<?> addInspectionItem(@RequestHeader("token")String token, @RequestBody UpdateInspectionItemDto updateInspectionItemDto) throws Exception {
+ public Result<?> addInspectionItem(@RequestHeader("token") String token, @RequestBody UpdateInspectionItemDto updateInspectionItemDto) throws Exception {
Map<String, String> usernameMessage = jwt.readJWT(token);
Map<String, Object> usernameAndId = JackSonUtil.unmarshal(usernameMessage.get("data"), Map.class);
String name = usernameAndId.get("name").toString().replaceAll("\"", "");
@@ -57,10 +70,16 @@
return Result.success(map);
}
- @ApiOperation(value = "鏂板鎸夐挳-->2銆佹楠岄」鐩�-->璇曢獙璁惧涓嬫媺妗�")
- @GetMapping("/list_device")
- public Result<?> selectDeviceIdAndName(){
- List<Map<String, Object>> maps = inspectionItemService.selectDeviceIdAndName();
- return Result.success(maps);
+ @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