Crunchy
2024-07-12 e04ce40a547fb63dc9c9f101902fad9952396f37
检验项目的导入添加支持多个sheet与三级检测项目添加
已修改3个文件
11 ■■■■ 文件已修改
cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsSampleMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java
@@ -175,11 +175,11 @@
        InputStream inputStream = file.getInputStream();
        List<StructureItemParameter> lists = new ArrayList<>();
        AtomicReference<String> sample = new AtomicReference<>();
        ExcelUtil.readBySax(inputStream, 0, (i, l, list1) -> {
            if (i == 0 && l == 1) {
        ExcelUtil.readBySax(inputStream, -1, (i, l, list1) -> {
            if (l == 1) {
                sample.set(list1.get(1) + "");
            }
            if (i == 0 && l >= 1) {
            if (l >= 1) {
                StructureItemParameter str = new StructureItemParameter();
                if (list1.get(1) == null) {
                    str.setSample(null);
@@ -363,7 +363,7 @@
        structureItemParameterService.removeNoSample(sample.get());
        // 如果数据库里面的数据存在那么就执行更新拷贝操作
        try {
            structureItemParameterService.saveBatch(lists);
            structureItemParameterService.saveOrUpdateBatch(lists);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("服务端报错啦!!!");
inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java
@@ -18,5 +18,4 @@
@RestController
@RequestMapping("/insFiber")
public class InsFiberController {
}
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -305,6 +305,8 @@
        select ip.id          ip_id,
               inspection_item,
               inspection_item_en,
               inspection_item_class,
               inspection_item_class_en,
               inspection_item_subclass,
               inspection_item_subclass_en,
               ip.factory     ip_factory,