_Main/BL/EDI/Broker_RB_DispatchShiftPlanBroker.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Relations/Relation_DispatchShiftPlan_InterfaceLoginfo_InterfaceLoginfo_DispatchShiftPl.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_DispatchShiftPlan/Attribute_ShiftQty.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_DispatchShiftPlan/Attribute_VersionFlag.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_DispatchShiftPlan/StaticMethod_Publish.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
_Main/BL/EDI/Broker_RB_DispatchShiftPlanBroker.qbl
ÎļþÒÑɾ³ý _Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl
ÎļþÒÑɾ³ý _Main/BL/Relations/Relation_DispatchShiftPlan_InterfaceLoginfo_InterfaceLoginfo_DispatchShiftPl.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: #root Relation DispatchShiftPlan_InterfaceLoginfo_InterfaceLoginfo_DispatchShiftPlan { #keys: '1[414996.1.203950081]' DefaultRelationStrategy { } RelationSide.LeftSide InterfaceLoginfo { #keys: '3[414996.1.203950083][414996.1.203950082][414996.1.203950084]' Cardinality: '0to1' ObjectDefinition: DispatchShiftPlan OwningSide: 'Reference' } RelationSide.RightSide DispatchShiftPlan { #keys: '3[414996.1.203950086][414996.1.203950085][414996.1.203950087]' Cardinality: '1toN' ObjectDefinition: InterfaceLoginfo OwningSide: 'Owned' } } _Main/BL/Type_DispatchShiftPlan/Attribute_ShiftQty.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,7 @@ Quintiq file version 2.0 #parent: #root Attribute ShiftQty { #keys: '3[414996.1.206760016][414996.1.206760015][414996.1.206760017]' ValueType: String } _Main/BL/Type_DispatchShiftPlan/Attribute_VersionFlag.qbl
ÎļþÒÑɾ³ý _Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl
@@ -1,18 +1,33 @@ Quintiq file version 2.0 #parent: #root StaticMethod Dispatch ( InterfaceDataset interfaceDataset, const MacroPlan macroPlan, Archive owner, String versionFlag String executor ) { TextBody: [* // Akari Aug-21-2024 (created) // owner.DispatchShiftPlan( relflush ); // owner.RB_DispatchShiftPlanBroker().Source().FlatQuery( "truncate table A_DispatchShiftPlan" ); now := DateTime::Now(); dispatchShiftPlans := selectset( owner,DispatchShiftPlan,dispatchShiftPlan,true ); interfaceLoginfo := maxselect( interfaceDataset,InterfaceLoginfo,loginfo,loginfo.Name() = Translations::InterfaceDataset_ShiftPlanPPPSPush_Name() ,loginfo.InterfaceDateTime() ); if( not isnull( interfaceLoginfo )){ if( not interfaceLoginfo.IsShow() ){ interfaceLoginfo.Delete(); }else{ interfaceLoginfo.Last( false ); } } interfaceLoginfo := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor, Name := Translations::InterfaceDataset_ShiftPlanPPPSPush_Name(), InterfaceDateTime := now, Last := true, Message := 'çæ¬¡è®¡åï¼PPA+IDSï¼æ°æ®æ¨é' ); dispatchShiftPlans := selectset( interfaceLoginfo,DispatchShiftPlan,dispatchShiftPlan,true ); dispatchShiftPlanIndexTree := NamedValueTree::Create(); for( i := 0 ; i < dispatchShiftPlans.Size() ; i++){ dispatchShiftPlan := dispatchShiftPlans.Element( i ); @@ -41,21 +56,20 @@ dispatchShiftPlan := dispatchShiftPlans.Element( dispatchShiftPlanIndex.GetValueAsNumber() ); dispatchShiftPlan.Tips( shiftPlan.Remark() ); dispatchShiftPlan.VersionName( macroPlanName ); dispatchShiftPlan.VersionFlag( versionFlag ); dispatchShiftPlan.InterfaceTime( now ); }else{ owner.DispatchShiftPlan( relnew,ID := OS:: GenerateGUIDAsString(), interfaceLoginfo.DispatchShiftPlan( relnew,ID := OS:: GenerateGUIDAsString(), ProductLine := productLine, FactoryName := factory.ID(), ShiftQty := shiftPlan.Outcome(), ShiftDate := shiftDate, Tips := shiftPlan.Remark(), VersionName := macroPlanName, VersionFlag := versionFlag, InterfaceTime := now ); } } DispatchShiftPlan::Publish( interfaceLoginfo ); // owner.RB_DispatchShiftPlanBroker().AsyncExecute(); *] } _Main/BL/Type_DispatchShiftPlan/StaticMethod_Publish.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,29 @@ Quintiq file version 2.0 #parent: #root StaticMethod Publish ( InterfaceLoginfo loginfo ) { TextBody: [* //// çå °é¸½ Jul-17-2024 (created) jsonarray := JSON::Array(); traverse( loginfo, DispatchShiftPlan, shiftPlan ){ shiftPlanjson := JSON::Object() .Add( "productLine", shiftPlan.ProductLine() ) .Add( "shiftDate", shiftPlan.ShiftDate().Format( 'Y-M2-D2' ) )//"2024-10-01" .Add( "shiftQty", shiftPlan.ShiftQty() ) .Add( "tips", shiftPlan.Tips() ) .Add( "versionName", shiftPlan.VersionName() ) .Add( "factoryName", shiftPlan.FactoryName() ) .Add( "fac", shiftPlan.Fac() ) .Add( "interfaceTime", shiftPlan.InterfaceTime().Format( 'Y-M2-D2 H:m:s' ) )/*"2024-10-01 12:00:00" )*/ .Build(); jsonarray.Add( shiftPlanjson ); } loginfo.RequestBody( jsonarray.Build().AsString() ); info( loginfo.RequestBody() ); data := InterfaceLoginfo::CallInterfaceForDataCenter( loginfo.InterfaceDataset(), loginfo ); info( '----------------', data.AsString() ); *] } _Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
@@ -21,6 +21,7 @@ // OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive ); } if( isshiftplan ){//çæ¬¡è®¡å DispatchShiftPlan::Dispatch(this, macroplan,executor ); // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); } if( isassembleonlineplan ){//è£ é ä¸çº¿è®¡å