From 8f6703cb76e33583bba780bffe8eb440e64c474a Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期四, 10 十月 2024 11:17:45 +0800
Subject: [PATCH] 拆分单班次

---
 _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