From 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 09 七月 2025 22:55:27 +0800
Subject: [PATCH] 增加质检出入库逻辑
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
index e29bab2..b83fbb7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs"
@@ -40,14 +40,6 @@
OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams");
if (ProductionLine != null)
{
- //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
- //{
- // stationCode = ProductionLine.DeviceCode,
- // traytype = 4,
- // Barcode = "25000037",
- // batchNo = "250325T1",
- //};
- //var content = ProductionLineToWMSRequest(MaterielGroupDTO);
#region MyRegion
var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request);
if (request == 1)
@@ -57,10 +49,13 @@
if (traytype == 4)
{
var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode).Replace("\0", "");
+ if (string.IsNullOrEmpty(Barcode)) throw new Exception("浜х嚎鐢宠鎵樼洏鍙蜂负绌猴紒");
var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode);
if (task == null)
{
var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", "");
+ if (string.IsNullOrEmpty(batchNo)) throw new Exception("浜х嚎鐢宠鎵瑰彿涓虹┖锛�");
+ WriteDebug($"{ProductionLine.DeviceName}鐢宠鍏ュ簱", $"鎵樼洏鍙枫�恵Barcode}銆�,鎵规煖鍙枫�恵batchNo}銆�");
ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
{
stationCode = ProductionLine.DeviceCode,
@@ -80,7 +75,7 @@
}
catch (Exception ex)
{
- Console.Out.WriteLine(nameof(CommonProductionLineJob) + ":" + ex.ToString());
+ //Console.Out.WriteLine(nameof(CommonProductionLineJob) + ":" + ex.ToString());
}
return Task.CompletedTask;
}
--
Gitblit v1.9.3