xiaoding721
2024-11-29 86d2018efcbee0e9a6d0c33ae93f4fc423242973
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已修改11个文件
87 ■■■■■ 文件已修改
_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_Publish.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_Publish.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceLoginfo/StaticMethod_SyncMiddle.qbl 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_GenerateData.qbl
@@ -10,7 +10,7 @@
  Boolean versionflag,
  const Product_MPs products,
  String executor
)
) as String
{
  TextBody:
  [*
@@ -49,7 +49,7 @@
      
    }
    loginfo.TotalRow( ms64.MS64Data( relsize ) );
    AOnlineAndMOfflinePlanMS64::Publish( owner, loginfo );
    return AOnlineAndMOfflinePlanMS64::Publish( owner, loginfo );
    //InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
  *]
}
_Main/BL/Type_AOnlineAndMOfflinePlanMS64/StaticMethod_Publish.qbl
@@ -3,7 +3,7 @@
StaticMethod Publish (
  InterfaceDataset owner,
  InterfaceLoginfo loginfo
)
) as String
{
  TextBody:
  [*
@@ -30,6 +30,7 @@
    loginfo.RequestBody( jsondata.Build().AsString() );
    info( loginfo.RequestBody() );
    data              := InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
    info( '----------------', data.Size() );
    info( '----------------', data );
    return data;
  *]
}
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -7,7 +7,7 @@
  Date startdate,
  Date enddate,
  String executor
)
) as String
{
  TextBody:
  [*
@@ -19,7 +19,7 @@
      }else{
        loginfo.Last( false );
      }
    //  owner.AOnlineAndMOfflinePlanPIR( relflush );
    //  owner.AOnlineAndMOfflinePlanPIR( relflush );
    }
    owner.AOnlineAndMOfflinePlanPIR( relflush );
    nowdate                := DateTime::ActualTime();
