XiaoRuby
2023-09-01 86adbb1544142dcfb48333dade822f81640607a6
Merge remote-tracking branch 'origin/master'

# Conflicts:
# production-server/src/main/java/com/yuanchu/mom/service/impl/ManualTechnologyServiceImpl.java
# standard-server/src/main/resources/mapper/DeviceMapper.xml
已添加50个文件
已重命名6个文件
已修改36个文件
已删除7个文件
4243 ■■■■ 文件已修改
base-server/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/MbomModelController.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/RecordModelController.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/SelfcheckModelController.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/TechnicalModelController.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/controller/TechniqueModelController.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/MbomModelMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/RecordModelMapper.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/SelfcheckModelMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/mapper/TechniqueModelMapper.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/Device.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/MbomModel.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/RecordModel.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/SelfcheckModel.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/TechnicalModel.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/TechniqueModel.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/DeviceDto.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomModelDto.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/RecordModelDto.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/SelfcheckModelDto.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnicalModelDto.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueModelDto.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/DeviceService.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/MbomModelService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/RecordModelService.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/SelfcheckModelService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/TechnicalModelService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/TechniqueModelService.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/MbomModelServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/RecordModelServiceImpl.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/SelfcheckModelServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/TechnicalModelServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueModelServiceImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyTemplateServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/DeviceMapper.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/ElementTechnologyMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/MbomModelMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/RecordModelMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/SelfcheckModelMapper.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/TechnicalModelMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/TechniqueModelMapper.xml 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/RawInsProductController.java 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/RawInsProductMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/RawInsProduct.java 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/RawInsProductService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/RawInsProductServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/RawInsProductMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/SpecificationsController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/StandardController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/MaterialMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Material.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Mbom.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Product.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Technique.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialDto.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialTreeDto.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/SpecificationsDto.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/StandardDto.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/DeviceService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/MaterialService.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/SpecificationsService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/StandardService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/MaterialServiceImpl.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/SpecificationsServiceImpl.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/StandardServiceImpl.java 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/DeviceMapper.xml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/MaterialMapper.xml 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/MbomMapper.xml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/ProductMapper.xml 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/RawInsProductMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/TechniqueMapper.xml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/TechnologyMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user-server/src/main/java/com/yuanchu/mom/service/UserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/pom.xml
@@ -28,11 +28,6 @@
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.yuanchu.mom</groupId>
            <artifactId>standard-server</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>
</project>
base-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.yuanchu.mom.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanchu.mom.pojo.Device;
import com.yuanchu.mom.pojo.dto.DeviceDto;
import com.yuanchu.mom.service.DeviceService;
import com.yuanchu.mom.service.UserService;
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.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * <p>
 * å‰ç«¯æŽ§åˆ¶å™¨
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-07-31
 */
