From 5d756f53f07880dc8b7ba0bc9f060b9e94d4b25e Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期三, 05 十一月 2025 18:08:34 +0800
Subject: [PATCH] 修改人工入库完成和wcs小车问题
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs | 66 +--------------------------------
新建文件夹/WMS/src/extension/outbound/outboundOrder.js | 1
新建文件夹/WIDESEA_WMSServer/ClassLibrary2/EquipmentAlarmInforService.cs | 4 +-
新建文件夹/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs | 11 -----
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs | 9 ++--
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs | 2
新建文件夹/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs | 6 --
7 files changed, 13 insertions(+), 86 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/EquipmentAlarmInforService.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/EquipmentAlarmInforService.cs"
index 7949385..3e2c26c 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/EquipmentAlarmInforService.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/EquipmentAlarmInforService.cs"
@@ -97,14 +97,14 @@
}
else
{
- equipmentAlarmInfor.RobotName = item.sorterCode;
+ equipmentAlarmInfor.RobotName = item.sorterName;
equipmentAlarmInfor.Status = item.status;
equipmentAlarmInfor.SyncTime = DateTime.Now;
equipmentAlarmInforsUp.Add(equipmentAlarmInfor);
}
if (string.Equals(item.status, nameof(DeviceStatus.Error), StringComparison.OrdinalIgnoreCase))
{
- _messageInfoService.AddMessageInfo(MessageGroupByEnum.EquipmentAlarm, "鍒嗘嫞鍙板悕瀛�" + item.sorterCode, item.status);
+ _messageInfoService.AddMessageInfo(MessageGroupByEnum.EquipmentAlarm, "鍒嗘嫞鍙癰缂栫爜" + item.sorterCode, item.status);
}
}
if (equipmentAlarmInforsAdd.Count > 0) BaseDal.AddData(equipmentAlarmInforsAdd);
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
index c595243..acacce2 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
@@ -14,11 +14,7 @@
public interface IDeliveryOrderServices : IService<Dt_DeliveryOrder>
{
IRepository<Dt_DeliveryOrder> Repository { get; }
- /// <summary>
- /// 鐩樼偣鍑哄簱鎺ュ彛
- /// </summary>
- /// <returns></returns>
- public WebResponseContent InventoryGood(string batchNo, string goodsNo);
+
WebResponseContent GetDeliveryOrders(SaveModel saveModel);
WebResponseContent GetDeliveryOrderDetail(int pageNo, string orderNo, bool isPick);
/// <summary>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
index 1fa0a25..c1098c6 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
@@ -376,7 +376,7 @@
};
#endregion
- List<Dt_MaterielInfo> materielInfos = _materielInfoService.Repository.QueryData(x => order.details.Select(x => x.goods_no).Contains(x.MaterielCode));
+ List<Dt_MaterielInfo> materielInfos = _materielInfoService.Repository.QueryData(x => order.details.Select(x => x.goods_no).Contains(x.MaterielCode)).ToList();
List<Dt_MaterielInfo> materielInfosUp = new List<Dt_MaterielInfo>();
foreach (var item in order.details)
{
@@ -607,8 +607,8 @@
List<Dt_CabinOrder> cabinOrdersAdd = new List<Dt_CabinOrder>();
string WareCodeLK = WarehouseEnum.绔嬪簱.ObjToInt().ToString("000");
string WareCodeDJ = WarehouseEnum.澶т欢搴�.ObjToInt().ToString("000");
- List<Dt_Inventory_Batch> inventory_Batchs = _inventory_BatchServices.Repository.QueryData(x => codes.Contains(x.MaterielCode));
- List<Dt_InventoryInfo> _InventoryInfos = _inventoryInfoService.Repository.QueryData(x => codes.Contains(x.MaterielCode));
+ List<Dt_Inventory_Batch> inventory_Batchs = _inventory_BatchServices.Repository.QueryData(x => codes.Contains(x.MaterielCode)).ToList();
+ List<Dt_InventoryInfo> _InventoryInfos = _inventoryInfoService.Repository.QueryData(x => codes.Contains(x.MaterielCode)).ToList();
foreach (var item in order.details)
{
//鎵惧簱瀛樻壒娆′俊鎭�
@@ -834,7 +834,8 @@
List<Dt_CabinOrderDetail> cabinOrderDetails = new List<Dt_CabinOrderDetail>();
foreach (var item in cabinOrders)
{
- if (item.Details != null) cabinOrderDetails.AddRange(cabinOrderDetails);
+ if (item.Details != null) cabinOrderDetails.AddRange(item.Details);
+
item.Modifier = App.User.UserName;
item.ModifyDate = DateTime.Now;
item.Details = null;
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
index 553f878..4a549b5 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
@@ -240,8 +240,8 @@
List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>();
List<Dt_Inventory_Batch> batchesUp = new List<Dt_Inventory_Batch>();
List<Dt_InventoryInfo> inventoryInfosUp = new List<Dt_InventoryInfo>();
- var inventory_Batchs = _inventory_BatchServices.Repository.QueryData(x => entityOrder.Details.Select(e => e.Goods_no).Contains(x.MaterielCode));
- var InventoryInfos = _inventoryInfoService.Repository.QueryData(x => entityOrder.Details.Select(e => e.Goods_no).Contains(x.MaterielCode) && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.AvailableQuantity > 0 && x.WarehouseCode == outorder.warehouse_no);
+ var inventory_Batchs = _inventory_BatchServices.Repository.QueryData(x => entityOrder.Details.Select(e => e.Goods_no).Contains(x.MaterielCode)).ToList();
+ var InventoryInfos = _inventoryInfoService.Repository.QueryData(x => entityOrder.Details.Select(e => e.Goods_no).Contains(x.MaterielCode) && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.AvailableQuantity > 0 && x.WarehouseCode == outorder.warehouse_no).ToList();
foreach (var item in entityOrder.Details)
{
Dt_Inventory_Batch? inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.Goods_no && x.BatchNo == item.Batch_num).FirstOrDefault();
@@ -946,68 +946,6 @@
}
#endregion
-
- //鐩樼偣 鎷挎暣涓壒娆′俊鎭〃鐨勫晢鍝佹壒鍙峰拰鍟嗗搧缂栧彿鏉ヨ繘琛岀洏鐐�
- public WebResponseContent InventoryGood(string batchNo, string goodsNo)
- {
- var response = new WebResponseContent();
- try
- {
- // 1锔忊儯 鏌ユ壘鎸囧畾鎵规涓庣墿鏂欑殑搴撳瓨淇℃伅
- var batchInfo = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == batchNo && x.MaterielCode == goodsNo);
-
- if (batchInfo == null)
- return response.Error($"鏈壘鍒拌鐗╂枡 [{goodsNo}] 鎵规 [{batchNo}] 鐨勫簱瀛樹俊鎭�");
-
- // 2锔忊儯 缁勮璇锋眰 DTO锛堝畬鍏ㄧ鍚堟帴鍙f枃妗g粨鏋勶級
- var ediDto = new TowcsDto.ToediOutInfo
- {
- customerCode = "905",
- materialCode = "YY", // 鐗╂枡绫诲瀷CODE
- externalOrderNo = $"PDCK-{batchInfo.Id}", // 澶栭儴鍑哄簱鍗曞彿
- outOrderType = "20", // 鐩樼偣鍑哄簱鍗�
- priority = 1,
- Is_cancel = 0,
- details = new List<TowcsDto.ToeOutdiInDetail>
- {
- new TowcsDto.ToeOutdiInDetail
- {
- batchNo = batchInfo.BatchNo,
- productCode = batchInfo.MaterielCode,
- productName = batchInfo.MaterielName,
- productSpecifications = batchInfo.MaterielSpec,
- quantity = (int)batchInfo.SupplyQuantity,
- //stocktakingDetails = new List<TowcsDto.ToOutediInStock>
- //{
- // // 鐩樼偣鏄庣粏鍙牴鎹疄闄呮墭鐩樻媶鍒嗭紱姝ゅ绀轰緥浠�1鏉�
- // new TowcsDto.ToOutediInStock
- // {
- // palletCode = "FC00001",
- // quantity = batchInfo.SupplyQuantity.ToString()
- // }
- //}
- }
- }
- };
-
- // 3锔忊儯 璋冪敤鎺ュ彛
- string url = "http://172.16.1.2:9357/file-admin/api/out/ediOut";
- var result = HttpHelper.Post(url, ediDto.ToJsonString());
- var resp = JsonConvert.DeserializeObject<TowcsDto.TowcsResponse<object>>(result);
-
- // 4锔忊儯 鍝嶅簲澶勭悊
- if (resp == null)
- return response.Error("WCS 鏃犲搷搴�");
- if (resp.code != "0")
- return response.Error($"WCS杩斿洖澶辫触: {resp.msg}");
-
- return response.OK("鐩樼偣鍑哄簱涓嬪彂鎴愬姛");
- }
- catch (Exception ex)
- {
- return response.Error("鐩樼偣澶辫触锛�" + ex.Message);
- }
- }
/// <summary>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
index 325a79e..cbf773e 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
@@ -75,7 +75,7 @@
/// <summary>
- /// 涓嶈鏄嚭搴撳叆搴撶洏鐐癸紝wcs閮戒細璋冪敤鎴戣繖涓柟娉�
+ /// wcs鍥炰紶缁欐垜璋冪敤鎴戠殑鏂规硶 涓嶇鏄叆搴� 鍑哄簱 鐩樼偣閮戒細璋冪敤杩欎釜鎺ュ彛(鐜板湪鐢ㄨ繖涓�)
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
index c11332c..a1e3ba4 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
@@ -98,16 +98,7 @@
return Service.GetCheckOutTasks(saveModel);
}
- /// <summary>
- /// 鐩樼偣鍑哄簱鎺ュ彛
- /// </summary>
- /// <param name="externalOrderNo"></param>
- /// <returns></returns>
- [HttpPost, Route("InventoryGood"), AllowAnonymous]
- public WebResponseContent InventoryGood(string batchNo, string goodsNo)
- {
- return Service.InventoryGood(batchNo, goodsNo);
- }
+
/// <summary>
/// 鍑哄簱娴嬭瘯
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
index 06741ff..c1b4768 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
@@ -92,6 +92,7 @@
x.readonly = true
})
})
+ //褰撳嚭搴撶被鍨�(out_type)涓�"20"涓斾粨搴撶紪鍙�(warehouse_no)涓嶄负"001"鏃讹細鍙樉绀�"娣诲姞琛�"鍜�"鑷畾涔夋寜閽�"杩欎袱涓寜閽紝鍏朵粬鏃跺�欏氨闅愯棌
this.detailOptions.buttons.forEach((btn) => {
if (row.out_type == "20" && row.warehouse_no != "001") {
btn.hidden = btn.name != '娣诲姞琛�' && btn.name != '鑷畾涔夋寜閽�'
--
Gitblit v1.9.3