yunchai
2023-10-12 cd4a8e6eddf711f948922ba88cdf1ea052646f79
临时提交
已修改3个文件
19 ■■■■■ 文件已修改
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -83,6 +83,7 @@
      // 没有BOM 添加测试数据
      else
      {
        error( "BOM 数据获取失败,无法扩展原材料信息!");
        nCount :=Owner.H_MaterialInfo(relsize );
        Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU"+ nCount.AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode
                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "原材料",NeedDate := NDate
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
@@ -15,6 +15,10 @@
    *创建人:yunying
    *创建时间:20230-09-24
    *描述:系统内订单冲减调用函数,IsNew=true时,重新处理预测信息,IsNew=false时,用预测累计信息。
    *参数:IsNew 是否时新的计算表示
    *     Operator 操作人
    *     OperatorType 操作类型[反签,授权,ERP订单],这里应该是ERP订单
    *备注:客户全部使用客户名称,不要使用客户ID,预测原始数据没有客户ID信息
    *****************************************************************************/
    // 初始化结果
    bStatus := false;
@@ -58,9 +62,9 @@
              nHaveForecastQty :=0; //有预测数量
              nNoHaveForecastQty:=0;//五预测数量
              OrderQuantity := 0;   //剩余订单数量
              // 获取预测数量(客户+SKU+月份 理论是没有物料预测)
              // 获取预测数量(客户名称+SKU+月份 理论是没有物料预测)
              OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID() 
                                                    and Obj.CustomCode() = ObjOrder.CustomerName()
                                                    and Obj.CustomName() = ObjOrder.CustomerName()
                                                    and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2"));
              if ( not isnull(OrderForecast))
              {
@@ -74,9 +78,9 @@
                  nReverseQtyOld := ObjReverse.ReverseRealQty();
                  nReverseQtyNew := nReverseQtyOld;
              }
              // 获取授权数量(客户ID+SKU)
              // 获取授权数量(客户名称+SKU)
              ObjAuthorize := select(Owner, H_AuthorizeRealQty , Obj, Obj.SKU() = ObjOrder.ProductID() 
                                                                      and Obj.CustomID() = ObjOrder.CustomerName());
                                                                      and Obj.CustomName() = ObjOrder.CustomerName());
              if ( not isnull(ObjAuthorize))
              {
                  nAuthorizeQtyOld := ObjAuthorize.AuthorizeRealQty();
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl
@@ -150,9 +150,9 @@
    {
      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());
      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( "Count",nCount)