@@ -80,6 +80,6 @@
      }
    }
    loginfo.TotalRow( pir.PIRData( relsize ) );
    AOnlineAndMOfflinePlanPIR::Publish( owner, loginfo );
    return AOnlineAndMOfflinePlanPIR::Publish( owner, loginfo );
  *]
}
_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_Publish.qbl
@@ -3,7 +3,7 @@
StaticMethod Publish (
  InterfaceDataset owner,
  InterfaceLoginfo loginfo
)
) as String
{
  TextBody:
  [*
@@ -30,6 +30,7 @@
    loginfo.RequestBody( jsondata.Build().AsString() );
    info( loginfo.RequestBody() );
    data              := InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
    info( '----------------', data.Size() );
    info( '----------------', data );
    return data;
  *]
}
_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
@@ -25,7 +25,7 @@
    //  CustomerDemandPPAIDS::GenerateData( this, macroplan, iscustomdemandcc, iscustomdemanddl, executor );
    }
    if ( isofflineplandl or isofflineplancc ) { // 各产线下线计划
      InterfaceDataset::PushOfflinePlanData( macroplan, this, executor );
      InterfaceDataset::PushOfflinePlanData( macroplan, this, executor, isofflineplandl, isofflineplancc );
    }
    if( isshiftplandl or isshiftplancc ){//班次计划
      DispatchShiftPlan::Dispatch(this, archive,executor );
@@ -35,7 +35,7 @@
      AssemblyOnlinePlanPPPSPush::GenerateData( this, macroplan, isassembleonlineplancc, isassembleonlineplandl, executor );
    }
    if ( isinventoryplandl or isinventoryplancc ) { // 计划库存数据
      InterfaceDataset::PushPlanInventoryData( macroplan, this, executor );
      InterfaceDataset::PushPlanInventoryData( macroplan, this, executor, isinventoryplandl, isinventoryplancc );
    }
  *]
}
_Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl
@@ -3,7 +3,9 @@
StaticMethod PushOfflinePlanData (
  const MacroPlan macroPlan,
  InterfaceDataset interfaceDataset,
  String executor
  String executor,
  Boolean isofflineplandl,
  Boolean isofflineplancc
)
{
  Description: '发送下线计划数据接口'
@@ -16,7 +18,7 @@
    
    jsonarray     := JSON::Array();
    
    traverse ( table, Row, r ){
    traverse ( table, Row, r, ifexpr( isofflineplandl, r.Unit().Regex( "DL" ), false ) or ifexpr( isofflineplancc, r.Unit().Regex( "CC" ), false ) ){
      traverse ( table, Column, c ) {//, c.TimeUnit() = Translations::MP_GlobalParameters_Day()
        cell := select( r, Cell, tempC, tempC.Column() = c );
        
_Main/BL/Type_InterfaceDataset/StaticMethod_PushPlanInventoryData.qbl
@@ -3,7 +3,9 @@
StaticMethod PushPlanInventoryData (
  const MacroPlan macroPlan,
  InterfaceDataset interfaceDataset,
  String executor
  String executor,
  Boolean isinventoryplandl,
  Boolean isinventoryplancc
)
{
  Description: '发送计划库存数据接口'
@@ -16,7 +18,7 @@
    
    jsonarray     := JSON::Array();
    
    traverse ( table, Row, r ){
    traverse ( table, Row, r, ifexpr( isinventoryplandl, r.Unit().Regex( "DL" ), false ) or ifexpr( isinventoryplancc, r.Unit().Regex( "CC" ), false ) ){
      traverse ( table, Column, c ) {//, c.TimeUnit() = Translations::MP_GlobalParameters_Day()
        cell := select( r, Cell, tempC, tempC.Column() = c );
        
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForSAPGet.qbl
@@ -3,14 +3,14 @@
StaticMethod CallInterfaceForSAPGet (
  InterfaceDataset owner,
  InterfaceLoginfo loginfo
) as owning InterfaceSAPResponseLoginfos
) as String
{
  Description: '调用数据中台接口'
  TextBody:
  [*
    // 甄兰鸽 Jul-22-2024 (created)
    address           := Translations::InterfaceDataset_SAP_Address(); 
    httpinterface     := HTTPInterface::Create( address,80);
    httpinterface     := HTTPInterface::Create( address,8080);
    httpinterface.PostMethod( true ); ; 
    httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
    try{
@@ -31,7 +31,8 @@
    //后续公共处理
    loginfo.FinishTime( DateTime::ActualTime() );
    data             := JSON::Null().Build();
    saploginfos      := construct( InterfaceSAPResponseLoginfos );
    sapresponse      := construct( InterfaceSAPResponseLoginfos );
    feedback         := '';
    if( loginfo.Success() ){
      resultJson     := JSON::Parse( loginfo.Response() );
      code           := resultJson.Get( "code" ).GetNumber();
@@ -47,10 +48,22 @@
      }
      for( i := 0; i < data.Size(); i++ ){
        item := data.Get( i );
        saploginfos.Add( InterfaceSAPResponseLoginfo::GenerateData( loginfo, item ) );
        sapresponse.Add( InterfaceSAPResponseLoginfo::GenerateData( loginfo, item ) );
      }
      sucproduct     := selectuniquevalues( sapresponse, Elements, e, e.IsSuccess(), e.Msg_v1() );
      failmssages    := selectuniquevalues( sapresponse, Elements, e, not e.IsSuccess(), ifexpr( e.Msg().FindString( e.Msg_v1(), 0 ) > -1, e.Msg().ReplaceAll( e.Msg_v1(), '*' ), e.Msg() ) );
      feedback       := feedback.Concat( '产品' ).Concat( sucproduct.Concatenate( "、" ) ).Concat( '推送成功' ).Concat( ';' );
      traverse( failmssages, Elements, failmsg ){
        failproduct  := selectuniquevalues( sapresponse, Elements, e, not e.IsSuccess() and ( failmsg = e.Msg() or failmsg = e.Msg().ReplaceAll( e.Msg_v1(), '*' ) ), e.Msg_v1() );
        if( failmsg.FindString( '*', 0  ) > -1 ){
          feedback   := feedback.Concat( failmsg.ReplaceAll( '*', failproduct.Concatenate( '、' ) ) ).Concat( ';' );
        }else{
          feedback   := feedback.Concat( '产品' ).Concat( failproduct.Concatenate( '、' ) ).Concat( '因为' ).Concat( failmsg ).Concat( '推送失败' ).Concat( ';' );
        }
      }
      feedback       := feedback.Replace( feedback.Length() - 1, 1, '。' );
    }
    
    return &saploginfos;
    return feedback;
  *]
}
_Main/BL/Type_InterfaceLoginfo/StaticMethod_SyncMiddle.qbl
@@ -7,15 +7,15 @@
  TextBody:
  [*
    // 甄兰鸽 Aug-23-2024 (created)
    owner.IL_InterfaceLogInfoMiddlesBroker().Execute();
    // 清空临时数据库
    owner.IL_InterfaceLogInfoMiddlesBroker().Source().FlatQuery( "truncate table A_InterfaceLogInfoMiddle" );
    traverse( owner, InterfaceLoginfoMiddle, middle ){
      loginfo := selectobject( owner, InterfaceLoginfo, loginfo, loginfo.Name() = middle.Name() and loginfo.IsShow() = false and loginfo.Last() = true );
      loginfo.FinishTime( middle.FinishTime() );
      loginfo.Response( middle.Response() );
      loginfo.IsShow( true );
      middle.Delete();
    }
    //owner.IL_InterfaceLogInfoMiddlesBroker().Execute();
    //// 清空临时数据库
    //owner.IL_InterfaceLogInfoMiddlesBroker().Source().FlatQuery( "truncate table A_InterfaceLogInfoMiddle" );
    //traverse( owner, InterfaceLoginfoMiddle, middle ){
    //  loginfo := selectobject( owner, InterfaceLoginfo, loginfo, loginfo.Name() = middle.Name() and loginfo.IsShow() = false and loginfo.Last() = true );
    //  loginfo.FinishTime( middle.FinishTime() );
    //  loginfo.Response( middle.Response() );
    //  loginfo.IsShow( true );
    //  middle.Delete();
    //}
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def
@@ -18,8 +18,8 @@
    if( WebMessageBox::Question( this, '是否确认推送', 'OK|Cancel' ) = 0 ){
      currentuser     := QuintiqUser::CurrentUser().DisplayName();
      
      AOnlineAndMOfflinePlanMS64::GenerateData( InterfaceDataset, ddslFactory.Text(), dsStartDate.Date(), dsEndDate.Date(), efVersionFrom.Text(), efVersionTo.Text(), cbActiveVersion.Checked(), dhProducts.Data(), currentuser );
      WebMessageBox::Success( "推送成功!" );
      msg             := AOnlineAndMOfflinePlanMS64::GenerateData( InterfaceDataset, ddslFactory.Text(), dsStartDate.Date(), dsEndDate.Date(), efVersionFrom.Text(), efVersionTo.Text(), cbActiveVersion.Checked(), dhProducts.Data(), currentuser );
      WebMessageBox::Warning( ApplicationMacroPlanner, msg, 'Yes|No' )
    }
    Form.Close();
  *]
_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
@@ -7,8 +7,8 @@
  [*
    Form.ApplyChanges();
    if( WebMessageBox::Question( this, '是否确认推送', 'OK|Cancel' ) = 0 ){
      AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
      WebMessageBox::Success( "推送成功!" );
      msg   := AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
      WebMessageBox::Warning( ApplicationMacroPlanner, msg, 'Yes|No' )
    }
    Form.Close();
  *]