From 3b7f72ee9c450955ecef1897d10d27e547f20476 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 01 九月 2023 17:07:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java            |    9 
 standard-server/src/main/resources/mapper/TechnologyMapper.xml                        |   35 +
 base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java                    |    1 
 standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueDto.java              |   34 +
 standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java             |   49 ++
 standard-server/src/main/resources/mapper/MbomMapper.xml                              |   51 ++
 standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java       |   84 +++
 standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java      |    1 
 standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java       |   62 ++
 standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java             |   18 
 standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java                    |    5 
 standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java                |   25 +
 standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java    |   81 +++
 standard-server/src/main/resources/mapper/TechniqueMapper.xml                         |   81 +++
 standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnologyDto.java             |   26 +
 standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java                  |   12 
 standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java |  100 ++++
 standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomDto.java                   |   45 ++
 standard-server/src/main/resources/mapper/ProductMapper.xml                           |   63 ++
 standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java     |   75 +++
 standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java           |   48 ++
 standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java               |   15 
 standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java                |   42 ++
 standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java    |   79 +++
 /dev/null                                                                             |   29 -
 standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java  |   65 +++
 standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java          |   47 ++
 standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java          |   73 +++
 28 files changed, 1,168 insertions(+), 87 deletions(-)

diff --git a/base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java b/base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
index b10515d..69e31a0 100644
--- a/base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
+++ b/base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
@@ -30,4 +30,5 @@
 
     //鎵归噺鍒犻櫎
     void delAllDevice(String ids);
+
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java
index 1d833ab..f77ff53 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java
@@ -95,4 +95,5 @@
         }
         return Result.fail("娌℃湁璇ョ被鍨�!");
     }
+
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java
index 9449ea8..a13dbd9 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java
@@ -1,8 +1,15 @@
 package com.yuanchu.mom.controller;
 
 
+import com.yuanchu.mom.pojo.dto.MbomDto;
+import com.yuanchu.mom.pojo.dto.ProductDto;
+import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import com.yuanchu.mom.service.MbomService;
 
@@ -21,5 +28,71 @@
     @Autowired
     private MbomService mbomService;
 
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟-->閫夋嫨宸ュ簭,宸ヨ壓")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseTech")
+    public Result<?> chooseTech(Integer specificationsId) {
+        return Result.success(mbomService.chooseTech(specificationsId));
+    }
+
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/add")
+    public Result<?> addMbom(Integer technologyId, @Validated @RequestBody MbomDto mbomDto) {
+        mbomService.addMbom(technologyId, mbomDto);
+        return Result.success("娣诲姞鐗╂枡娓呭崟銆�" + mbomDto.getName() + "銆戞垚鍔�");
+    }
+
+    @ApiOperation("濉啓鏁伴噺,榧犳爣绉诲紑淇濆瓨")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "鐗╂枡娓呭崟id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "num", value = "鏁伴噺", dataTypeClass = Integer.class, required = true)
+
+    })
+    @PostMapping("/write")
+    public Result<?> write(Integer id, Integer num) {
+        Integer write = mbomService.write(id, num);
+        if (write >= 1) {
+            return Result.success("鏇存柊鎴愬姛");
+        }
+        return Result.fail("鏇存柊澶辫触");
+    }
+
+    @ApiOperation("娣诲姞鍚屼竴涓瀷鍙风墿鏂欐竻鍗曠殑鐗堟湰")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "version", value = "褰撳墠鐗堟湰", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/addVersion")
+    public Result<?> addVersion(Integer specificationsId ,Integer version) {
+        Integer version1 = mbomService.addVersion(specificationsId,version);
+        return Result.success("娣诲姞鍨嬪彿"+specificationsId+"鐨勭墿鏂欐竻鍗曠増鏈�"+version1+"鎴愬姛");
+    }
+
+    @ApiOperation(value = "鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "鐗╂枡娓呭崟id", dataTypeClass = Integer.class,required = true)
+    })
+    @PostMapping("/delMbomById")
+    public Result delMbomById(Integer id) {
+        mbomService.delMbomById(id);
+        return Result.success("鍒犻櫎"+id+"鎴愬姛!");
+    }
+
+    @ApiOperation(value = "鎵归噺鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "ids", value = "鐗╂枡娓呭崟id", dataTypeClass = String.class,required = true)
+    })
+    @PostMapping("/delAllMbom")
+    public Result delAllMbom(String ids) {
+        mbomService.delAllMbom(ids);
+        return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
+    }
+
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java
index 404440d..a8e8164 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java
@@ -1,6 +1,8 @@
 package com.yuanchu.mom.controller;
 
+
 import com.yuanchu.mom.pojo.dto.ProductDto;
+import com.yuanchu.mom.pojo.dto.TechnologyDto;
 import com.yuanchu.mom.service.ProductService;
 import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
@@ -8,11 +10,8 @@
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
 @Api(tags = "鎶�鏈鐞�-->鏍囧噯BOM-->鎶�鏈寚鏍�(妫�楠岄」鐩�)")
 @RestController
