From 2b49f7643d15b74889d190f216630559006ed93a Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期一, 01 十二月 2025 09:48:43 +0800
Subject: [PATCH] pad和后端的优化
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 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 5e3d40a..41040f9 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"
@@ -207,7 +207,7 @@
{
WebResponseContent webResponseContent = new WebResponseContent();
try
- {
+ {
Dt_Tactics tactics = _tacticsService.Repository.QueryFirst(x => x.TacticeName == "鍑哄簱绛栫暐");
#region 鐗规畩搴撴埧鍑哄簱
string WareCodeMJ = WarehouseEnum.楹荤簿搴�.ObjToInt().ToString("000");
@@ -281,6 +281,7 @@
OrderNo = entityOrder.Out_no,
StockQuantity = InventoryInfo.AvailableQuantity,
SupplyQuantity = 0,
+ Modifier= InventoryInfo.ValidityPeriod,//鏈夋晥鏈熸
Remark = "鍑哄簱"
};
supplyTasks.Add(supplyTask);
@@ -369,7 +370,7 @@
inventory_Batch.AvailableQuantity -= detail.order_qty;
inventory_Batch.OutboundQuantity += detail.order_qty;
List<Dt_InventoryInfo> dt_InventoryInfos = InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList();
- if (dt_InventoryInfos.Count < 1) throw new Exception($"鍑哄簱鍗曞彿銆恵outorder.order_no}銆戜腑鐗╂枡缂栧彿銆恵detail.goods_no}銆戠墿鏂欐壒娆°�恵detail.batch_num}銆戠殑鍙敤搴撳瓨涓嶈冻");
+ if (dt_InventoryInfos.Count < 1) throw new Exception($"娌℃湁鎵惧埌搴撳瓨淇℃伅涓殑锛氬嚭搴撳崟鍙枫�恵outorder.order_no}銆戠殑鐗╂枡缂栧彿銆恵detail.goods_no}銆戠墿鏂欐壒娆°�恵detail.batch_num}銆�");
#endregion
#region 鎸夊嚭搴撶瓥鐣ユ煡鎵惧簱瀛�
if (tactics.SelectTactice == TacticsEnum.ComeOutonFirstTime.ObjToInt())
@@ -424,6 +425,7 @@
LocationCode = InventoryInfo.LocationCode,
OrderNo = entityOrder.Out_no,
StockQuantity = InventoryInfo.AvailableQuantity,
+ Modifier=InventoryInfo.ValidityPeriod,//鏈夋晥鏈熸
SupplyQuantity = 0,
Remark = "鍑哄簱"
};
@@ -448,6 +450,7 @@
LocationCode = InventoryInfo.LocationCode,
OrderNo = entityOrder.Out_no,
StockQuantity = Order_qty,
+ Modifier = InventoryInfo.ValidityPeriod,//鏈夋晥鏈熸
SupplyQuantity = 0,
Remark = "鍑哄簱"
};
@@ -534,6 +537,7 @@
LocationCode = item.LocationCode,
OrderNo = entityOrder.Out_no,
StockQuantity = outqty,
+ Modifier= item.ValidityPeriod,//鏈夋晥鏈�
SupplyQuantity = 0,
Remark = "鍑哄簱"
};
@@ -590,6 +594,7 @@
LocationCode = inventoryInfo.LocationCode,
OrderNo = entityOrder.Out_no,
StockQuantity = orderDetailLK.Order_qty,
+ Modifier = inventoryInfo.ValidityPeriod,//鏈夋晥鏈�
SupplyQuantity = 0,
Remark = "鍑哄簱"
};
@@ -994,7 +999,12 @@
foreach (var item in order.details)
{
//鎵惧簱瀛樻壒娆′俊鎭�
- Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
+ Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).FirstOrDefault();
+ if (inventory_Batch==null)
+ {
+ _messageInfoService.AddMessageInfo(MessageGroupByEnum.OutOrderAlarm, "ERP鎶ユ崯鍑哄簱閿欒", $"鐩樹簭鍑哄簱鍗曘�恵order.order_no}銆戠墿鏂欑紪鍙枫�恵item.goods_no}銆戠墿鏂欐壒娆°�恵item.batch_num}銆戠殑搴撳瓨鎵规淇℃伅鏈夐敊");
+ throw new Exception($"鐩樹簭鍑哄簱鍗曘�恵order.order_no}銆戠墿鏂欑紪鍙枫�恵item.goods_no}銆戠墿鏂欐壒娆°�恵item.batch_num}銆戠殑搴撳瓨鎵规淇℃伅鏈夐敊");
+ }
var Qty = Math.Abs(inventory_Batch.SupplyQuantity);
if (Qty != item.order_qty)
{
@@ -1107,7 +1117,12 @@
foreach (var item in order.details)
{
//鎵惧簱瀛樻壒娆′俊鎭�
- Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
+ Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).FirstOrDefault();
+ if (inventory_Batch==null)
+ {
+ _messageInfoService.AddMessageInfo(MessageGroupByEnum.OutOrderAlarm, "ERP鎶ユ崯鍑哄簱閿欒", $"鐩樹簭鍑哄簱鍗曘�恵order.order_no}銆戠墿鏂欑紪鍙枫�恵item.goods_no}銆戠墿鏂欐壒娆°�恵item.batch_num}銆戠殑搴撳瓨鎵规淇℃伅鏈夐敊");
+ throw new Exception($"鐩樹簭鍑哄簱鍗曘�恵order.order_no}銆戠墿鏂欑紪鍙枫�恵item.goods_no}銆戠墿鏂欐壒娆°�恵item.batch_num}銆戠殑搴撳瓨鎵规淇℃伅鏈夐敊");
+ }
var Qty = Math.Abs(inventory_Batch.SupplyQuantity);
if (Qty != item.order_qty)
{
@@ -1653,8 +1668,8 @@
}
else
{
- var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
- if (deliveryOrder.Out_type == "3") url = "http://121.37.118.63:80/GYZ2/95fck/inOrderOk";
+ var url = "http://192.168.1.100:80/GYZ2/95fck/outOrderOk";
+ if (deliveryOrder.Out_type == "3") url = "http://192.168.1.100:80/GYZ2/95fck/inOrderOk";
var requestDate = new
{
order_no = deliveryOrder.Out_no
--
Gitblit v1.9.3