From cbf2cc895f1d1e7dcf522a462e77709d92667747 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 11 十月 2024 18:10:13 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl b/_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl
index 6d686a2..2f98a27 100644
--- a/_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl
+++ b/_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl
@@ -61,22 +61,29 @@
             shiftDayTime := select( shiftPattern,ShiftDayTime,object,true );
           }
         }
+        if( shiftVolume <> 0 ){
+          shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume );
         
-        shiftSchedulingInformation := owner.DispatchShiftSchedulingInformation( relnew ,
-                                                                                ID := IDHolder::GetGUID() ,
-                                                                                InterfaceTime := now ,
-                                                                                VersionName := macroPlan.MDSMacroPlan().Description(),
-                                                                                Product := productID,
-                                                                                ProductLine := productLine,
-                                                                                ShiftDate := shiftDate,
-                                                                                ShiftName := shiftName,
-                                                                                ShiftVolume := shiftVolume );
-        if( not isnull( shiftDayTime )){
-          shiftSchedulingInformation.ShiftStartDate( shiftDayTime.StartDateTime() );
-          shiftSchedulingInformation.ShiftEndDate( shiftDayTime.EndDateTIme() );
+        traverse( shiftSchedulingInformations,Elements,shiftSchedulingInformation ){
+          shiftSchedulingInformation.InterfaceTime( now );
+          shiftSchedulingInformation.VersionName( macroPlan.MDSMacroPlan().Description() );
+          shiftSchedulingInformation.Product( productID );
+          shiftSchedulingInformation.ProductLine( productLine );
+          shiftSchedulingInformation.ShiftDate( shiftDate );
+    //      shiftSchedulingInformation.InterfaceTime( now );
+    //      shiftSchedulingInformation.InterfaceTime( now );
+    //      shiftSchedulingInformation.InterfaceTime( now );
+    //      shiftSchedulingInformation.InterfaceTime( now );
+          
+          
+          if( not isnull( shiftDayTime )){
+            shiftSchedulingInformation.ShiftStartDate( shiftDayTime.StartDateTime() );
+            shiftSchedulingInformation.ShiftEndDate( shiftDayTime.EndDateTIme() );
+          }
+          if( not isnull( factory )){
+            shiftSchedulingInformation.FactoryName( factory.Name() );
+          }
         }
-        if( not isnull( factory )){
-          shiftSchedulingInformation.FactoryName( factory.Name() );
         }
       }
     }

--
Gitblit v1.9.3