zss
2023-09-01 6a19365f5dea396622b32afe28b3e4b9b067e0e1
标准BOM(完结)
已添加3个文件
已修改24个文件
已删除1个文件
1169 ■■■■■ 文件已修改
base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomDto.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto2.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueDto.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnologyDto.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/MbomMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/ProductMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/TechniqueMapper.xml 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/TechnologyMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
@@ -30,4 +30,5 @@
    //批量删除
    void delAllDevice(String ids);
}
standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java
@@ -95,4 +95,5 @@
        }
        return Result.fail("没有该类型!");
    }
}
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("批量删除成功!");
    }
}
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 = "技术指标id", 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 = "技术指标id", 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 = "技术指标id", dataTypeClass = String.class,required = true)
    })
    @PostMapping("/delAllPro")
    public Result delAllPro(String ids) {
        productService.delAllPro(ids);
        return Result.success("批量删除成功!");
    }
}
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("批量删除成功!");
    }
}
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,13 +9,9 @@
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>
@@ -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("批量删除成功!");
    }
}
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);
}
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);
    //根据技术指标id批量删除
    void delAllPro(String ids);
}
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);
}
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);
}
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 = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
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;
}
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;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/ProductDto2.java
ÎļþÒÑɾ³ý
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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) {
@@ -33,5 +39,57 @@
    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);
    }
}
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;
@@ -23,6 +26,9 @@
    @Resource
    private ProductMapper productMapper;
    @Resource
    TechnologyMapper technologyMapper;
    //根据型号id查询项目(技术指标)
    @Override
    public List<Map<String, Object>> selectProductList(Integer specificationsId) {
@@ -40,6 +46,65 @@
    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);
    }
}
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) {
@@ -33,5 +39,60 @@
    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);
    }
}
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;
@@ -26,6 +30,18 @@
    @Resource
    TechnologyMapper technologyMapper;
    @Resource
    DeviceMapper deviceMapper;
    @Resource
    ProductMapper productMapper;
    @Resource
    MbomMapper mbomMapper;
    @Resource
    TechniqueMapper techniqueMapper;
    //根据型号id查询版本
    @Override
@@ -38,4 +54,80 @@
    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);
    }
}
standard-server/src/main/resources/mapper/MbomMapper.xml
@@ -46,4 +46,37 @@
            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>
standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -68,4 +68,45 @@
            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>
    <!--根据技术指标id批量删除-->
    <update id="delAllPro">
        update mom_ocean.product
        set state=0
        where id in (${ids})
    </update>
</mapper>
standard-server/src/main/resources/mapper/TechniqueMapper.xml
@@ -46,4 +46,67 @@
            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>
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>