@@ -22,4 +21,79 @@
     @Autowired
     private ProductService productService;
 
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨宸ュ簭,宸ヨ壓")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseTech")
+    public Result<?> chooseTech(Integer specificationsId) {
+        return Result.success(productService.chooseTech(specificationsId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨椤圭洰鐖剁被")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseFather")
+    public Result<?> chooseFather(Integer technologyId) {
+        return Result.success(productService.chooseFather(technologyId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/add")
+    public Result<?> addProduct(Integer technologyId, @Validated @RequestBody ProductDto productDto) {
+        productService.addProduct(technologyId, productDto);
+        return Result.success("娣诲姞鎶�鏈寚鏍囥��" + productDto.getName() + "銆戞垚鍔�");
+    }
+
+    @ApiOperation("濉啓鏍囧噯鍊间笌鍐呮帶鍊�,榧犳爣绉诲紑淇濆瓨")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "鎶�鏈寚鏍噄d", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "required", value = "鏍囧噯鍊�", dataTypeClass = String.class, required = true),
+            @ApiImplicitParam(name = "internal", value = "鍐呮帶鍊�", dataTypeClass = String.class, required = true)
+
+    })
+    @PostMapping("/write")
+    public Result<?> write(Integer id, String required, String internal) {
+        Integer write = productService.write(id, required, internal);
+        if (write >= 1){
+            return Result.success("鏇存柊鎴愬姛");
+        }
+        return Result.fail("鏇存柊澶辫触");
+    }
+
+    @ApiOperation("娣诲姞鍚屼竴涓瀷鍙锋妧鏈寚鏍囩殑鐗堟湰")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "version", value = "褰撳墠鐗堟湰", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/addVersion")
+    public Result<?> addVersion(Integer specificationsId ,Integer version) {
+        Integer version1 = productService.addVersion(specificationsId,version);
+        return Result.success("娣诲姞鍨嬪彿"+specificationsId+"鐨勬妧鏈寚鏍囩増鏈�"+version1+"鎴愬姛");
+    }
+
+    @ApiOperation(value = "鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "鎶�鏈寚鏍噄d", dataTypeClass = Integer.class,required = true)
+    })
+    @PostMapping("/delTechById")
+    public Result delProById(Integer id) {
+        productService.delProById(id);
+        return Result.success("鍒犻櫎"+id+"鎴愬姛!");
+    }
+
+    @ApiOperation(value = "鎵归噺鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "ids", value = "鎶�鏈寚鏍噄d", dataTypeClass = String.class,required = true)
+    })
+    @PostMapping("/delAllPro")
+    public Result delAllPro(String ids) {
+        productService.delAllPro(ids);
+        return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
+    }
+
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java
index 24831fd..cd22e42 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java
@@ -1,8 +1,15 @@
 package com.yuanchu.mom.controller;
 
 
+import com.yuanchu.mom.pojo.dto.ProductDto;
+import com.yuanchu.mom.pojo.dto.TechniqueDto;
+import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import com.yuanchu.mom.service.TechniqueService;
 
