From 7ec2fdc761acd483a621c590fae3a60af7b464ba Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期二, 04 十一月 2025 15:17:08 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/FangCangZhiNeng
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 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 d1f49e4..fdb77d2 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"
@@ -317,7 +317,7 @@
_supplyTaskService.AddData(supplyTasks);
_inventory_BatchServices.UpdateData(batchesUp);
_inventoryInfoService.UpdateData(inventoryInfosUp);
- BaseDal.Db.CopyNew().InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand();
+ BaseDal.Db.InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand();
_unitOfWorkManage.CommitTran();
#endregion
}
@@ -570,7 +570,7 @@
#region 娣诲姞鍑哄簱浠诲姟銆佷慨鏀瑰簱瀛樹俊鎭�
Dt_InventoryInfo? inventoryInfo = dt_InventoryInfos.FirstOrDefault(x => x.WarehouseCode == WareCodeLK);
if (inventoryInfo == null)
- throw new Exception($"鏈壘鍒扮墿鏂欑紪鍙枫�恵detail.goods_no}銆戠墿鏂欐壒娆°�恵detail.batch_num}銆戝湪绔嬪簱涓殑搴撳瓨淇℃伅锛涙墍闇�鏁伴噺銆恵orderDetailLK.Order_qty}銆戣琛ヨ揣");
+ throw new Exception($"鍑哄簱鍗曘�恵outorder.order_no}銆戣鎯呭瓨鍦ㄦ暎浠�,鐗╂枡缂栧彿銆恵detail.goods_no}銆戠墿鏂欐壒娆°�恵detail.batch_num}銆戞墍闇�鏁伴噺銆恵Convert.ToInt32(orderDetailLK.Order_qty)}銆戣浜哄伐璋冩嫧琛ヨ揣鍏ョ珛搴�");
inventoryInfo.AvailableQuantity -= orderDetailLK.Order_qty;
inventoryInfo.OutboundQuantity += orderDetailLK.Order_qty;
Dt_SupplyTask supplyTask = new Dt_SupplyTask()
@@ -610,9 +610,9 @@
_inventory_BatchServices.UpdateData(batchesUp);
_inventoryInfoService.UpdateData(inventoryInfosUp);
if (entityOrder.Details.Count > 0)
- BaseDal.Db.CopyNew().InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand();
+ BaseDal.Db.InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand();
if (entityOrderLK.Details.Count > 0)
- BaseDal.Db.CopyNew().InsertNav(entityOrderLK).Include(x => x.Details).ExecuteCommand();
+ BaseDal.Db.InsertNav(entityOrderLK).Include(x => x.Details).ExecuteCommand();
_unitOfWorkManage.CommitTran();
}
catch (Exception ex)
@@ -954,9 +954,7 @@
try
{
// 1锔忊儯 鏌ユ壘鎸囧畾鎵规涓庣墿鏂欑殑搴撳瓨淇℃伅
- var batchInfo = BaseDal.Db.CopyNew().Queryable<Dt_Inventory_Batch>()
- .Where(x => x.BatchNo == batchNo && x.MaterielCode == goodsNo)
- .First();
+ var batchInfo = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == batchNo && x.MaterielCode == goodsNo);
if (batchInfo == null)
return response.Error($"鏈壘鍒拌鐗╂枡 [{goodsNo}] 鎵规 [{batchNo}] 鐨勫簱瀛樹俊鎭�");
@@ -1092,6 +1090,7 @@
}
return content;
}
+
public WebResponseContent OutTaskFinish(Dt_SupplyTask supplyTask, Dt_DeliveryOrder deliveryOrder)
{
WebResponseContent content = new WebResponseContent();
@@ -1171,12 +1170,13 @@
}
return content;
}
+
public WebResponseContent OutTaskFinish(Dt_SupplyTask supplyTask)
{
WebResponseContent content = new WebResponseContent();
try
{
- Dt_DeliveryOrder? cabinOrder = BaseDal.Db.CopyNew().Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First();
+ Dt_DeliveryOrder? cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First();
if (cabinOrder == null) return WebResponseContent.Instance.OK($"鍑哄簱鍗曞凡瀹屾垚");
Dt_DeliveryOrderDetail? cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).FirstOrDefault();
@@ -1200,7 +1200,7 @@
//_deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(cabinOrderDetail, OperateTypeEnum.鑷姩瀹屾垚);
}
_deliveryOrderDetailServices.Repository.UpdateData(cabinOrderDetail);
- var cabinOrder1 = BaseDal.Db.CopyNew().Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Warehouse_no == supplyTask.WarehouseCode && x.Out_type != "20").Includes(x => x.Details).First();
+ var cabinOrder1 = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Warehouse_no == supplyTask.WarehouseCode && x.Out_type != "20").Includes(x => x.Details).First();
if (!cabinOrder1.Details.Where(x => x.OotDetailStatus != "宸插畬鎴�").Any())
cabinOrder.OutStatus = "宸插畬鎴�";
Repository.UpdateData(cabinOrder);
--
Gitblit v1.9.3