@Api(tags = "基础数据-->设备维护")
@RestController
@RequestMapping("/device")
public class DeviceController {
    @Autowired
    private DeviceService deviceService;
    @Autowired
    private UserService userService;
    @ApiOperation(value = "查询设备维护-->左侧列表设备组展示")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "type", value = "类型", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "search_class", value = "搜索框内容", dataTypeClass = String.class)
    })
    @GetMapping("/two_tree")
    public Result<?> deviceTwoTree(@RequestParam(defaultValue = "1") Integer type, String search_class) {
        List<Map<String, Object>> mapList = deviceService.deviceTwoTree(type, search_class);
        return Result.success(mapList);
    }
    @ApiOperation(value = "查询设备维护-->右侧列表展示该设备组下的所有设备")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "type", value = "类型", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "father", value = "设备组", dataTypeClass = String.class, required = true),
            @ApiImplicitParam(name = "deviceStatus", value = "设备状态(为空=全部)", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "message", value = "设备编号或者设备名称", dataTypeClass = String.class)
    })
    @GetMapping("/selectDevice")
    public Result<?> selectTreeDevice(Integer type, String father, Integer deviceStatus, String message) {
        return Result.success(deviceService.selectTreeDevice(type, father, deviceStatus, message));
    }
    @ApiOperation(value = "新增仪器设备:保管人下拉框")
    @GetMapping("/list_user")
    public Result<?> selectUserIdAndName() {
        List<Map<String, Object>> maps = userService.listUserIdAndName();
        return Result.success(maps);
    }
    @ApiOperation(value = "新增仪器设备")
    @PostMapping("/add")
    public Result<?> addDevice(@RequestBody DeviceDto deviceDto) {
        return Result.success("添加"+deviceService.addDevice(deviceDto)+"成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "设备维护id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delDeviceById")
    public Result delDeviceById(Integer id) {
        deviceService.delDeviceById(id);
        return Result.success("删除" + id + "成功!");
    }
    @ApiOperation(value = "批量删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "ids", value = "设备维护id", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/delAllDevice")
    public Result delAllDevice(String ids) {
        deviceService.delAllDevice(ids);
        return Result.success("批量删除成功!");
    }
}
base-server/src/main/java/com/yuanchu/mom/controller/MbomModelController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.MbomModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
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.MbomModelService;
/**
 * ç‰©æ–™æ¸…单维护表(MbomModel)表控制层
 *
 * @author zss
 * @since 2023-08-30 09:17:26
 */
@Api(tags = "基础数据-->物料清单维护")
@RestController
@RequestMapping("/mbomModel")
public class MbomModelController {
    @Autowired
    private MbomModelService mbomModelService;
    /*查询物料清单维护列表-->左边二级展示工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "查询物料清单维护列表-->右边展示该工艺所需要的原材料")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectAllMbom")
    public Result selectAllMbom(Integer id) {
        return Result.success(mbomModelService.selectAllMbom(id));
    }
    /*新增物料清单维护-->选择工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "新增物料清单维护")
    @PostMapping("/addMbom")
    public Result addMbom(@Validated @RequestBody MbomModelDto mbomModelDto) {
        Integer id = mbomModelService.addMbom(mbomModelDto);
        return Result.success("新增" + id + "成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "物料清单id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delMbomById")
    public Result delMbomById(Integer id) {
        mbomModelService.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) {
        mbomModelService.delAllMbom(ids);
        return Result.success("批量删除成功!");
    }
}
base-server/src/main/java/com/yuanchu/mom/controller/RecordModelController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.RecordModelDto;
import com.yuanchu.mom.pojo.dto.SelfcheckModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
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.RecordModelService;
/**
 * è®°å½•内容维护表(RecordModel)表控制层
 *
 * @author zss
 * @since 2023-08-29 15:40:38
 */
@Api(tags = "基础数据-->记录内容维护")
@RestController
@RequestMapping("/recordModel")
public class RecordModelController {
    @Autowired
    private RecordModelService recordModelService;
    /*查询记录内容维护列表-->左边二级展示工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "查询记录内容维护列表-->右边展示该工艺下的所有记录内容")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectAllRecord")
    public Result selectAllRecord(Integer id) {
        return Result.success(recordModelService.selectAllRecord(id));
    }
    /*新增记录内容维护-->选择工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "新增记录内容维护")
    @PostMapping("/addRecord")
    public Result addRecord(@Validated @RequestBody RecordModelDto recordModelDto) {
        Integer id = recordModelService.addRecord(recordModelDto);
        return Result.success("新增记录内容"+id+"成功!");
    }
    @ApiOperation(value = "根据id查询详情")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "记录内容id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selecRecordById")
    public Result selecRecordById(Integer id) {
        return Result.success(recordModelService.selecRecordById(id));
    }
    @ApiOperation(value = "编辑")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "记录内容id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/writeRecordById")
    public Result writeRecordById(Integer id, @Validated @RequestBody RecordModelDto recordModelDto) {
        recordModelService.writeRecordById(id, recordModelDto);
        return Result.success("修改" + id + "成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "记录内容id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delQueById")
    public Result delRecordById(Integer id) {
        recordModelService.delRecordById(id);
        return Result.success("删除" + id + "成功!");
    }
    @ApiOperation(value = "批量删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "ids", value = "记录内容id", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/delAllRecord")
    public Result delAllRecord(String ids) {
        recordModelService.delAllRecord(ids);
        return Result.success("批量删除成功!");
    }
}
base-server/src/main/java/com/yuanchu/mom/controller/SelfcheckModelController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.SelfcheckModelDto;
import com.yuanchu.mom.pojo.dto.TechnicalModelDto;
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.SelfcheckModelService;
/**
 * è‡ªæ£€é¡¹ç›®ç»´æŠ¤è¡¨(SelfcheckModel)表控制层
 *
 * @author zss
 * @since 2023-08-29 14:40:07
 */
@Api(tags = "基础数据-->自检项目维护")
@RestController
@RequestMapping("/selfcheckModel")
public class SelfcheckModelController {
    @Autowired
    private SelfcheckModelService selfcheckModelService;
    /*查询自检项目维护列表-->左边二级展示工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "查询自检项目维护列表-->右边展示该工艺下的所有自检项目")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectAllSelf")
    public Result selectAllSelf(Integer id) {
        return Result.success(selfcheckModelService.selectAllSelf(id));
    }
    /*新增自检项目维护-->选择工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "新增自检项目维护")
    @PostMapping("/addSelfcheck")
    public Result addSelfcheck(@Validated @RequestBody SelfcheckModelDto selfcheckModelDto) {
        Integer id = selfcheckModelService.addSelfcheck(selfcheckModelDto);
        return Result.success("新增自建项目"+id+"成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "自检项目id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delSelfcheckById")
    public Result delSelfcheckById(Integer id) {
        selfcheckModelService.delSelfcheckById(id);
        return Result.success("删除" + id + "成功!");
    }
    @ApiOperation(value = "批量删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "ids", value = "自检项目id", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/delAllTech")
    public Result delAllSelfcheck(String ids) {
        selfcheckModelService.delAllSelfcheck(ids);
        return Result.success("批量删除成功!");
    }
}
base-server/src/main/java/com/yuanchu/mom/controller/TechnicalModelController.java
@@ -59,26 +59,23 @@
    @ApiOperation(value = "新增技术指标维护-->选择项目父类")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
            @ApiImplicitParam(name = "techTemId", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/chooseProFath")
    public Result chooseProFath(Integer id) {
        return Result.success(technicalModelService.chooseProFath(id));
    public Result chooseProFath(Integer techTemId) {
        return Result.success(technicalModelService.chooseProFath(techTemId));
    }
    @ApiOperation(value = "新增技术指标维护")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/addTechMode")
    public Result addTechMode(Integer id, @Validated @RequestBody TechnicalModelDto technicalModelDto) {
        technicalModelService.addTechMode(id, technicalModelDto);
    public Result addTechMode(@Validated @RequestBody TechnicalModelDto technicalModelDto) {
        technicalModelService.addTechMode(technicalModelDto);
        return Result.success("新增成功!");
    }
    @ApiOperation(value = "根据id查询详情")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class,required = true)
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selecTechById")
    public Result selecTechById(Integer id) {
@@ -87,27 +84,27 @@
    @ApiOperation(value = "编辑")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class,required = true)
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/writeTechById")
    public Result writeTechById(Integer id,@Validated @RequestBody TechnicalModelDto technicalModelDto) {
        technicalModelService.writeTechById(id,technicalModelDto);
        return Result.success("修改"+id+"成功!");
    public Result writeTechById(Integer id, @Validated @RequestBody TechnicalModelDto technicalModelDto) {
        technicalModelService.writeTechById(id, technicalModelDto);
        return Result.success("修改" + id + "成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class,required = true)
            @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delTechById")
    public Result delTechById(Integer id) {
        technicalModelService.delTechById(id);
        return Result.success("删除"+id+"成功!");
        return Result.success("删除" + id + "成功!");
    }
    @ApiOperation(value = "批量删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "ids", value = "技术指标id", dataTypeClass = String.class,required = true)
            @ApiImplicitParam(name = "ids", value = "技术指标id", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/delAllTech")
    public Result delAllTech(String ids) {
base-server/src/main/java/com/yuanchu/mom/controller/TechniqueModelController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,112 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.TechnicalModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
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.TechniqueModelService;
/**
 * ç”Ÿäº§å·¥è‰ºç»´æŠ¤è¡¨(TechniqueModel)表控制层
 *
 * @author zss
 * @since 2023-08-29 09:26:37
 */
@Api(tags = "基础数据-->生产工艺维护")
@RestController
@RequestMapping("/techniqueModel")
public class TechniqueModelController {
    @Autowired
    private TechniqueModelService techniqueModelService;
    /*查询生产工艺维护列表-->左边二级展示工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "查询生产工艺维护列表-->右边展示该工艺下能使用的设备所能做的项目")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectAllTeque")
    public Result selectAllTeque(Integer id) {
        return Result.success(techniqueModelService.selectAllTeque(id));
    }
    /*新增生产工艺维护-->选择工序和工艺*/
    //使用技术指标维护的接口
    @ApiOperation(value = "新增生产工艺维护-->选择项目父类,子类,带出单位")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "techTemId", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/choosePro")
    public Result choosePro(Integer techTemId) {
        return Result.success(techniqueModelService.choosePro(techTemId));
    }
    @ApiOperation(value = "新增生产工艺维护-->选择设备")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "techTemId", value = "工艺路线id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/chooseDeiv")
    public Result chooseDeiv(Integer techTemId) {
        return Result.success(techniqueModelService.chooseDeiv(techTemId));
    }
    @ApiOperation(value = "新增生产工艺维护")
    @PostMapping("/addQeMode")
    public Result addQeMode(@Validated @RequestBody TechniqueModelDto techniqueModelDto) {
        Integer id = techniqueModelService.addQeMode(techniqueModelDto);
        return Result.success("新增" + id + "成功!");
    }
    @ApiOperation(value = "根据id查询详情")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "生产工艺id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selecQueById")
    public Result selecQueById(Integer id) {
        return Result.success(techniqueModelService.selecQueById(id));
    }
    @ApiOperation(value = "编辑")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "生产工艺id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/writeQueById")
    public Result writeQueById(Integer id, @Validated @RequestBody TechniqueModelDto techniqueModelDto) {
        techniqueModelService.writeQueById(id, techniqueModelDto);
        return Result.success("修改" + id + "成功!");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "生产工艺id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/delQueById")
    public Result delQueById(Integer id) {
        techniqueModelService.delQueById(id);
        return Result.success("删除" + id + "成功!");
    }
    @ApiOperation(value = "批量删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "ids", value = "生产工艺id", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/delAllQue")
    public Result delAllQue(String ids) {
        techniqueModelService.delAllQue(ids);
        return Result.success("批量删除成功!");
    }
}
base-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.yuanchu.mom.mapper;
import com.yuanchu.mom.pojo.Device;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
/**
 * <p>
 * Mapper æŽ¥å£
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-07-31
 */
public interface DeviceMapper extends BaseMapper<Device> {
    //查询设备维护-->左侧列表设备组展示
    List<Map<String, Object>> deviceTwoTree(Integer type, String search_class);
    //查询设备维护-->右侧列表展示该设备组下的所有设备
    List<Map<String, Object>> selectTreeDevice(Integer type, String father, Integer deviceStatus, String message);
    //根据分组查询设备名
    List<Map<String, Object>> getDeviceNameByGroup(String deviceGroup);
    //选择所有设备组
    List<Map<String, Object>> chooseDevGroup();
    //批量删除
    void delAllDevice(String ids);
}
base-server/src/main/java/com/yuanchu/mom/mapper/MbomModelMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.MbomModel;
import java.util.List;
import java.util.Map;
/**
 * ç‰©æ–™æ¸…单维护表(MbomModel)表数据库访问层
 *
 * @author zss
 * @since 2023-08-30 09:17:26
 */
public interface MbomModelMapper extends BaseMapper<MbomModel> {
    //查询物料清单维护列表-->右边展示该工艺所需要的原材料
    List<Map<String, Object>> selectAllMbom(Integer id);
    //根据物料清单id批量删除
    void delAllMbom(String ids);
    //根据工艺路线id删除
    void delMbomByTechId(Integer id);
    //根据工艺路线id批量删除
    void delAllByTechId(String ids);
}
base-server/src/main/java/com/yuanchu/mom/mapper/RecordModelMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.RecordModel;
import java.util.List;
import java.util.Map;
/**
 * è®°å½•内容维护表(RecordModel)表数据库访问层
 *
 * @author zss
 * @since 2023-08-29 15:40:38
 */
public interface RecordModelMapper extends BaseMapper<RecordModel> {
    //查询记录内容维护列表-->右边展示该工艺下的所有记录内容
    List<Map<String, Object>> selectAllRecord(Integer id);
    //根据记录内容id查看详情
    List<Map<String, Object>> selecRecordById(Integer id);
    //根据记录内容id批量删除
    void delAllRecord(String ids);
    //根据工艺路线id删除
    void delRecordByTechId(Integer id);
    //根据工艺路线id批量删除
    void delAllByTechId(String ids);
}
base-server/src/main/java/com/yuanchu/mom/mapper/SelfcheckModelMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.SelfcheckModel;
import java.util.List;
import java.util.Map;
/**
 * è‡ªæ£€é¡¹ç›®ç»´æŠ¤è¡¨(SelfcheckModel)表数据库访问层
 *
 * @author zss
 * @since 2023-08-29 14:40:08
 */
public interface SelfcheckModelMapper extends BaseMapper<SelfcheckModel> {
    //查询生产工艺维护列表-->右边展示该工艺下的所有自检项目
    List<Map<String, Object>> selectAllSelf(Integer id);
    //根据自检项目id批量删除
    void delAllSelfcheck(String ids);
    //根据工艺路线id删除
    void delSelfByTechId(Integer id);
    //根据工艺路线id批量删除
    void delAllByTechId(String ids);
}
base-server/src/main/java/com/yuanchu/mom/mapper/TechniqueModelMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.TechniqueModel;
import java.util.List;
import java.util.Map;
/**
 * ç”Ÿäº§å·¥è‰ºç»´æŠ¤è¡¨(TechniqueModel)表数据库访问层
 *
 * @author zss
 * @since 2023-08-29 09:26:37
 */
public interface TechniqueModelMapper extends BaseMapper<TechniqueModel> {
    //查询生产工艺维护列表-->右边展示该工艺下能使用的设备所能做的项目
    List<Map<String, Object>> selectAllTeque(Integer id);
    //新增生产工艺维护-->选择项目父类,子类,带出单位
    List<Map<String, Object>> choosePro(Integer id);
    //新增生产工艺维护-->选择设备
    List<Map<String, Object>> chooseDeiv(Integer id);
    //根据生产工艺id查看详情
    List<Map<String, Object>> selecQueById(Integer id);
    //根据生产工艺id批量删除
    void delAllQue(String ids);
    //根据工艺路线id删除
    void delQueByTechId(Integer id);
    //根据工艺路线id批量删除
    void delAllByTechId(String ids);
}
base-server/src/main/java/com/yuanchu/mom/pojo/Device.java
ÎļþÃû´Ó standard-server/src/main/java/com/yuanchu/mom/pojo/Device.java ÐÞ¸Ä
@@ -43,12 +43,13 @@
    private String father;
    @ApiModelProperty(value = "类型 1:生产设备;2:检测设备", example = "1")
    private String type;
    private Integer type;
    @ApiModelProperty(value = "保管人", example = "1")
    private Integer keeper;
    @ApiModelProperty(value = "计量截止有效期", example = "2023-08-09", dataType = "date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endMeasure;
    @ApiModelProperty(value = "设备状态 1:运行;2:报废;3:检修;4:故障;5:空闲", example = "1")
@@ -62,16 +63,15 @@
    private Integer rawInsProductId;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    @TableLogic(value = "1", delval = "0")
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
base-server/src/main/java/com/yuanchu/mom/pojo/MbomModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
/**
 * ç‰©æ–™æ¸…单维护表(MbomModel)表实体类
 *
 * @author zss
 * @since 2023-08-30 09:17:26
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName("mbom_model")
public class MbomModel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * å…³è” å·¥è‰ºid
     **/
    private Integer techTemId;
    /**
     * åŽŸææ–™åç§°
     **/
    private String name;
    /**
     * å•位
     **/
    private String unit;
    /**
     * ä¾›åº”商
     **/
    private String supplier;
    /**
     * è´¨é‡è¿½æº¯å·
     **/
    private String qualityTraceability;
    /**
     * è§„格型号
     **/
    private String specifications;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
base-server/src/main/java/com/yuanchu/mom/pojo/RecordModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
/**
 * è®°å½•内容维护表(RecordModel)表实体类
 *
 * @author zss
 * @since 2023-08-29 15:40:39
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName("record_model")
public class RecordModel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * å†…容名称(记录)
     **/
    private String name;
    /**
     * å…³è” å·¥è‰ºid
     **/
    private Integer techTemId;
    /**
     * å•位
     **/
    private String unit;
    /**
     * å¤‡æ³¨
     **/
    private String note;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
base-server/src/main/java/com/yuanchu/mom/pojo/SelfcheckModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
/**
 * è‡ªæ£€é¡¹ç›®ç»´æŠ¤è¡¨(SelfcheckModel)表实体类
 *
 * @author zss
 * @since 2023-08-29 14:40:08
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName("selfcheck_model")
public class SelfcheckModel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * è‡ªæ£€é¡¹ç›®
     **/
    private String name;
    /**
     * å…³è” å·¥è‰ºid
     **/
    private Integer techTemId;
    /**
     * å•位
     **/
    private String unit;
    /**
     * æ ‡å‡†å€¼
     **/
    private String required;
    /**
     * å†…控值
     **/
    private String internal;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
base-server/src/main/java/com/yuanchu/mom/pojo/TechnicalModel.java
@@ -3,10 +3,7 @@
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
@@ -24,6 +21,7 @@
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName("technical_model")
public class TechnicalModel implements Serializable {
    private static final long serialVersionUID = 1L;
base-server/src/main/java/com/yuanchu/mom/pojo/TechniqueModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
/**
 * ç”Ÿäº§å·¥è‰ºç»´æŠ¤è¡¨(TechniqueModel)表实体类
 *
 * @author zss
 * @since 2023-08-29 09:26:37
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName("technique_model")
public class TechniqueModel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * å…³è” å·¥è‰ºid
     **/
    private Integer techTemId;
    /**
     * å…³è” è®¾å¤‡id
     **/
    private Integer deviceId;
    /**
     * å…³è” é¡¹ç›®(技术指标)id
     **/
    private Integer technicalModelId;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
base-server/src/main/java/com/yuanchu/mom/pojo/dto/DeviceDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
//新增记录内容维护参数
public class DeviceDto {
    @JsonSerialize
    @NotNull(message = "类型不能为空")
    private Integer type;
    @JsonSerialize
    @NotNull(message = "设备状态不能为空")
    private Integer deviceStatus;
    @JsonSerialize
    @NotBlank(message = "设备编码不能为空")
    private String code;
    @JsonSerialize
    @NotBlank(message = "设备名称不能为空")
    private String name;
    @JsonSerialize
    @NotBlank(message = "设备分组不能为空")
    private String father;
    @JsonSerialize
    @NotNull(message = "保管人不能为空")
    private Integer keeper;
    @JsonSerialize
    @NotBlank(message = "厂家不能为空")
    private String factory;
    @JsonSerialize
    @NotNull(message = "计量截止有效期不能为空")
    private Date endMeasure;
}
base-server/src/main/java/com/yuanchu/mom/pojo/dto/MbomModelDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
//新增记录内容维护参数
public class MbomModelDto {
    @JsonSerialize
    @NotNull(message = "工艺路线id不能为空")
    private Integer techTemId;
    @JsonSerialize
    @NotBlank(message = "原材料名称不能为空")
    private String name;
    @JsonSerialize
    @NotBlank(message = "单位不能为空")
    private String unit;
    @JsonSerialize
    @NotBlank(message = "供应商不能为空")
    private String supplier;
    @JsonSerialize
    @NotBlank(message = "质量追溯号不能为空")
    private String qualityTraceability;
    @JsonSerialize
    @NotBlank(message = "规格型号不能为空")
    private String specifications;
}
base-server/src/main/java/com/yuanchu/mom/pojo/dto/RecordModelDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
//新增记录内容维护参数
public class RecordModelDto {
    @JsonSerialize
    @NotNull(message = "工艺路线id不能为空")
    private Integer techTemId;
    @JsonSerialize
    @NotBlank(message = "内容名称(记录)不能为空")
    private String name;
    @JsonSerialize
    @NotBlank(message = "单位不能为空")
    private String unit;
    @JsonSerialize
    private String note;
}
base-server/src/main/java/com/yuanchu/mom/pojo/dto/SelfcheckModelDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
//新增自检项目维护参数
public class SelfcheckModelDto {
    @JsonSerialize
    @NotNull(message = "工艺路线id不能为空")
    private Integer techTemId;
    @JsonSerialize
    @NotBlank(message = "项目不能为空")
    private String name;
    @JsonSerialize
    @NotBlank(message = "单位不能为空")
    private String unit;
    @JsonSerialize
    @NotBlank(message = "标准值不能为空")
    private String required;
    @JsonSerialize
    @NotBlank(message = "内控值不能为空")
    private String internal;
}
base-server/src/main/java/com/yuanchu/mom/pojo/dto/TechnicalModelDto.java
@@ -12,16 +12,8 @@
    @JsonSerialize
    @NotNull(message = "类型不能为空")
    private Integer type;
    @JsonSerialize
    @NotBlank(message = "工序不能为空")
    private String TechFather;
    @JsonSerialize
    @NotBlank(message = "工艺不能为空")
    private String TechName;
    @NotNull(message = "工艺路线id不能为空")
    private Integer techTemId;
    @JsonSerialize
    @NotBlank(message = "项目父类不能为空")
base-server/src/main/java/com/yuanchu/mom/pojo/dto/TechniqueModelDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
//新增生产工艺维护参数
public class TechniqueModelDto {
    @JsonSerialize
    @NotNull(message = "工艺路线id不能为空")
    private Integer techTemId;
    @JsonSerialize
    @NotNull(message = "技术指标id不能为空")
    private Integer technicalModelId;
    @JsonSerialize
    @NotNull(message = "设备id不能为空")
    private Integer devId;
}
base-server/src/main/java/com/yuanchu/mom/service/DeviceService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
package com.yuanchu.mom.service;
import com.yuanchu.mom.pojo.Device;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.dto.DeviceDto;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * <p>
 * æœåŠ¡ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-07-31
 */
public interface DeviceService extends IService<Device> {
    /**
     * æŸ¥è¯¢è®¾å¤‡ç»´æŠ¤-->左侧列表设备组展示
     * @param type
     * @param search_class
     * @return
     */
    List<Map<String, Object>> deviceTwoTree(Integer type, String search_class);
    /**
     * æŸ¥è¯¢è®¾å¤‡ç»´æŠ¤-->右侧列表展示该设备组下的所有设备
     * @param father
     * @return
     */
    List<Map<String, Object>> selectTreeDevice(Integer type, String father, Integer deviceStatus, String message);
    /**
     * æŸ¥è¯¢æ‰€æœ‰è®¾å¤‡
     * @return
     */
    List<Device> selectDevice();
    /**
     * æ ¹æ®è®¾å¤‡id查询设备名称
     * @param id
     */
    String getDeviceNameById(Integer id);
    /**
     * æ–°å¢žä»ªå™¨è®¾å¤‡
     * @param deviceDto
     * @return
     */
    Integer addDevice(DeviceDto deviceDto);
    /**
     * æ ¹æ®è®¾å¤‡åˆ†ç»„查询设备
     * @param deviceGroup
     * @return
     */
    List<Map<String, Object>> getDeviceNameByGroup(String deviceGroup);
    /**
     * æŸ¥è¯¢æ‰€æœ‰è®¾å¤‡ç¼–号和设备名称
     * @return
     */
    List<Map<String, Object>> selectDeviceIdAndName();
    /**
     * åˆ é™¤
     * @param id
     */
    void delDeviceById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     * @param ids
     */
    void delAllDevice(String ids);
}
base-server/src/main/java/com/yuanchu/mom/service/MbomModelService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.MbomModel;
import com.yuanchu.mom.pojo.dto.MbomModelDto;
import java.util.List;
import java.util.Map;
/**
 * ç‰©æ–™æ¸…单维护表(MbomModel)表服务接口
 *
 * @author zss
 * @since 2023-08-30 09:17:26
 */
public interface MbomModelService extends IService<MbomModel> {
    /**
     * æŸ¥è¯¢ç‰©æ–™æ¸…单维护列表-->右边展示该工艺所需要的原材料
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> selectAllMbom(Integer id);
    /**
     * æ–°å¢žç‰©æ–™æ¸…单维护表
     * @param mbomModelDto
     * @return
     */
    Integer addMbom(MbomModelDto mbomModelDto);
    /**
     * åˆ é™¤
     * @param id
     */
    void delMbomById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     * @param ids
     */
    void delAllMbom(String ids);
}
base-server/src/main/java/com/yuanchu/mom/service/RecordModelService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.RecordModel;
import com.yuanchu.mom.pojo.dto.RecordModelDto;
import java.util.List;
import java.util.Map;
/**
 * è®°å½•内容维护表(RecordModel)表服务接口
 *
 * @author zss
 * @since 2023-08-29 15:40:38
 */
public interface RecordModelService extends IService<RecordModel> {
    /**
     * æŸ¥è¯¢è®°å½•内容维护列表-->右边展示该工艺下的所有记录内容
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> selectAllRecord(Integer id);
    /**
     * æ–°å¢žè®°å½•内容维护
     * @param recordModelDto
     * @return
     */
    Integer addRecord(RecordModelDto recordModelDto);
    /**
     * æ ¹æ®id查看详情
     * @param id è®°å½•内容id
     * @return
     */
    List<Map<String,Object>> selecRecordById(Integer id);
    /**
     * ç¼–辑
     * @param id
     * @param recordModelDto
     */
    void writeRecordById(Integer id, RecordModelDto recordModelDto);
    /**
     * åˆ é™¤
     * @param id
     */
    void delRecordById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     * @param ids
     */
    void delAllRecord(String ids);
}
base-server/src/main/java/com/yuanchu/mom/service/SelfcheckModelService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.SelfcheckModel;
import com.yuanchu.mom.pojo.dto.SelfcheckModelDto;
import java.util.List;
import java.util.Map;
/**
 * è‡ªæ£€é¡¹ç›®ç»´æŠ¤è¡¨(SelfcheckModel)表服务接口
 *
 * @author zss
 * @since 2023-08-29 14:40:08
 */
public interface SelfcheckModelService extends IService<SelfcheckModel> {
    /**
     * æŸ¥è¯¢è‡ªæ£€é¡¹ç›®ç»´æŠ¤åˆ—表-->右边展示该工艺下的所有自检项目
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> selectAllSelf(Integer id);
    /**
     * æ–°å¢žè‡ªæ£€é¡¹ç›®
     * @param selfcheckModelDto
     * @return
     */
    Integer addSelfcheck(SelfcheckModelDto selfcheckModelDto);
    /**
     * åˆ é™¤
     * @param id è‡ªæ£€é¡¹ç›®id
     */
    void delSelfcheckById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     * @param ids è‡ªæ£€é¡¹ç›®ids
     */
    void delAllSelfcheck(String ids);
}
base-server/src/main/java/com/yuanchu/mom/service/TechnicalModelService.java
@@ -51,30 +51,33 @@
     *
     * @param technicalModelDto
     */
    void addTechMode(Integer id, TechnicalModelDto technicalModelDto);
    void addTechMode(TechnicalModelDto technicalModelDto);
    /**
     * æ ¹æ®id查询详情
     *
     * @param id æŠ€æœ¯æŒ‡æ ‡id
     * @return
     */
    List<Map<String,Object>> selecTechById(Integer id);
    List<Map<String, Object>> selecTechById(Integer id);
    /**
     * ç¼–辑
     * @param id
     *
     * @param technicalModelDto
     */
    void writeTechById(Integer id, TechnicalModelDto technicalModelDto);
    /**
     * åˆ é™¤
     *
     * @param id
     */
    void delTechById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     *
     * @param ids
     */
    void delAllTech(String ids);
base-server/src/main/java/com/yuanchu/mom/service/TechniqueModelService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.TechniqueModel;
import com.yuanchu.mom.pojo.dto.TechnicalModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
import java.util.List;
import java.util.Map;
/**
 * ç”Ÿäº§å·¥è‰ºç»´æŠ¤è¡¨(TechniqueModel)表服务接口
 *
 * @author zss
 * @since 2023-08-29 09:26:37
 */
public interface TechniqueModelService extends IService<TechniqueModel> {
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥è‰ºç»´æŠ¤åˆ—表-->右边展示该工艺下能使用的设备所能做的项目
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> selectAllTeque(Integer id);
    /**
     * æ–°å¢žç”Ÿäº§å·¥è‰ºç»´æŠ¤-->选择项目父类,子类,带出单位
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> choosePro(Integer id);
    /**
     * æ–°å¢žç”Ÿäº§å·¥è‰ºç»´æŠ¤-->选择设备
     * @param id å·¥è‰ºè·¯çº¿id
     * @return
     */
    List<Map<String,Object>> chooseDeiv(Integer id);
    /**
     * æ–°å¢žç”Ÿäº§å·¥è‰ºç»´æŠ¤
     * @param techniqueModelDto
     */
    Integer addQeMode(TechniqueModelDto techniqueModelDto);
    /**
     * æ ¹æ®id查看详情
     * @param id ç”Ÿäº§å·¥è‰ºid
     * @return
     */
    List<Map<String,Object>> selecQueById(Integer id);
    /**
     * ç¼–辑
     * @param id
     * @param techniqueModelDto
     */
    void writeQueById(Integer id, TechniqueModelDto techniqueModelDto);
    /**
     * åˆ é™¤
     * @param id
     */
    void delQueById(Integer id);
    /**
     * æ‰¹é‡åˆ é™¤
     * @param ids
     */
    void delAllQue(String ids);
}
base-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yuanchu.mom.pojo.Device;
import com.yuanchu.mom.mapper.DeviceMapper;
import com.yuanchu.mom.pojo.dto.DeviceDto;
import com.yuanchu.mom.service.DeviceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * <p>
 * æœåŠ¡å®žçŽ°ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-07-31
 */
@Service
public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> implements DeviceService {
    @Resource
    private DeviceMapper deviceMapper;
    //查询设备维护-->左侧列表设备组展示
    @Override
    public List<Map<String, Object>> deviceTwoTree(Integer type, String search_class) {
        return deviceMapper.deviceTwoTree(type, search_class);
    }
    //查询设备维护-->右侧列表展示该设备组下的所有设备
    @Override
    public List<Map<String, Object>> selectTreeDevice(Integer type, String father, Integer deviceStatus, String message) {
        return deviceMapper.selectTreeDevice(type, father, deviceStatus, message);
    }
    //查询所有设备
    @Override
    public List<Device> selectDevice() {
        return deviceMapper.selectList(new QueryWrapper<>());
    }
    //根据设备id获取设备名称
    @Override
    public String getDeviceNameById(Integer id) {
        Device device = deviceMapper.selectById(id);
        return device.getName();
    }
    //新增仪器设备
    @Override
    public Integer addDevice(DeviceDto deviceDto) {
        Device device = new Device();
        BeanUtils.copyProperties(deviceDto, device);
        deviceMapper.insert(device);
        return device.getId();
    }
    //根据分组查询设备名
    @Override
    public List<Map<String, Object>> getDeviceNameByGroup(String deviceGroup) {
        return deviceMapper.getDeviceNameByGroup(deviceGroup);
    }
    //查询所有设备编号和设备名称
    @Override
    public List<Map<String, Object>> selectDeviceIdAndName() {
        LambdaQueryWrapper<Device> wrapper = new LambdaQueryWrapper<>();
        wrapper.select(Device::getId, Device::getName, Device::getCode);
        return deviceMapper.selectMaps(wrapper);
    }
    //删除
    @Override
    public void delDeviceById(Integer id) {
        Device device = new Device();
        device.setId(id);
        device.setState(0);
        deviceMapper.updateById(device);
    }
    //批量删除
    @Override
    public void delAllDevice(String ids) {
        deviceMapper.delAllDevice(ids);
    }
}
base-server/src/main/java/com/yuanchu/mom/service/impl/MbomModelServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.MbomModelMapper;
import com.yuanchu.mom.pojo.MbomModel;
import com.yuanchu.mom.pojo.dto.MbomModelDto;
import com.yuanchu.mom.service.MbomModelService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * ç‰©æ–™æ¸…单维护表(MbomModel)表服务实现类
 *
 * @author zss
 * @since 2023-08-30 09:17:26
 */
@Service
public class MbomModelServiceImpl extends ServiceImpl<MbomModelMapper, MbomModel> implements MbomModelService {
    @Resource
    MbomModelMapper mbomModelMapper;
    //查询物料清单维护列表-->右边展示该工艺所需要的原材料
    @Override
    public List<Map<String, Object>> selectAllMbom(Integer id) {
        return mbomModelMapper.selectAllMbom(id);
    }
    //新增物料清单维护表
    @Override
    public Integer addMbom(MbomModelDto mbomModelDto) {
        MbomModel mbomModel = new MbomModel();
        BeanUtils.copyProperties(mbomModelDto,mbomModel);
        mbomModelMapper.insert(mbomModel);
        return mbomModel.getId();
    }
    //删除
    @Override
    public void delMbomById(Integer id) {
        MbomModel mbomModel = new MbomModel();
        mbomModel.setId(id);
        mbomModel.setState(0);
        mbomModelMapper.updateById(mbomModel);
    }
    //批量删除
    @Override
    public void delAllMbom(String ids) {
        mbomModelMapper.delAllMbom(ids);
    }
}
base-server/src/main/java/com/yuanchu/mom/service/impl/RecordModelServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.RecordModelMapper;
import com.yuanchu.mom.pojo.RecordModel;
import com.yuanchu.mom.pojo.dto.RecordModelDto;
import com.yuanchu.mom.service.RecordModelService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * è®°å½•内容维护表(RecordModel)表服务实现类
 *
 * @author zss
 * @since 2023-08-29 15:40:39
 */
@Service
public class RecordModelServiceImpl extends ServiceImpl<RecordModelMapper, RecordModel> implements RecordModelService {
    @Resource
    RecordModelMapper recordModelMapper;
    //查询记录内容维护列表-->右边展示该工艺下的所有记录内容
    @Override
    public List<Map<String, Object>> selectAllRecord(Integer id) {
        return recordModelMapper.selectAllRecord(id);
    }
    //新增记录内容维护
    @Override
    public Integer addRecord(RecordModelDto recordModelDto) {
        RecordModel recordModel = RecordModel.builder()
                .name(recordModelDto.getName())
                .techTemId(recordModelDto.getTechTemId())
                .unit(recordModelDto.getUnit())
                .note(recordModelDto.getNote())
                .build();
        recordModelMapper.insert(recordModel);
        return recordModel.getId();
    }
    //根据id查看详情
    @Override
    public List<Map<String, Object>> selecRecordById(Integer id) {
        return recordModelMapper.selecRecordById(id);
    }
    //编辑
    @Override
    public void writeRecordById(Integer id, RecordModelDto recordModelDto) {
        RecordModel recordModel = new RecordModel();
        BeanUtils.copyProperties(recordModelDto, recordModel);
        recordModel.setId(id);
        recordModelMapper.updateById(recordModel);
    }
    //删除
    @Override
    public void delRecordById(Integer id) {
        RecordModel recordModel = new RecordModel();
        recordModel.setId(id);
        recordModel.setState(0);
        recordModelMapper.updateById(recordModel);
    }
    //批量删除
    @Override
    public void delAllRecord(String ids) {
        recordModelMapper.delAllRecord(ids);
    }
}
base-server/src/main/java/com/yuanchu/mom/service/impl/SelfcheckModelServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.SelfcheckModelMapper;
import com.yuanchu.mom.pojo.SelfcheckModel;
import com.yuanchu.mom.pojo.dto.SelfcheckModelDto;
import com.yuanchu.mom.service.SelfcheckModelService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * è‡ªæ£€é¡¹ç›®ç»´æŠ¤è¡¨(SelfcheckModel)表服务实现类
 *
 * @author zss
 * @since 2023-08-29 14:40:08
 */
@Service
public class SelfcheckModelServiceImpl extends ServiceImpl<SelfcheckModelMapper, SelfcheckModel> implements SelfcheckModelService {
    @Resource
    SelfcheckModelMapper selfcheckModelMapper;
    //查询生产工艺维护列表-->右边展示该工艺下的所有自检项目
    @Override
    public List<Map<String, Object>> selectAllSelf(Integer id) {
        return selfcheckModelMapper.selectAllSelf(id);
    }
    //新增自检项目
    @Override
    public Integer addSelfcheck(SelfcheckModelDto selfcheckModelDto) {
        SelfcheckModel selfcheckModel = SelfcheckModel.builder()
                .name(selfcheckModelDto.getName())
                .techTemId(selfcheckModelDto.getTechTemId())
                .unit(selfcheckModelDto.getUnit())
                .required(selfcheckModelDto.getRequired())
                .internal(selfcheckModelDto.getInternal())
                .build();
        selfcheckModelMapper.insert(selfcheckModel);
        return selfcheckModel.getId();
    }
    //删除
    @Override
    public void delSelfcheckById(Integer id) {
        SelfcheckModel selfcheckModel = new SelfcheckModel();
        selfcheckModel.setId(id);
        selfcheckModel.setState(0);
        selfcheckModelMapper.updateById(selfcheckModel);
    }
    //批量删除
    @Override
    public void delAllSelfcheck(String ids) {
        selfcheckModelMapper.delAllSelfcheck(ids);
    }
}
base-server/src/main/java/com/yuanchu/mom/service/impl/TechnicalModelServiceImpl.java
@@ -51,10 +51,13 @@
    //新增技术指标维护
    @Override
    public void addTechMode(Integer id, TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = new TechnicalModel();
        BeanUtils.copyProperties(technicalModelDto, technicalModel);
        technicalModel.setTechTemId(id);
    public void addTechMode(TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = TechnicalModel.builder()
                .techTemId(technicalModelDto.getTechTemId())
                .father(technicalModelDto.getFather())
                .name(technicalModelDto.getName())
                .unit(technicalModelDto.getUnit())
                .build();
        technicalModelMapper.insert(technicalModel);
    }
@@ -66,7 +69,7 @@
    //编辑
    @Override
    public void writeTechById(Integer id, TechnicalModelDto technicalModelDto) {
    public void writeTechById(Integer id,TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = new TechnicalModel();
        BeanUtils.copyProperties(technicalModelDto, technicalModel);
        technicalModel.setId(id);
base-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueModelServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.TechniqueModelMapper;
import com.yuanchu.mom.pojo.TechniqueModel;
import com.yuanchu.mom.pojo.dto.TechnicalModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
import com.yuanchu.mom.service.TechniqueModelService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * ç”Ÿäº§å·¥è‰ºç»´æŠ¤è¡¨(TechniqueModel)表服务实现类
 *
 * @author zss
 * @since 2023-08-29 09:26:37
 */
@Service
public class TechniqueModelServiceImpl extends ServiceImpl<TechniqueModelMapper, TechniqueModel> implements TechniqueModelService {
    @Resource
    TechniqueModelMapper techniqueModelMapper;
    //查询生产工艺维护列表-->右边展示该工艺下能使用的设备所能做的项目
    @Override
    public List<Map<String, Object>> selectAllTeque(Integer id) {
        return techniqueModelMapper.selectAllTeque(id);
    }
    //新增生产工艺维护-->选择项目父类,子类,带出单位
    @Override
    public List<Map<String, Object>> choosePro(Integer id) {
        return techniqueModelMapper.choosePro(id);
    }
    //新增生产工艺维护-->选择设备
    @Override
    public List<Map<String, Object>> chooseDeiv(Integer id) {
        return techniqueModelMapper.chooseDeiv(id);
    }
    //新增生产工艺维护
    @Override
    public Integer addQeMode(TechniqueModelDto techniqueModelDto) {
        TechniqueModel techniqueModel = TechniqueModel.builder()
                .technicalModelId(techniqueModelDto.getTechnicalModelId())
                .techTemId(techniqueModelDto.getTechTemId())
                .deviceId(techniqueModelDto.getDevId())
                .build();
        techniqueModelMapper.insert(techniqueModel);
        return techniqueModel.getId();
    }
    //根据生产工艺id查看详情
    @Override
    public List<Map<String, Object>> selecQueById(Integer id) {
        return techniqueModelMapper.selecQueById(id);
    }
    //编辑
    @Override
    public void writeQueById(Integer id, TechniqueModelDto techniqueModelDto) {
        TechniqueModel techniqueModel = new TechniqueModel();
        BeanUtils.copyProperties(techniqueModelDto,techniqueModel);
        techniqueModel.setId(id);
        techniqueModelMapper.updateById(techniqueModel);
    }
    //删除
    @Override
    public void delQueById(Integer id) {
        TechniqueModel techniqueModel = new TechniqueModel();
        techniqueModel.setId(id);
        techniqueModel.setState(0);
        techniqueModelMapper.updateById(techniqueModel);
    }
    //批量删除
    @Override
    public void delAllQue(String ids) {
        techniqueModelMapper.delAllQue(ids);
    }
}
base-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyTemplateServiceImpl.java
@@ -45,6 +45,18 @@
    @Resource
    TechnicalModelMapper technicalModelMapper;
    @Resource
    TechniqueModelMapper techniqueModelMapper;
    @Resource
    SelfcheckModelMapper selfcheckModelMapper;
    @Resource
    RecordModelMapper recordModelMapper;
    @Resource
    MbomModelMapper mbomModelMapper;
    //新增工艺路线-->选择设备组
    @Override
@@ -128,7 +140,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delTechById(Integer id) {
        //删除工艺表
        //删除工艺路线维护表
        TechnologyTemplate technologyTemplate = new TechnologyTemplate();
        technologyTemplate.setId(id).setState(0);
        technologyTemplateMapper.updateById(technologyTemplate);
@@ -136,7 +148,14 @@
        elementTechnologyService.delElemaByTechsId(id);
        //删除技术指标维护表
        technicalModelMapper.delTeMoByTechId(id);
        //todo:删除未完待续
        //删除生产工艺维护表
        techniqueModelMapper.delQueByTechId(id);
        //删除自检项目维护表
        selfcheckModelMapper.delSelfByTechId(id);
        //删除记录内容维护表
        recordModelMapper.delRecordByTechId(id);
        //删除物料清单维护表
        mbomModelMapper.delMbomByTechId(id);
    }
    //批量删除
@@ -149,6 +168,14 @@
        elementTechnologyService.delAllByTechId(ids);
        //批量删除指标维护表
        technicalModelMapper.delAllByTechId(ids);
        //批量删除生产工艺维护表
        techniqueModelMapper.delAllByTechId(ids);
        //批量删除自检项目维护表
        selfcheckModelMapper.delAllByTechId(ids);
        //批量删除记录内容维护表
        recordModelMapper.delAllByTechId(ids);
        //批量删除物料清单维护表
        mbomModelMapper.delAllByTechId(ids);
    }
}
base-server/src/main/resources/mapper/DeviceMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.DeviceMapper">
    <!--查询设备维护 å·¦ä¾§åˆ—表设备组展示-->
    <select id="deviceTwoTree" resultType="java.util.Map">
        SELECT distinct father,type
        FROM mom_ocean.device d
        WHERE d.state = 1
        AND d.type = #{type}
        <if test="search_class !=null and search_class != ''">
            AND d.`name` like concat('%',#{search_class},'%')
        </if>
    </select>
    <!--查询设备维护 å³ä¾§åˆ—表展示该设备组下的所有设备-->
    <select id="selectTreeDevice" resultType="java.util.Map">
        select device.id,
        code,
        device.name,
        user.name userName,
        DATE_FORMAT(end_measure, '%Y-%m-%d'),
        device_status,
        factory
        from mom_ocean.device,mom_ocean.user
        where device.state=1
        and user.id=keeper
        and type=#{type}
        and father=#{father}
        <if test="deviceStatus!=null and deviceStatus!=''">
            and device_status=#{deviceStatus}
        </if>
        <if test="message!=null and message!=''">
            and code like concat('%',#{message},'%')
            or name like concat('%',#{message},'%')
        </if>
    </select>
    <!--根据设备分组查询设备-->
    <select id="getDeviceNameByGroup" resultType="java.util.Map">
        select id, name
        from mom_ocean.device
        where state = 1
          and father = #{deviceGroup}
          and device_status in (1, 5)
    </select>
    <!--选择设备组-->
    <select id="chooseDevGroup" resultType="java.util.Map">
        select distinct father
        from mom_ocean.device
        where state = 1
          and device_status in (1, 5)
    </select>
    <!--批量删除-->
    <update id="delAllDevice">
        update mom_ocean.device
        set state=0
        where id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/ElementTechnologyMapper.xml
@@ -12,6 +12,6 @@
    <update id="delAllByTechId">
        update mom_ocean.element_technology
        set state=0
        where tech_tem_id in (${id})
        where tech_tem_id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/MbomModelMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.MbomModelMapper">
    <!--查询物料清单维护列表 å³è¾¹å±•示该工艺所需要的原材料-->
    <select id="selectAllMbom" resultType="java.util.Map">
        select id,
               name,
               unit
        from mom_ocean.mbom_model
        where state = 1
          and tech_tem_id = #{id}
    </select>
    <!--根据物料清单id批量删除-->
    <update id="delAllMbom">
        update mom_ocean.mbom_model
        set state=0
        where id in (${ids})
    </update>
    <!--根据工艺路线id删除-->
    <update id="delMbomByTechId">
        update mom_ocean.mbom_model
        set state=0
        where tech_tem_id = #{id}
    </update>
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTechId">
        update mom_ocean.mbom_model
        set state=0
        where tech_tem_id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/RecordModelMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.RecordModelMapper">
    <!--查询记录内容维护列表 å³è¾¹å±•示该工艺下的所有记录内容-->
    <select id="selectAllRecord" resultType="java.util.Map">
        select id,
               name,
               unit,
               note
        from mom_ocean.record_model
        where state = 1
          and tech_tem_id = #{id}
    </select>
    <!--根据记录内容id查看详情-->
    <select id="selecRecordById" resultType="java.util.Map">
        select type,
               father  techFather,
               tt.name techName,
               rm.name,
               unit,
               note
        from mom_ocean.record_model rm,
             mom_ocean.technology_template tt
        where rm.state = 1
          and tech_tem_id = tt.id
          and rm.id = #{id}
    </select>
    <!--根据记录内容id批量删除-->
    <update id="delAllRecord">
        update mom_ocean.record_model
        set state=0
        where id in (${ids})
    </update>
    <!--根据工艺路线id删除-->
    <update id="delRecordByTechId">
        update mom_ocean.record_model
        set state=0
        where tech_tem_id = #{id}
    </update>
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTechId">
        update mom_ocean.record_model
        set state=0
        where tech_tem_id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/SelfcheckModelMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.SelfcheckModelMapper">
    <!--查询生产工艺维护列表 å³è¾¹å±•示该工艺下的所有自检项目-->
    <select id="selectAllSelf" resultType="java.util.Map">
        select id,
               name,
               unit,
               required,
               internal
        from mom_ocean.selfcheck_model
        where state = 1
          and tech_tem_id = #{id}
    </select>
    <!--根据自检项目id批量删除-->
    <update id="delAllSelfcheck">
        update mom_ocean.selfcheck_model
        set state=0
        where id in (${ids})
    </update>
    <!--根据工艺路线id删除-->
    <update id="delSelfByTechId">
        update mom_ocean.selfcheck_model
        set state=0
        where selfcheck_model.tech_tem_id = #{id}
    </update>
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTechId">
        update mom_ocean.selfcheck_model
        set state=0
        where selfcheck_model.tech_tem_id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/TechnicalModelMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="com.yuanchu.mom.mapper.TechnicalModelMapper">
    <!--查询技术指标维护列表 å·¦è¾¹äºŒçº§å±•示工序和工艺  -->
    <resultMap id="selectAllTechTemMap" type="map">
        <id property="father" column="father"/>
        <id property="name" column="father"/>
        <collection property="children" resultMap="selectAllTechTemTowMap" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTechTemTowMap" type="map">
@@ -24,13 +24,13 @@
    <!--查询技术指标维护列表 å³è¾¹å±•示该工艺下的检验项目-->
    <resultMap id="selectAllTechNamMap" type="map">
        <id property="father" column="father"/>
        <id property="name" column="father"/>
        <collection property="children" resultMap="selectAllTechNamTowMap" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTechNamTowMap" type="map">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="unit" column="unit"/>
        <result property="name" column="unit"/>
    </resultMap>
    <select id="selectAllTechNam" resultMap="selectAllTechNamMap">
        select id,
@@ -44,15 +44,15 @@
    <!--新增技术指标维护 é€‰æ‹©å·¥åºå’Œå·¥è‰º-->
    <resultMap id="chooseTechFathMap" type="map">
        <id property="techFather" column="techFather"/>
        <id property="name" column="techFather"/>
        <collection property="children" resultMap="chooseTechFathTowMap" javaType="List"/>
    </resultMap>
    <resultMap id="chooseTechFathTowMap" type="map">
        <id property="id" column="id"/>
        <result property="techName" column="techName"/>
        <id property="id" column="techTemId"/>
        <result property="name" column="techName"/>
    </resultMap>
    <select id="chooseTechFath" resultMap="chooseTechFathMap">
        select id,
        select id techTemId,
               name   techName,
               father techFather
        from mom_ocean.technology_template
base-server/src/main/resources/mapper/TechniqueModelMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.TechniqueModelMapper">
    <!--查询生产工艺维护列表 å³è¾¹å±•示该工艺下能使用的设备所能做的项目-->
    <resultMap id="selectAllTequeMap" type="map">
        <id property="name" column="dname"/>
        <collection property="children" resultMap="selectAllTequeMaps" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTequeMaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="father"/>
        <result property="name" column="unit"/>
        <result property="name" column="name"/>
    </resultMap>
    <select id="selectAllTeque" resultMap="selectAllTequeMap">
        select d.name dname,
               qm.id,
               cm.father,
               unit,
               cm.name
        from mom_ocean.technique_model qm,
             mom_ocean.technical_model cm,
             mom_ocean.device d,
             mom_ocean.technology_template tt
        where qm.state = 1
          and d.id = qm.device_id
          and cm.id = qm.technical_model_id
          and tt.id = qm.tech_tem_id
          and qm.tech_tem_id = #{id}
    </select>
    <!--新增生产工艺维护 é€‰æ‹©é¡¹ç›®çˆ¶ç±»,子类,带出单位-->
    <resultMap id="chooseProMap" type="map">
        <id property="name" column="father"/>
        <collection property="children" resultMap="chooseProMaps" javaType="List"/>
    </resultMap>
    <resultMap id="chooseProMaps" type="map">
        <id property="id" column="technicalModelId"/>
        <result property="name" column="name"/>
        <result property="name" column="unit"/>
    </resultMap>
    <select id="choosePro" resultMap="chooseProMap">
        select father,
               id technicalModelId,
               name,
               unit
        from mom_ocean.technical_model
        where state = 1
          and tech_tem_id = #{id}
    </select>
    <!--新增生产工艺维护 é€‰æ‹©è®¾å¤‡-->
    <select id="chooseDeiv" resultType="java.util.Map">
        select id devId,
               name
        from mom_ocean.device
        where state = 1
          and device_status in (1, 5)
          and father = (select device_group
                        from mom_ocean.technology_template
                        where technology_template.state = 1
                          and technology_template.id = #{id})
    </select>
    <!--根据生产工艺id查看详情-->
    <select id="selecQueById" resultType="java.util.Map">
        select tt.type,
               tt.father techFather,
               tt.name   techName,
               d.name    dname,
               cm.father,
               cm.name,
               unit
        from mom_ocean.technique_model qm,
             mom_ocean.technology_template tt,
             mom_ocean.device d,
             mom_ocean.technical_model cm
        where qm.tech_tem_id = tt.id
          and device_id = d.id
          and cm.id = qm.technical_model_id
          and qm.id = #{id}
    </select>
    <!--批量删除-->
    <update id="delAllQue">
        update mom_ocean.technique_model
        set state=0
        where id in (${ids})
    </update>
    <!--根据工艺路线id删除-->
    <update id="delQueByTechId">
        update mom_ocean.technique_model
        set state=0
        where tech_tem_id = #{id}
    </update>
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTechId">
        update mom_ocean.technique_model
        set state=0
        where tech_tem_id in (${ids})
    </update>
</mapper>
base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -9,14 +9,14 @@
    <!--查询工艺路线列表  å·¦è¾¹äºŒçº§å±•示-->
    <resultMap id="selectAllTechTemMap" type="map">
        <id property="elname" column="elname"/>
        <id property="name" column="elname"/>
        <collection property="children" resultMap="selectAllTechTemTowMap" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTechTemTowMap" type="map">
        <result property="father" column="father"/>
        <result property="name" column="father"/>
    </resultMap>
    <select id="selectAllTechTem" resultMap="selectAllTechTemMap">
        select e.name elname,
        select  e.name elname,
        father
        from mom_ocean.technology_template t,
        mom_ocean.element e,
@@ -49,10 +49,10 @@
    <!--根据id查看详情-->
    <resultMap id="selecTechByIdMap" type="map">
        <id property="type" column="type"/>
        <result property="father" column="father"/>
        <id property="id" column="type"/>
        <result property="name" column="father"/>
        <result property="name" column="name"/>
        <result property="deviceGroup" column="device_group"/>
        <result property="name" column="device_group"/>
        <collection property="children" resultMap="selecTechByIdsMap" javaType="List"/>
    </resultMap>
    <resultMap id="selecTechByIdsMap" type="map">
inspect-server/src/main/java/com/yuanchu/mom/controller/RawInsProductController.java
inspect-server/src/main/java/com/yuanchu/mom/mapper/RawInsProductMapper.java
ÎļþÃû´Ó standard-server/src/main/java/com/yuanchu/mom/mapper/RawInsProductMapper.java ÐÞ¸Ä
@@ -15,12 +15,6 @@
 */
public interface RawInsProductMapper extends BaseMapper<RawInsProduct> {
    List<Map<String, Object>> selectInspectIdAndName();
    IPage<Map<String, Object>> selectPageDevice(Integer pageNo, Integer pageSize, String codeOrNameOrModel);
    Map<String, Object> inspectIdSelect(Integer inspectId);
    List<Map<String, Object>> parentClassification();
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/RawInsProduct.java
inspect-server/src/main/java/com/yuanchu/mom/service/RawInsProductService.java
ÎļþÃû´Ó standard-server/src/main/java/com/yuanchu/mom/service/RawInsProductService.java ÐÞ¸Ä
@@ -22,12 +22,6 @@
     */
    void updaterawInsProduct(int userId, RawInsProduct rawInsProduct);
    List<Map<String, Object>> selectInspectIdAndName();
    IPage<Map<String, Object>> selectPageDevice(Integer pageNo, Integer pageSize, String codeOrNameOrModel);
    Map<String, Object> inspectIdSelect(Integer inspectId);
    List<Map<String, Object>> parentClassification();
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/RawInsProductServiceImpl.java
ÎļþÃû´Ó standard-server/src/main/java/com/yuanchu/mom/service/impl/RawInsProductServiceImpl.java ÐÞ¸Ä
@@ -42,26 +42,6 @@
        rawInsProductMapper.update(rawInsProduct, updateWrapper);
    }
    @Override
    public List<Map<String, Object>> selectInspectIdAndName() {
        return rawInsProductMapper.selectInspectIdAndName();
    }
    @Override
    public IPage<Map<String, Object>> selectPageDevice(Integer pageNo, Integer pageSize, String codeOrNameOrModel) {
        return rawInsProductMapper.selectPageDevice(pageNo, pageSize, codeOrNameOrModel);
    }
    @Override
    public Map<String, Object> inspectIdSelect(Integer inspectId) {
        return rawInsProductMapper.inspectIdSelect(inspectId);
    }
    @Override
    public List<Map<String, Object>> parentClassification() {
        return rawInsProductMapper.parentClassification();
    }
    /*判断检测值是否满足标准值和内控值的要求,如果不满足则检验结论为不合格*/
    private int checkValues(String standardValueStr, String controlValueStr, String detectionValueStr) {
        boolean isStandardValueSatisfied = isValueSatisfied(standardValueStr, detectionValueStr);
inspect-server/src/main/resources/mapper/RawInsProductMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.RawInsProductMapper">
</mapper>
standard-server/pom.xml
@@ -33,6 +33,11 @@
            <artifactId>user-server</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.yuanchu.mom</groupId>
            <artifactId>base-server</artifactId>
            <version>1.0.0</version>
        </dependency>
    </dependencies>
</project>
standard-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
ÎļþÒÑɾ³ý
standard-server/src/main/java/com/yuanchu/mom/controller/MaterialController.java
@@ -1,22 +1,19 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.MaterialTreeDto;
import com.yuanchu.mom.service.MaterialService;
import com.yuanchu.mom.pojo.dto.MaterialDto;
import com.yuanchu.mom.service.*;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
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.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@Api(tags = "技术管理-->标准MOM-->物料模块")
@Api(tags = "技术管理-->标准BOM")
@RestController
@RequestMapping("/material")
public class MaterialController {
@@ -24,10 +21,78 @@
    @Autowired
    private MaterialService materialService;
    @ApiOperation(value = "查询物料的树")
    @Resource
    TechnologyService technologyService;
    @Resource
    ProductService productService;
    @Resource
    MbomService mbomService;
    @Resource
    TechniqueService techniqueService;
    @ApiOperation(value = "左侧五级树展示")
    @GetMapping("/selectTreeByMaterial")
    public Result<List<MaterialTreeDto>> selectTreeByMaterial(){
    public Result selectTreeByMaterial() {
        return Result.success(materialService.selectTreeByMaterial());
    }
    @ApiOperation("(1,2级)新增-->物料,标准,型号")
    @PostMapping("/add")
    public Result<?> addMaterial(@Validated @RequestBody MaterialDto materialDto) {
        materialService.addMaterial(materialDto);
        return Result.success("添加物料【" + materialDto.getName() + "】成功");
    }
    @ApiOperation(value = "右侧数据展示-->选择版本")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "type", value = "类型(0:工艺路线;1:技术指标;2:物料清单;3:生产工艺)", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectVersion")
    public Result selectVersion(Integer type, Integer specificationsId) {
        switch (type) {
            case 0:
                //工艺路线
                return Result.success(technologyService.selectVerByTec(specificationsId));
            case 1:
                //技术指标
                return Result.success(productService.selectVerByPro(specificationsId));
            case 2:
                //物料清单
                return Result.success(mbomService.selectVerByMbom(specificationsId));
            case 3:
                //生产工艺
                return Result.success(techniqueService.selectVerByTeq(specificationsId));
        }
        return Result.fail("没有该类型!");
    }
    @ApiOperation(value = "右侧数据展示")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "type", value = "类型(0:工艺路线;1:技术指标;2:物料清单;3:生产工艺)", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "version", value = "版本(默认最新)", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "message", value = "搜索内容", dataTypeClass = String.class)
    })
    @GetMapping("/selectAll")
    public Result selectAll(Integer specificationsId, Integer type, Integer version,String message) {
        switch (type) {
            case 0:
                //工艺路线
                return Result.success(technologyService.selectAllTec(specificationsId, version,message));
            case 1:
                //技术指标
                return Result.success(productService.selectAllPro(specificationsId, version,message));
            case 2:
                //物料清单
                return Result.success(mbomService.selectAllMbom(specificationsId, version,message));
            case 3:
                //生产工艺
                return Result.success(techniqueService.selectAllTeq(specificationsId, version,message));
        }
        return Result.fail("没有该类型!");
    }
}
standard-server/src/main/java/com/yuanchu/mom/controller/MbomController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.yuanchu.mom.controller;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.yuanchu.mom.service.MbomService;
/**
 * æ ‡å‡†BOM-物料清单表(Mbom)表控制层
 *
 * @author zss
 * @since 2023-08-31 11:58:23
 */
@Api(tags = "技术管理-->标准BOM-->物料清单")
@RestController
@RequestMapping("/mbom")
public class MbomController {
    @Autowired
    private MbomService mbomService;
}
standard-server/src/main/java/com/yuanchu/mom/controller/ProductController.java
@@ -14,7 +14,7 @@
import java.util.List;
@Api(tags = "技术管理-->标准MOM-->项目模块")
@Api(tags = "技术管理-->标准BOM-->技术指标(检验项目)")
@RestController
@RequestMapping("/product")
public class ProductController {
@@ -22,14 +22,4 @@
    @Autowired
    private ProductService productService;
    @ApiOperation(value = "项目表格二级树")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "project", value = "项目", dataTypeClass = String.class),
            @ApiImplicitParam(name = "specifications", value = "型号ID", dataTypeClass = String.class, required = true)
    })
    @GetMapping("/selectTreeByMaterial")
    public Result<?> selectTreeProduct(String specifications, String project){
        List<ProductDto> map = productService.selectTreeProduct(specifications, project);
        return Result.success(map);
    }
}
standard-server/src/main/java/com/yuanchu/mom/controller/SpecificationsController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.SpecificationsDto;
import com.yuanchu.mom.pojo.dto.StandardDto;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
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.SpecificationsService;
/**
 * åž‹å·è¡¨(Specifications)表控制层
 *
 * @author zss
 * @since 2023-08-31 09:35:56
 */
@Api(tags = "技术管理-->标准BOM")
@RestController
@RequestMapping("/specifications")
public class SpecificationsController {
    @Autowired
    private SpecificationsService specificationsService;
    @ApiOperation("(4级)新增-->型号")
    @PostMapping("/add")
    public Result<?> addSpecifications(@Validated @RequestBody SpecificationsDto specificationsDto) {
        specificationsService.addSpecifications(specificationsDto);
        return Result.fail("添加型号【"+ specificationsDto.getSpecifications() +"】成功!");
    }
}
standard-server/src/main/java/com/yuanchu/mom/controller/StandardController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.mom.controller;
import com.yuanchu.mom.pojo.dto.MaterialDto;
import com.yuanchu.mom.pojo.dto.StandardDto;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
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.StandardService;
/**
 * æ ‡å‡†è¡¨(Standard)表控制层
 *
 * @author zss
 * @since 2023-08-31 09:35:38
 */
@Api(tags = "技术管理-->标准BOM")
@RestController
@RequestMapping("/standard")
public class StandardController {
    @Autowired
    private StandardService standardService;
    @ApiOperation("(3级)新增-->标准,型号")
    @PostMapping("/add")
    public Result<?> addStandard(@Validated @RequestBody StandardDto standardDto) {
        standardService.addStandard(standardDto);
        return Result.fail("添加标准【"+ standardDto.getStandard() +"】成功!");
    }
}
standard-server/src/main/java/com/yuanchu/mom/controller/TechniqueController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.yuanchu.mom.controller;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.yuanchu.mom.service.TechniqueService;
/**
 * æ ‡å‡†BOM-生产工艺表(Technique)表控制层
 *
 * @author zss
 * @since 2023-08-31 11:57:52
 */
@Api(tags = "技术管理-->标准BOM-->生产工艺")
@RestController
@RequestMapping("/technique")
public class TechniqueController {
    @Autowired
    private TechniqueService techniqueService;
}
standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
@@ -24,7 +24,7 @@
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-07-31
 */
@Api(tags = "技术管理-->标准MOM-->工艺路线")
@Api(tags = "技术管理-->标准BOM-->工艺路线")
@RestController
@RequestMapping("/technology")
public class TechnologyController {
@@ -32,14 +32,5 @@
    @Autowired
    private TechnologyService technologyService;
    @ApiOperation(value = "选择工艺路线出现的表格查询")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "technologyName", value = "工艺名称", dataTypeClass = String.class),
            @ApiImplicitParam(name = "specificationId", value = "规格ID", dataTypeClass = String.class,required = true)
    })
    @GetMapping("/select")
    public Result<?> selectTechnology(String technologyName, String specificationId){
        List<Map<String, Object>> map = technologyService.selectTechnology(technologyName);
        return Result.success(map);
    }
}
standard-server/src/main/java/com/yuanchu/mom/mapper/DeviceMapper.java
ÎļþÒÑɾ³ý
standard-server/src/main/java/com/yuanchu/mom/mapper/MaterialMapper.java
@@ -2,8 +2,6 @@
import com.yuanchu.mom.pojo.Material;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.dto.MaterialTreeDto;
import org.apache.ibatis.annotations.MapKey;
import java.util.List;
import java.util.Map;
@@ -17,14 +15,18 @@
public interface MaterialMapper extends BaseMapper<Material> {
    @MapKey("id")
    List<MaterialTreeDto> selectTreeByMaterial();
    //标准MOM-->左侧五级树展示
    List<Map<String,Object>> selectTreeByMaterial();
    //根据物料名称查询物料id和物料编码
    List<Material> selectMcodeId(String name);
    //根据物料名称和物料编码查询物料id,规格信息和型号信息
    List<Map> selectIdByCoNa(String name, String code);
    //根据标准id查询物料
    Material selFath(Integer id);
}
standard-server/src/main/java/com/yuanchu/mom/mapper/MbomMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.Mbom;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-物料清单表(Mbom)表数据库访问层
 *
 * @author zss
 * @since 2023-08-31 11:58:23
 */
public interface MbomMapper extends BaseMapper<Mbom> {
    //根据型号id查询所有版本
    List<Integer> selectVerByMbom(Integer specificationsId);
    //右侧数据展示-->物料清单
    List<Map<String, Object>> selectAllMbom(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/mapper/ProductMapper.java
@@ -15,7 +15,14 @@
*/
public interface ProductMapper extends BaseMapper<Product> {
    List<ProductDto> selectTreeProduct(String specifications, String project);
    //根据型号id查询项目(技术指标)
    List<Map<String, Object>> selectProductList(Integer specificationsId);
    //根据型号id查询所有版本
    List<Integer> selectVerByPro(Integer specificationsId);
    //右侧数据展示-->技术指标(检验项目)
    List<Map<String, Object>> selectAllPro(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/mapper/TechniqueMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.yuanchu.mom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.Technique;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-生产工艺表(Technique)表数据库访问层
 *
 * @author zss
 * @since 2023-08-31 11:57:52
 */
public interface TechniqueMapper extends BaseMapper<Technique> {
    //根据型号id查询所有版本
    List<Integer> selectVerByTeq(Integer specificationsId);
    //右侧数据展示-->生产工艺
    List<Map<String, Object>> selectAllTeq(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/mapper/TechnologyMapper.java
@@ -3,6 +3,9 @@
import com.yuanchu.mom.pojo.Technology;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
/**
 * <p>
 *  Mapper æŽ¥å£
@@ -13,4 +16,9 @@
 */
public interface TechnologyMapper extends BaseMapper<Technology> {
    //根据型号id查询版本
    List<Integer> selectVerByTec(Integer specificationsId);
    //右侧数据展示-->工艺路线
    List<Map<String, Object>> selectAllTec(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/pojo/Material.java
@@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
/**
@@ -33,26 +34,30 @@
    private String name;
    /**
     * 0:原材料;1:成品;2:半成品
     * 1:成品;2:半成品
     */
    private Integer type;
    /**
     * 0:橡胶连接器;1:金属连接器;2:湿插拔电连接器;3:分支组件
     **/
    private Integer father;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    @TableLogic(value = "1", delval = "0")
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
    @ApiModelProperty(value = "乐观锁", hidden = true)
    @Version
    //版本
    private Integer version;
    @TableField(exist = false)
standard-server/src/main/java/com/yuanchu/mom/pojo/Mbom.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
import java.io.Serializable;
/**
 * æ ‡å‡†BOM-物料清单表(Mbom)表实体类
 *
 * @author zss
 * @since 2023-08-31 11:58:24
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("mbom")
public class Mbom implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * å…³è” å·¥è‰ºè·¯çº¿id
     **/
    private Integer technologyId;
    /**
     * åŽŸææ–™åç§°
     **/
    private String name;
    /**
     * å•位
     **/
    private String unit;
    /**
     * æ•°é‡
     **/
    private Integer num;
    /**
     * ä¾›åº”商
     **/
    private String supplier;
    /**
     * è´¨é‡è¿½æº¯å·
     **/
    private String qualityTraceability;
    /**
     * (原材料的)规格型号
     **/
    private String specifications;
    /**
     * ç‰ˆæœ¬
     **/
    private Integer version;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/Product.java
@@ -48,27 +48,25 @@
    private String internal;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    @TableLogic(value = "1", delval = "0")
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
    @ApiModelProperty(value = "乐观锁", hidden = true)
    @Version
    //版本
    private Integer version;
    /**
     * å…³è” åž‹å·id
     * å…³è” å·¥è‰ºè·¯çº¿id
     */
    private Integer specificationsId;
    private Integer technologyId;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
standard-server/src/main/java/com/yuanchu/mom/pojo/Technique.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
import java.io.Serializable;
/**
 * æ ‡å‡†BOM-生产工艺表(Technique)表实体类
 *
 * @author zss
 * @since 2023-08-31 11:57:53
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("technique")
public class Technique implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     **/
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * å…³è” å·¥è‰ºè·¯çº¿id
     **/
    private Integer technologyId;
    /**
     * è®¾å¤‡åç§°
     **/
    private String device;
    /**
     * æ£€éªŒé¡¹ç›®(父类)
     **/
    private String productFather;
    /**
     * å•位
     **/
    private String unit;
    /**
     * æŒ‡æ ‡(子类项目)
     **/
    private String product;
    /**
     * ç‰ˆæœ¬
     **/
    private Integer version;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/Technology.java
@@ -40,25 +40,26 @@
    @ApiModelProperty(value = "设备组")
    private String deviceGroup;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    @TableLogic(value = "1", delval = "0")
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @ApiModelProperty(value = "关联 åž‹å·id")
    private Integer specificationsId;
    @ApiModelProperty(value = "生产定额(个/天)")
    private Integer productionQuota;
    @ApiModelProperty(value = "逻辑删除 æ­£å¸¸>=1,删除<=0", hidden = true)
    private Integer state;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
//标准BOM新增参数(1,2级新增)
public class MaterialDto {
    @JsonSerialize
    @NotNull(message = "类型(成品半成品)不能为空")
    private Integer type;
    @JsonSerialize
    @NotNull(message = "产品大类(4大类)不能为空")
    private Integer father;
    @JsonSerialize
    @NotBlank(message = "物料名称不能为空")
    private String name;
    @JsonSerialize
    @NotBlank(message = "标准不能为空")
    private String standard;
    @JsonSerialize
    @NotBlank(message = "型号不能为空")
    private String specifications;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialTreeDto.java
ÎļþÒÑɾ³ý
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/SpecificationsDto.java
@@ -1,15 +1,22 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
class SpecificationsDto {
//标准BOM新增参数(4级新增)
public class SpecificationsDto {
    @JsonSerialize
    @NotNull(message = "标准id不能为空")
    private Integer id;
    private String name;
    private String code = "[4]";
    @JsonSerialize
    @NotBlank(message = "型号不能为空")
    private String specifications;
}
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/StandardDto.java
@@ -1,17 +1,26 @@
package com.yuanchu.mom.pojo.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
class StandardDto {
//标准BOM新增参数(3级新增)
public class StandardDto {
    @JsonSerialize
    @NotNull(message = "物料id不能为空")
    private Integer id;
    private String name;
    @JsonSerialize
    @NotBlank(message = "标准不能为空")
    private String standard;
    private String code = "[3]";
    List<SpecificationsDto> children;
    @JsonSerialize
    @NotBlank(message = "型号不能为空")
    private String specifications;
}
standard-server/src/main/java/com/yuanchu/mom/service/DeviceService.java
ÎļþÒÑɾ³ý
standard-server/src/main/java/com/yuanchu/mom/service/MaterialService.java
@@ -2,7 +2,7 @@
import com.yuanchu.mom.pojo.Material;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.dto.MaterialTreeDto;
import com.yuanchu.mom.pojo.dto.MaterialDto;
import java.util.List;
import java.util.Map;
@@ -14,7 +14,19 @@
*/
public interface MaterialService extends IService<Material> {
    List<MaterialTreeDto> selectTreeByMaterial();
    /**
     * æ ‡å‡†MOM-->左侧五级树展示
     * @return
     */
    List<Map<String,Object>> selectTreeByMaterial();
    /**
     * (1,2级)新增-->物料,标准,型号
     * @param materialDto
     * @return
     */
    void addMaterial(MaterialDto materialDto);
    /**
     * æ ¹æ®ç‰©æ–™åç§°æŸ¥è¯¢ç‰©æ–™id和物料编码
@@ -30,8 +42,9 @@
     * @return
     */
    List<Map> selectIdByCoNa(String name, String code);
    /**
     * æ£€éªŒæ¨¡å—-->OMS管理-->成品检验-->新增(项目名称下拉框:Id与名称,编码)
     * æ£€éªŒæ¨¡å—-->QMS管理-->成品检验-->新增(项目名称下拉框:Id与名称,编码)
     */
    List<Map<String, Object>> selectMaterialIdAndNameAndCode();
@@ -40,4 +53,5 @@
     * @return
     */
    List<Material> selectMaterial();
}
standard-server/src/main/java/com/yuanchu/mom/service/MbomService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.Mbom;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-物料清单表(Mbom)表服务接口
 *
 * @author zss
 * @since 2023-08-31 11:58:23
 */
public interface MbomService extends IService<Mbom> {
    /**
     * æ ¹æ®åž‹å·id查询所有版本
     * @param specificationsId
     * @return
     */
    List<Integer> selectVerByMbom(Integer specificationsId);
    /**
     *右侧数据展示-->物料清单
     * @param specificationsId
     * @param version
     * @return
     */
    List<Map<String,Object>> selectAllMbom(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/service/ProductService.java
@@ -14,7 +14,25 @@
*/
public interface ProductService extends IService<Product> {
    List<ProductDto> selectTreeProduct(String specifications, String project);
    /**
     * æ ¹æ®åž‹å·id查询项目(技术指标)
     * @param specificationsId
     * @return
     */
    List<Map<String, Object>> selectProductList(Integer specificationsId);
    /**
     * æ ¹æ®åž‹å·id查询版本
     * @param specificationsId
     * @return
     */
    List<Integer> selectVerByPro(Integer specificationsId);
    /**
     *右侧数据展示-->技术指标(检验项目)
     * @param specificationsId
     * @param version
     * @return
     */
    List<Map<String,Object>> selectAllPro(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/service/SpecificationsService.java
@@ -4,6 +4,7 @@
import com.yuanchu.mom.pojo.Material;
import com.yuanchu.mom.pojo.Specifications;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.dto.SpecificationsDto;
import java.util.List;
@@ -30,4 +31,11 @@
     * æ£€éªŒæ¨¡å—-->OMS管理-->成品检验-->新增(需要规格型号的Id与名称)
     */
    List<Map<String, Object>> selectSpecificationIdAndName(Integer materialId);
    /**
     *   (4级)新增-->型号
     * @param specificationsDto
     */
    void addSpecifications(SpecificationsDto specificationsDto);
}
standard-server/src/main/java/com/yuanchu/mom/service/StandardService.java
@@ -2,6 +2,7 @@
import com.yuanchu.mom.pojo.Standard;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.dto.StandardDto;
/**
* @author Administrator
@@ -10,4 +11,9 @@
*/
public interface StandardService extends IService<Standard> {
    /**
     * (3级)新增-->标准,型号
     * @param standardDto
     */
    void addStandard(StandardDto standardDto);
}
standard-server/src/main/java/com/yuanchu/mom/service/TechniqueService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.yuanchu.mom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.Technique;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-生产工艺表(Technique)表服务接口
 *
 * @author zss
 * @since 2023-08-31 11:57:53
 */
public interface TechniqueService extends IService<Technique> {
    /**
     * æ ¹æ®åž‹å·id查询所有版本
     * @param specificationsId
     * @return
     */
    List<Integer> selectVerByTeq(Integer specificationsId);
    /**
     * å³ä¾§æ•°æ®å±•示-->生产工艺
     * @param specificationsId
     * @param version
     * @return
     */
    List<Map<String,Object>> selectAllTeq(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/service/TechnologyService.java
@@ -16,5 +16,17 @@
 */
public interface TechnologyService extends IService<Technology> {
    List<Map<String, Object>> selectTechnology(String technologyName);
    /**
     * æ ¹æ®åž‹å·id查询版本
     * @return
     */
    List<Integer> selectVerByTec(Integer specificationsId);
    /**
     * å³ä¾§æ•°æ®å±•示-->工艺路线
     * @param specificationsId åž‹å·id
     * @param version ç‰ˆæœ¬
     * @return
     */
    List<Map<String,Object>> selectAllTec(Integer specificationsId, Integer version,String message);
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/DeviceServiceImpl.java
ÎļþÒÑɾ³ý
standard-server/src/main/java/com/yuanchu/mom/service/impl/MaterialServiceImpl.java
@@ -3,16 +3,19 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.pojo.Material;
import com.yuanchu.mom.pojo.dto.MaterialTreeDto;
import com.yuanchu.mom.service.MaterialService;
import com.yuanchu.mom.mapper.MaterialMapper;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.mapper.*;
import com.yuanchu.mom.pojo.*;
import com.yuanchu.mom.pojo.dto.MaterialDto;
import com.yuanchu.mom.service.*;
import com.yuanchu.mom.utils.MyUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * @author Administrator
@@ -20,19 +23,139 @@
 * @createDate 2023-07-26 15:52:50
 */
@Service
public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material>
        implements MaterialService {
public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements MaterialService {
    @Resource
    MaterialMapper materialMapper;
    @Resource
    StandardMapper standardMapper;
    @Resource
    SpecificationsMapper specificationsMapper;
    @Resource
    TechnologyService technologyService;
    @Resource
    TechnologyTemplateMapper technologyTemplateMapper;
    @Resource
    ProductService productService;
    @Resource
    TechnicalModelMapper technicalModelMapper;
    @Resource
    MbomService mbomService;
    @Resource
    MbomModelMapper mbomModelMapper;
    @Resource
    TechniqueService techniqueService;
    @Resource
    TechniqueModelMapper techniqueModelMapper;
    @Resource
    DeviceMapper deviceMapper;
    //标准MOM-->左侧五级树展示
    @Override
    public List<MaterialTreeDto> selectTreeByMaterial() {
        List<MaterialTreeDto> materialTreeDtos = materialMapper.selectTreeByMaterial();
        materialTreeDtos.forEach(System.out::println);
    public List<Map<String, Object>> selectTreeByMaterial() {
        return materialMapper.selectTreeByMaterial();
    }
    //(1,2级)新增-->物料,标准,型号
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addMaterial(MaterialDto materialDto) {
        /*新增物料表*/
        Material material = new Material();
        material.setCode(MyUtil.getTimeSixNumberCode("ML", "ML"));
        material.setName(materialDto.getName());
        material.setType(materialDto.getType());
        material.setFather(materialDto.getFather());
        materialMapper.insert(material);
        /*新增标准表*/
        Standard standard = new Standard();
        standard.setName(materialDto.getStandard());
        standard.setMaterial_id(material.getId());
        standardMapper.insert(standard);
        /*新增型号表*/
        Specifications specifications = new Specifications();
        specifications.setName(materialDto.getSpecifications());
        specifications.setStandardId(standard.getId());
        specificationsMapper.insert(specifications);
        /*新增标准BOM-->工艺路线(批量添加)*/
        List<TechnologyTemplate> technologyTemplateList = technologyTemplateMapper.selectList(Wrappers.<TechnologyTemplate>query().eq("type", materialDto.getFather()));
        List<Technology> technologyList = technologyTemplateList.stream().map(technologyTemplate -> {
            Technology technology = new Technology();
            technology.setSpecificationsId(specifications.getId());
            technology.setFather(technologyTemplate.getFather());
            technology.setName(technologyTemplate.getName());
            technology.setDeviceGroup(technologyTemplate.getDeviceGroup());
            return technology;
        }).collect(Collectors.toList());
        technologyService.saveBatch(technologyList);
        /*新增标准BOM-->技术指标(批量添加)*/
        //新增的工艺路线id集合
        List<Integer> technologyIds = technologyList.stream().map(Technology::getId).collect(Collectors.toList());
        //基础数据中工艺路线id集合
        List<Integer> techTemIds = technologyTemplateList.stream().map(TechnologyTemplate::getId).collect(Collectors.toList());
        //两者长度一定一样
        List<Product> productList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechnicalModel> technicalModelList = technicalModelMapper.selectList(Wrappers.<TechnicalModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechnicalModel technicalModel : technicalModelList) {
                Product product = new Product();
                product.setFather(technicalModel.getFather());
                product.setName(technicalModel.getName());
                product.setUnit(technicalModel.getUnit());
                product.setTechnologyId(technologyIds.get(i));
                productList.add(product);
            }
        }
        productService.saveBatch(productList);
        /*新增标准BOM-->物料清单(批量添加)*/
        List<Mbom> mbomList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<MbomModel> mbomModelList = mbomModelMapper.selectList(Wrappers.<MbomModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (MbomModel mbomModel : mbomModelList) {
                Mbom mbom = new Mbom();
                mbom.setUnit(mbomModel.getUnit());
                mbom.setName(mbomModel.getName());
                mbom.setSupplier(mbomModel.getSupplier());
                mbom.setQualityTraceability(mbomModel.getQualityTraceability());
                mbom.setSpecifications(mbomModel.getSpecifications());
                mbom.setTechnologyId(technologyIds.get(i));
                mbomList.add(mbom);
            }
        }
        mbomService.saveBatch(mbomList);
        /*新增标准BOM-->生产工艺(批量添加)*/
        List<Technique> techniqueList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechniqueModel> techniqueModelList = techniqueModelMapper.selectList(Wrappers.<TechniqueModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechniqueModel techniqueModel : techniqueModelList) {
                //查询设备名称
                Device device = deviceMapper.selectById(techniqueModel.getDeviceId());
                //查询基础生产工艺中每个设备的具体项目
                TechnicalModel technicalModel = technicalModelMapper.selectById(techniqueModel.getTechnicalModelId());
                Technique technique = new Technique();
                technique.setTechnologyId(technologyIds.get(i));
                technique.setDevice(device.getName());
                technique.setProductFather(technicalModel.getFather());
                technique.setProduct(technicalModel.getName());
                technique.setUnit(technicalModel.getUnit());
                techniqueList.add(technique);
            }
        }
        techniqueService.saveBatch(techniqueList);
    }
    //检验模块-->QMS管理-->成品检验-->新增(项目名称下拉框:Id与名称,编码)
    @Override
    public List<Map<String, Object>> selectMaterialIdAndNameAndCode() {
        LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>();
@@ -55,7 +178,7 @@
    //根据物料名称和物料编码查询物料id,规格信息和型号信息
    @Override
    public List<Map> selectIdByCoNa(String name, String code) {
        return materialMapper.selectIdByCoNa(name,code);
        return materialMapper.selectIdByCoNa(name, code);
    }
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/MbomServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.MbomMapper;
import com.yuanchu.mom.pojo.Mbom;
import com.yuanchu.mom.service.MbomService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-物料清单表(Mbom)表服务实现类
 *
 * @author zss
 * @since 2023-08-31 11:58:24
 */
@Service
public class MbomServiceImpl extends ServiceImpl<MbomMapper, Mbom> implements MbomService {
    @Resource
    MbomMapper mbomMapper;
    //根据型号id查询所有版本
    @Override
    public List<Integer> selectVerByMbom(Integer specificationsId) {
        return mbomMapper.selectVerByMbom(specificationsId);
    }
    //右侧数据展示-->物料清单
    @Override
    public List<Map<String, Object>> selectAllMbom(Integer specificationsId, Integer version,String message) {
        return mbomMapper.selectAllMbom(specificationsId,version,message);
    }
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
@@ -23,17 +23,22 @@
    @Resource
    private ProductMapper productMapper;
    @Override
    public List<ProductDto> selectTreeProduct(String specifications, String project) {
        return productMapper.selectTreeProduct(specifications, project);
    }
    //根据型号id查询项目(技术指标)
    @Override
    public List<Map<String, Object>> selectProductList(Integer specificationsId) {
        LambdaQueryWrapper<Product> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Product::getSpecificationsId, specificationsId);
        wrapper.select(Product::getName, Product::getFather, Product::getRequired, Product::getInternal, Product::getUnit);
        return productMapper.selectMaps(wrapper);
        return productMapper.selectProductList(specificationsId);
    }
    //根据型号id查询所有版本
    @Override
    public List<Integer> selectVerByPro(Integer specificationsId) {
        return productMapper.selectVerByPro(specificationsId);
    }
    //右侧数据展示-->技术指标(检验项目)
    @Override
    public List<Map<String, Object>> selectAllPro(Integer specificationsId, Integer version,String message) {
        return productMapper.selectAllPro(specificationsId,version,message);
    }
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/SpecificationsServiceImpl.java
@@ -3,18 +3,21 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.SpecificationsMapper;
import com.yuanchu.mom.pojo.Specifications;
import com.yuanchu.mom.service.SpecificationsService;
import com.yuanchu.mom.mapper.*;
import com.yuanchu.mom.pojo.*;
import com.yuanchu.mom.pojo.dto.SpecificationsDto;
import com.yuanchu.mom.service.*;
import com.yuanchu.mom.utils.MyUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * @author Administrator
@@ -22,14 +25,120 @@
 * @createDate 2023-07-26 16:01:49
 */
@Service
public class SpecificationsServiceImpl extends ServiceImpl<SpecificationsMapper, Specifications>
        implements SpecificationsService {
public class SpecificationsServiceImpl extends ServiceImpl<SpecificationsMapper, Specifications> implements SpecificationsService {
    @Resource
    private SpecificationsMapper specificationsMapper;
    MaterialMapper materialMapper;
    @Resource
    SpecificationsMapper specificationsMapper;
    @Resource
    TechnologyService technologyService;
    @Resource
    TechnologyTemplateMapper technologyTemplateMapper;
    @Resource
    ProductService productService;
    @Resource
    TechnicalModelMapper technicalModelMapper;
    @Resource
    MbomService mbomService;
    @Resource
    MbomModelMapper mbomModelMapper;
    @Resource
    TechniqueService techniqueService;
    @Resource
    TechniqueModelMapper techniqueModelMapper;
    @Resource
    DeviceMapper deviceMapper;
    //(4级)新增-->型号
    @Override
    public void addSpecifications(SpecificationsDto specificationsDto) {
        /*新增型号表*/
        Specifications specifications = new Specifications();
        specifications.setStandardId(specificationsDto.getId());
        specifications.setName(specificationsDto.getSpecifications());
        specificationsMapper.insert(specifications);
        /*新增标准BOM-->工艺路线(批量添加)*/
        //根据标准id查询物料大类
        Material material = materialMapper.selFath(specificationsDto.getId());
        List<TechnologyTemplate> technologyTemplateList = technologyTemplateMapper.selectList(Wrappers.<TechnologyTemplate>query().eq("type", material.getFather()));
        List<Technology> technologyList = technologyTemplateList.stream().map(technologyTemplate -> {
            Technology technology = new Technology();
            technology.setSpecificationsId(specifications.getId());
            technology.setFather(technologyTemplate.getFather());
            technology.setName(technologyTemplate.getName());
            technology.setDeviceGroup(technologyTemplate.getDeviceGroup());
            return technology;
        }).collect(Collectors.toList());
        technologyService.saveBatch(technologyList);
        /*新增标准BOM-->技术指标(批量添加)*/
        //新增的工艺路线id集合
        List<Integer> technologyIds = technologyList.stream().map(Technology::getId).collect(Collectors.toList());
        //基础数据中工艺路线id集合
        List<Integer> techTemIds = technologyTemplateList.stream().map(TechnologyTemplate::getId).collect(Collectors.toList());
        //两者长度一定一样
        List<Product> productList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechnicalModel> technicalModelList = technicalModelMapper.selectList(Wrappers.<TechnicalModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechnicalModel technicalModel : technicalModelList) {
                Product product = new Product();
                product.setFather(technicalModel.getFather());
                product.setName(technicalModel.getName());
                product.setUnit(technicalModel.getUnit());
                product.setTechnologyId(technologyIds.get(i));
                productList.add(product);
            }
        }
        productService.saveBatch(productList);
        /*新增标准BOM-->物料清单(批量添加)*/
        List<Mbom> mbomList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<MbomModel> mbomModelList = mbomModelMapper.selectList(Wrappers.<MbomModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (MbomModel mbomModel : mbomModelList) {
                Mbom mbom = new Mbom();
                mbom.setUnit(mbomModel.getUnit());
                mbom.setName(mbomModel.getName());
                mbom.setSupplier(mbomModel.getSupplier());
                mbom.setQualityTraceability(mbomModel.getQualityTraceability());
                mbom.setSpecifications(mbomModel.getSpecifications());
                mbom.setTechnologyId(technologyIds.get(i));
                mbomList.add(mbom);
            }
        }
        mbomService.saveBatch(mbomList);
        /*新增标准BOM-->生产工艺(批量添加)*/
        List<Technique> techniqueList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechniqueModel> techniqueModelList = techniqueModelMapper.selectList(Wrappers.<TechniqueModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechniqueModel techniqueModel : techniqueModelList) {
                //查询设备名称
                Device device = deviceMapper.selectById(techniqueModel.getDeviceId());
                //查询基础生产工艺中每个设备的具体项目
                TechnicalModel technicalModel = technicalModelMapper.selectById(techniqueModel.getTechnicalModelId());
                Technique technique = new Technique();
                technique.setTechnologyId(technologyIds.get(i));
                technique.setDevice(device.getName());
                technique.setProductFather(technicalModel.getFather());
                technique.setProduct(technicalModel.getName());
                technique.setUnit(technicalModel.getUnit());
                techniqueList.add(technique);
            }
        }
        techniqueService.saveBatch(techniqueList);
    }
    /**
     * æ£€éªŒæ¨¡å—-->OMS管理-->成品检验-->新增(需要规格型号的Id与名称)
     * æ£€éªŒæ¨¡å—-->QMS管理-->成品检验-->新增(需要规格型号的Id与名称)
     */
    @Override
    public List<Map<String, Object>> selectSpecificationIdAndName(Integer materialId) {
standard-server/src/main/java/com/yuanchu/mom/service/impl/StandardServiceImpl.java
@@ -1,10 +1,18 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.pojo.Standard;
import com.yuanchu.mom.service.StandardService;
import com.yuanchu.mom.mapper.StandardMapper;
import com.yuanchu.mom.mapper.*;
import com.yuanchu.mom.pojo.*;
import com.yuanchu.mom.pojo.dto.StandardDto;
import com.yuanchu.mom.service.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author Administrator
@@ -14,6 +22,124 @@
@Service
public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> implements StandardService {
    @Resource
    MaterialMapper materialMapper;
    @Resource
    StandardMapper standardMapper;
    @Resource
    SpecificationsMapper specificationsMapper;
    @Resource
    TechnologyService technologyService;
    @Resource
    TechnologyTemplateMapper technologyTemplateMapper;
    @Resource
    ProductService productService;
    @Resource
    TechnicalModelMapper technicalModelMapper;
    @Resource
    MbomService mbomService;
    @Resource
    MbomModelMapper mbomModelMapper;
    @Resource
    TechniqueService techniqueService;
    @Resource
    TechniqueModelMapper techniqueModelMapper;
    @Resource
    DeviceMapper deviceMapper;
    //(3级)新增-->标准,型号
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addStandard(StandardDto standardDto) {
        /*新增标准表*/
        Standard standard = new Standard();
        standard.setMaterial_id(standardDto.getId());
        standard.setName(standardDto.getStandard());
        standardMapper.insert(standard);
        /*新增型号表*/
        Specifications specifications = new Specifications();
        specifications.setStandardId(standard.getId());
        specifications.setName(standardDto.getSpecifications());
        specificationsMapper.insert(specifications);
        /*新增标准BOM-->工艺路线(批量添加)*/
        //查询物料的大类(根据物料id)
        Material material = materialMapper.selectById(standardDto.getId());
        List<TechnologyTemplate> technologyTemplateList = technologyTemplateMapper.selectList(Wrappers.<TechnologyTemplate>query().eq("type", material.getFather()));
        List<Technology> technologyList = technologyTemplateList.stream().map(technologyTemplate -> {
            Technology technology = new Technology();
            technology.setSpecificationsId(specifications.getId());
            technology.setFather(technologyTemplate.getFather());
            technology.setName(technologyTemplate.getName());
            technology.setDeviceGroup(technologyTemplate.getDeviceGroup());
            return technology;
        }).collect(Collectors.toList());
        technologyService.saveBatch(technologyList);
        /*新增标准BOM-->技术指标(批量添加)*/
        //新增的工艺路线id集合
        List<Integer> technologyIds = technologyList.stream().map(Technology::getId).collect(Collectors.toList());
        //基础数据中工艺路线id集合
        List<Integer> techTemIds = technologyTemplateList.stream().map(TechnologyTemplate::getId).collect(Collectors.toList());
        //两者长度一定一样
        List<Product> productList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechnicalModel> technicalModelList = technicalModelMapper.selectList(Wrappers.<TechnicalModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechnicalModel technicalModel : technicalModelList) {
                Product product = new Product();
                product.setFather(technicalModel.getFather());
                product.setName(technicalModel.getName());
                product.setUnit(technicalModel.getUnit());
                product.setTechnologyId(technologyIds.get(i));
                productList.add(product);
            }
        }
        productService.saveBatch(productList);
        /*新增标准BOM-->物料清单(批量添加)*/
        List<Mbom> mbomList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<MbomModel> mbomModelList = mbomModelMapper.selectList(Wrappers.<MbomModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (MbomModel mbomModel : mbomModelList) {
                Mbom mbom = new Mbom();
                mbom.setUnit(mbomModel.getUnit());
                mbom.setName(mbomModel.getName());
                mbom.setSupplier(mbomModel.getSupplier());
                mbom.setQualityTraceability(mbomModel.getQualityTraceability());
                mbom.setSpecifications(mbomModel.getSpecifications());
                mbom.setTechnologyId(technologyIds.get(i));
                mbomList.add(mbom);
            }
        }
        mbomService.saveBatch(mbomList);
        /*新增标准BOM-->生产工艺(批量添加)*/
        List<Technique> techniqueList = new ArrayList<>();
        for (int i = 0; i < technologyIds.size(); i++) {
            List<TechniqueModel> techniqueModelList = techniqueModelMapper.selectList(Wrappers.<TechniqueModel>query().eq("tech_tem_id", techTemIds.get(i)));
            for (TechniqueModel techniqueModel : techniqueModelList) {
                //查询设备名称
                Device device = deviceMapper.selectById(techniqueModel.getDeviceId());
                //查询基础生产工艺中每个设备的具体项目
                TechnicalModel technicalModel = technicalModelMapper.selectById(techniqueModel.getTechnicalModelId());
                Technique technique = new Technique();
                technique.setTechnologyId(technologyIds.get(i));
                technique.setDevice(device.getName());
                technique.setProductFather(technicalModel.getFather());
                technique.setProduct(technicalModel.getName());
                technique.setUnit(technicalModel.getUnit());
                techniqueList.add(technique);
            }
        }
        techniqueService.saveBatch(techniqueList);
    }
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechniqueServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.TechniqueMapper;
import com.yuanchu.mom.pojo.Technique;
import com.yuanchu.mom.service.TechniqueService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * æ ‡å‡†BOM-生产工艺表(Technique)表服务实现类
 *
 * @author zss
 * @since 2023-08-31 11:57:53
 */
@Service
public class TechniqueServiceImpl extends ServiceImpl<TechniqueMapper, Technique> implements TechniqueService {
    @Resource
    TechniqueMapper techniqueMapper;
    //根据型号id查询所有版本
    @Override
    public List<Integer> selectVerByTeq(Integer specificationsId) {
        return techniqueMapper.selectVerByTeq(specificationsId);
    }
    //右侧数据展示-->生产工艺
    @Override
    public List<Map<String, Object>> selectAllTeq(Integer specificationsId, Integer version,String message) {
        return techniqueMapper.selectAllTeq(specificationsId,version,message);
    }
}
standard-server/src/main/java/com/yuanchu/mom/service/impl/TechnologyServiceImpl.java
@@ -24,15 +24,18 @@
public class TechnologyServiceImpl extends ServiceImpl<TechnologyMapper, Technology> implements TechnologyService {
    @Resource
    private TechnologyMapper technologyMapper;
    TechnologyMapper technologyMapper;
    //根据型号id查询版本
    @Override
    public List<Map<String, Object>> selectTechnology(String technologyName) {
        LambdaQueryWrapper<Technology> wrapper = new LambdaQueryWrapper<>();
        if (!ObjectUtils.isEmpty(technologyName)){
            wrapper.like(Technology::getName, technologyName);
        }
        wrapper.select(Technology::getId, Technology::getName, Technology::getDeviceGroup, Technology::getFather);
        return technologyMapper.selectMaps(wrapper);
    public List<Integer> selectVerByTec(Integer specificationsId) {
        return technologyMapper.selectVerByTec(specificationsId);
    }
    //右侧数据展示-->工艺路线
    @Override
    public List<Map<String, Object>> selectAllTec(Integer specificationsId, Integer version,String message) {
        return technologyMapper.selectAllTec(specificationsId,version,message);
    }
}
standard-server/src/main/resources/mapper/DeviceMapper.xml
ÎļþÒÑɾ³ý
standard-server/src/main/resources/mapper/MaterialMapper.xml
@@ -3,49 +3,43 @@
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.MaterialMapper">
    <resultMap id="BaseResultMap" type="Material">
        <id property="id" column="id" jdbcType="INTEGER"/>
        <result property="code" column="code" jdbcType="VARCHAR"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="type" column="type" jdbcType="INTEGER"/>
        <result property="state" column="state" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="version" column="version" jdbcType="INTEGER"/>
    <!--标准MOM å·¦ä¾§äº”级树展示-->
    <resultMap id="selectTreeByMaterialMap" type="map">
        <id property="id" column="type"/>
        <collection property="children" resultMap="selectTreeByMaterialMaps1" javaType="List"/>
    </resultMap>
    <resultMap id="materialTreeDto" type="materialTreeDto">
    <resultMap id="selectTreeByMaterialMaps1" type="map">
        <id property="name" column="father"/>
        <collection property="children" resultMap="selectTreeByMaterialMaps2" javaType="List"/>
    </resultMap>
    <resultMap id="selectTreeByMaterialMaps2" type="map">
        <id property="id" column="mid"/>
        <result property="name" column="mname"/>
        <result property="type" column="type"/>
        <association property="children" resultMap="standardDto"/>
        <collection property="children" resultMap="selectTreeByMaterialMaps3" javaType="List"/>
    </resultMap>
    <resultMap id="standardDto" type="standardDto">
    <resultMap id="selectTreeByMaterialMaps3" type="map">
        <id property="id" column="sid"/>
        <result property="name" column="sname"/>
        <association property="children" resultMap="specificationsDto"/>
        <collection property="children" resultMap="selectTreeByMaterialMaps4" javaType="List"/>
    </resultMap>
    <resultMap id="specificationsDto" type="specificationsDto">
    <resultMap id="selectTreeByMaterialMaps4" type="map">
        <id property="id" column="spid"/>
        <result property="name" column="spname"/>
    </resultMap>
    <select id="selectTreeByMaterial" resultMap="materialTreeDto">
        select m.type,
               m.id    mid,
               m.name  mname,
               s.id    sid,
               s.name  sname,
               s2.id   spid,
               s2.name spname,
               p.id    pid,
               p.name  pname
        from (select type, id, name from material where state = 1) m
                 left join (select id, name, material_id from standard where state = 1) s on m.id = s.material_id
                 left join (select id, name, standard_id from specifications where state = 1) s2
                           on s2.standard_id = s.id
                 left join (select id, name, specifications_id from product where state = 1) p
                           on s2.id = p.specifications_id
    <select id="selectTreeByMaterial" resultMap="selectTreeByMaterialMap">
        select m.type,        #一级类型
               father,        #二级产品大类(4大类)
               m.id    mid,   #三级物料id
               m.name  mname, #三级样品名称
               s.id    sid,   #四级标准id
               s.name  sname, #四级标准名
               sp.id   spid,  #五级型号id
               sp.name spname #五级型号名
        from (select type, id, name, father from mom_ocean.material where state = 1) m
                 left join (select id, name, material_id from mom_ocean.standard where state = 1) s
                           on m.id = s.material_id
                 left join (select id, name, standard_id from mom_ocean.specifications where state = 1) sp
                           on sp.standard_id = s.id
    </select>
    <select id="selectMcodeId" resultType="com.yuanchu.mom.pojo.Material">
@@ -55,10 +49,10 @@
    </select>
    <select id="selectIdByCoNa" resultType="java.util.Map">
        select m.id     '物料id',
               st.id    '规格id',
               st.name  '规格名称',
               sp.name  '型号名称'
        select m.id    '物料id',
               st.id   '规格id',
               st.name '规格名称',
               sp.name '型号名称'
        from mom_ocean.material m,
             mom_ocean.standard st,
             mom_ocean.specifications sp
@@ -67,4 +61,15 @@
          and m.name = #{name}
          and code = #{code}
    </select>
    <!--根据标准id查询物料-->
    <select id="selFath" resultType="com.yuanchu.mom.pojo.Material">
        select *
        from mom_ocean.material
        where state = 1
          and id = (select material_id
                    from mom_ocean.standard
                    where standard.state = 1
                      and standard.id = #{id})
    </select>
</mapper>
standard-server/src/main/resources/mapper/MbomMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.MbomMapper">
    <!--根据型号id查询所有版本-->
    <select id="selectVerByMbom" resultType="java.lang.Integer">
        select distinct version
        from mom_ocean.mbom
        where state = 1
          and technology_id in (select id
                                from mom_ocean.technology
                                where technology.state = 1
                                  and specifications_id = #{specificationsId})
        order by version desc
    </select>
    <!--右侧数据展示 ç‰©æ–™æ¸…单-->
    <resultMap id="oneMap" type="map">
        <id property="father" column="father"/>
        <collection property="children" resultMap="twoMap" javaType="List"/>
    </resultMap>
    <resultMap id="twoMap" type="map">
        <id property="tname" column="tname"/>
        <collection property="children" resultMap="threeMap" javaType="List"/>
    </resultMap>
    <resultMap id="threeMap" type="map">
        <id property="id" column="mid"/>
        <result property="mname" column="mname"/>
        <result property="specifications" column="specifications"/>
        <result property="unit" column="unit"/>
        <result property="num" column="num"/>
    </resultMap>
    <select id="selectAllMbom" resultMap="oneMap">
        select m.id mid,
               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
        where m.state = 1
          and m.version = #{version}
          and specifications_id = #{specificationsId}
        <if test="message!=null and message!=''">
            and m.name like concat('%',#{message},'%')
        </if>
    </select>
</mapper>
standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -3,42 +3,69 @@
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.ProductMapper">
    <!--根据型号id查询项目(技术指标)-->
    <select id="selectProductList" resultType="java.util.Map">
        select name,
               father,
               unit,
               required,
               internal
        from mom_ocean.product
        where state = 1
          and technology_id in (select id
                                from mom_ocean.technology
                                where technology.state = 1
                                  and specifications_id = #{specificationsId})
    </select>
    <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.Product">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="father" column="father" jdbcType="VARCHAR"/>
            <result property="unit" column="unit" jdbcType="VARCHAR"/>
            <result property="required" column="required" jdbcType="VARCHAR"/>
            <result property="internal" column="internal" jdbcType="VARCHAR"/>
            <result property="state" column="state" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
            <result property="version" column="version" jdbcType="INTEGER"/>
            <result property="specificationsId" column="specifications_id" jdbcType="INTEGER"/>
    <!--根据型号id查询所有版本-->
    <select id="selectVerByPro" resultType="java.lang.Integer">
        select distinct version
        from mom_ocean.product
        where state = 1
          and technology_id in (select id
                                from mom_ocean.technology
                                where technology.state = 1
                                  and specifications_id = #{specificationsId})
        order by version desc
    </select>
    <!--右侧数据展示 æŠ€æœ¯æŒ‡æ ‡(检验项目)-->
    <resultMap id="oneMap" type="map">
        <id property="tfather" column="tfather"/>
        <collection property="children" resultMap="twoMap" javaType="List"/>
    </resultMap>
    <resultMap id="selectTreeProduct" type="ProductDto">
        <id property="father" column="father" jdbcType="VARCHAR"/>
        <collection property="children" resultMap="productDto2ListMap"/>
    <resultMap id="twoMap" type="map">
        <id property="tname" column="tname"/>
        <collection property="children" resultMap="threeMap" javaType="List"/>
    </resultMap>
    <resultMap id="productDto2ListMap" type="ProductDto2">
        <id property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="unit" column="unit" jdbcType="VARCHAR"/>
        <result property="required" column="required" jdbcType="VARCHAR"/>
        <result property="internal" column="internal" jdbcType="VARCHAR"/>
        <result property="state" column="state" jdbcType="INTEGER"/>
    <resultMap id="threeMap" type="map">
        <id property="pfather" column="pfather"/>
        <collection property="children" resultMap="fourMap" javaType="List"/>
    </resultMap>
    <select id="selectTreeProduct" resultMap="selectTreeProduct">
        SELECT p.id, p.`name`, IFNULL(p.`father`,p.`name`) father, p.`unit`, p.`required`, p.`internal`
        FROM product p
        where p.specifications_id = #{specifications}
          <if test="project != null and project != ''">
              AND p.father like concat('%',#{project},'%')
          </if>
        and p.state = 1
    <resultMap id="fourMap" type="map">
        <id property="pid" column="pid"/>
        <result property="pname" column="pname"/>
        <result property="unit" column="unit"/>
        <result property="required" column="required"/>
        <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
        from mom_ocean.product p
                 left join mom_ocean.technology t on p.technology_id = t.id
        where p.state = 1
          and p.version = #{version}
          and specifications_id = #{specificationsId}
        <if test="message!=null and message!=''">
            and p.name like concat('%',#{message},'%')
        </if>
    </select>
</mapper>
standard-server/src/main/resources/mapper/RawInsProductMapper.xml
ÎļþÒÑɾ³ý
standard-server/src/main/resources/mapper/TechniqueMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.TechniqueMapper">
    <!--根据型号id查询所有版本-->
    <select id="selectVerByTeq" resultType="java.lang.Integer">
        select distinct version
        from mom_ocean.technique
        where state = 1
          and technology_id in (select id
                                from mom_ocean.technology
                                where technology.state = 1
                                  and specifications_id = #{specificationsId})
        order by version desc
    </select>
    <!--右侧数据展示 ç”Ÿäº§å·¥è‰º-->
    <resultMap id="oneMap" type="map">
        <id property="father" column="father"/>
        <collection property="children" resultMap="twoMap" javaType="List"/>
    </resultMap>
    <resultMap id="twoMap" type="map">
        <id property="name" column="name"/>
        <collection property="children" resultMap="threeMap" javaType="List"/>
    </resultMap>
    <resultMap id="threeMap" type="map">
        <id property="tqid" column="tqid"/>
        <result property="device" column="device"/>
        <result property="productFather" column="product_father"/>
        <result property="product" column="product"/>
        <result property="unit" column="unit"/>
    </resultMap>
    <select id="selectAllTeq" resultMap="oneMap">
        select tq.id tqid,
               device,
               product_father,
               product,
               unit,
               name,
               father
        from mom_ocean.technique tq
                 left join mom_ocean.technology tc on tq.technology_id = tc.id
        where tq.state = 1
          and specifications_id = #{specificationsId}
          and tq.version = #{version}
        <if test="message!=null and message!=''">
            and device like concat('%',#{message},'%')
        </if>
    </select>
</mapper>
standard-server/src/main/resources/mapper/TechnologyMapper.xml
@@ -1,5 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.TechnologyMapper">
    <!--根据型号id查询版本-->
    <select id="selectVerByTec" resultType="java.lang.Integer">
        select distinct version
        from mom_ocean.technology
        where state = 1
          and specifications_id = #{specificationsId}
        order by version desc
    </select>
    <!--右侧数据展示 å·¥è‰ºè·¯çº¿-->
    <resultMap id="selectAllTecMap" type="map">
        <id property="father" column="father"/>
        <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTecMaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="dg" column="dg"/>
        <result property="pq" column="pq"/>
    </resultMap>
    <select id="selectAllTec" resultMap="selectAllTecMap">
        select id,
        name,
        father,
        device_group dg,
        production_quota pq
        from mom_ocean.technology
        where state = 1
        and specifications_id = #{specificationsId}
        and version = #{version}
        <if test="message!=null and message!=''">
            and father like concat('%',#{message},'%')
        </if>
    </select>
</mapper>
user-server/src/main/java/com/yuanchu/mom/service/UserService.java
@@ -14,7 +14,7 @@
    String selectNameById(Integer id);
    /**
     * æ£€éªŒæ¨¡å—-->OMS管理-->成品检验-->新增(需要用户Id与名称)
     * æ£€éªŒæ¨¡å—-->QMS管理-->成品检验-->新增(需要用户Id与名称)
     */
    List<Map<String, Object>> listUserIdAndName();