From 52af69dd4c1be4ec93e012013dee78c3105998ec Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 06 三月 2025 16:34:27 +0800
Subject: [PATCH] 修改问题
---
Wms/WMS.BLL/BllTransServer/RcsServer.cs | 217 +++++++++++++++++++++++++++++++++++++++++-
Wms/WMS.Entity/DataEntity/DataStockDetail.cs | 4
Wms/Wms/Controllers/SysController.cs | 2
Wms/Model/ModelDto/DataDto/StockDetailDto.cs | 5 +
HTML/views/WareHouseSetting/PalletsPrintFrom.html | 6 +
HTML/views/StatisticalReport/BoxInfor.html | 1
HTML/views/WareHouseSetting/Pallets.html | 3
Wms/WMS.BLL/SysServer/PalletsServer.cs | 23 ++++
Wms/Model/ModelVm/SysVm/PalletVm.cs | 5
Wms/WMS.IBLL/ISysServer/IPalletsServer.cs | 2
10 files changed, 253 insertions(+), 15 deletions(-)
diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index 4901114..ee4df8b 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -410,6 +410,7 @@
{field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center',},
{field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center'},
{field: 'InspectStatus', title: '璐ㄦ鐘舵��', align: 'center', templet: '#InspectStatus1'},
+ {field: 'UDF1', title: '鎵�灞炶澶囩紪鐮�', align: 'center'},
//{field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus'},
//{field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus'},
]];
diff --git a/HTML/views/WareHouseSetting/Pallets.html b/HTML/views/WareHouseSetting/Pallets.html
index 016b826..0f767ef 100644
--- a/HTML/views/WareHouseSetting/Pallets.html
+++ b/HTML/views/WareHouseSetting/Pallets.html
@@ -246,7 +246,8 @@
var param = {
PalletNo:field.StockCode,
- LocatNo:field.LocatNo
+ LocatNo:field.LocatNo,
+ DeviceCode:field.DeviceCode
};
synData(IP + "/Sys/AddPallets", param, 'post', function(res) {
console.log(res);
diff --git a/HTML/views/WareHouseSetting/PalletsPrintFrom.html b/HTML/views/WareHouseSetting/PalletsPrintFrom.html
index 8bf171c..0b9a541 100644
--- a/HTML/views/WareHouseSetting/PalletsPrintFrom.html
+++ b/HTML/views/WareHouseSetting/PalletsPrintFrom.html
@@ -23,6 +23,12 @@
<input type="text" name="LocatNo" placeholder="璇疯緭鍏ュ偍浣嶅湴鍧�" lay-verify="required" autocomplete="off" class="layui-input">
</div>
</div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">鎵�灞炴帴鏂欒澶�</label>
+ <div class="layui-input-block">
+ <input type="text" name="DeviceCode" placeholder="璇疯緭鍏ユ墍灞炴帴鏂欒澶�" lay-verify="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
<div class="layui-form-item layui-hide">
<input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="纭娣诲姞">
<input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="纭缂栬緫">
diff --git a/Wms/Model/ModelDto/DataDto/StockDetailDto.cs b/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
index efa4fae..c0cdb47 100644
--- a/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
+++ b/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
@@ -215,5 +215,10 @@
/// 鍌ㄤ綅娣卞害
/// </summary>
public int Dept { get; set; }
+
+ /// <summary>
+ /// 鎵�灞炶澶囩紪鐮�
+ /// </summary>
+ public string UDF1 { get; set; }
}
}
diff --git a/Wms/Model/ModelVm/SysVm/PalletVm.cs b/Wms/Model/ModelVm/SysVm/PalletVm.cs
index 5771b92..a6454cc 100644
--- a/Wms/Model/ModelVm/SysVm/PalletVm.cs
+++ b/Wms/Model/ModelVm/SysVm/PalletVm.cs
@@ -34,7 +34,10 @@
/// 鍌ㄤ綅鍦板潃
/// </summary>
public string LocatNo { get; set; }
-
+ /// <summary>
+ /// 璁惧缂栫爜
+ /// </summary>
+ public string DeviceCode { get; set; }
}
}
diff --git a/Wms/WMS.BLL/BllTransServer/RcsServer.cs b/Wms/WMS.BLL/BllTransServer/RcsServer.cs
index 1e8e7a3..63f8680 100644
--- a/Wms/WMS.BLL/BllTransServer/RcsServer.cs
+++ b/Wms/WMS.BLL/BllTransServer/RcsServer.cs
@@ -79,12 +79,28 @@
//鏌ユ壘鍒拌杞﹂棿鍑�妗跺尯
List<string> areaNoList = Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Type == "0" && w.WareHouseNo == houseNo).Select(s => s.AreaNo).ToList();
//鏌ユ壘鍑�妗�
- pallet = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "0" && w.Status == "0"
- && areaNoList.Contains(w.AreaNo)).OrderByDescending(o => o.CreateTime).First();
+ if (houseNo == "M03")//澶у崟浣撹溅闂村噣妗舵槸缁戝畾鎺ユ枡璁惧鐨�
+ {
+ pallet = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "0" && w.Status == "0"
+ && areaNoList.Contains(w.AreaNo) && w.UDF1 == deviceInfo.DeviceCode).OrderBy(o => o.UpdateTime).First();
+ }
+ else
+ {
+ pallet = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "0" && w.Status == "0"
+ && areaNoList.Contains(w.AreaNo)).OrderBy(o => o.UpdateTime).First();
+ }
+
if (pallet == null)
{
throw new Exception("鏆傛棤鍑�妗跺彲鍒嗛厤");
}
+ //鍒嗛厤妗跺悗鍒ゆ柇璇ユ《澶栦晶鍌ㄤ綅鏄惁闇�瑕佺Щ搴�
+ bool yikuResult = YikuTask(pallet.PalletNo, url);
+ if (!yikuResult)
+ {
+ throw new Exception("绉诲簱澶辫触");
+ }
+
pallet.Status = "2";//鍒嗛厤鐘舵�� 0:寰呭垎閰嶏紝1锛氶儴鍒嗗垎閰� 锛� 2:宸插垎閰�
//鏇存柊妗跺簱瀛樻槑缁�
Db.Updateable(pallet).ExecuteCommand();
@@ -109,11 +125,18 @@
List<string> areaNoList2 = Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Type == "1" && w.WareHouseNo == houseNo).Select(s => s.AreaNo).ToList();
//鏌ユ壘搴撳瓨涓槸鍚︽湁鍙敤鐨勬鎵规鐨勬贩鏂欐《
pallet = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "1" && w.Status == "0" && w.LotNo == model.LotNo
- && areaNoList2.Contains(w.AreaNo)).OrderByDescending(o => o.CompleteTime).First();
+ && areaNoList2.Contains(w.AreaNo)).OrderBy(o => o.UpdateTime).First();
if (pallet == null)
{
throw new Exception("鏆傛棤娣锋枡妗跺彲鍒嗛厤");
}
+ //鍒嗛厤妗跺悗鍒ゆ柇璇ユ《澶栦晶鍌ㄤ綅鏄惁闇�瑕佺Щ搴�
+ bool yikuResult = YikuTask(pallet.PalletNo, url);
+ if (!yikuResult)
+ {
+ throw new Exception("绉诲簱澶辫触");
+ }
+
pallet.Status = "2";//鍒嗛厤鐘舵�� 0:寰呭垎閰嶏紝1锛氶儴鍒嗗垎閰� 锛� 2:宸插垎閰�
//鏇存柊妗跺簱瀛樻槑缁�
Db.Updateable(pallet).ExecuteCommand();
@@ -143,14 +166,14 @@
throw new Exception("鎵规鍙蜂负绌猴紒");
}
//鏌ユ壘鏄惁鏈夋鎵规鍑哄簱鍗曟槑缁�
- var soNoticeDetail = Db.Queryable<BllExportNoticeDetail>().Where(w => w.IsDel == "0" && w.LotNo == model.LotNo).OrderBy(o => o.CreateTime).First();
+ /*var soNoticeDetail = Db.Queryable<BllExportNoticeDetail>().Where(w => w.IsDel == "0" && w.LotNo == model.LotNo).OrderBy(o => o.CreateTime).First();
if (soNoticeDetail == null)
{
throw new Exception("璇ユ壒娆℃病鏈夊搴旂殑鍑哄簱鍗曟槑缁�");
}
noticeNo = soNoticeDetail.Id.ToString();
//鍑哄簱鎬诲崟
- /*var soNotice = Db.Queryable<BllExportNotice>().Where(w => w.IsDel == "0" && w.SONo == soNoticeDetail.SONo).First();
+ var soNotice = Db.Queryable<BllExportNotice>().Where(w => w.IsDel == "0" && w.SONo == soNoticeDetail.SONo).First();
if (soNotice == null)
{
throw new Exception("璇ユ壒娆℃病鏈夊搴旂殑鍑哄簱鍗�");
@@ -164,11 +187,18 @@
List<string> areaNoList3 = Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Type == "2" && w.WareHouseNo == houseNo).Select(s => s.AreaNo).ToList();
//鏌ユ壘搴撳瓨涓槸鍚︽湁姝ゆ壒娆$殑鍚堟牸涓嬫枡妗�
pallet = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "2" && w.Status == "0" && w.LotNo == model.LotNo && w.InspectStatus == "1"
- && areaNoList3.Contains(w.AreaNo)).OrderByDescending(o => o.CompleteTime).First();
+ && areaNoList3.Contains(w.AreaNo)).OrderBy(o => o.UpdateTime).First();
if (pallet == null)
{
throw new Exception("鏆傛棤涓嬫枡妗跺彲鍒嗛厤");
}
+ //鍒嗛厤妗跺悗鍒ゆ柇璇ユ《澶栦晶鍌ㄤ綅鏄惁闇�瑕佺Щ搴�
+ bool yikuResult = YikuTask(pallet.PalletNo, url);
+ if (!yikuResult)
+ {
+ throw new Exception("绉诲簱澶辫触");
+ }
+
pallet.Status = "2";//鍒嗛厤鐘舵�� 0:寰呭垎閰嶏紝1锛氶儴鍒嗗垎閰� 锛� 2:宸插垎閰�
//鏇存柊妗跺簱瀛樻槑缁�
Db.Updateable(pallet).ExecuteCommand();
@@ -186,8 +216,23 @@
}
//鏌ユ壘鍒拌杞﹂棿鑴忔《鍖�
List<string> areaNoList4 = Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Type == "3" && w.WareHouseNo == houseNo).Select(s => s.AreaNo).ToList();
- List<DataStockDetail> palletList = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "3" && w.Status == "0"
- && areaNoList4.Contains(w.AreaNo)).OrderByDescending(o => o.CompleteTime).ToList();
+
+ List<DataStockDetail> palletList = new List<DataStockDetail>();
+ if (houseNo == "M01")
+ {
+ palletList = Db.Queryable<DataStockDetail>()
+ .LeftJoin<SysStorageLocat>((d, l) => d.LocatNo == l.LocatNo)
+ .Where(d => d.WareHouseNo == houseNo && d.PalletStatus == "3" && d.Status == "0" && areaNoList4.Contains(d.AreaNo))
+ .OrderBy((d, l) => l.Row)
+ .OrderBy((d, l) => l.Column)
+ .ToList();
+ }
+ else
+ {
+ palletList = stockDetail.Where(w => w.WareHouseNo == houseNo && w.PalletStatus == "3" && w.Status == "0"
+ && areaNoList4.Contains(w.AreaNo)).OrderBy(o => o.UpdateTime).ToList();
+ }
+
if (palletList.Count <= 0)
{
throw new Exception("鏆傛棤鑴忔《鍙垎閰�");
@@ -230,7 +275,7 @@
#endregion
item.Status = "2";//鍒嗛厤鐘舵�� 0:寰呭垎閰嶏紝1锛氶儴鍒嗗垎閰� 锛� 2:宸插垎閰�
- //鏇存柊妗跺簱瀛樻槑缁�
+ //鏇存柊妗跺簱瀛樻槑缁�
Db.Updateable(item).ExecuteCommand();
//璧峰鍌ㄤ綅鍦板潃淇℃伅
var startLoction2 = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == item.LocatNo);
@@ -1244,5 +1289,159 @@
return result;
#endregion
}
+
+ /// <summary>
+ /// 鍒嗛厤妗跺悗鍒ゆ柇璇ユ《澶栦晶鍌ㄤ綅鏄惁闇�瑕佺Щ搴�
+ /// </summary>
+ /// <param name="palletNo"></param>
+ /// <param name="url"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ private bool YikuTask(string palletNo,string url)
+ {
+ try
+ {
+ //鍒嗛厤妗剁殑搴撳瓨淇℃伅
+ var palletInfo = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo);
+ if (palletInfo == null)
+ {
+ throw new Exception("鏈煡璇㈠埌鍒嗛厤妗剁殑搴撳瓨淇℃伅");
+ }
+ //鍒ゆ柇鍒嗛厤鐨勬《鏈夋病鏈夋鍦ㄦ墽琛岀殑浠诲姟锛堢Щ搴撲腑锛�
+ var taskIng= Db.Queryable<LogTask>().First(w => w.IsDel == "0" && (w.Status == "0" || w.Status == "1") && w.PalletNo == palletNo);
+ if (taskIng != null)
+ {
+ throw new Exception("鍒嗛厤鐨勬《鏈夋鍦ㄦ墽琛岀殑浠诲姟锛岃绋嶅悗鍐嶈瘯");
+ }
+ //鍒嗛厤妗剁殑鍌ㄤ綅淇℃伅
+ var locatInfo = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == palletInfo.LocatNo);
+ if (locatInfo == null)
+ {
+ throw new Exception("鏈煡璇㈠埌鍒嗛厤妗舵墍鍦ㄧ殑鍌ㄤ綅淇℃伅");
+ }
+
+ //鍒ゆ柇璇ュ偍浣嶆槸鍚︽槸鍐呬晶鍌ㄤ綅
+ if (!string.IsNullOrEmpty(locatInfo.AisleOne))
+ {
+ //鍒ゆ柇澶栦晶鍌ㄤ綅鏄惁鏈夋《
+ var palletInfoYi = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == locatInfo.AisleOne);
+ if (palletInfoYi != null)
+ {
+ //鍒ゆ柇瑕佺Щ搴撶殑妗舵槸鍚﹁鍒嗛厤
+ if (palletInfoYi.Status != "0")
+ {
+ throw new Exception("瑕佺Щ搴撶殑妗跺凡琚垎閰嶏紝璇风◢鍚庡啀璇�");
+ }
+ //鍒ゆ柇瑕佺Щ搴撶殑妗舵槸鍚︽湁姝e湪鎵ц鐨勪换鍔�
+ var taskInfo = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && (w.Status == "0" || w.Status == "1") && w.PalletNo == palletInfoYi.PalletNo);
+ if (taskInfo != null)
+ {
+ throw new Exception("瑕佺Щ搴撶殑妗舵湁姝e湪鎵ц鐨勪换鍔★紝璇风◢鍚庡啀璇�");
+ }
+ #region#缁欒绉诲簱鐨勬《鍒嗛厤鏂板偍浣�
+ var locatInfoNew = new SysStorageLocat();
+ //浼樺厛鍒嗛厤鍐呬晶鍌ㄤ綅
+ var locatListNei = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.Status == "0" && !string.IsNullOrEmpty(w.AisleOne) && w.WareHouseNo == palletInfoYi.WareHouseNo && w.AreaNo == palletInfoYi.AreaNo).ToList();
+ foreach (var item in locatListNei)
+ {
+ //鍒ゆ柇璇ュ唴渚у偍浣嶇殑澶栦晶鍌ㄤ綅鏄惁鏈夋《
+ var detailWai = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == item.AisleOne);
+ if (detailWai != null)
+ {
+ continue;
+ }
+ locatInfoNew = item;
+ break;
+ }
+ if (locatInfoNew == null)
+ {
+ //娌℃湁鍐呬晶鍌ㄤ綅锛屽啀鏌ユ壘澶栦晶鍌ㄤ綅
+ var locatListWai = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.Status == "0" && string.IsNullOrEmpty(w.AisleOne) && w.WareHouseNo == palletInfoYi.WareHouseNo && w.AreaNo == palletInfoYi.AreaNo).OrderBy(o => o.Row).ToList();
+ foreach (var item in locatListWai)
+ {
+ //鍒ゆ柇璇ュ偍浣嶇殑鍐呬晶鍌ㄤ綅鏄惁鏈夋鍦ㄦ墽琛岀殑浠诲姟
+ var locatItemNei = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.AisleOne == item.LocatNo);
+ if (locatItemNei != null && locatItemNei.Status != "0")
+ {
+ continue;
+ }
+ locatInfoNew = item;
+ break;
+ }
+ }
+ if (locatInfoNew == null)
+ {
+ throw new Exception("娌℃湁绌轰綑鐨勭┖鍌ㄤ綅杩涜绉诲簱");
+ }
+ #endregion
+
+ //缁欎笅杞︿笅鍙戠Щ搴撲换鍔�
+ var taskNo = new Common().GetMaxNo("TK");//浠诲姟鍙�
+ //浠诲姟淇℃伅
+ var logTaskEntry = new LogTask
+ {
+ TaskNo = taskNo,
+ Sender = "WMS",
+ Receiver = "RCS",
+ //IsSuccess = 1, //鏄惁涓嬪彂鎴愬姛 0澶辫触 1鎴愬姛
+ SendDate = DateTime.Now, //鍙戦�佹椂闂�
+ //BackDate = DateTime.Now, //杩斿洖鏃堕棿
+ StartLocat = palletInfoYi.LocatNo,//璧峰浣嶇疆
+ EndLocat = locatInfoNew.LocatNo,//鐩爣浣嶇疆
+ PalletNo = palletInfoYi.PalletNo,//鎵樼洏鐮�
+ IsSend = 1,//鏄惁鍙啀娆′笅鍙�
+ IsCancel = 1,//鏄惁鍙彇娑�
+ IsFinish = 1,//鏄惁鍙畬鎴�
+ Type = "1",//浠诲姟绫诲瀷 0 鍏ュ簱浠诲姟 1 鍑哄簱浠诲姟 2 绉诲簱浠诲姟
+ OrderType = "3",//鍗曟嵁绫诲瀷 0 鍏ュ簱 1 鍑哄簱 3绉诲簱
+ Status = "0",//浠诲姟鐘舵��0锛氱瓑寰呮墽琛�1姝e湪鎵ц2鎵ц瀹屾垚
+ NoticeDetailNo = 0,
+ Msg = $"灏嗘《{palletInfoYi.PalletNo}浠巤palletInfoYi.LocatNo}绉诲埌{locatInfoNew.LocatNo}", //鍏抽敭淇℃伅
+ LotNo = ""//鎵规鍙�
+ };
+
+ //缁勭粐涓嬪彂灏忚溅浠诲姟淇℃伅
+ var task = new TaskDetial
+ {
+ Taskno = taskNo,//浠诲姟鍙�
+ Startport = palletInfoYi.LocatNo,//璧峰浣嶇疆
+ Endport = locatInfoNew.LocatNo,//endLoction.LocatNo,//鐩爣浣嶇疆
+ Pallno = palletInfoYi.PalletNo,//妗跺彿
+ Crtype = "1",//鍙《
+ WareHouseNo = palletInfoYi.WareHouseNo//杞﹂棿缂栫爜
+ };
+ //缁欎笅杞︿笅鍙戜换鍔�
+ logTaskEntry.SendDate = DateTime.Now;//鍙戦�佹椂闂�
+ var agvResult = CreateTaskForAgv(task, url);
+ if (agvResult)//鎴愬姛
+ {
+ //璇锋眰鎴愬姛淇敼浠诲姟琛ㄧ浉搴斿瓧娈电姸鎬�
+ logTaskEntry.IsSuccess = 1;
+ logTaskEntry.IsSend = 0;
+ //logTaskEntry.IsCancel = 0;
+ logTaskEntry.BackDate = DateTime.Now;
+ logTaskEntry.Status = "1";//姝e湪鎵ц
+ Db.Insertable(logTaskEntry).ExecuteCommand();
+
+
+ locatInfo.Status = "5";//绉诲嚭涓�
+ Db.Updateable(locatInfo).ExecuteCommand();
+
+ locatInfoNew.Status = "4";//绉诲叆涓�
+ Db.Updateable(locatInfoNew).ExecuteCommand();
+ }
+ else//澶辫触
+ {
+ throw new Exception($"缁欏皬杞︿笅鍙戠Щ搴撲换鍔″け璐ワ紝妗跺彿锛歿palletInfoYi.PalletNo}");
+ }
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw new Exception(e.Message);
+ }
+ }
}
}
diff --git a/Wms/WMS.BLL/SysServer/PalletsServer.cs b/Wms/WMS.BLL/SysServer/PalletsServer.cs
index 622d79e..8691b93 100644
--- a/Wms/WMS.BLL/SysServer/PalletsServer.cs
+++ b/Wms/WMS.BLL/SysServer/PalletsServer.cs
@@ -120,7 +120,7 @@
/// <param name="locatNo"></param>
/// <param name="userId"></param>
/// <exception cref="Exception"></exception>
- public void AddPallets(string palletNo,string locatNo,int userId)
+ public void AddPallets(string palletNo,string locatNo, string deviceCode, int userId)
{
var db = DataContext.Db;
try
@@ -155,6 +155,22 @@
if (!areaModel.AreaName.Contains("鍑�妗�"))
{
throw new Exception("鏂版坊鍔犵殑妗跺彧鑳界粦瀹氬噣妗跺尯");
+ }
+ if (!string.IsNullOrEmpty(deviceCode))
+ {
+ var areaInfo = db.Queryable<SysStorageArea>().First(w => w.IsDel == "0" && w.DeviceCode.Contains(deviceCode));
+ if (areaInfo == null)
+ {
+ throw new Exception("鏈煡鍒拌澶囨墍灞炲尯鍩熶俊鎭�");
+ }
+ if (!areaInfo.AreaName.Contains("鎺ユ枡璁惧"))
+ {
+ throw new Exception("鍙兘缁戝畾鎺ユ枡璁惧");
+ }
+ if (areaInfo.WareHouseNo != "M03")
+ {
+ throw new Exception("鍙湁澶у崟浣撹溅闂存墠鑳界粦瀹氳澶�");
+ }
}
//寮�鍚簨鍔�
db.BeginTran();
@@ -200,9 +216,12 @@
PalletStatus = "0",//鍑�妗�
+ UDF1 = deviceCode,
+
IsDel = "0",
CreateUser = userId,
- CreateTime = comTime
+ CreateTime = comTime,
+ UpdateTime=comTime,
};
//鎻掑叆搴撳瓨鏄庣粏
db.Insertable(model).ExecuteCommand();
diff --git a/Wms/WMS.Entity/DataEntity/DataStockDetail.cs b/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
index e742d8e..731b449 100644
--- a/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
+++ b/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
@@ -276,5 +276,9 @@
/// </summary>
public string Demo { get; set; }
+ /// <summary>
+ /// 璁惧缂栫爜
+ /// </summary>
+ public string UDF1 { get; set; }
}
}
diff --git a/Wms/WMS.IBLL/ISysServer/IPalletsServer.cs b/Wms/WMS.IBLL/ISysServer/IPalletsServer.cs
index 9d05244..cfb445e 100644
--- a/Wms/WMS.IBLL/ISysServer/IPalletsServer.cs
+++ b/Wms/WMS.IBLL/ISysServer/IPalletsServer.cs
@@ -33,6 +33,6 @@
/// <param name="groupCount">缁勬暟</param>
/// <param name="userId">鎿嶄綔浜�</param>
/// <returns></returns>
- void AddPallets(string palletNo, string locatNo, int userId);
+ void AddPallets(string palletNo, string locatNo,string deviceCode, int userId);
}
}
diff --git a/Wms/Wms/Controllers/SysController.cs b/Wms/Wms/Controllers/SysController.cs
index 58dc937..a524fa1 100644
--- a/Wms/Wms/Controllers/SysController.cs
+++ b/Wms/Wms/Controllers/SysController.cs
@@ -1327,7 +1327,7 @@
{
return Ok(new { code = 1, msg = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
}
- _palletSvc.AddPallets(model.PalletNo, model.LocatNo,int.Parse(userId));
+ _palletSvc.AddPallets(model.PalletNo, model.LocatNo, model.DeviceCode, int.Parse(userId));
return Ok(new { code = 0, msg = "娣诲姞鎴愬姛", data = "" });
--
Gitblit v1.8.0