李林
2024-03-05 dd7cf6b7d8da76c7ceb0ae79fe57fb72ce1c3eb5
标准库开发完毕
已修改11个文件
已添加5个文件
541 ■■■■■ 文件已修改
cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTreeController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardProductListMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardTreeMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardMethodList.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardMethodListService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardProductListService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTreeService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardProductListMapper.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
@@ -46,7 +46,7 @@
    private String unit;
    @ValueTableShow(5)
    @ApiModelProperty(value = "试验方法")
    @ApiModelProperty(value = "检验标准")
    private String method;
    @ValueTableShow(6)
inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTreeController.java
@@ -1,9 +1,12 @@
package com.yuanchu.mom.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.yuanchu.mom.annotation.ValueAuth;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.pojo.StandardTree;
import com.yuanchu.mom.service.StandardMethodListService;
import com.yuanchu.mom.service.StandardProductListService;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.ApiOperation;
@@ -18,6 +21,8 @@
    private StandardTreeService standardTreeService;
    private StandardMethodListService standardMethodListService;
    private StandardProductListService standardProductListService;
    @ApiOperation(value = "获取标准树")
    @GetMapping("/selectStandardTreeList")
@@ -45,4 +50,35 @@
        return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree));
    }
    @ApiOperation(value = "修改标准库中的要求值")
    @PostMapping("/upStandardProductList")
    public Result upStandardProductList(@RequestBody StandardProductList list){
        return Result.success(standardProductListService.upStandardProductList(list));
    }
    @ApiOperation(value = "删除标准树下的检验标准")
    @PostMapping("/delStandardMethodByFLSSM")
    public Result delStandardMethodByFLSSM(Integer id){
        return Result.success(standardMethodListService.delStandardMethodByFLSSM(id));
    }
    @ApiOperation(value = "删除标准树下的检验项目")
    @PostMapping("/delStandardProductByIds")
    public Result delStandardProductByIds(String ids){
        JSONArray lists = JSON.parseArray(ids);
        return Result.success(standardProductListService.delStandardProduct(lists));
    }
    @ApiOperation(value = "新增标准树下的检验项目")
    @PostMapping("/addStandardProduct")
    public Result addStandardProduct(String ids, String tree){
        return Result.success(standardTreeService.addStandardProduct(ids, tree));
    }
    @ApiOperation(value = "删除标准树的层级")
    @PostMapping("/delStandardTree")
    public Result delStandardTree(String tree){
        return Result.success(standardTreeService.delStandardTree(tree));
    }
}
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java
@@ -2,6 +2,7 @@
import com.yuanchu.mom.pojo.StandardMethodList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanchu.mom.pojo.StandardProductList;
import java.util.List;
import java.util.Map;
@@ -20,6 +21,8 @@
    List<StandardMethodList> selectStandardMethodLists(String data1,String data2,String data3,String data4, String data5);
    List<StandardProductList> selectParameterList(String code);
}
inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardProductListMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package com.yuanchu.mom.mapper;
import com.yuanchu.mom.pojo.StandardProductList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author Administrator
* @description é’ˆå¯¹è¡¨ã€standard_product_list(标准树下的检验项目)】的数据库操作Mapper
* @createDate 2024-03-05 10:33:29
* @Entity com.yuanchu.mom.pojo.StandardProductList
*/
public interface StandardProductListMapper extends BaseMapper<StandardProductList> {
}
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.pojo.StandardProductList;
import com.yuanchu.mom.pojo.StandardTree;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -16,6 +17,8 @@
    List<FactoryDto> selectStandardTreeList();
    StandardProductList selectStandardProductById(Integer id);
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardMethodList.java
@@ -50,7 +50,7 @@
    private String laboratory;
    @ApiModelProperty("样品分类")
    private String sample_type;
    private String sampleType;
    @ApiModelProperty("样品")
    private String sample;
inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,176 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * æ ‡å‡†æ ‘下的检验项目
 * @TableName standard_product_list
 */
