From bdf8e9ee1711d3dde0f060ec4eaf20b8a9543ecf Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期日, 23 六月 2024 18:40:58 +0800 Subject: [PATCH] 优化任务完成逻辑 --- 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" index 6184d54..b200c66 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" @@ -578,7 +578,7 @@ Idt_mes_headRepository mes_HeadRepository = new dt_mes_headRepository(Context); IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(Context); //var mes_Detail = freeDB.Select<dt_mes_detail>().Where(x => x.SN == SN).First(); - var Mes_Work = workinfoRepository.Find(x => x.SN == SN && x.processCode == "28").FirstOrDefault(); + var Mes_Work = workinfoRepository.Find(x => x.SN == SN && x.processCode == "28").OrderByDescending(x => x.CreateTime).FirstOrDefault(); var mes_Detail = mes_DetailRepository.Find(x => x.SN == SN && x.jobID == Mes_Work.jobID).FirstOrDefault(); if (mes_Detail != null) { -- Gitblit v1.9.3