yunchai
2023-10-07 160249d574bc6776d347eb7c046ee2d759af8c16
临时提交
已添加3个文件
已修改3个文件
137 ■■■■■ 文件已修改
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SM_OrderHedgingEx (
  MacroPlan Owner,
  String Operator
) as owning JSON
{
  Description: '填产后冲减'
  TextBody:
  [*
    /*******************************填产后订单冲减***********************
    *函数名称:SM_OrderHedgingEx
    *创 å»º äººï¼šyunying
    *创建时间:2023-09-27
    *描    è¿°ï¼šå¡«äº§åŽè®¢å•冲减,填产后的表:Owner.FillingCapacityOrder
    *参    æ•°ï¼šOperator æ“ä½œäºº
    *返 å›ž å€¼ï¼šJSON {Status: true æˆåŠŸ/false å¤±è´¥,Msg:"提示消息"}
    *******************************************************************/
    // åˆå§‹åŒ–结果
    bStatus := false;
    strMsg :="";
    try
    {
      error( "AAAAAA");
      if(not isnull( Owner))
      {
        // Customer æ¢æˆçŠ¶æ€
        NewOrders := selectset( Owner,FillingCapacityOrder,Obj,Obj.State() = "未冲减");
        if(NewOrders.Size()>0)
        {
          traverse( NewOrders,Elements,Obj)
          {
            if( Obj.OrderType()="反签" or Obj.OrderType()="授权")
            {
              // æ›´æ–°çŠ¶æ€
              Obj.State("已冲减");
            }
            else
            {
              strMsg :="订单类型:" + Obj.OrderType() + "无法冲减!";
            }
          }
          bStatus:=true;
          strMsg :="填产后冲减完成!";
        }
        else
        {
          strMsg :="无可冲减的数据!";
        }
      }
      else
      {
        strMsg :="加载数据失败,请创建或选择场景后再操作!";
      }
    }
    onerror
    {
      strMsg :="填产后订单冲减发生错误,请联系系统管理员!";
      // è®°å½•错误日志
      Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_OrderHedgingEx",
                         DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
                         GeneralInformation := e.GeneralInformation());
    }
    return JSON::Object().Add( "Status",bStatus)
                         .Add( "Msg",strMsg).Build();
  *]
}
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl
@@ -39,7 +39,7 @@
        nReverseQtyNew :=0;   //计算后的反签数量
        nAuthorizeQtyNew :=0; //计算后的授权数量
        nHaveForecastQty :=0; //有预测数量
        nNoHaveForecastQty:=0;//五预测数量
        nNoHaveForecastQty:=0;//无预测数量
        // èŽ·å–é¢„æµ‹æ•°é‡ï¼ˆå®¢æˆ·+SKU+月份 ç†è®ºæ˜¯æ²¡æœ‰ç‰©æ–™é¢„测)
        OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU 
                                              and Obj.CustomCode() = CustomerCode 
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def
@@ -36,6 +36,6 @@
  ]
  Properties:
  [
    Taborder: 1
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component Panel391
{
  #keys: '[414724.0.193860534]'
  BaseType: 'WebPanel'
  Children:
  [
    Component Button655
    {
      #keys: '[414724.0.193860558]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'BULL'
        Label: '填产冲减'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
Quintiq file version 2.0
#parent: Panel391/Button655
Response OnClick () id:Response_Panel391_Button655_OnClick
{
  #keys: '[414724.0.194975663]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan);
  *]
  QuillAction
  {
    Body:
    [*
      HResult := H_FunctionClass::SM_OrderHedgingEx( MacroPlan,"测试用户" );
      Msg := HResult.Get( "Msg").GetString();
      if( HResult.Get( "Status").GetBoolean())
      {
        if( Msg.Length()>0)
        {
          WebMessageBox::Information(Msg);
        }
      }
      else
      {
        if( Msg.Length()>0)
        {
          WebMessageBox::Warning(Msg);
        }
        else
        {
          WebMessageBox::Information("运行错误!");
        }
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def
@@ -30,9 +30,10 @@
      ]
      Properties:
      [
        Taborder: 0
        Taborder: 1
      ]
    }
    #child: Panel391
  ]
  Properties:
  [