From 3793ba4a9b6be8faa6df0d4a76c06763ac03f873 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 29 十月 2025 15:06:04 +0800
Subject: [PATCH] 外购成品报检相关问题调整
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java | 52 ++++++++++++++++++++++++++++------------------------
1 files changed, 28 insertions(+), 24 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 7f9701e..72a1f65 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
@@ -11,6 +11,7 @@
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.License;
import com.aspose.words.SaveFormat;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -168,9 +169,7 @@
public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
// todo: 浠呯湅鑷繁鎴栬�呭疄楠屽
//鑾峰彇褰撳墠浜烘墍灞炲疄楠屽id
-
String laboratory = null;
-
String userName = null;
Integer userId = null;
if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) {
@@ -181,8 +180,17 @@
Integer isCheck = insOrderPlanDTO.getIsCheck();
insOrderPlanDTO.setIsCheck(null);
String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//璇曢獙瀹�
+ Integer typeSource = insOrderPlanDTO.getTypeSource();
+ QueryWrapper<InsOrderPlanDTO> queryWrapper = new QueryWrapper<>();
+ if(ObjectUtils.isNotEmpty(typeSource)){
+ insOrderPlanDTO.setTypeSource(null);
+ queryWrapper = QueryWrappers.queryWrappers(insOrderPlanDTO)
+ .eq(!Objects.equals(-1,typeSource),"type_source",typeSource)
+ .isNotNull(!Objects.equals(-1,typeSource),"ifs_inventory_id")
+ .isNull(Objects.equals(-1,typeSource),"ifs_inventory_id");//濮旀墭璇曢獙鏌ヨ闈瀒fs鎶ユ璁㈠崟
+ }
IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page,
- QueryWrappers.queryWrappers(insOrderPlanDTO),
+ queryWrapper,
userName,
userId,
sonLaboratory,
@@ -919,24 +927,23 @@
InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
.eq(InsSample::getInsOrderId, orderId)
.last("limit 1"));
-// threadPoolTaskExecutor.execute(() -> {
-// String message = "";
-// message += "鑰愪笣绯荤粺妫�楠屼换鍔″鏍搁�氱煡";
-// message += "\n鎻愪氦浜�: " + userName;
-// message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
-// message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
-// message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
-// if (ifsInventoryQuantity != null) {
-// message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
-// }
-// //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡 鎻愪氦澶嶆牳
-// try {
-// WxCpUtils.inform(sendUserAccount, message, null);
-// } catch (Exception e) {
-// throw new RuntimeException(e);
-// }
-// });
-
+ threadPoolTaskExecutor.execute(() -> {
+ String message = "";
+ message += "鑰愪笣绯荤粺妫�楠屼换鍔″鏍搁�氱煡";
+ message += "\n鎻愪氦浜�: " + userName;
+ message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
+ message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
+ message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
+ if (ifsInventoryQuantity != null) {
+ message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
+ }
+ //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡 鎻愪氦澶嶆牳
+ try {
+ WxCpUtils.inform(sendUserAccount, message, null);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ });
// 14.ifs绉诲簱(鍘熸潗鏂欓渶瑕佽繘琛岀Щ搴撴搷浣�) --> 鏈�鍚庢墽琛�,鍥犱负澶辫触鏃犳硶鍥炴粴
if (ifsInventoryQuantity != null) {
// 鐧昏妫�楠岀粨鏋�
@@ -950,8 +957,6 @@
// 娣诲姞鍒嗘瀽鏁版嵁
addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount);
});
-
-
} else {
// 淇敼鎴愬搧鐘舵��
// 鍒ゆ柇鏄惁鏈変笉鍚堟牸
@@ -966,7 +971,6 @@
.set(InsOrder::getInsResult, 0));
}
}
-
return 1;
}
--
Gitblit v1.9.3