@@ -21,5 +28,73 @@
     @Autowired
     private TechniqueService techniqueService;
 
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨宸ュ簭,宸ヨ壓")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseTech")
+    public Result<?> chooseTech(Integer specificationsId) {
+        return Result.success(techniqueService.chooseTech(specificationsId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨璁惧")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseDev")
+    public Result<?> chooseDev(Integer technologyId) {
+        return Result.success(techniqueService.chooseDev(technologyId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨椤圭洰(鐖跺瓙),鍗曚綅")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/choosePro")
+    public Result<?> choosePro(Integer technologyId) {
+        return Result.success(techniqueService.choosePro(technologyId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/add")
+    public Result<?> addTechnique(Integer technologyId, @Validated @RequestBody TechniqueDto techniqueDto) {
+        techniqueService.addTechnique(technologyId, techniqueDto);
+        return Result.success("娣诲姞鐢熶骇宸ヨ壓鎴愬姛");
+    }
+
+    @ApiOperation("娣诲姞鍚屼竴涓瀷鍙风敓浜у伐鑹虹殑鐗堟湰")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "version", value = "褰撳墠鐗堟湰", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/addVersion")
+    public Result<?> addVersion(Integer specificationsId,Integer version ) {
+        Integer version1 = techniqueService.addVersion(specificationsId,version);
+        return Result.success("娣诲姞鍨嬪彿"+specificationsId+"鐨勭敓浜у伐鑹虹増鏈�"+version1+"鎴愬姛");
+    }
+
+    @ApiOperation(value = "鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "鐢熶骇宸ヨ壓id", dataTypeClass = Integer.class,required = true)
+    })
+    @PostMapping("/delTeqById")
+    public Result delTeqById(Integer id) {
+        techniqueService.delTeqById(id);
+        return Result.success("鍒犻櫎"+id+"鎴愬姛!");
+    }
+
+    @ApiOperation(value = "鎵归噺鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "ids", value = "鐢熶骇宸ヨ壓id", dataTypeClass = String.class,required = true)
+    })
+    @PostMapping("/delAllTeq")
+    public Result delAllTeq(String ids) {
+        techniqueService.delAllTeq(ids);
+        return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
+    }
+
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
index b56b93d..1314d76 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
@@ -1,6 +1,7 @@
 package com.yuanchu.mom.controller;
 
 
+import com.yuanchu.mom.pojo.dto.TechnologyDto;
 import com.yuanchu.mom.service.TechnologyService;
 import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
@@ -8,17 +9,13 @@
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-import java.util.Map;
 
 /**
  * <p>
- *  鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
  * </p>
  *
  * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
@@ -32,5 +29,75 @@
     @Autowired
     private TechnologyService technologyService;
 
+    @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨璁惧缁�")
+    @GetMapping("/chooseDevice")
+    public Result<?> chooseDevice() {
+        return Result.success(technologyService.chooseDevice());
+    }
 
+    @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨宸ュ簭")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/chooseFather")
+    public Result<?> chooseFather(Integer specificationsId) {
+        return Result.success(technologyService.chooseFather(specificationsId));
+    }
+
+    @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/add")
+    public Result<?> addTechnology(Integer specificationsId, @Validated @RequestBody TechnologyDto technologyDto) {
+        technologyService.addTechnology(specificationsId, technologyDto);
+        return Result.success("娣诲姞宸ヨ壓銆�" + technologyDto.getName() + "銆戞垚鍔�");
+    }
+
+    @ApiOperation("濉啓鐢熶骇瀹氶,榧犳爣绉诲紑淇濆瓨")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "productionQuota", value = "鐢熶骇瀹氶(涓�/澶�)", dataTypeClass = Integer.class, required = true)
+
+    })
+    @PostMapping("/write")
+    public Result<?> write(Integer id, Integer productionQuota) {
+        Integer write = technologyService.write(id, productionQuota);
+        if (write >= 1) {
+            return Result.success("鏇存柊鎴愬姛");
+        }
+        return Result.fail("鏇存柊澶辫触");
+    }
+
+    @ApiOperation("娣诲姞鍚屼竴涓瀷鍙峰伐鑹鸿矾绾跨殑鐗堟湰")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "version", value = "褰撳墠鐗堟湰", dataTypeClass = Integer.class, required = true)
+    })
+    @PostMapping("/addVersion")
+    public Result<?> addVersion(Integer specificationsId ,Integer version) {
+        Integer version1 = technologyService.addVersion(specificationsId,version);
+        return Result.success("娣诲姞鍨嬪彿"+specificationsId+"鐨勫伐鑹鸿矾绾跨増鏈�"+version1+"鎴愬姛");
+    }
+
+    @ApiOperation(value = "鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class,required = true)
+    })
+    @PostMapping("/delTechById")
+    public Result delTechById(Integer id) {
+        technologyService.delTechById(id);
+        return Result.success("鍒犻櫎"+id+"鎴愬姛!");
+    }
+
+    @ApiOperation(value = "鎵归噺鍒犻櫎")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "ids", value = "宸ヨ壓璺嚎id", dataTypeClass = String.class,required = true)
+    })
+    @PostMapping("/delAllTech")
+    public Result delAllTech(String ids) {
+        technologyService.delAllTech(ids);
+        return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
+    }
 }
+
diff --git a/standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java b/standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java
index babe5a2..15b71d6 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java
@@ -19,5 +19,17 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鐗╂枡娓呭崟
     List<Map<String, Object>> selectAllMbom(Integer specificationsId, Integer version,String message);
+
+    //鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹洪渶瑕佺殑鐗╂枡娓呭崟
+    List<Mbom> selAllBySpeId(Integer specificationsId,Integer version);
+
+    //鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐗╂枡娓呭崟
+    void delMbomByTecId(Integer id);
+
+    //鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎
+    void delAllByTecId(String ids);
+
+    //鏍规嵁鐗╂枡娓呭崟id鎵归噺鍒犻櫎
+    void delAllMbom(String ids);
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java b/standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java
index d78d10a..465d9a0 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java
@@ -23,6 +23,21 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鎶�鏈寚鏍�(妫�楠岄」鐩�)
     List<Map<String, Object>> selectAllPro(Integer specificationsId, Integer version,String message);
+
+    //鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨椤圭洰鐖剁被
+    List<Map<String, Object>> chooseFather(Integer technologyId);
+
+    //鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鐨勬墍鏈夊伐鑹虹殑鎶�鏈寚鏍�
+    List<Product> selAllBySpeId(Integer specificationsId,Integer version);
+
+    //鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鎶�鏈寚鏍�
+    void delProByTecId(Integer id);
+
+    //鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎
+    void delAllByTechId(String ids);
+
+    //鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎
+    void delAllPro(String ids);
 }
 
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java b/standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java
index bde10e3..6cfe76f 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java
@@ -19,5 +19,23 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鐢熶骇宸ヨ壓
     List<Map<String, Object>> selectAllTeq(Integer specificationsId, Integer version,String message);
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨璁惧
+    List<Map<String, Object>> chooseDev(Integer technologyId);
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨椤圭洰(鐖跺瓙),鍗曚綅
+    List<Map<String, Object>> choosePro(Integer technologyId);
+
+    //鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹虹殑鐢熶骇宸ヨ壓
+    List<Technique> selAllBySpeId(Integer specificationsId,Integer version);
+
+    //鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐢熶骇宸ヨ壓
+    void delTeqByTecId(Integer id);
+
+    //鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎
+    void delAllByTecId(String ids);
+
+    //鏍规嵁鐢熶骇宸ヨ壓id鎵归噺鍒犻櫎
+    void delAllTeq(String ids);
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java b/standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java
index db1af29..3366794 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java
@@ -21,4 +21,13 @@
 
     //鍙充晶鏁版嵁灞曠ず-->宸ヨ壓璺嚎
     List<Map<String, Object>> selectAllTec(Integer specificationsId, Integer version,String message);
+
+    //鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨宸ュ簭
+    List<Map<String, Object>> chooseFather(Integer specificationsId);
+
+    //鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨宸ュ簭,宸ヨ壓
+    List<Map<String, Object>> chooseTech(Integer specificationsId);
+
+    //鎵归噺鍒犻櫎
+    void delAllTech(String ids);
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java
index 04140ad..fdf1c47 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java
@@ -46,6 +46,11 @@
     @ApiModelProperty(value = "鐢熶骇瀹氶(涓�/澶�)")
     private Integer productionQuota;
 
+    /**
+     * 鐗堟湰
+     **/
+    private Integer version;
+
     @ApiModelProperty(value = "閫昏緫鍒犻櫎 姝e父>=1,鍒犻櫎<=0", hidden = true)
     private Integer state;
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomDto.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomDto.java
new file mode 100644
index 0000000..6a59603
--- /dev/null
+++ b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomDto.java
@@ -0,0 +1,45 @@
+package com.yuanchu.mom.pojo.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+@Data
+//鍙充笂瑙掓柊澧炲弬鏁�
+public class MbomDto {
+
+    /**
+     * 鍘熸潗鏂欏悕绉�
+     **/
+    @NotBlank(message = "鍘熸潗鏂欏悕绉颁笉鑳戒负绌�!")
+    private String name;
+
+    /**
+     * 鍗曚綅
+     **/
+    @NotBlank(message = "鍗曚綅涓嶈兘涓虹┖!")
+    private String unit;
+
+    /**
+     * 鏁伴噺
+     **/
+    private Integer num;
+
+    /**
+     * 渚涘簲鍟�
+     **/
+    @NotBlank(message = "渚涘簲鍟嗕笉鑳戒负绌�!")
+    private String supplier;
+
+    /**
+     * 璐ㄩ噺杩芥函鍙�
+     **/
+    @NotBlank(message = "璐ㄩ噺杩芥函鍙蜂笉鑳戒负绌�!")
+    private String qualityTraceability;
+
+    /**
+     * (鍘熸潗鏂欑殑)瑙勬牸鍨嬪彿
+     **/
+    @NotBlank(message = "瑙勬牸鍨嬪彿涓嶈兘涓虹┖!")
+    private String specifications;
+}
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java
index 08ec5bf..3b1e74e 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java
@@ -2,15 +2,38 @@
 
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
 import java.util.List;
 
 @Data
+//鍙充笂瑙掓柊澧炲弬鏁�
 public class ProductDto {
 
     /**
      * 椤圭洰鍚嶇О
      */
+    @NotBlank(message = "宸ヨ壓鍚嶇О涓嶈兘涓虹┖!")
+    private String name;
+
+    /**
+     * 椤圭洰鐖剁被
+     */
+    @NotBlank(message = "宸ヨ壓鍚嶇О涓嶈兘涓虹┖!")
     private String father;
 
-    List<ProductDto2> children;
+    /**
+     * 鍗曚綅
+     */
+    @NotBlank(message = "宸ヨ壓鍚嶇О涓嶈兘涓虹┖!")
+    private String unit;
+
+    /**
+     * 鏍囧噯鍊�
+     */
+    private String required;
+
+    /**
+     * 鍐呮帶鍊�
+     */
+    private String internal;
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto2.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto2.java
deleted file mode 100644
index 15e8a3f..0000000
--- a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto2.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.yuanchu.mom.pojo.dto;
-
-import lombok.Data;
-
-@Data
-public class ProductDto2 {
-    private Integer id;
-
-    /**
-     * 椤圭洰鍚嶇О
-     */
-    private String name;
-
-    /**
-     * 鍗曚綅
-     */
-    private String unit;
-
-    /**
-     * 鏍囧噯鍊�
-     */
-    private String required;
-
-    /**
-     * 鍐呮帶鍊�
-     */
-    private String internal;
-
-}
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueDto.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueDto.java
new file mode 100644
index 0000000..dc12a1a
--- /dev/null
+++ b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueDto.java
@@ -0,0 +1,34 @@
+package com.yuanchu.mom.pojo.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+@Data
+//鍙充笂瑙掓柊澧炲弬鏁�
+public class TechniqueDto {
+
+    /**
+     * 璁惧鍚嶇О
+     **/
+    @NotBlank(message = "璁惧鍚嶇О涓嶈兘涓虹┖!")
+    private String device;
+
+    /**
+     * 妫�楠岄」鐩�(鐖剁被)
+     **/
+    @NotBlank(message = "妫�楠岄」鐩笉鑳戒负绌�!")
+    private String productFather;
+
+    /**
+     * 鍗曚綅
+     **/
+    @NotBlank(message = "鍗曚綅涓嶈兘涓虹┖!")
+    private String unit;
+
+    /**
+     * 鎸囨爣(瀛愮被椤圭洰)
+     **/
+    @NotBlank(message = "鎸囨爣(瀛愮被椤圭洰)涓嶈兘涓虹┖!")
+    private String product;
+}
diff --git a/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnologyDto.java b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnologyDto.java
new file mode 100644
index 0000000..b04f6fa
--- /dev/null
+++ b/standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnologyDto.java
@@ -0,0 +1,26 @@
+package com.yuanchu.mom.pojo.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+@Data
+//鍙充笂瑙掓柊澧炲弬鏁�
+public class TechnologyDto {
+
+    //宸ヨ壓鍚嶇О
+    @NotBlank(message = "宸ヨ壓鍚嶇О涓嶈兘涓虹┖!")
+    private String name;
+
+    //宸ュ簭
+    @NotBlank(message = "宸ュ簭涓嶈兘涓虹┖!")
+    private String father;
+
+    //璁惧缁�
+    @NotBlank(message = "璁惧缁勪笉鑳戒负绌�!")
+    private String deviceGroup;
+
+    //鐢熶骇瀹氶(涓�/澶�)
+    private Integer productionQuota;
+}
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java b/standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java
index d41d71f..359a9f6 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yuanchu.mom.pojo.Mbom;
+import com.yuanchu.mom.pojo.dto.MbomDto;
 
 import java.util.List;
 import java.util.Map;
@@ -28,5 +29,46 @@
      * @return
      */
     List<Map<String,Object>> selectAllMbom(Integer specificationsId, Integer version,String message);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟-->閫夋嫨宸ュ簭,宸ヨ壓
+     * @param specificationsId
+     * @return
+     */
+    List<Map<String,Object>> chooseTech(Integer specificationsId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟
+     * @param technologyId
+     * @param mbomDto
+     */
+    void addMbom(Integer technologyId, MbomDto mbomDto);
+
+    /**
+     * 濉啓鏁伴噺,榧犳爣绉诲紑淇濆瓨
+     * @param id
+     * @param num
+     * @return
+     */
+    Integer write(Integer id, Integer num);
+
+    /**
+     * 娣诲姞鍚屼竴涓瀷鍙风墿鏂欐竻鍗曠殑鐗堟湰
+     * @param specificationsId
+     * @return
+     */
+    Integer addVersion(Integer specificationsId,Integer version);
+
+    /**
+     * 鍒犻櫎
+     * @param id
+     */
+    void delMbomById(Integer id);
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     */
+    void delAllMbom(String ids);
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java b/standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java
index ffa0dc2..5c07376 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java
@@ -35,4 +35,53 @@
      * @return
      */
     List<Map<String,Object>> selectAllPro(Integer specificationsId, Integer version,String message);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨宸ュ簭,宸ヨ壓
+     * @param specificationsId
+     * @return
+     */
+    List<Map<String,Object>> chooseTech(Integer specificationsId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨椤圭洰鐖剁被
+     * @param technologyId
+     * @return
+     */
+    List<Map<String,Object>> chooseFather(Integer technologyId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�
+     * @param technologyId
+     * @param productDto
+     */
+    void addProduct(Integer technologyId, ProductDto productDto);
+
+    /**
+     * 濉啓鏍囧噯鍊间笌鍐呮帶鍊�,榧犳爣绉诲紑淇濆瓨
+     * @param id
+     * @param required
+     * @param internal
+     * @return
+     */
+    Integer write(Integer id, String required, String internal);
+
+    /**
+     * 娣诲姞鍚屼竴涓瀷鍙锋妧鏈寚鏍囩殑鐗堟湰
+     * @param specificationsId
+     * @return
+     */
+    Integer addVersion(Integer specificationsId,Integer version);
+
+    /**
+     * 鍒犻櫎
+     * @param id
+     */
+    void delProById(Integer id);
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     */
+    void delAllPro(String ids);
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java b/standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java
index 45dddad..c102f35 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yuanchu.mom.pojo.Technique;
+import com.yuanchu.mom.pojo.dto.TechniqueDto;
 
 import java.util.List;
 import java.util.Map;
@@ -28,5 +29,52 @@
      * @return
      */
     List<Map<String,Object>> selectAllTeq(Integer specificationsId, Integer version,String message);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨宸ュ簭,宸ヨ壓
+     * @param specificationsId
+     * @return
+     */
+    List<Map<String,Object>> chooseTech(Integer specificationsId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨璁惧
+     * @param technologyId
+     * @return
+     */
+    List<Map<String,Object>> chooseDev(Integer technologyId);
+
+    /**
+     *鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨椤圭洰(鐖跺瓙),鍗曚綅
+     * @param technologyId
+     * @return
+     */
+    List<Map<String,Object>> choosePro(Integer technologyId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓
+     * @param technologyId
+     * @param techniqueDto
+     */
+    void addTechnique(Integer technologyId, TechniqueDto techniqueDto);
+
+    /**
+     * 娣诲姞鍚屼竴涓瀷鍙风敓浜у伐鑹虹殑鐗堟湰
+     * @param specificationsId
+     * @return
+     */
+    Integer addVersion(Integer specificationsId,Integer version);
+
+    /**
+     * 鍒犻櫎
+     * @param id
+     */
+    void delTeqById(Integer id);
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     */
+    void delAllTeq(String ids);
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java b/standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java
index 6f709cc..6147b41 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java
@@ -2,6 +2,7 @@
 
 import com.yuanchu.mom.pojo.Technology;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.yuanchu.mom.pojo.dto.TechnologyDto;
 
 import java.util.List;
 import java.util.Map;
@@ -29,4 +30,50 @@
      * @return
      */
     List<Map<String,Object>> selectAllTec(Integer specificationsId, Integer version,String message);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨璁惧缁�
+     * @return
+     */
+    List<Map<String, Object>> chooseDevice();
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨宸ュ簭
+     * @return
+     */
+    List<Map<String,Object>> chooseFather(Integer specificationsId);
+
+    /**
+     * 鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎
+     * @param specificationsId
+     * @param technologyDto
+     */
+    void addTechnology(Integer specificationsId, TechnologyDto technologyDto);
+
+    /**
+     * 濉啓鐢熶骇瀹氶,榧犳爣绉诲紑淇濆瓨
+     * @param id
+     * @param productionQuota
+     * @return
+     */
+    Integer write(Integer id, Integer productionQuota);
+
+    /**
+     * 娣诲姞鍚屼竴涓瀷鍙峰伐鑹鸿矾绾跨殑鐗堟湰
+     * @param specificationsId
+     * @return
+     */
+    Integer addVersion(Integer specificationsId,Integer version);
+
+    /**
+     * 鍒犻櫎
+     * @param id
+     */
+    void delTechById(Integer id);
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     */
+    void delAllTech(String ids);
 }
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java b/standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java
index f6fffbb..b438470 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java
@@ -2,8 +2,11 @@
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yuanchu.mom.mapper.MbomMapper;
+import com.yuanchu.mom.mapper.TechnologyMapper;
 import com.yuanchu.mom.pojo.Mbom;
+import com.yuanchu.mom.pojo.dto.MbomDto;
 import com.yuanchu.mom.service.MbomService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -22,6 +25,9 @@
     @Resource
     MbomMapper mbomMapper;
 
+    @Resource
+    TechnologyMapper technologyMapper;
+
     //鏍规嵁鍨嬪彿id鏌ヨ鎵�鏈夌増鏈�
     @Override
     public List<Integer> selectVerByMbom(Integer specificationsId) {
@@ -30,8 +36,60 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鐗╂枡娓呭崟
     @Override
-    public List<Map<String, Object>> selectAllMbom(Integer specificationsId, Integer version,String message) {
-        return mbomMapper.selectAllMbom(specificationsId,version,message);
+    public List<Map<String, Object>> selectAllMbom(Integer specificationsId, Integer version, String message) {
+        return mbomMapper.selectAllMbom(specificationsId, version, message);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟-->閫夋嫨宸ュ簭,宸ヨ壓
+    @Override
+    public List<Map<String, Object>> chooseTech(Integer specificationsId) {
+        return technologyMapper.chooseTech(specificationsId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐗╂枡娓呭崟
+    @Override
+    public void addMbom(Integer technologyId, MbomDto mbomDto) {
+        Mbom mbom = new Mbom();
+        BeanUtils.copyProperties(mbomDto, mbom);
+        mbom.setTechnologyId(technologyId);
+        mbomMapper.insert(mbom);
+    }
+
+    //濉啓鏁伴噺,榧犳爣绉诲紑淇濆瓨
+    @Override
+    public Integer write(Integer id, Integer num) {
+        Mbom mbom = new Mbom();
+        mbom.setId(id);
+        mbom.setNum(num);
+        return mbomMapper.updateById(mbom);
+    }
+
+    //娣诲姞鍚屼竴涓瀷鍙风墿鏂欐竻鍗曠殑鐗堟湰
+    @Override
+    public Integer addVersion(Integer specificationsId,Integer version) {
+        List<Mbom> mbomList = mbomMapper.selAllBySpeId(specificationsId,version);
+        for (Mbom mbom : mbomList) {
+            mbom.setId(null);
+            //鏈�鏂扮増鏈�+1
+            mbom.setVersion(mbomMapper.selectVerByMbom(specificationsId).get(0) + 1);
+        }
+        saveBatch(mbomList);
+        return mbomList.get(0).getVersion();
+    }
+
+    //鍒犻櫎
+    @Override
+    public void delMbomById(Integer id) {
+        Mbom mbom = new Mbom();
+        mbom.setId(id);
+        mbom.setState(0);
+        mbomMapper.updateById(mbom);
+    }
+
+    //鎵归噺鍒犻櫎
+    @Override
+    public void delAllMbom(String ids) {
+        mbomMapper.delAllMbom(ids);
     }
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java b/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
index 4ccc9d7..0a17c2f 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
@@ -2,10 +2,13 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yuanchu.mom.mapper.TechnologyMapper;
 import com.yuanchu.mom.pojo.Product;
 import com.yuanchu.mom.pojo.dto.ProductDto;
 import com.yuanchu.mom.service.ProductService;
 import com.yuanchu.mom.mapper.ProductMapper;
+import com.yuanchu.mom.utils.MyUtil;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -13,15 +16,18 @@
 import java.util.Map;
 
 /**
-* @author Administrator
-* @description 閽堝琛ㄣ�恜roduct銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
-* @createDate 2023-07-26 16:00:44
-*/
+ * @author Administrator
+ * @description 閽堝琛ㄣ�恜roduct銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+ * @createDate 2023-07-26 16:00:44
+ */
 @Service
-public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService{
+public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {
 
     @Resource
     private ProductMapper productMapper;
+
+    @Resource
+    TechnologyMapper technologyMapper;
 
     //鏍规嵁鍨嬪彿id鏌ヨ椤圭洰(鎶�鏈寚鏍�)
     @Override
@@ -37,8 +43,67 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鎶�鏈寚鏍�(妫�楠岄」鐩�)
     @Override
-    public List<Map<String, Object>> selectAllPro(Integer specificationsId, Integer version,String message) {
-        return productMapper.selectAllPro(specificationsId,version,message);
+    public List<Map<String, Object>> selectAllPro(Integer specificationsId, Integer version, String message) {
+        return productMapper.selectAllPro(specificationsId, version, message);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨宸ュ簭,宸ヨ壓
+    @Override
+    public List<Map<String, Object>> chooseTech(Integer specificationsId) {
+        return technologyMapper.chooseTech(specificationsId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�-->閫夋嫨椤圭洰鐖剁被
+    @Override
+    public List<Map<String, Object>> chooseFather(Integer technologyId) {
+        return productMapper.chooseFather(technologyId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鎶�鏈寚鏍�
+    @Override
+    public void addProduct(Integer technologyId, ProductDto productDto) {
+        Product product = new Product();
+        BeanUtils.copyProperties(productDto, product);
+        product.setTechnologyId(technologyId);
+        productMapper.insert(product);
+    }
+
+    //濉啓鏍囧噯鍊间笌鍐呮帶鍊�,榧犳爣绉诲紑淇濆瓨
+    @Override
+    public Integer write(Integer id, String required, String internal) {
+        Product product = new Product();
+        product.setId(id);
+        product.setRequired(required);
+        product.setInternal(internal);
+        return productMapper.updateById(product);
+    }
+
+    //娣诲姞鍚屼竴涓瀷鍙锋妧鏈寚鏍囩殑鐗堟湰
+    @Override
+    public Integer addVersion(Integer specificationsId,Integer version) {
+        List<Product> productList = productMapper.selAllBySpeId(specificationsId,version);
+        for (Product product : productList) {
+            product.setId(null);
+            //鏈�鏂扮増鏈�+1
+            product.setVersion(productMapper.selectVerByPro(specificationsId).get(0)+1);
+        }
+        saveBatch(productList);
+        return productList.get(0).getVersion();
+    }
+
+    //鍒犻櫎
+    @Override
+    public void delProById(Integer id) {
+        Product product = new Product();
+        product.setId(id);
+        product.setState(0);
+        productMapper.updateById(product);
+    }
+
+    //鎵归噺鍒犻櫎
+    @Override
+    public void delAllPro(String ids) {
+        productMapper.delAllPro(ids);
     }
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java b/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java
index 256cd31..7ccdfc7 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java
@@ -2,8 +2,11 @@
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yuanchu.mom.mapper.TechniqueMapper;
+import com.yuanchu.mom.mapper.TechnologyMapper;
 import com.yuanchu.mom.pojo.Technique;
+import com.yuanchu.mom.pojo.dto.TechniqueDto;
 import com.yuanchu.mom.service.TechniqueService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -22,6 +25,9 @@
     @Resource
     TechniqueMapper techniqueMapper;
 
+    @Resource
+    TechnologyMapper technologyMapper;
+
     //鏍规嵁鍨嬪彿id鏌ヨ鎵�鏈夌増鏈�
     @Override
     public List<Integer> selectVerByTeq(Integer specificationsId) {
@@ -30,8 +36,63 @@
 
     //鍙充晶鏁版嵁灞曠ず-->鐢熶骇宸ヨ壓
     @Override
-    public List<Map<String, Object>> selectAllTeq(Integer specificationsId, Integer version,String message) {
-        return techniqueMapper.selectAllTeq(specificationsId,version,message);
+    public List<Map<String, Object>> selectAllTeq(Integer specificationsId, Integer version, String message) {
+        return techniqueMapper.selectAllTeq(specificationsId, version, message);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨宸ュ簭,宸ヨ壓
+    @Override
+    public List<Map<String, Object>> chooseTech(Integer specificationsId) {
+        return technologyMapper.chooseTech(specificationsId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨璁惧
+    @Override
+    public List<Map<String, Object>> chooseDev(Integer technologyId) {
+        return techniqueMapper.chooseDev(technologyId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓-->閫夋嫨椤圭洰(鐖跺瓙),鍗曚綅
+    @Override
+    public List<Map<String, Object>> choosePro(Integer technologyId) {
+        return techniqueMapper.choosePro(technologyId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->鐢熶骇宸ヨ壓
+    @Override
+    public void addTechnique(Integer technologyId, TechniqueDto techniqueDto) {
+        Technique technique = new Technique();
+        BeanUtils.copyProperties(techniqueDto, technique);
+        technique.setTechnologyId(technologyId);
+        techniqueMapper.insert(technique);
+    }
+
+    //娣诲姞鍚屼竴涓瀷鍙风敓浜у伐鑹虹殑鐗堟湰
+    @Override
+    public Integer addVersion(Integer specificationsId,Integer version) {
+        List<Technique> techniqueList = techniqueMapper.selAllBySpeId(specificationsId,version);
+        for (Technique technique : techniqueList) {
+            technique.setId(null);
+            //鏈�鏂扮増鏈�+1
+            technique.setVersion(techniqueMapper.selectVerByTeq(specificationsId).get(0)+1);
+        }
+        saveBatch(techniqueList);
+        return techniqueList.get(0).getVersion();
+    }
+
+    //鍒犻櫎
+    @Override
+    public void delTeqById(Integer id) {
+        Technique technique = new Technique();
+        technique.setId(id);
+        technique.setState(0);
+        techniqueMapper.updateById(technique);
+    }
+
+    //鎵归噺鍒犻櫎
+    @Override
+    public void delAllTeq(String ids) {
+        techniqueMapper.delAllTeq(ids);
     }
 }
 
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java b/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java
index e66d960..f713884 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java
@@ -2,11 +2,15 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yuanchu.mom.mapper.*;
 import com.yuanchu.mom.pojo.Technology;
-import com.yuanchu.mom.mapper.TechnologyMapper;
+import com.yuanchu.mom.pojo.dto.TechnologyDto;
 import com.yuanchu.mom.service.TechnologyService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -14,7 +18,7 @@
 
 /**
  * <p>
- *  鏈嶅姟瀹炵幇绫�
+ * 鏈嶅姟瀹炵幇绫�
  * </p>
  *
  * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
@@ -26,6 +30,18 @@
     @Resource
     TechnologyMapper technologyMapper;
 
+    @Resource
+    DeviceMapper deviceMapper;
+
+    @Resource
+    ProductMapper productMapper;
+
+    @Resource
+    MbomMapper mbomMapper;
+
+    @Resource
+    TechniqueMapper techniqueMapper;
+
 
     //鏍规嵁鍨嬪彿id鏌ヨ鐗堟湰
     @Override
@@ -35,7 +51,83 @@
 
     //鍙充晶鏁版嵁灞曠ず-->宸ヨ壓璺嚎
     @Override
-    public List<Map<String, Object>> selectAllTec(Integer specificationsId, Integer version,String message) {
-        return technologyMapper.selectAllTec(specificationsId,version,message);
+    public List<Map<String, Object>> selectAllTec(Integer specificationsId, Integer version, String message) {
+        return technologyMapper.selectAllTec(specificationsId, version, message);
+    }
+
+    //鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨璁惧缁�
+    @Override
+    public List<Map<String, Object>> chooseDevice() {
+        return deviceMapper.chooseDevGroup();
+    }
+
+    //鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎-->閫夋嫨宸ュ簭
+    @Override
+    public List<Map<String, Object>> chooseFather(Integer specificationsId) {
+        return technologyMapper.chooseFather(specificationsId);
+    }
+
+    //鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎
+    @Override
+    public void addTechnology(Integer specificationsId, TechnologyDto technologyDto) {
+        Technology technology = new Technology();
+        BeanUtils.copyProperties(technologyDto, technology);
+        technology.setSpecificationsId(specificationsId);
+        technologyMapper.insert(technology);
+    }
+
+    //濉啓鐢熶骇瀹氶,榧犳爣绉诲紑淇濆瓨
+    @Override
+    public Integer write(Integer id, Integer productionQuota) {
+        Technology technology = new Technology();
+        technology.setId(id);
+        technology.setProductionQuota(productionQuota);
+        return technologyMapper.updateById(technology);
+    }
+
+    //娣诲姞鍚屼竴涓瀷鍙峰伐鑹鸿矾绾跨殑鐗堟湰
+    @Override
+    public Integer addVersion(Integer specificationsId, Integer version) {
+        List<Technology> technologyList = technologyMapper.selectList(Wrappers.<Technology>query()
+                .eq("specifications_id", specificationsId)
+                .eq("version", version));
+        for (Technology technology : technologyList) {
+            technology.setId(null);
+            //鏈�鏂扮増鏈�+!
+            technology.setVersion(technologyMapper.selectVerByTec(specificationsId).get(0) + 1);
+        }
+        saveBatch(technologyList);
+        return technologyList.get(0).getVersion();
+    }
+
+    //鍒犻櫎
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delTechById(Integer id) {
+        //鍒犻櫎宸ヨ壓璺嚎琛�
+        Technology technology = new Technology();
+        technology.setId(id);
+        technology.setState(0);
+        technologyMapper.updateById(technology);
+        //鍒犻櫎鎶�鏈寚鏍囪〃
+        productMapper.delProByTecId(id);
+        //鍒犻櫎鐗╂枡娓呭崟琛�
+        mbomMapper.delMbomByTecId(id);
+        //鍒犻櫎鐢熶骇宸ヨ壓琛�
+        techniqueMapper.delTeqByTecId(id);
+    }
+
+    //鎵归噺鍒犻櫎
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delAllTech(String ids) {
+        //鎵归噺鍒犻櫎宸ヨ壓璺嚎琛�
+        technologyMapper.delAllTech(ids);
+        //鎵归噺鍒犻櫎鎶�鏈寚鏍囪〃
+        productMapper.delAllByTechId(ids);
+        //鎵归噺鍒犻櫎鐗╂枡娓呭崟琛�
+        mbomMapper.delAllByTecId(ids);
+        //鎵归噺鍒犻櫎鐢熶骇宸ヨ壓琛�
+        techniqueMapper.delAllByTecId(ids);
     }
 }
diff --git a/standard-server/src/main/resources/mapper/MbomMapper.xml b/standard-server/src/main/resources/mapper/MbomMapper.xml
index 4a312a6..e4bb434 100644
--- a/standard-server/src/main/resources/mapper/MbomMapper.xml
+++ b/standard-server/src/main/resources/mapper/MbomMapper.xml
@@ -31,19 +31,52 @@
     </resultMap>
     <select id="selectAllMbom" resultMap="oneMap">
         select m.id mid,
-               m.name mname,
-               unit,
-               num,
-               specifications,
-               t.name tname,
-               father
+        m.name mname,
+        unit,
+        num,
+        specifications,
+        t.name tname,
+        father
         from mom_ocean.mbom m
-                 left join mom_ocean.technology t on m.technology_id = t.id
+        left join mom_ocean.technology t on m.technology_id = t.id
         where m.state = 1
-          and m.version = #{version}
-          and specifications_id = #{specificationsId}
+        and m.version = #{version}
+        and specifications_id = #{specificationsId}
         <if test="message!=null and message!=''">
             and m.name like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹洪渶瑕佺殑鐗╂枡娓呭崟-->
+    <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Mbom">
+        select *
+        from mom_ocean.mbom
+        where state = 1
+          and version = #{version}
+          and technology_id in (select id
+                                from mom_ocean.technology
+                                where technology.state = 1
+                                  and specifications_id = #{specificationsId})
+    </select>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐗╂枡娓呭崟-->
+    <update id="delMbomByTecId">
+        update mom_ocean.mbom
+        set state=0
+        where technology_id = #{id}
+    </update>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+    <update id="delAllByTecId">
+        update mom_ocean.mbom
+        set state=0
+        where technology_id in (${ids})
+    </update>
+
+    <!--鏍规嵁鐗╂枡娓呭崟id鎵归噺鍒犻櫎-->
+    <update id="delAllMbom">
+        update mom_ocean.mbom
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>
\ No newline at end of file
diff --git a/standard-server/src/main/resources/mapper/ProductMapper.xml b/standard-server/src/main/resources/mapper/ProductMapper.xml
index 4fcd5c3..4a3bf35 100644
--- a/standard-server/src/main/resources/mapper/ProductMapper.xml
+++ b/standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -51,21 +51,62 @@
         <result property="internal" column="internal"/>
     </resultMap>
     <select id="selectAllPro" resultMap="oneMap">
-        select p.id     pid,
-               p.name   pname,
-               p.father pfather,
-               unit,
-               required,
-               internal,
-               t.father tfather,
-               t.name   tname
+        select p.id pid,
+        p.name pname,
+        p.father pfather,
+        unit,
+        required,
+        internal,
+        t.father tfather,
+        t.name tname
         from mom_ocean.product p
-                 left join mom_ocean.technology t on p.technology_id = t.id
+        left join mom_ocean.technology t on p.technology_id = t.id
         where p.state = 1
-          and p.version = #{version}
-          and specifications_id = #{specificationsId}
+        and p.version = #{version}
+        and specifications_id = #{specificationsId}
         <if test="message!=null and message!=''">
             and p.name like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鍙充笂瑙掓柊澧�-鎶�鏈寚鏍�-閫夋嫨椤圭洰鐖剁被-->
+    <select id="chooseFather" resultType="java.util.Map">
+        select distinct father
+        from mom_ocean.product
+        where state = 1
+          and technology_id = #{technologyId}
+    </select>
+
+    <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鐨勬墍鏈夊伐鑹虹殑鎶�鏈寚鏍�-->
+    <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Product">
+        select *
+        from mom_ocean.product
+        where state = 1
+          and version = #{version}
+          and technology_id in (select id
+                                from mom_ocean.technology
+                                where technology.state = 1
+                                  and specifications_id = #{specificationsId})
+    </select>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎-->
+    <update id="delProByTecId">
+        update mom_ocean.product
+        set state=0
+        where technology_id = #{id}
+    </update>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+    <update id="delAllByTechId">
+        update mom_ocean.product
+        set state=0
+        where technology_id in (${ids})
+    </update>
+
+    <!--鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎-->
+    <update id="delAllPro">
+        update mom_ocean.product
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>
diff --git a/standard-server/src/main/resources/mapper/TechniqueMapper.xml b/standard-server/src/main/resources/mapper/TechniqueMapper.xml
index 0d8255b..8f15432 100644
--- a/standard-server/src/main/resources/mapper/TechniqueMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechniqueMapper.xml
@@ -31,19 +31,82 @@
     </resultMap>
     <select id="selectAllTeq" resultMap="oneMap">
         select tq.id tqid,
-               device,
-               product_father,
-               product,
-               unit,
-               name,
-               father
+        device,
+        product_father,
+        product,
+        unit,
+        name,
+        father
         from mom_ocean.technique tq
-                 left join mom_ocean.technology tc on tq.technology_id = tc.id
+        left join mom_ocean.technology tc on tq.technology_id = tc.id
         where tq.state = 1
-          and specifications_id = #{specificationsId}
-          and tq.version = #{version}
+        and specifications_id = #{specificationsId}
+        and tq.version = #{version}
         <if test="message!=null and message!=''">
             and device like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鍙充笂瑙掓柊澧�-鐢熶骇宸ヨ壓-閫夋嫨璁惧-->
+    <select id="chooseDev" resultType="java.util.Map">
+        select name device
+        from mom_ocean.device
+        where state = 1
+          and device_status in (1, 5)
+          and father = (select distinct device_group
+                        from mom_ocean.technology
+                        where technology.state = 1
+                          and technology.id = #{technologyId})
+    </select>
+
+    <!--鍙充笂瑙掓柊澧�-鐢熶骇宸ヨ壓-閫夋嫨椤圭洰(鐖跺瓙),鍗曚綅-->
+    <resultMap id="chooseProMap" type="map">
+        <id property="name" column="productFather"/>
+        <collection property="children" resultMap="chooseProMaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="chooseProMaps" type="map">
+        <id property="name" column="product"/>
+        <result property="unit" column="unit"/>
+    </resultMap>
+    <select id="choosePro" resultMap="chooseProMap">
+        select name   product,
+               father productFather,
+               unit
+        from mom_ocean.product
+        where state = 1
+          and technology_id = #{technologyId}
+    </select>
+
+    <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹虹殑鐢熶骇宸ヨ壓-->
+    <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Technique">
+        select *
+        from mom_ocean.technique
+        where state = 1
+          and version = #{version}
+          and technology_id in (select id
+                                from mom_ocean.technology
+                                where technology.state = 1
+                                  and specifications_id = #{specificationsId})
+    </select>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐢熶骇宸ヨ壓-->
+    <update id="delTeqByTecId">
+        update mom_ocean.technique
+        set state=0
+        where technology_id = #{id}
+    </update>
+
+    <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+    <update id="delAllByTecId">
+        update mom_ocean.technique
+        set state=0
+        where technology_id in (${ids})
+    </update>
+
+    <!--鏍规嵁鐢熶骇宸ヨ壓id鎵归噺鍒犻櫎-->
+    <update id="delAllTeq">
+        update mom_ocean.technique
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>
\ No newline at end of file
diff --git a/standard-server/src/main/resources/mapper/TechnologyMapper.xml b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
index aacc7ab..bfdd39d 100644
--- a/standard-server/src/main/resources/mapper/TechnologyMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
@@ -12,7 +12,7 @@
 
     <!--鍙充晶鏁版嵁灞曠ず 宸ヨ壓璺嚎-->
     <resultMap id="selectAllTecMap" type="map">
-        <id property="father" column="father"/>
+        <id property="name" column="father"/>
         <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
     </resultMap>
     <resultMap id="selectAllTecMaps" type="map">
@@ -35,4 +35,37 @@
             and father like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鍙充笂瑙掓柊澧�-宸ヨ壓璺嚎-閫夋嫨宸ュ簭-->
+    <select id="chooseFather" resultType="java.util.Map">
+        select distinct father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+
+    <!--鍙充笂瑙掓柊澧�-鎶�鏈寚鏍�-閫夋嫨宸ュ簭,宸ヨ壓-->
+    <resultMap id="chooseTechMap" type="map">
+        <id property="name" column="father"/>
+        <collection property="children" resultMap="chooseTechMaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="chooseTechMaps" type="map">
+        <id property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+    <select id="chooseTech" resultMap="chooseTechMap">
+        select id,
+               name,
+               father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+
+    <!--鎵归噺鍒犻櫎-->
+    <update id="delAllTech">
+        update mom_ocean.technology
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>

--
Gitblit v1.9.3