From 0c9661af88f5533ac73fbab82da39ea78d42853b Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期一, 09 九月 2024 14:10:03 +0800
Subject: [PATCH] 修改托盘码生成规则
---
Wms/WMS.BLL/SysServer/StorageLocatServer.cs | 92 +++++++++++++++++++++++++++++-----------------
1 files changed, 58 insertions(+), 34 deletions(-)
diff --git a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
index d968e79..e87f209 100644
--- a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
+++ b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -110,6 +110,7 @@
try
{
var data = LocatRst.GetOneById(id);
+ //var data = Db.Queryable<SysStorageLocat>().First(m=>m.Id == id);
return data;
}
catch (Exception e)
@@ -118,7 +119,24 @@
throw;
}
}
-
+ public List<SysStorageLocat> GetStorageLocat(List<int> id)
+ {
+ try
+ {
+ var SysStorageLocats = new List<SysStorageLocat>();
+ foreach (var item in id)
+ {
+ var storage = LocatRst.GetOneById(item);
+ SysStorageLocats.Add(storage);
+ }
+ return SysStorageLocats;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
public bool EditStorageLocat(EditLocateVm model, int userId)
{
@@ -473,8 +491,8 @@
int b = 0; //1锛氭湁鐗╁搧
int c = 0; //2锛氬叆搴撲腑
int d = 0; //3锛氬嚭搴撲腑
- //int e = 0; //4锛氱Щ鍏ヤ腑
- //int f = 0; //5锛氱Щ鍑轰腑
+ int e = 0; //4锛氱Щ鍏ヤ腑
+ int f = 0; //5锛氱Щ鍑轰腑
int g = 0; //6锛氭崯鍧廫灞忚斀
foreach (var item in getLocateVms)
@@ -503,18 +521,18 @@
d = 1; //3锛氬嚭搴撲腑
continue;
}
- ////4锛氱Щ鍏ヤ腑
- //if (item.Status == "4")
- //{
- // e = 1; //4锛氱Щ鍏ヤ腑
- // continue;
- //}
- ////5锛氱Щ鍑轰腑
- //if (item.Status == "5")
- //{
- // f = 1; //5锛氱Щ鍑轰腑
- // continue;
- //}
+ //4锛氱Щ鍏ヤ腑
+ if (item.Status == "4")
+ {
+ e = 1; //4锛氱Щ鍏ヤ腑
+ continue;
+ }
+ //5锛氱Щ鍑轰腑
+ if (item.Status == "5")
+ {
+ f = 1; //5锛氱Щ鍑轰腑
+ continue;
+ }
//6锛氭崯鍧廫灞忚斀
if (item.Status == "6")
{
@@ -559,24 +577,24 @@
getLocateVm.Status = "3";
getLocateVms.Add(getLocateVm);
}
- ////4锛氱Щ鍏ヤ腑
- //if (e == 0)
- //{
- // getLocateVm = new GetLocateVm();
- // getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
- // getLocateVm.StatusNum = "0";
- // getLocateVm.Status = "4";
- // getLocateVms.Add(getLocateVm);
- //}
- ////5锛氱Щ鍑轰腑
- //if (f == 0)
- //{
- // getLocateVm = new GetLocateVm();
- // getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
- // getLocateVm.StatusNum = "0";
- // getLocateVm.Status = "5";
- // getLocateVms.Add(getLocateVm);
- //}
+ //4锛氱Щ鍏ヤ腑
+ if (e == 0)
+ {
+ getLocateVm = new GetLocateVm();
+ getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
+ getLocateVm.StatusNum = "0";
+ getLocateVm.Status = "4";
+ getLocateVms.Add(getLocateVm);
+ }
+ //5锛氱Щ鍑轰腑
+ if (f == 0)
+ {
+ getLocateVm = new GetLocateVm();
+ getLocateVm.WareHouseNo = wareHouseNo; //浠撳簱鍙�
+ getLocateVm.StatusNum = "0";
+ getLocateVm.Status = "5";
+ getLocateVms.Add(getLocateVm);
+ }
//6锛氭崯鍧廫灞忚斀
if (g == 0)
{
@@ -672,7 +690,7 @@
throw new Exception("鏈壘鍒板搴斿偍浣�");
}
//鏈夌墿鍝併�佸嚭搴撲腑鏁版嵁婧愶紙搴撳瓨鏄庣粏琛級
- if (storageLocat.Status == "1" || storageLocat.Status == "3")
+ if (storageLocat.Status == "1" || storageLocat.Status == "3" || storageLocat.Status == "5")
{
//搴撳瓨鏄庣粏
List<DataStockDetail> stockDetailList = Db.Queryable<DataStockDetail>().Where(w => w.LocatNo == locatNo && w.IsDel == "0").ToList();
@@ -750,6 +768,12 @@
case "3":
model.Status = "鍑哄簱涓�";
break;
+ case "4":
+ model.Status = "绉诲叆涓�";
+ break;
+ case "5":
+ model.Status = "绉诲嚭涓�";
+ break;
default:
model.Status = "";
break;
--
Gitblit v1.8.0