From b88cbdbc97735732fe6406fbe5aa3228eaa1b551 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 20 十月 2025 13:13:44 +0800
Subject: [PATCH] 修改包装管理,包装可输入小数
---
Wms/WMS.BLL/HttpServer.cs | 62 ++++++++++++++++++++++++++++++-
1 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index ba26307..8994443 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;
@@ -86,8 +87,8 @@
{
throw new Exception("鐗╂枡淇℃伅涓湭鏌ヨ鍒扮┖鎵樼洏鐨勭墿鏂欎俊鎭紝涓嶅彲鍏ュ簱");
}
- var pNum = 0;
- var bNum = 0;
+ var pNum = 0m;
+ var bNum = 0m;
new Common().GetPackQtyInfo(sku.PackagNo, ref pNum, ref bNum);
@@ -1992,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