From fb40b7634d8a199169d1c7e6d43e1e5e02278158 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 20 三月 2024 17:07:28 +0800
Subject: [PATCH] 合并
---
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 8d0d9c4..c3031a1 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -17,6 +17,7 @@
using Model.ModelDto.PdaDto;
using Dm;
using Model.InterFaceModel;
+using WMS.Entity.BllQualityEntity;
namespace WMS.BLL.BllPdaServer
{
@@ -1788,9 +1789,9 @@
}
//鏍规嵁鍗曟嵁鍙疯幏鍙栧叆搴撳崟鎬诲崟
var notice = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.AsnNo);
- if (notice.Status != "0" && notice.Status != "1")
+ if (notice.Status != "0" && notice.Status != "1" && notice.Status != "2")
{
- throw new Exception("-1:鍏ュ簱鍗曠姸鎬佷笉鏄瓑寰呮墽琛屾垨鎵ц瀹屾垚!");
+ throw new Exception("-1:璇ュ崟鎹凡鍏冲崟!");
}
if (string.IsNullOrEmpty(model.LotNo))
{
@@ -2371,8 +2372,28 @@
detailModel.SupplierNo = notice.CustomerNo;//渚涘簲鍟嗙紪鐮�
detailModel.SupplierName = notice.CustomerName;//渚涘簲鍟嗗悕绉�
}
+ #region 缁存姢璐ㄦ缁撴灉
+ //鑾峰彇璇ユ壒娆℃渶缁堣川妫�缁撴灉
+ var quality = Db.Queryable<BllQualityInspect>().Where(a => a.LotNo == noticeDetail.LotNo && a.IsDel == "0").OrderByDescending(a => a.CreateTime).First();
+ if (quality != null)
+ {
+ //淇敼鍚堟牸涓嶅悎鏍兼暟閲�
+ if (quality.IsQualified == "1") //鍚堟牸
+ {
+ //澧炲姞鍚堟牸鏁伴噺
+ quality.PassQty += detailModel.Qty;
+ detailModel.InspectStatus = "1";
+ }
+ else if (quality.IsQualified == "0") //涓嶅悎鏍�
+ {
+ //澧炲姞涓嶅悎鏍兼暟閲�
+ quality.FailQty += detailModel.Qty;
+ detailModel.InspectStatus = "2";
+ }
+ Db.Updateable(quality).ExecuteCommand(); //淇敼璐ㄦ淇℃伅
+ }
+ #endregion
stId = Db.Insertable<DataStockDetail>(detailModel).ExecuteReturnIdentity();
-
}
else
{
--
Gitblit v1.8.0