value
2024-04-29 ce7184b9b054e4cd98af2d747545d04ae85c2728
修改产品绑定和标准库关系
已修改19个文件
314 ■■■■■ 文件已修改
cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTreeController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardTreeMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardMethodListService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTemplateService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTreeService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTemplateServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java
@@ -1,16 +1,14 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuanchu.mom.annotation.ValueTableShow;
import com.yuanchu.mom.common.OrderBy;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * 标准方法
@@ -28,11 +26,9 @@
    @ValueTableShow(value = 1, name = "领域")
    private String field;
    private Integer structureTestObjectId;
    @ValueTableShow(2)
    @ApiModelProperty("检验对象")
    private String sampleType;
    private String structureTestObjectId;
    /**
     * 标准编号
cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
@@ -32,10 +32,6 @@
    @ApiModelProperty(value = "检验项EN")
    private String inspectionItemEn;
//    @ValueTableShow(2)
//    @ApiModelProperty(value = "检验分类")
//    private String inspectionItemClassify;
    @ValueTableShow(3)
    @ApiModelProperty(value = "检验子项")
    private String inspectionItemSubclass;
@@ -95,19 +91,12 @@
    @ApiModelProperty(value = "检验值类型")
    private String inspectionValueType;
    @ApiModelProperty(value = "设备组")
    private String deviceGroup;
    @ApiModelProperty(value = "检验次数")
    private Integer checkoutNumber;
    @ValueTableShow(12)
    @ApiModelProperty(value = "区间")
    private String section;
    /*@ValueTableShow(13)
    @ApiModelProperty(value = "取值类型")
    private String valueType;*/
    @ValueTableShow(13)
    @ApiModelProperty(value = "特殊标识")
cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java
@@ -13,7 +13,6 @@
import com.yuanchu.mom.pojo.StructureItemParameter;
import com.yuanchu.mom.pojo.StructureTestObject;
import com.yuanchu.mom.service.CapacityScopeService;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.utils.QueryWrappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@@ -37,8 +36,6 @@
    private StructureItemParameterMapper structureItemParameterMapper;
    private StructureTestObjectMapper structureTestObjectMapper;
    private StandardTreeService standardTreeService;
    @Override
    public Map<String, Object> selectItemParameterList(Page page, StructureItemParameter itemParameter) {
cnas-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodServiceImpl.java
@@ -8,7 +8,6 @@
import com.yuanchu.mom.mapper.StandardMethodMapper;
import com.yuanchu.mom.pojo.StandardMethod;
import com.yuanchu.mom.service.StandardMethodService;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.utils.QueryWrappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@@ -30,8 +29,6 @@
    private GetLook getLook;
    private StandardMethodMapper standardMethodMapper;
    private StandardTreeService standardTreeService;
    @Override
    public Map<String, Object> selectStandardMethodList(Page page, StandardMethod standardMethod) {
inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTreeController.java
@@ -102,4 +102,11 @@
        return Result.success(standardMethodListService.selectStandardMethodEnum());
    }
    @ApiOperation(value = "获取产品架构")
    @GetMapping("/getStandardTree2")
    @ValueAuth
    public Result getStandardTree2(){
        return Result.success(standardTreeService.getStandardTree2());
    }
}
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java
@@ -1,7 +1,7 @@
package com.yuanchu.mom.mapper;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.yuanchu.mom.pojo.StandardProductList;
import java.util.List;
@@ -19,7 +19,7 @@
    String selectUserById(Integer id);
    List<StandardMethodList> selectStandardMethodLists(String sampleType);
    List<StandardMethodList> selectStandardMethodLists(String tree);
    List<StandardMethodList> selectStandardMethodLists2(String data1,String data2,String data3,String data4, String data5);
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardTreeMapper.java
@@ -1,6 +1,7 @@
package com.yuanchu.mom.mapper;
import com.yuanchu.mom.dto.FactoryDto;
import com.yuanchu.mom.dto.SampleTypeDto;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.pojo.StandardTree;
@@ -26,8 +27,9 @@
    List<StandardMethodList> getStandardMethodListBySample(String sampleType);
    List<StandardProductList> selectStandardProductListByTree(String tree1, String tree2);
    List<StandardProductList> selectStandardProductListByTree(String tree);
    List<SampleTypeDto> getStandardTree2();
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
@@ -2,17 +2,15 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 检验项目
@@ -193,4 +191,7 @@
    @TableField(exist = false)
    private InsProductResult insProductResult;
    @TableField(exist = false)
    private String templateName;
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
@@ -28,11 +28,17 @@
    @ApiModelProperty("检验项")
    private String inspectionItem;
    @ApiModelProperty("检验项EN")
    private String inspectionItemEn;
    /**
     * 检验项小类
     */
    @ApiModelProperty("检验项小类")
    private String inspectionItemSubclass;
    @ApiModelProperty("检验项小类EN")
    private String inspectionItemSubclassEn;
    /**
     * 实验室
@@ -80,12 +86,6 @@
    private String inspectionValueType;
    /**
     * 设备组
     */
    @ApiModelProperty("设备组")
    private String deviceGroup;
    /**
     * 检验次数
     */
    @ApiModelProperty("检验次数")
