From 7a9de16c90c1d936c35d426c95c3f4a9bba8a1f8 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 22 十一月 2024 09:25:54 +0800
Subject: [PATCH] 电路试验的计算规则,将检验值转换成绝对值进行判定,不判定的情况加上要求值是中文
---
system-run/src/main/resources/application-dev.yml | 11 ++++++-----
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 5 +++--
2 files changed, 9 insertions(+), 7 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 ccc5cf7..443e7a8 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
@@ -749,8 +749,9 @@
//缁撹
int ressult = 1;
String valueStr = insProductResult2.getValue();
+ String regex ="[\u4e00-\u9fa5]";
if (!insProduct.getAsk().contains(",")) {
- if (insProduct.getAsk().equals("/")) {
+ if (insProduct.getAsk().equals("/") || Pattern.compile(regex).matcher(insProduct.getAsk()).find()) {
ressult = 3; //涓嶅垽瀹�
} else if (!isValueValid(valueStr, new String[]{insProduct.getAsk()})) {
ressult = 0; //涓嶅悎鏍�
@@ -884,7 +885,7 @@
if (ObjectUtils.isEmpty(s)) {
continue;
}
- double numericValue = Double.parseDouble(s);
+ double numericValue = Math.abs(Double.parseDouble(s));
boolean valid = Arrays.stream(valuesToCheck)
.allMatch(v -> getResult(numericValue, v));
if (!valid) {
diff --git a/system-run/src/main/resources/application-dev.yml b/system-run/src/main/resources/application-dev.yml
index 3752805..28058cd 100644
--- a/system-run/src/main/resources/application-dev.yml
+++ b/system-run/src/main/resources/application-dev.yml
@@ -41,12 +41,13 @@
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
-# url: jdbc:mysql://localhost:3306/11?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
- url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+ url: jdbc:mysql://localhost:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+# url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
# url: jdbc:mysql://192.168.22.29:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
- username: remote_user
-# username: root
- password: zttZTT123!
+# username: remote_user
+ username: root
+ password: 123456
+# password: zttZTT123!
# password: Dq<)dAiAczXs
druid:
# Druid鏁版嵁婧愰厤缃�
--
Gitblit v1.9.3