From 1e38f44af86775a341e4d0e4411d24ad35e417d3 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 28 六月 2024 07:49:36 +0800
Subject: [PATCH] 调整平面图调用接口时间
---
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs"
index 14a2b4f..8b52c8e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs"
@@ -54,12 +54,20 @@
//鏍规嵁涓嬫枡鍙g殑缁戝畾淇℃伅鏌ヨ瀵瑰簲宸ュ崟锛屾娴嬫宸ュ崟鏄惁宸插畬鎴� 瀹屾垚鍗冲彲灏嗗叾閫佸叆搴�
- var work = workinfoRepository.Find(x => x.workOrder == item.Number && x.drawingNo == item.stationType && x.heatID == item.heatNumber && x.processCode == "17").FirstOrDefault();
+ var work = workinfoRepository.Find(x => x.workOrder == item.Number && x.drawingNo == item.stationType && x.heatID == item.heatNumber && x.processCode == "17").OrderByDescending(x => x.CreateTime).FirstOrDefault();
if (work == null)
{
item.remark = "瑙﹀彂鍏ュ簱浠诲姟,浣嗘湭鎵惧埌宸ュ崟淇℃伅锛�";
item.location_state = LocationStateEnum.Abnormal.ToString();
- stationinfoRepository.Update(item, true);
+ stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true);
+ continue;
+ }
+ var geometry = Pipeline.QueryMateriel(work.drawingNo);
+ if (geometry == null)
+ {
+ item.remark = "鏈壘鍒拌溅杞俊鎭紒";
+ item.location_state = LocationStateEnum.Abnormal.ToString();
+ stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true);
continue;
}
@@ -67,7 +75,7 @@
string tasktype = "";
//if (item.quantity == 5)
- if (item.quantity == work.stackNoRange)
+ if (item.quantity == geometry.stackNoRange)
{
if (!string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3"))
tasktype = "TaskType_OutsourceInbound";
@@ -364,10 +372,10 @@
if (TargetLocation != null && PalletSignal == 2 && MaterialSignal == 2) return TargetLocation;
}
- if (TargetLocation == null)
- {
- throw new Exception("澶栧崗鍏ュ簱鍙e凡婊�");
- }
+ //if (TargetLocation == null)
+ //{
+ // throw new Exception("澶栧崗鍏ュ簱鍙e凡婊�");
+ //}
return TargetLocation;
}
/// <summary>
--
Gitblit v1.9.3