@TableName(value ="standard_product_list")
@Data
public class StandardProductList implements Serializable {
    /**
     * ä¸»é”®id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * æ£€éªŒé¡¹
     */
    @ApiModelProperty("检验项")
    private String inspectionItem;
    /**
     * æ£€éªŒé¡¹åˆ†ç±»
     */
    @ApiModelProperty("检验项分类")
    private String inspectionItemClassify;
    /**
     * æ£€éªŒé¡¹å°ç±»
     */
    @ApiModelProperty("检验项小类")
    private String inspectionItemSubclass;
    /**
     * å®žéªŒå®¤
     */
    @ApiModelProperty("实验室")
    private String laboratory;
    /**
     * è®¡é‡å•位
     */
    @ApiModelProperty("计量单位")
    private String unit;
    /**
     * å•ä»·(元)
     */
    @ApiModelProperty("单价")
    private BigDecimal price;
    /**
     * å·¥æ—¶(H)
     */
    @ApiModelProperty("工时")
    private Integer manHour;
    /**
     * å·¥æ—¶åˆ†ç»„
     */
    @ApiModelProperty("工时分组")
    private String manHourGroup;
    /**
     * æ£€éªŒé¡¹ç±»åž‹
     */
    @ApiModelProperty("检验项类型")
    private String inspectionItemType;
    /**
     * æ£€éªŒå€¼ç±»åž‹
     */
    @ApiModelProperty("检验值类型")
    private String inspectionValueType;
    /**
     * è®¾å¤‡ç»„
     */
    @ApiModelProperty("设备组")
    private String deviceGroup;
    /**
     * æ£€éªŒæ¬¡æ•°
     */
    @ApiModelProperty("检验次数")
    private Integer checkoutNumber;
    /**
     * åŒºé—´
     */
    @ApiModelProperty("区间")
    private String section;
    /**
     * å–值类型
     */
    @ApiModelProperty("取值类型")
    private String valueType;
    /**
     * æ–¹æ³•
     */
    @ApiModelProperty("方法")
    private String method;
    /**
     * é¢„计时间(天)
     */
    @ApiModelProperty("预计时间")
    private Integer manDay;
    /**
     * ç‰¹æ®Šæ ‡è¯†
     */
    @ApiModelProperty("特殊标识")
    private String bsm;
    /**
     * è¦æ±‚值
     */
    @ApiModelProperty("要求值")
    private String ask;
    /**
     * å¤–键:标准方法id
     */
    @ApiModelProperty("标准方法id")
    private Integer standardMethodListId;
    @ApiModelProperty("工厂")
    private String factory;
    @ApiModelProperty("样品分类")
    private String sampleType;
    @ApiModelProperty("样品")
    private String sample;
    @ApiModelProperty("型号")
    private String model;
    @ApiModelProperty("")
    @TableField(fill = FieldFill.INSERT)
    private Integer createUser;
    /**
     *
     */
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     *
     */
    @ApiModelProperty("")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateUser;
    /**
     *
     */
    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardMethodListService.java
@@ -2,8 +2,10 @@
import com.yuanchu.mom.pojo.StandardMethodList;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.StandardProductList;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
@@ -14,6 +16,7 @@
    int addStandardMethodList(Integer standardId, String tree);
    List<StandardMethodList> selectsStandardMethodByFLSSM(String tree);
    Map<String, List<?>> selectsStandardMethodByFLSSM(String tree);
    int delStandardMethodByFLSSM(Integer id);
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardProductListService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
package com.yuanchu.mom.service;
import com.alibaba.fastjson.JSONArray;
import com.yuanchu.mom.pojo.StandardProductList;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.ArrayList;
/**
* @author Administrator
* @description é’ˆå¯¹è¡¨ã€standard_product_list(标准树下的检验项目)】的数据库操作Service
* @createDate 2024-03-05 10:33:29
*/
public interface StandardProductListService extends IService<StandardProductList> {
    int upStandardProductList(StandardProductList list);
    int delStandardProduct(JSONArray list);
}
inspect-server/src/main/java/com/yuanchu/mom/service/StandardTreeService.java
@@ -17,4 +17,8 @@
    int addStandardTree(StandardTree standardTree);
    int delStandardTree(String tree);
    int addStandardProduct(String ids, String tree);
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java
@@ -2,12 +2,17 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.mapper.StandardProductListMapper;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.service.StandardMethodListService;
import com.yuanchu.mom.mapper.StandardMethodListMapper;
import lombok.AllArgsConstructor;
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;
@@ -23,7 +28,10 @@
    private StandardMethodListMapper standardMethodListMapper;
    private StandardProductListMapper standardProductListMapper;
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addStandardMethodList(Integer standardId, String tree) {
        String[] trees = tree.split(" - ");
        Map<String, String> map = standardMethodListMapper.selectStandardMethodById(standardId);
@@ -32,37 +40,78 @@
        list.setName(map.get("name"));
        list.setRemark(map.get("remark"));
        list.setFactory(trees[0]);
        list.setLaboratory(trees[1]);
        list.setSample_type(trees[2]);
        list.setSample(trees[3]);
        try {
            list.setLaboratory(trees[1]);
        }catch (Exception e){}
        try {
            list.setSampleType(trees[2]);
        }catch (Exception e){}
        try {
            list.setSample(trees[3]);
        }catch (Exception e){}
        try {
            list.setModel(trees[4]);
        }catch (Exception e){}
        return standardMethodListMapper.insert(list);
        standardMethodListMapper.insert(list);
        List<StandardProductList> standardProductLists = standardMethodListMapper.selectParameterList(list.getCode());
        for (StandardProductList standardProductList : standardProductLists) {
            standardProductList.setStandardMethodListId(list.getId());
            standardProductList.setFactory(trees[0]);
            try {
                standardProductList.setLaboratory(trees[1]);
            }catch (Exception e){}
            try {
                standardProductList.setSampleType(trees[2]);
            }catch (Exception e){}
            try {
                standardProductList.setSample(trees[3]);
            }catch (Exception e){}
            try {
                standardProductList.setModel(trees[4]);
            }catch (Exception e){}
            standardProductListMapper.insert(standardProductList);
        }
        return 1;
    }
    @Override
    public List<StandardMethodList> selectsStandardMethodByFLSSM(String tree) {
    public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) {
        String[] trees = tree.split(" - ");
        List<StandardMethodList> standardMethodLists = null;
        List<StandardProductList> standardProductLists = null;
        switch (trees.length){
            case 5:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],trees[4]);
                standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2]).eq(StandardProductList::getSample, trees[3]).eq(StandardProductList::getModel, trees[4]));
                break;
            case 4:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],null);
                standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2]).eq(StandardProductList::getSample, trees[3]));
                break;
            case 3:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],null,null);
                standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2]));
                break;
            case 2:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],null,null,null);
                standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]));
                break;
            case 1:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],null,null,null,null);
                standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]));
                break;
        }
        return standardMethodLists;
        Map<String, List<?>> map = new HashMap<>();
        map.put("standardMethodList", standardMethodLists);
        map.put("standardProductList", standardProductLists);
        return map;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int delStandardMethodByFLSSM(Integer id) {
        standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id));
        return standardMethodListMapper.deleteById(id);
    }
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.yuanchu.mom.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.service.StandardProductListService;
import com.yuanchu.mom.mapper.StandardProductListMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @author Administrator
* @description é’ˆå¯¹è¡¨ã€standard_product_list(标准树下的检验项目)】的数据库操作Service实现
* @createDate 2024-03-05 10:33:29
*/
@Service
@AllArgsConstructor
public class StandardProductListServiceImpl extends ServiceImpl<StandardProductListMapper, StandardProductList>
    implements StandardProductListService{
    private StandardProductListMapper standardProductListMapper;
    @Override
    public int upStandardProductList(StandardProductList list) {
        return standardProductListMapper.updateById(list);
    }
    @Override
    public int delStandardProduct(JSONArray list) {
        return standardProductListMapper.deleteBatchIds(list);
    }
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -1,26 +1,43 @@
package com.yuanchu.mom.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.dto.FactoryDto;
import com.yuanchu.mom.mapper.StandardMethodListMapper;
import com.yuanchu.mom.mapper.StandardProductListMapper;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.yuanchu.mom.pojo.StandardProductList;
import com.yuanchu.mom.pojo.StandardTree;
import com.yuanchu.mom.service.StandardMethodListService;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.mapper.StandardTreeMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
* @description é’ˆå¯¹è¡¨ã€standard_tree(标准树)】的数据库操作Service实现
* @createDate 2024-03-01 15:06:44
*/
 * @author Administrator
 * @description é’ˆå¯¹è¡¨ã€standard_tree(标准树)】的数据库操作Service实现
 * @createDate 2024-03-01 15:06:44
 */
@Service
@AllArgsConstructor
public class StandardTreeServiceImpl extends ServiceImpl<StandardTreeMapper, StandardTree>
    implements StandardTreeService{
        implements StandardTreeService {
    private StandardTreeMapper standardTreeMapper;
    private StandardMethodListMapper standardMethodListMapper;
    private StandardMethodListService standardMethodListService;
    private StandardProductListMapper standardProductListMapper;
    @Override
    public List<FactoryDto> selectStandardTreeList() {
@@ -31,6 +48,62 @@
    public int addStandardTree(StandardTree standardTree) {
        return standardTreeMapper.insert(standardTree);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int delStandardTree(String tree) {
        String[] trees = tree.split(" - ");
        switch (trees.length) {
            case 5:
                standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]).eq(StandardTree::getModel, trees[4]));
                break;
            case 4:
                standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]));
                break;
            case 3:
                standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]));
                break;
            case 2:
                standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]));
                break;
            case 1:
                standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]));
                break;
        }
        Map<String, List<?>> listMap = standardMethodListService.selectsStandardMethodByFLSSM(tree);
        if(listMap.get("standardMethodList").size() != 0){
            standardMethodListMapper.deleteBatchIds(listMap.get("standardMethodList"));
        }
        if(listMap.get("standardProductList").size() != 0){
            standardProductListMapper.deleteBatchIds(listMap.get("standardProductList"));
        }
        return 1;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addStandardProduct(String ids, String tree) {
        String[] trees = tree.split(" - ");
        JSONArray jsonArray = JSON.parseArray(ids);
        for (Object o : jsonArray) {
            StandardProductList standardProductList = standardTreeMapper.selectStandardProductById(Integer.parseInt("" + o));
            standardProductList.setFactory(trees[0]);
            try {
                standardProductList.setLaboratory(trees[1]);
            }catch (Exception e){}
            try {
                standardProductList.setSampleType(trees[2]);
            }catch (Exception e){}
            try {
                standardProductList.setSample(trees[3]);
            }catch (Exception e){}
            try {
                standardProductList.setModel(trees[4]);
            }catch (Exception e){}
            standardProductListMapper.insert(standardProductList);
        }
        return 1;
    }
}
inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml
@@ -9,7 +9,6 @@
        <result property="code" column="code" jdbcType="VARCHAR"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <result property="standardTreeId" column="standard_tree_id" jdbcType="INTEGER"/>
        <result property="createUser" column="create_user" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
