From 235195d724949cb447d835837d510851bb642ea3 Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期二, 12 三月 2024 16:57:17 +0800
Subject: [PATCH] 添加删除标签菜单信息、用户权限及功能方法,编写PDA取样出库页面功能,添加获取入库单信息方法
---
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index adb86a9..8a95a3a 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -114,8 +114,19 @@
{
try
{
+ Expression<Func<BllBoxInfo, bool>> item1 = Expressionable.Create<BllBoxInfo>()
+ .AndIF(!string.IsNullOrWhiteSpace(model.ASNNo), it => it.ASNNo.Contains(model.ASNNo.Trim()))
+ .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), it => it.PalletNo.Contains(model.PalletNo.Trim()))
+ .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim()))
+ .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), it => it.SkuNo.Contains(model.SkuNo.Trim()))
+ .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), it => it.SkuName.Contains(model.SkuName.Trim()))
+ .AndIF((model.BindNo != 0 && !string.IsNullOrWhiteSpace(model.BindNo.ToString())),it=>it.BindNo == model.BindNo)
+ .And(m => m.IsDel == "0")
+ .ToExpression();
+
var total = 0;
- var data = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BindNo == model.BindNo)
+ DbHelper<BllBoxInfo> helper = new DbHelper<BllBoxInfo>(Db);
+ var data = helper.GetAllWhereAsync(item1).Where(m => m.IsDel == "0")
.LeftJoin<BllPalletBind>((a, b) => a.BindNo == b.Id)
.GroupBy((a, b) => new
{
@@ -380,7 +391,8 @@
Db.Updateable(boxInfos).ExecuteCommand();
//淇敼鎵樼洏缁戝畾淇℃伅
- bind.Qty -= qty;
+ bind.Qty -= qty; // 鏁伴噺鍙樻洿
+ bind.BitPalletMark = "1"; // 闆舵墭鏍囪鍙樻洿
if (bind.Qty == 0)
{
@@ -1218,17 +1230,23 @@
throw new Exception($"{palletNo}鎵樼洏鏉$爜涓嶅叿鏈夌鐮佷俊鎭紝涓嶅彲鍏ュ簱锛�");
}
skuNo = stockDetail.First().SkuNo;
- //else
- //{
- // //鍒ゆ柇鏄惁鏈夐浂绠�
- // var detailIdList = stockDetail.Select(m => m.Id).ToList();
- // var dataBoxInfo = Db.Queryable<DataBoxInfo>().Where(m => detailIdList.Contains(m.StockDetailId)).ToList();
- // if (dataBoxInfo.Count(m => m.BitBoxMark == "1")>0)
- // {
- // throw new Exception($"{palletNo}鎵樼洏涓婃湁闆剁锛屼笉鍙叆搴擄紒");
- // }
+ if (!string.IsNullOrWhiteSpace(stockDetail.First().WareHouseNo))
+ {
+ if (stockDetail.First().WareHouseNo == "W01")//绔嬪簱
+ {
+ throw new Exception($"{palletNo}鎵樼洏涓婂湪绔嬪簱涓湁搴撳瓨鍌ㄤ綅淇℃伅锛岃鏍稿疄锛�");
+ }
- //}
+ if (stockDetail.First().WareHouseNo == "W02")//骞冲簱
+ {
+ var locatePingKu = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == stockDetail.First().LocatNo);
+ if (locatePingKu != null)
+ {
+ locatePingKu.Status = "0";
+ Db.Updateable(locatePingKu).ExecuteCommand();
+ }
+ }
+ }
//鑾峰彇瀵瑰簲鍥炲簱瑙勫垯
--
Gitblit v1.8.0