@@ -96,12 +96,6 @@
     */
    @ApiModelProperty("区间")
    private String section;
    /**
     * 取值类型
     */
    @ApiModelProperty("取值类型")
    private String valueType;
    /**
     * 方法
@@ -130,7 +124,7 @@
    @ApiModelProperty("要求值")
    private String ask;
    @ApiModelProperty("要求值")
    @ApiModelProperty("要求描述")
    private String tell;
    /**
@@ -182,4 +176,6 @@
    private Integer state;
    private String dic;
    private String tree;
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardMethodListService.java
@@ -1,8 +1,7 @@
package com.yuanchu.mom.service;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.pojo.StandardMethodList;
import java.util.List;
import java.util.Map;
@@ -23,4 +22,5 @@
    int delStandardMethodByFLSSM(Integer id);
    List<StandardMethodList> selectStandardMethodEnum();
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTemplateService.java
@@ -26,4 +26,6 @@
    String getStandTempThingById(Integer templateId);
    String getStandTempNameById(Integer templateId);
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTreeService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.dto.FactoryDto;
import com.yuanchu.mom.dto.SampleTypeDto;
import com.yuanchu.mom.pojo.StandardTree;
import java.util.List;
@@ -21,4 +22,6 @@
    int addStandardProduct(String ids, String tree);
    List<SampleTypeDto> getStandardTree2();
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -603,6 +603,7 @@
                style.put("columnlen", config.get("columnlen"));
                product.setTemplate(cellData);
                product.setStyle(style);
                product.setTemplateName(standardTemplateService.getStandTempNameById(product.getTemplateId()));
            }
        }
    }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java
@@ -11,6 +11,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -77,12 +78,23 @@
    public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) {
        String[] trees = tree.split(" - ");
        Map<String, List<?>> map = new HashMap<>();
        if(trees.length < 3) {
            map.put("standardMethodList", null);
            return map;
        String str = "";
        List<StandardMethodList> standardMethodLists = new ArrayList<>();
        switch (trees.length){
            case 5:
                str += "\"" + trees[2] + "\",\"" + trees[3] + "\",\"" + trees[4] + "\"";
                break;
            case 4:
                str += "\"" + trees[2] + "\",\"" + trees[3] + "\"";
                break;
            case 3:
                str += "\"" + trees[2] + "\"";
                break;
            default:
                map.put("standardMethodList", null);
                return map;
        }
        List<StandardMethodList> standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[2]);
        map.put("standardMethodList", standardMethodLists);
        map.put("standardMethodList", standardMethodListMapper.selectStandardMethodLists(str));
        return map;
    }
@@ -123,6 +135,7 @@
    public List<StandardMethodList> selectStandardMethodEnum() {
        return standardMethodListMapper.selectList(Wrappers.<StandardMethodList>lambdaQuery().select(StandardMethodList::getId,StandardMethodList::getCode,StandardMethodList::getName));
    }
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
@@ -10,10 +10,12 @@
import com.yuanchu.mom.service.StandardProductListService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
@@ -29,6 +31,8 @@
    private StandardProductListMapper standardProductListMapper;
    private StandardTreeMapper standardTreeMapper;
    private StandardProductListService standardProductListService;
    @Override
    public int upStandardProductList(StandardProductList list) {
@@ -75,15 +79,42 @@
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StandardProductList> selectStandardProductListByMethodId(Integer id, String tree) {
        String[] trees = tree.split(" - ");
        List<StandardProductList> list;
        if(tree.length() == 3){
            list = standardTreeMapper.selectStandardProductListByTree(trees[2], trees[3]);
        }else{
            list = standardTreeMapper.selectStandardProductListByTree(trees[2], null);
        StringBuffer str = new StringBuffer();
        if (trees.length == 3) {
            str.append("\"").append(trees[2]).append("\"");
        } else {
            str.append("\"").append(trees[2]).append("\",\"").append(trees[3]).append("\"");
        }
        List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, id));
        List<StandardProductList> list = standardTreeMapper.selectStandardProductListByTree(str + "");
        List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, id).eq(StandardProductList::getTree, tree));
        for (StandardProductList sp : standardProductLists) {
            for (StandardProductList pl : list) {
                if (sp.getInspectionItem().equals(pl.getInspectionItem()) && sp.getInspectionItemSubclass().equals(pl.getInspectionItemSubclass())) {
                    pl.setId(sp.getId());
                    pl.setState(sp.getState());
                    pl.setFactory(sp.getFactory());
                    pl.setLaboratory(sp.getLaboratory());
                    pl.setSampleType(sp.getSampleType());
                    pl.setSample(sp.getSample());
                    pl.setModel(sp.getModel());
                    pl.setMethodS(sp.getMethodS());
                    break;
                }
            }
        }
        CompletableFuture.supplyAsync(() -> {
            standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).eq(StandardProductList::getTree, tree));
            standardProductListService.saveBatch(list);
            return null;
        }).thenAccept(res -> {
        }).exceptionally(e -> {
            e.printStackTrace();
            return null;
        });
        ;
        return list;
    }
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTemplateServiceImpl.java
@@ -1,15 +1,13 @@
package com.yuanchu.mom.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.common.PrintChina;
import com.yuanchu.mom.mapper.StandardTemplateMapper;
import com.yuanchu.mom.pojo.StandardTemplate;
import com.yuanchu.mom.service.StandardTemplateService;
import com.yuanchu.mom.mapper.StandardTemplateMapper;
import com.yuanchu.mom.utils.QueryWrappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@@ -66,6 +64,11 @@
    public String getStandTempThingById(Integer templateId) {
        return standardTemplateMapper.selectById(templateId).getThing();
    }
    @Override
    public String getStandTempNameById(Integer templateId) {
        return standardTemplateMapper.selectById(templateId).getName();
    }
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.dto.FactoryDto;
import com.yuanchu.mom.dto.SampleTypeDto;
import com.yuanchu.mom.mapper.StandardMethodListMapper;
import com.yuanchu.mom.mapper.StandardProductListMapper;
import com.yuanchu.mom.mapper.StandardTreeMapper;
@@ -119,6 +120,11 @@
        return 1;
    }
    @Override
    public List<SampleTypeDto> getStandardTree2() {
        return standardTreeMapper.getStandardTree2();
    }
}
inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml
@@ -26,12 +26,16 @@
        where id = #{id}
    </select>
    <select id="selectStandardMethodLists" resultType="com.yuanchu.mom.pojo.StandardMethodList">
        select sm.id, sm.code, sm.name,sm.remark
        from standard_method sm
        left join structure_test_object sto on sto.id = sm.structure_test_object_id
        where sm.is_use = 1
        and sm.is_product = 1
        and sto.specimen_name = #{sampleType}
        select id, code, name, remark
        from standard_method
        where is_use = 1
        and is_product = 1
        and (
                structure_test_object_id is null
                OR structure_test_object_id = ''
                OR structure_test_object_id = '[]'
                or structure_test_object_id LIKE CONCAT('%', #{tree}, '%')
            )
    </select>
    <select id="selectParameterList" resultType="standardProductList">
        select
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -5,16 +5,16 @@
<mapper namespace="com.yuanchu.mom.mapper.StandardTreeMapper">
    <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.StandardTree">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="factory" column="factory" jdbcType="VARCHAR"/>
            <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/>
            <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/>
            <result property="sample" column="sample" jdbcType="VARCHAR"/>
            <result property="model" column="model" jdbcType="VARCHAR"/>
            <result property="createUser" column="create_user" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <id property="id" column="id" jdbcType="INTEGER"/>
        <result property="factory" column="factory" jdbcType="VARCHAR"/>
        <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/>
        <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/>
        <result property="sample" column="sample" jdbcType="VARCHAR"/>
        <result property="model" column="model" jdbcType="VARCHAR"/>
        <result property="createUser" column="create_user" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
    </resultMap>
    <resultMap id="FactoryDto" type="com.yuanchu.mom.dto.FactoryDto">
@@ -47,36 +47,36 @@
    </resultMap>
    <select id="selectStandardTreeList" resultMap="FactoryDto">
#         select factory,laboratory,sample_type,sample,model from standard_tree
        select '中天科技检测中心' factory, l.laboratory_name laboratory, sto.specimen_name sample_type, p.name sample, st.model from laboratory l
        left join structure_test_object sto on sto.laboratory_id = l.id
        left join product p on p.object_id = sto.id
        left join standard_tree st on st.laboratory = l.laboratory_name
        and st.sample_type = sto.specimen_name
        and st.sample = p.name
        select '中天科技检测中心' factory,
               l.laboratory_name  laboratory,
               sto.specimen_name  sample_type,
               p.name             sample,
               st.model
        from laboratory l
                 left join structure_test_object sto on sto.laboratory_id = l.id
                 left join product p on p.object_id = sto.id
                 left join standard_tree st on st.laboratory = l.laboratory_name
            and st.sample_type = sto.specimen_name
            and st.sample = p.name
    </select>
    <select id="selectStandardProductById" resultType="com.yuanchu.mom.pojo.StandardProductList">
        select
            inspection_item,
            inspection_item_classify,
            inspection_item_subclass,
            laboratory,
            son_laboratory,
            unit,
            price,
            man_hour,
            man_hour_group,
            inspection_item_type,
            inspection_value_type,
            device_group,
            checkout_number,
            section,
            value_type,
            method,
            man_day,
            bsm,
            template_id
        select inspection_item,
               inspection_item_subclass,
               laboratory,
               son_laboratory,
               unit,
               price,
               man_hour,
               man_hour_group,
               inspection_item_type,
               inspection_value_type,
               checkout_number,
               section,
               method,
               man_day,
               bsm,
               template_id
        from structure_item_parameter
        where id = #{id}
    </select>
@@ -91,10 +91,8 @@
               man_hour_group,
               inspection_item_type,
               inspection_value_type,
               device_group,
               checkout_number,
               section,
               value_type,
               method,
               man_day,
               sample,
@@ -105,8 +103,8 @@
               ask_tell as tell
        from structure_item_parameter sp
        where sp.sample = #{sampleType}
        or sp.sample = ''
        or sp.sample = '[]'
           or sp.sample = ''
           or sp.sample = '[]'
    </select>
    <select id="getStandardMethodListBySample" resultType="com.yuanchu.mom.pojo.StandardMethodList">
        select sm.code,sm.name,sm.remark from standard_method sm
@@ -118,7 +116,7 @@
        </if>
    </select>
    <select id="selectStandardTreeList2" resultType="com.yuanchu.mom.pojo.StandardTree">
        select '中天科技检测中心'  factory,
        select '中天科技检测中心' factory,
               l.laboratory_name  laboratory,
               sto.specimen_name  sample_type,
               p.name             sample
@@ -132,13 +130,45 @@
        group by sto.specimen_name
    </select>
    <select id="selectStandardProductListByTree" resultType="com.yuanchu.mom.pojo.StandardProductList">
        select * from structure_item_parameter
        where sample is NULL
           OR sample = ''
           or sample = '[]'
           OR sample LIKE CONCAT('%["', #{tree1}, '"]%')
           <if test="tree2 != null and tree2 != ''">
               OR sample LIKE CONCAT('%["', #{tree2}, '"]%')
           </if>
        select sample,
               inspection_item,
               inspection_item_en,
               inspection_item_subclass,
               inspection_item_subclass_en,
               method,
               son_laboratory,
               unit,
               ask_tell tell,
               ask,
               price,
               man_hour,
               man_hour_group,
               man_day,
               inspection_item_type,
               inspection_value_type,
               bsm,
               template_id,
               laboratory,
               checkout_number,
               section,
               dic,
               0 state
        from structure_item_parameter
        where (
                      sample is NULL
                      OR sample = ''
                      or sample = '[]'
                      OR sample LIKE CONCAT('%', #{tree}, '%')
                  )
    </select>
    <select id="getStandardTree2" resultMap="SampleTypeDto">
        select sto.specimen_name sample_type,
               p.name            sample,
               st.model
        from structure_test_object sto
                 left join product p on p.object_id = sto.id
                 left join standard_tree st on st.sample_type = sto.specimen_name
            and st.sample = p.name
    </select>
</mapper>