From bb929bd0809eefc1108dd779846ff07d997f7ef0 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期五, 19 七月 2024 09:25:14 +0800
Subject: [PATCH] 反馈MES工单完成
---
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/AutoUpdateWork.cs | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/AutoUpdateWork.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/AutoUpdateWork.cs"
index 5b81463..9854254 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/AutoUpdateWork.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/AutoUpdateWork.cs"
@@ -8,6 +8,7 @@
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
+using WIDESEA_WCS.Jobs.Task;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.Services;
using WIDESEA_WMS.IRepositories;
@@ -71,7 +72,24 @@
{
foreach (var mes_head in mes_head_jcxs)
{
- AddHtyMesWork(mes_head, mes_HeadRepository);
+ if (mes_head.quantity == mes_head.agv_finishNum)
+ {
+ if (mes_head.creator == "MES")
+ {
+ var uploadResult = HandleTask_Mes.UploadMESInfo(mes_head.jobID);
+ if (uploadResult.Status)
+ {
+ AddHtyMesWork(mes_head, mes_HeadRepository);
+ }
+ }
+ else
+ {
+ AddHtyMesWork(mes_head, mes_HeadRepository);
+ }
+
+ }
+
+
}
}
#endregion
@@ -82,11 +100,24 @@
{
foreach (var mes_head in mes_head_jjgs)
{
- var inventorys = inventoryRepository.Find(x => x.jobID == mes_head.jobID).ToList();
- if (inventorys.Count == mes_head.quantity || inventorys.Count==0)
- AddHtyMesWork(mes_head, mes_HeadRepository);
+ if (mes_head.quantity == mes_head.agv_finishNum)
+ {
+ if (mes_head.creator == "MES")
+ {
+ var uploadResult = HandleTask_Mes.UploadMESInfo(mes_head.jobID);
+ if (uploadResult.Status)
+ {
+ AddHtyMesWork(mes_head, mes_HeadRepository);
+ }
+ }
+ else
+ {
+ AddHtyMesWork(mes_head, mes_HeadRepository);
+ }
+
+ }
+
}
- var k = "鍔犺浇瀹屾垚";
}
#endregion
}
--
Gitblit v1.9.3