From e04ce40a547fb63dc9c9f101902fad9952396f37 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期五, 12 七月 2024 16:53:34 +0800
Subject: [PATCH] 检验项目的导入添加支持多个sheet与三级检测项目添加
---
inspect-server/src/main/resources/mapper/InsSampleMapper.xml | 2 ++
inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java | 1 -
cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java | 8 ++++----
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java b/cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java
index 4020ab9..878ddeb 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/controller/CapacityScopeController.java
+++ b/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());
// 濡傛灉鏁版嵁搴撻噷闈㈢殑鏁版嵁瀛樺湪閭d箞灏辨墽琛屾洿鏂版嫹璐濇搷浣�
try {
- structureItemParameterService.saveBatch(lists);
+ structureItemParameterService.saveOrUpdateBatch(lists);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("鏈嶅姟绔姤閿欏暒!!!");
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java
index 13713f7..82a564b 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsFiberController.java
@@ -18,5 +18,4 @@
@RestController
@RequestMapping("/insFiber")
public class InsFiberController {
-
}
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 5b22c2d..f6c177f 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/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,
--
Gitblit v1.9.3