From 2056ae6f3d8243b0555f437ec6d214666d5bde53 Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期一, 02 六月 2025 09:43:19 +0800
Subject: [PATCH] 修改问题
---
Wms/WMS.BLL/HttpServer.cs | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index 81d4d68..e426f1e 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -1378,7 +1378,7 @@
throw new Exception("閫夋嫨鐨勫嚭搴撳崟鏄庣粏鍙傛暟閿欒");
}
//鎵�鏈夎鍑哄簱鐨勫嚭搴撳垎閰嶄俊鎭�(鏈笅鍙戠殑淇℃伅鍜屽緟鎷h揣鐨勪俊鎭�)
- var item = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == soNo && a.SODetailNo == intDetailId && a.Status == "0" );
+ var item = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == soNo && a.SODetailNo == intDetailId && a.PalletNo == palletNo && a.Status == "0" );
if (item == null) //鍒ゆ柇鏄惁鏈夐渶瑕佷笅鍙戠殑鍑哄簱娴佹按
{
throw new Exception("褰撳墠鍑哄簱鍗曟嵁鏃犻渶瑕佷笅鍙戠殑鎵樼洏");
@@ -1418,8 +1418,7 @@
var imBl = com.GetImTask(item.PalletNo);
if (imBl != null)
{
- str = "瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱";
- return outDto1;
+ throw new Exception("瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱");
}
//鍒ゆ柇鏄惁鏄凡缁忓嚭杩囧簱鍙堝洖搴�
if (item.Status == "0")
@@ -1445,40 +1444,34 @@
Db.Updateable(notice).ExecuteCommand();
}
}
- str = "瑕佸嚭搴撶殑鎵樼洏宸插湪搴撳";
+ Db.CommitTran();
+ str = "鎵樼洏宸插湪搴撳";
return outDto1;
}
- str = "瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱";
- return outDto1;
}
var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == locateNo && m.IsDel == "0");//褰撳墠鍑哄簱鐨勫偍浣嶄俊鎭�
if (locate == null)
{
- str = "鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)";
- return outDto1;
+ throw new Exception("鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)");
}
//鍒ゆ柇鍌ㄤ綅鏍囧織鏄惁涓烘崯鍧�
if (locate.Flag == "2")
{
- str = "鍌ㄤ綅鎹熷潖涓嶈兘鍑哄簱";
- return outDto1;
+ throw new Exception("鍌ㄤ綅鎹熷潖涓嶈兘鍑哄簱");
}
if (locate.WareHouseNo != "W02")
{
- str = "鎵樼洏涓嶅湪璐ф灦搴撲笂";
- return outDto1;
+ throw new Exception("鎵樼洏涓嶅湪璐ф灦搴撲笂");
}
var locateEnd = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == outModeLocate && m.IsDel == "0");//褰撳墠鍑哄簱鐨勭洰鏍囧偍浣嶄俊鎭�
if (locateEnd == null)
{
- str = "鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)";
- return outDto1;
+ throw new Exception("鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)");
}
else if (locateEnd.Status != "0")
{
- str = "鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅";
- return outDto1;
+ throw new Exception("鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅");
}
#endregion
@@ -1606,8 +1599,7 @@
}
else if (locate.Status == "5") //绉诲嚭涓�
{
- str = "褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭";
- return outDto1;
+ throw new Exception("褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭");
}
--
Gitblit v1.8.0