From 5f0b86328b2678a326166e84b461e9ede3dc4715 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 01 十二月 2025 21:03:46 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 141197b..04a0dbf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -51,6 +51,7 @@
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Check;
using WIDESEA_Model.Models.Outbound;
namespace WIDESEA_TaskInfoService
@@ -66,6 +67,7 @@
private readonly IInboundOrderService _inboundOrderService;
private readonly IInboundOrderDetailService _inboundOrderDetailService;
+ private readonly IRepository<Dt_ReCheckOrder> _reCheckOrderRepository;
private readonly IRepository<Dt_OutboundBatch> _OutboundBatchRepository;
private readonly IOutboundOrderService _outboundOrderService;
private readonly IOutboundOrderDetailService _outboundOrderDetailService;
@@ -95,7 +97,7 @@
public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList();
- public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService, IAllocateService allocateService, IRepository<Dt_OutboundBatch> outboundBatchRepository) : base(BaseDal)
+ public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService, IAllocateService allocateService, IRepository<Dt_OutboundBatch> outboundBatchRepository,IRepository<Dt_ReCheckOrder> reCheckOrderRepository) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -114,6 +116,7 @@
_outStockLockInfoService = outStockLockInfoService;
_allocateService = allocateService;
_OutboundBatchRepository = outboundBatchRepository;
+ _reCheckOrderRepository = reCheckOrderRepository;
}
@@ -282,7 +285,7 @@
{
ReqCode = Guid.NewGuid().ToString(),
ReqTime = DateTime.Now.ToString(),
- BusinessType = "2",
+ BusinessType = "3",
FactoryArea = inboundOrder.FactoryArea,
OperationType = 1,
Operator = inboundOrder.Operator,
@@ -325,6 +328,13 @@
}
else if (inboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) //閲嶆鍏ュ簱
{
+ //涓嶉渶瑕佸洖浼犮�傚崰涓�涓綅缃��
+ }
+ else if (inboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) //鏅轰粨璋冩櫤浠�
+ {
+ _logger.LogInformation($"InboundTaskCompleted 鍥炲啓MES : {inboundOrder.InboundOrderNo } ,ordertype: {InOrderTypeEnum.InternalAllocat.ObjToInt()} " );
+ // BusinessTypeEnum.鏅轰粨璋冩櫤浠�
+
}
else
@@ -593,6 +603,7 @@
bool allCompleted = true;
foreach (var detail in orderDetails)
{
+ _logger.LogInformation($"TaskService HandleOutboundOrderToMESCompletion: {outboundOrder.OrderNo} , {detail.NeedOutQuantity}");
if (detail.OverOutQuantity < detail.NeedOutQuantity)
{
allCompleted = false;
@@ -621,7 +632,7 @@
{
ReqCode = Guid.NewGuid().ToString(),
ReqTime = DateTime.Now.ToString(),
- BusinessType = "3",
+ BusinessType = "2",
FactoryArea = outboundOrder.FactoryArea,
OperationType = 1,
Operator = outboundOrder.Operator,
@@ -655,14 +666,13 @@
Barcode = lockInfo.CurrentBarcode,
SupplyCode = lockInfo.SupplyCode,
BatchNo = lockInfo.BatchNo,
- Unit = lockInfo.Unit,
- Qty = lockInfo.PickedQty // 鏉$爜绾у埆鐨勬暟閲忎粛鐢ㄩ攣瀹氳褰�
+ Unit = lockInfo.BarcodeUnit,
+ Qty = lockInfo.BarcodeQty // 鏉$爜绾у埆鐨勬暟閲忎粛鐢ㄩ攣瀹氳褰�
}).ToList()
};
allocatefeedmodel.Details.Add(detailModel);
}
-
var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
if (result != null && result.code == 200)
{
@@ -680,7 +690,7 @@
}
else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt())
{
-
+ //涓嶇敤鍥炰紶
}
else
{
@@ -713,22 +723,21 @@
materialCode = detail.MaterielCode,
lineNo = detail.lineNo, // 娉ㄦ剰锛氳繖閲屽彲鑳介渶瑕佽皟鏁村瓧娈靛悕
warehouseCode = detail.WarehouseCode,
- qty = detail.OverOutQuantity, // 浣跨敤璁㈠崟鏄庣粏鐨勫凡鍑哄簱鏁伴噺
- currentDeliveryQty = detail.OverOutQuantity,
+ qty = detail.BarcodeQty,
+ currentDeliveryQty = detail.BarcodeQty,
unit = detail.Unit,
barcodes = detailLocks.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel
{
barcode = lockInfo.CurrentBarcode,
supplyCode = lockInfo.SupplyCode,
batchNo = lockInfo.BatchNo,
- unit = lockInfo.Unit,
- qty = lockInfo.PickedQty // 鏉$爜绾у埆鐨勬暟閲忎粛鐢ㄩ攣瀹氳褰�
+ unit = lockInfo.BarcodeUnit,
+ qty = lockInfo.BarcodeQty // 鏉$爜绾у埆鐨勬暟閲忎粛鐢ㄩ攣瀹氳褰�
}).ToList()
};
feedmodel.details.Add(detailModel);
}
-
var result = await _invokeMESService.FeedbackOutbound(feedmodel);
if (result != null && result.code == 200)
{
--
Gitblit v1.9.3