From 51f7eb771322a65ee552ca9b60280632f72760e6 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 15 十月 2025 16:55:08 +0800
Subject: [PATCH] 修改物料管理列表
---
Wms/WMS.BLL/HttpServer.cs | 65 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 1 deletions(-)
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index 9af3615..7ca3643 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
using Utility.Tools;
using WMS.BLL.Logic;
using WMS.BLL.LogServer;
@@ -144,7 +145,12 @@
for (int i = 1; i <= 2; i++)
{
var iStr = i.ToString();
- locate = allotLocate.GetSuiTableLocate(houseNo, areaList, "", iStr);
+ try
+ {
+ locate = allotLocate.GetSuiTableLocate(houseNo, areaList, "", iStr);
+ }
+ catch (Exception e)
+ { }
if (locate != null)
{
break;
@@ -1987,7 +1993,64 @@
throw new Exception(e.Message);
}
}
+ /// <summary>
+ /// PDA骞冲簱涓嬪彂鍑哄簱
+ /// </summary>
+ /// <param name="soNo"></param>
+ /// <param name="detailId"></param>
+ /// <param name="palletNo"></param>
+ /// <param name="userId"></param>
+ /// <exception cref="Exception"></exception>
+ public void IssueOutHousePk(string soNo, string detailId, string palletNo, int userId)
+ {
+ try
+ {
+ var notice = Db.Queryable<BllExportNotice>().First(m => m.SONo == soNo && m.IsDel == "0");
+ if (notice == null)
+ {
+ throw new Exception($"鏈壘鍒皗soNo}鍑哄簱鍗曚俊鎭�");
+ }
+ var detail=Db.Queryable<DataStockDetail>().First(m => m.PalletNo == palletNo && m.IsDel == "0");
+ if (detail.WareHouseNo != "W04")
+ {
+ throw new Exception("浠撳簱鍙烽敊璇�");
+ }
+ var intDetailId = int.Parse(detailId);
+ if (intDetailId <= 0)
+ {
+ throw new Exception("閫夋嫨鐨勫嚭搴撳崟鏄庣粏鍙傛暟閿欒");
+ }
+ //寮�鍚簨鍔�
+ Db.BeginTran();
+ notice.Status = "3";//姝e湪杩涜
+ Db.Updateable(notice).ExecuteCommand();
+
+ //鎵�鏈夎鍑哄簱鐨勫嚭搴撳垎閰嶄俊鎭�(鏈笅鍙戠殑淇℃伅鍜屽緟鎷h揣鐨勪俊鎭�)
+ var allot = Db.Queryable<BllExportAllot>().Where(a => a.IsDel == "0" && a.PalletNo == palletNo && a.Status == "0").ToList();
+ if (allot == null || allot.Count <= 0) //鍒ゆ柇鏄惁鏈夐渶瑕佷笅鍙戠殑鍑哄簱娴佹按
+ {
+ throw new Exception("褰撳墠鍑哄簱鍗曟嵁鏃犻渶瑕佷笅鍙戠殑鎵樼洏");
+ }
+ //鍑哄簱娴佹按锛堟洿鏀圭姸鎬侊級
+ foreach (var item in allot)
+ {
+ item.Status = "2";
+ Db.Updateable(item).ExecuteCommand();
+ }
+
+ //娣诲姞鎿嶄綔鏃ュ織璁板綍
+ var k = new OperationSOServer().AddLogOperationSo("PDA妯″潡", "涓嬪彂鍑哄簱", soNo, "鍑哄簱", $"鐐瑰嚮鍑哄簱鎸夐挳鍑哄簱鍗曞彿涓猴細{soNo}鐨勫嚭搴撳崟", userId);
+ //鎻愪氦浜嬪姟
+ Db.CommitTran();
+ }
+ catch (Exception e)
+ {
+ //鍥炴粴浜嬪姟
+ Db.RollbackTran();
+ throw new Exception(e.Message);
+ }
+ }
#region MyRegion
--
Gitblit v1.8.0