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 | 44 ++++++++++++++++++++++++++------------------
1 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index 0f5f9a3..e426f1e 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -534,9 +534,9 @@
{
areaList.Add(item);
}
-
+ var roadStr = Db.Queryable<SysStorageRoadway>().Where(m => m.IsDel == "0" && m.Status == "0").Select(m=>m.RoadwayNo).ToList();
//宸烽亾缁勪俊鎭�
- var roadList = Db.Queryable<SysStorageLocat>().Where(m => m.IsDel == "0" && m.WareHouseNo == houseNo && areaList.Contains(m.AreaNo) && !string.IsNullOrWhiteSpace(m.RoadwayNo))
+ var roadList = Db.Queryable<SysStorageLocat>().Where(m => m.IsDel == "0" && m.WareHouseNo == houseNo && areaList.Contains(m.AreaNo) && !string.IsNullOrWhiteSpace(m.RoadwayNo) && roadStr.Contains(m.RoadwayNo))
.GroupBy(m => m.RoadwayNo).OrderBy(m => m.RoadwayNo).Select(m => m.RoadwayNo).ToList();
#endregion
@@ -1231,7 +1231,7 @@
else
{
locate2.Status = "1";
- Db.Updateable(locate).ExecuteCommand();
+ Db.Updateable(locate2).ExecuteCommand();
}
Db.Updateable(stockDetail).ExecuteCommand();
@@ -1348,12 +1348,13 @@
/// <param name="soNo"></param>
/// <param name="detailId"></param>
/// <param name="outMode"></param>
+ /// <param name="palletNo"></param>
/// <param name="userId"></param>
/// <param name="url"></param>
/// <param name="str"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
- public List<OutCommandDto> IssueOutHouseLk(string soNo, string detailId,string outMode, int userId, string url, out string str)
+ public List<OutCommandDto> IssueOutHouseLk(string soNo, string detailId,string outMode, string palletNo, int userId, string url, out string str)
{
try
{
@@ -1377,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("褰撳墠鍑哄簱鍗曟嵁鏃犻渶瑕佷笅鍙戠殑鎵樼洏");
@@ -1417,8 +1418,7 @@
var imBl = com.GetImTask(item.PalletNo);
if (imBl != null)
{
- str = "瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱";
- return outDto1;
+ throw new Exception("瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱");
}
//鍒ゆ柇鏄惁鏄凡缁忓嚭杩囧簱鍙堝洖搴�
if (item.Status == "0")
@@ -1444,26 +1444,35 @@
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")
+ {
+ throw new Exception("鎵樼洏涓嶅湪璐ф灦搴撲笂");
+ }
+ var locateEnd = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == outModeLocate && m.IsDel == "0");//褰撳墠鍑哄簱鐨勭洰鏍囧偍浣嶄俊鎭�
+ if (locateEnd == null)
+ {
+ throw new Exception("鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)");
+ }
+ else if (locateEnd.Status != "0")
+ {
+ throw new Exception("鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅");
+ }
#endregion
if (locate.Status == "1") //鏈夌墿鍝�
@@ -1590,8 +1599,7 @@
}
else if (locate.Status == "5") //绉诲嚭涓�
{
- str = "褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭";
- return outDto1;
+ throw new Exception("褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭");
}
@@ -1614,7 +1622,7 @@
//瑙f瀽杩斿洖鏁版嵁
var wcsModel = JsonConvert.DeserializeObject<WcsModel2>(response);
- if (wcsModel.code == 0)
+ if (wcsModel.code == 200)
{
//鏇存敼浠诲姟鐨勫彂閫佽繑鍥炴椂闂�//
new TaskServer().EditTaskIssueOk(list2, time1, time2);
--
Gitblit v1.8.0