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 +--------------------------------
1 files changed, 2 insertions(+), 64 deletions(-)
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>
--
Gitblit v1.9.3