From 28931a8caa40a965738838e967533762162a7583 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期一, 24 三月 2025 16:22:52 +0800
Subject: [PATCH] 振动文件解析修改
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index 5497fbe..3ad9805 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -366,7 +366,7 @@
return pathName;
}
// 闇囧姩doc鏂囦欢瑙f瀽
- if(filename.contains(".doc") && sonLaboratory.equals("鎸姩")){
+ if(filename.toLowerCase().contains(".doc") && sonLaboratory.equals("鎸姩")){
return docAnalysis(urlString,orderId,sampleId,file.getOriginalFilename());
}
} catch (Exception e) {
@@ -940,6 +940,9 @@
if(tableIndex == 0){
Table table = tableList.get(0);
for (int i = 0; i < table.numRows(); i++) {
+ if(table.getRow(i).numCells() < 2){
+ continue;
+ }
String columnText = ObjectUtils.isEmpty(table.getRow(i).getCell(0))? "" : table.getRow(i).getCell(0).text();
String columnValue = ObjectUtils.isEmpty(table.getRow(i).getCell(1))? "" : table.getRow(i).getCell(1).text();
if(columnValue.contains("\u0007")){
@@ -962,7 +965,7 @@
//鍙栫涓�涓〃鍗曡緭鍏ラ�氶亾鍙傛暟绗竴鏉℃暟鎹�
if(tableIndex == 1){
Table table = tableList.get(1);
- if(ObjectUtils.isNotEmpty(table)&& table.numRows() > 0){
+ if(ObjectUtils.isNotEmpty(table) && table.numRows() > 1 && table.getRow(1).numCells() >= 3){
String columnValue = ObjectUtils.isEmpty(table.getRow(1).getCell(2))? "" : table.getRow(1).getCell(2).text();
if(columnValue.contains("\u0007")){
columnValue = columnValue.replace("\u0007","");
@@ -974,6 +977,9 @@
if(tableIndex == tableList.size() - 1){
Table table = tableList.get(tableIndex);
for (int i = 0; i < table.numRows(); i++) {
+ if(table.getRow(i).numCells() < 2){
+ continue;
+ }
String columnText = ObjectUtils.isEmpty(table.getRow(i).getCell(0))? "" : table.getRow(i).getCell(0).text();
String columnValue = ObjectUtils.isEmpty(table.getRow(i).getCell(1))? "" : table.getRow(i).getCell(1).text();
if(columnValue.contains("\u0007")){
--
Gitblit v1.9.3