From d55fe4255a7fa2b1a9c7a8f5d00a0b7683649e2d Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期二, 22 四月 2025 16:09:53 +0800
Subject: [PATCH] 预警功能调整
---
ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java | 2 +-
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
index c6f3e6b..71da0be 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -822,9 +822,10 @@
// 5.鍙戦�佹秷鎭�氱煡缁欏鏍镐汉
// 鏌ヨ褰撳墠浜轰俊鎭�
Integer userId = SecurityUtils.getUserId().intValue();
- String userName = insProductMapper.selectUserById(userId).get("name");
+ Map<String, String> userMap = insProductMapper.selectUserById(verifyUser);
+ String userName = userMap.get("name");
// 鏌ヨ鍙戦�佷汉淇℃伅
- String sendUserAccount = insProductMapper.selectUserById(verifyUser).get("account");
+ String sendUserAccount = userMap.get("account");
InformationNotification info = new InformationNotification();
info.setCreateUser(userName);
info.setMessageType("2");
@@ -938,7 +939,7 @@
// 鏌ヨifs淇℃伅鑾峰彇鑾峰彇鍓�10涓緵搴斿晢涓�鏍风殑, 妫�楠岄」涓�鏍蜂俊鎭�
threadPoolTaskExecutor.execute(() -> {
// 娣诲姞鍒嗘瀽鏁版嵁
- addAnalysis(productList, ifsInventoryQuantity, order, userName);
+ addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount);
});
@@ -966,13 +967,13 @@
* @param ifsInventoryQuantity
* @param order
*/
- private void addAnalysis(List<InsProduct> productList, IfsInventoryQuantity ifsInventoryQuantity, InsOrder order, String userName) {
+ private void addAnalysis(List<InsProduct> productList, IfsInventoryQuantity ifsInventoryQuantity, InsOrder order, String sendUserAccount) {
for (InsProduct insProduct : productList) {
// 鍒ゆ柇鏄惁鏄暟鍊肩被鍨�
if (insProduct.getInspectionValueType().equals("1") && insProduct.getInsResult().equals(1)) {
List<InsProductDeviationWarningDetail> insProductAnalysisDtoList = insProductMapper.selectAnalysis(insProduct, ifsInventoryQuantity.getSupplierName());
- if (insProductAnalysisDtoList.size() < 5) {
+ if (insProductAnalysisDtoList.size() < 10) {
continue;
}
@@ -1033,10 +1034,10 @@
message += "\n妫�楠岄」: " + insProduct.getInspectionItem() + insProduct.getInspectionItemSubclass();
message += "\n鍋忓樊瓒呰繃浜� 10%";
// 鍙戦�佺粰鎻愪氦浜�
- WxCpUtils.inform(userName, message, null);
-
- // todo: 鍙戦�佺粰妫�娴嬩腑蹇冧富浠�(鍥哄畾姝�)
- WxCpUtils.inform("ZT-004704", message, null);
+// WxCpUtils.inform(sendUserAccount, message, null);
+//
+// // todo: 鍙戦�佺粰妫�娴嬩腑蹇冧富浠�(鍥哄畾姝�)
+// WxCpUtils.inform("ZT-004704", message, null);
} catch (Exception e) {
e.printStackTrace();
log.error("鍋忓樊棰勮浼佷笟寰俊閫氱煡鎶ラ敊");
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java
index f882b7b..689fe16 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/ssoAuth/SsoCodeAuthenticationProvider.java
@@ -28,7 +28,7 @@
@Override
public boolean supports(Class<?> authentication) {
- // 鍒ゆ柇 authentication 鏄笉鏄� WxCodeAuthenticationToken 鐨勫瓙绫绘垨瀛愭帴鍙�
+ // 鍒ゆ柇 authentication 鏄笉鏄� SsoCodeAuthenticationToken 鐨勫瓙绫绘垨瀛愭帴鍙�
return SsoCodeAuthenticationToken.class.isAssignableFrom(authentication);
}
--
Gitblit v1.9.3