@@ -49,4 +48,26 @@
            and model = #{data5}
        </if>
    </select>
    <select id="selectParameterList" resultType="standardProductList">
        select
               inspection_item,
               inspection_item_classify,
               inspection_item_subclass,
               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
        from structure_item_parameter
        where method = #{code}
    </select>
</mapper>
inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
<?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.StandardProductListMapper">
    <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.StandardProductList">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/>
            <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/>
            <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/>
            <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/>
            <result property="unit" column="unit" jdbcType="VARCHAR"/>
            <result property="price" column="price" jdbcType="DECIMAL"/>
            <result property="manHour" column="man_hour" jdbcType="INTEGER"/>
            <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/>
            <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/>
            <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/>
            <result property="deviceGroup" column="device_group" jdbcType="VARCHAR"/>
            <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/>
            <result property="section" column="section" jdbcType="VARCHAR"/>
            <result property="valueType" column="value_type" jdbcType="VARCHAR"/>
            <result property="method" column="method" jdbcType="VARCHAR"/>
            <result property="manDay" column="man_day" jdbcType="INTEGER"/>
            <result property="bsm" column="bsm" jdbcType="VARCHAR"/>
            <result property="ask" column="ask" jdbcType="VARCHAR"/>
            <result property="standardMethodListId" column="standard_method_list_id" jdbcType="INTEGER"/>
            <result property="createUser" column="create_user" jdbcType="INTEGER"/>
            <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,inspection_item,inspection_item_classify,
        inspection_item_subclass,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,
        ask,standard_method_list_id,create_user,
        update_user,create_time,update_time
    </sql>
</mapper>
inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -49,4 +49,27 @@
    <select id="selectStandardTreeList" resultMap="FactoryDto">
        select factory,laboratory,sample_type,sample,model from standard_tree
    </select>
    <select id="selectStandardProductById" resultType="com.yuanchu.mom.pojo.StandardProductList">
        select
            inspection_item,
            inspection_item_classify,
            inspection_item_subclass,
            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
        from structure_item_parameter
        where id = #{id}
    </select>
</mapper>