zss
2023-09-09 a62666cf3a69198d68cce5c9890f0a038315d3bc
修改bug6.0  9.9
已修改4个文件
21 ■■■■ 文件已修改
base-server/src/main/resources/mapper/RecordModelMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/Material.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/mom/service/impl/MaterialServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base-server/src/main/resources/mapper/RecordModelMapper.xml
@@ -17,6 +17,7 @@
        select type,
               father  techFather,
               tt.name techName,
               tt.id,
               rm.name,
               unit,
               note
standard-server/src/main/java/com/yuanchu/mom/pojo/Material.java
@@ -39,9 +39,9 @@
    private Integer type;
    /**
     * 0:橡胶连接器;1:金属连接器;2:湿插拔电连接器;3:分支组件
     * 产品大类0:橡胶连接器;1:金属连接器;2:湿插拔电连接器;3:分支组件
     **/
    private Integer father;
    private String father;
    @ApiModelProperty(value = "逻辑删除 正常>=1,删除<=0", hidden = true)
standard-server/src/main/java/com/yuanchu/mom/pojo/dto/MaterialDto.java
@@ -16,7 +16,7 @@
    @JsonSerialize
    @NotNull(message = "产品大类(4大类)不能为空")
    private Integer father;
    private String father;
    @JsonSerialize
    @NotBlank(message = "物料名称不能为空")
standard-server/src/main/java/com/yuanchu/mom/service/impl/MaterialServiceImpl.java
@@ -109,8 +109,18 @@
        specifications.setName(materialDto.getSpecifications());
        specifications.setStandardId(standard.getId());
        specificationsMapper.insert(specifications);
        /*新增标准BOM-->工艺路线(批量添加)*/
        List<TechnologyTemplate> technologyTemplateList = technologyTemplateMapper.selectList(Wrappers.<TechnologyTemplate>query().eq("type", materialDto.getFather()));
        /*新增标准BOM-->工艺路线(批量添加)*///0:橡胶连接器;1:金属连接器;2:湿插拔电连接器;3:分支组件
        Integer type = null;
        if (materialDto.getFather().equals("橡胶连接器")){
            type=0;
        }else if (materialDto.getFather().equals("金属连接器")){
            type=1;
        }else if(materialDto.getFather().equals("湿插拔电连接器")){
            type=2;
        }else if(materialDto.getFather().equals("分支组件")){
            type=3;
        }else return "添加物料【" + materialDto.getName() + "】成功";
        List<TechnologyTemplate> technologyTemplateList = technologyTemplateMapper.selectList(Wrappers.<TechnologyTemplate>query().eq("type", type));
        List<Technology> technologyList = technologyTemplateList.stream().map(technologyTemplate -> {
            Technology technology = new Technology();
            technology.setSpecificationsId(specifications.getId());