value
2024-05-18 8e89de5320fbfebc14851fc4fd7ea9231ba28896
标准库修复
已修改4个文件
41 ■■■■ 文件已修改
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user-server/src/main/java/com/yuanchu/mom/dto/Custom.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
@@ -177,4 +177,6 @@
    private String dic;
    private String tree;
    private Integer structureItemParameterId;
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
@@ -40,6 +40,9 @@
    @Override
    public int upStandardProductList(StandardProductList list) {
        /*if(list.getId()==null || list.getId().equals("")){
        }*/
        return standardProductListMapper.updateById(list);
    }
@@ -106,12 +109,27 @@
        List<StandardProductList> list = new ArrayList<>();
        if (trees.length == 3) {
            List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]));
            if(treeList.size()==0){
                StandardTree standardTree = new StandardTree();
                standardTree.setFactory(trees[0]);
                standardTree.setLaboratory(trees[1]);
                standardTree.setSampleType(trees[2]);
                treeList.add(standardTree);
            }
            for (StandardTree standardTree : treeList) {
                String str = tree+" - "+standardTree.getSample()+" - "+standardTree.getModel();
                list.addAll(standardTreeMapper.selectStandardProductListByTree3("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str));
            }
        } else if (trees.length == 4){
            List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]));
            if(treeList.size()==0){
                StandardTree standardTree = new StandardTree();
                standardTree.setFactory(trees[0]);
                standardTree.setLaboratory(trees[1]);
                standardTree.setSampleType(trees[2]);
                standardTree.setSample(trees[2]);
                treeList.add(standardTree);
            }
            for (StandardTree standardTree : treeList) {
                String str = tree+" - "+standardTree.getModel();
                list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str));
@@ -125,10 +143,14 @@
        for (StandardProductList sp : standardProductLists) {
            for (StandardProductList pl : list) {
                if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem())
                        && Objects.equals(sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass())
                        && Objects.equals(sp.getModel(), pl.getModel())) {
                        && Objects.equals(sp.getInspectionItemSubclass()==null?"":sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass()==null?"":pl.getInspectionItemSubclass())
                        && Objects.equals(sp.getModel(), pl.getModel()) && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) {
                    pl.setId(sp.getId());
                    pl.setState(id==0?1:sp.getState());
                    if(sp.getState()!=null&&!sp.getState().equals("")){
                        pl.setState(sp.getState());
                    }else{
                        pl.setState(id==0?1:0);
                    }
                    pl.setMethodS(sp.getMethodS());
                    if(sp.getAsk()!=null&&!sp.getAsk().equals("")){
                        pl.setAsk(sp.getAsk());
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -157,7 +157,8 @@
               0 state,
               #{model} model,
               #{sample} sample,
               #{trees} tree
               #{trees} tree,
               id structure_item_parameter_id
        from structure_item_parameter
        where (
                      sample is NULL
@@ -193,7 +194,8 @@
               0 state,
               #{model} model,
               #{sample} sample,
               #{trees} tree
               #{trees} tree,
               id structure_item_parameter_id
        from structure_item_parameter
        where sample LIKE CONCAT('%[', #{tree}, ']%')
    </select>
@@ -233,7 +235,8 @@
               0 state,
               #{model} model,
               #{sample} sample,
               #{trees} tree
               #{trees} tree,
               id structure_item_parameter_id
        from structure_item_parameter
        where (
                      sample is NULL
user-server/src/main/java/com/yuanchu/mom/dto/Custom.java
@@ -24,7 +24,7 @@
    @TableId(type = IdType.AUTO)
    private Integer id;
    @ValueTableShow(2)
    @ValueTableShow(value = 2)
    @ApiModelProperty(value = "客户账号")
    private String account;