From cfdbd0eadeb5dbe4ff8872bb67f43ae8f323a799 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 13 十月 2025 09:35:13 +0800
Subject: [PATCH] 优化入库单导入功能
---
Wms/WMS.BLL/DataServer/StockDetailServer.cs | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 46 insertions(+), 1 deletions(-)
diff --git a/Wms/WMS.BLL/DataServer/StockDetailServer.cs b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
index e8699c6..410570c 100644
--- a/Wms/WMS.BLL/DataServer/StockDetailServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
@@ -6,6 +6,7 @@
using SqlSugar;
using WMS.BLL.LogServer;
using WMS.DAL;
+using WMS.Entity.BllAsnEntity;
using WMS.Entity.BllQualityEntity;
using WMS.Entity.Context;
using WMS.Entity.DataEntity;
@@ -38,7 +39,8 @@
/// <param name="inspectStatus">璐ㄩ噺鐘舵��</param>
/// <returns></returns>
public List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status,
- string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName, string startTime, string endTime)
+ string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName,
+ string startTime, string endTime, string WareHouseNo, string AreaNo)
{
string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName,roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName," +
"area.AreaNo + '-' + area.AreaName as AreaName " +
@@ -90,6 +92,18 @@
{
endTime = Convert.ToDateTime(endTime).AddDays(1).ToString();
str += $" and detail.CompleteTime < '{endTime}'";
+ }
+ if (!string.IsNullOrEmpty(WareHouseNo))
+ {
+ str += $" and detail.WareHouseNo = '{WareHouseNo}'";
+ }
+ if (!string.IsNullOrEmpty(WareHouseNo))
+ {
+ str += $" and detail.WareHouseNo = '{WareHouseNo}'";
+ }
+ if (!string.IsNullOrEmpty(AreaNo))
+ {
+ str += $" and detail.AreaNo = '{AreaNo}'";
}
int i = 0;
@@ -187,7 +201,38 @@
return boxInforList;
}
+ /// <summary>
+ /// 鎵樼洏鏄庣粏澶囨敞
+ /// </summary>
+ /// <param name="id"></param>
+ /// <param name="demo"></param>
+ /// <param name="userId"></param>
+ /// <exception cref="Exception"></exception>
+ public void EditStockDetailDemo(int id, string demo, int userId)
+ {
+ try
+ {
+ var detail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.Id == id);
+ if (detail == null)
+ {
+ throw new Exception("鏈煡璇㈠埌搴撳瓨鏄庣粏淇℃伅");
+ }
+ detail.Demo = demo + "".Trim();
+ detail.UpdateUser = userId;
+ detail.UpdateTime = DateTime.Now;
+ int i = Db.Updateable(detail).ExecuteCommand();
+ if (i > 0)
+ {
+ //娣诲姞鎿嶄綔鏃ュ織
+ new OperationASNServer().AddLogOperationAsn("搴撳瓨缁熻", "鎵樼洏鏄庣粏", detail.PalletNo, "缂栬緫", $"缂栬緫浜嗘墭鐩樺彿涓簕detail.PalletNo}鐨勫娉ㄤ俊鎭�", userId);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
#endregion
--
Gitblit v1.8.0