From b9e2c1619cf61bcd5f24b858fff738244d20566e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 05 九月 2023 17:04:29 +0800
Subject: [PATCH] 过程检验修改9-5

---
 inspect-server/src/main/java/com/yuanchu/mom/controller/FinishedInspectController.java |   72 ++++++++++++++++++++----------------
 1 files changed, 40 insertions(+), 32 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/FinishedInspectController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/FinishedInspectController.java
index f64a1f7..ce2e053 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/controller/FinishedInspectController.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/FinishedInspectController.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.yuanchu.mom.pojo.FinishedInspect;
+import com.yuanchu.mom.pojo.vo.FinishedInspectVo1;
 import com.yuanchu.mom.service.*;
 import com.yuanchu.mom.utils.JackSonUtil;
 import com.yuanchu.mom.utils.Jwt;
@@ -23,7 +24,7 @@
 
 /**
  * <p>
- *  鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
  * </p>
  *
  * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
@@ -49,50 +50,62 @@
     @Autowired
     Jwt jwt;
 
+    @ApiOperation(value = "鏂板杩囩▼妫�楠屽崟-->鏍规嵁璁㈠崟鍙烽�夋嫨浜у搧淇℃伅鍜屽伐鑹�")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "orderNumber", value = "璁㈠崟缂栧彿", dataTypeClass = String.class, required = true)
+    })
+    @GetMapping("/chooseMater")
+    public Result<?> chooseMater(String orderNumber) {
+        return Result.success(finishedInspectService.chooseMater(orderNumber));
+    }
+
+    @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(finishedInspectService.chooseDev(technologyId,father,name));
+    }
+
+    @ApiOperation(value = "鏂板杩囩▼妫�楠屽崟")
+    @PostMapping("/addProcess")
+    public Result<?> addProcess(@RequestHeader("token") String token, @RequestBody FinishedInspectVo1 finishedInspectVo1) throws Exception {
+        Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class);
+        return Result.success(finishedInspectService.addProcess(data.get("id").replaceAll("\"", ""), finishedInspectVo1));
+    }
+
+
     @ApiOperation(value = "鏂板鎸夐挳-->1銆佹柊澧炴垚鍝佹楠屽崟")
     @PostMapping("/add_process_inspection_sheet")
-    public Result<?> addProcessInspectionSheet(@Validated @RequestBody FinishedInspect finishedInspect){
+    public Result<?> addProcessInspectionSheet(@Validated @RequestBody FinishedInspect finishedInspect) {
         Integer isInsertSuccess = finishedInspectService.addProcessInspectionSheet(finishedInspect);
-        if (isInsertSuccess == 1){
+        if (isInsertSuccess == 1) {
             return Result.success("鏂板鎴愬姛锛�", finishedInspect.getId());
         }
         return Result.fail("鏂板澶辫触锛�");
     }
 
-    @ApiOperation(value = "鏂板鎸夐挳-->1銆佹柊澧炶繃绋嬫楠屽崟-->涓绘満宸ヤ笅鎷夋")
-    @GetMapping("/list_user")
-    public Result<?> selectUserIdAndName(){
-        List<Map<String, Object>> maps = userService.listUserIdAndName();
-        return Result.success(maps);
-    }
-
-    @ApiOperation(value = "鏂板鎸夐挳-->1銆佹柊澧炶繃绋嬫楠屽崟-->2銆佽鏍煎瀷鍙蜂笅鎷夋锛氭牴鎹」鐩甀D鏌ヨ")
-    @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "materialId",value = "椤圭洰鍚嶇ОID",dataTypeClass  = Integer.class,required = true)
-    })
-    @GetMapping("/list_specification")
-    public Result<?> selectSpecificationIdAndName(Integer materialId){
-        List<Map<String, Object>> maps = specificationsService.selectSpecificationIdAndName(materialId);
-        return Result.success(maps);
-    }
 
     @ApiOperation(value = "鏂板鎸夐挳-->1銆佹柊澧炶繃绋嬫楠屽崟-->1銆侀」鐩悕绉颁笅鎷夋")
     @GetMapping("/list_material")
-    public Result<?> selectMaterialIdAndNameAndCode(){
+    public Result<?> selectMaterialIdAndNameAndCode() {
         List<Map<String, Object>> maps = materialService.selectMaterialIdAndNameAndCode();
         return Result.success(maps);
     }
 
     @ApiOperation(value = "鏂板鎸夐挳-->3銆佹楠岀粨璁�")
     @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "finishedInspectId",value = "妫�楠屽崟Id",dataTypeClass  = Integer.class,required = true),
-            @ApiImplicitParam(name = "result",value = "妫�楠岀粨璁�",dataTypeClass  = Integer.class,required = true),
+            @ApiImplicitParam(name = "finishedInspectId", value = "妫�楠屽崟Id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "result", value = "妫�楠岀粨璁�", dataTypeClass = Integer.class, required = true),
     })
     @PostMapping("/inspection_conclusion")
-    public Result<?> inspectionConclusion(@RequestHeader("token") String token,Integer finishedInspectId, Integer result) throws Exception {
+    public Result<?> inspectionConclusion(@RequestHeader("token") String token, Integer finishedInspectId, Integer result) throws Exception {
         Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class);
-        Integer isInsertSuccess = finishedInspectService.inspectionConclusion(data.get("name").replaceAll("\"", ""),finishedInspectId, result);
-        if (isInsertSuccess == 1){
+        Integer isInsertSuccess = finishedInspectService.inspectionConclusion(data.get("name").replaceAll("\"", ""), finishedInspectId, result);
+        if (isInsertSuccess == 1) {
             return Result.success("涓婃姤鎴愬姛锛�");
         }
         return Result.fail("涓婃姤澶辫触锛�");
@@ -107,7 +120,7 @@
             @ApiImplicitParam(name = "inspectUsername", value = "涓绘満宸�", dataTypeClass = String.class)
     })
     @GetMapping("/list_page")
-    public Result<?> selectFinishedInspectPage(Integer pageNo, Integer pageSize, Integer inspectResult, String inspectDate, String inspectUsername){
+    public Result<?> selectFinishedInspectPage(Integer pageNo, Integer pageSize, Integer inspectResult, String inspectDate, String inspectUsername) {
         IPage<Map<String, Object>> page = finishedInspectService.selectFinishedInspectPage(new Page<Object>(pageNo, pageSize), inspectResult, inspectDate, inspectUsername);
         Map<String, Object> map = new HashMap<>();
         map.put("total", page.getTotal());
@@ -115,10 +128,5 @@
         return Result.success(map);
     }
 
-    @ApiOperation(value = "4銆佷富椤靛垎椤�-->涓绘満宸ユ潯浠舵煡璇笅鎷夋")
-    @GetMapping("/page_user")
-    public Result<?> selectPageUserIdAndName(){
-        List<Map<String, Object>> maps = userService.listUserIdAndName();
-        return Result.success(maps);
-    }
+
 }

--
Gitblit v1.9.3