hongji.li
2023-10-13 59a8fe7a013435dee9d81c65bc289af35e79a7fd
Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
已添加7个文件
已修改22个文件
已删除5个文件
637 ■■■■ 文件已修改
_Main/BL/Relations/Relation_ManufactureLTImputation_GlobalOTDTable_GlobalOTDTable_ManufactureLT.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_ManufactureLTImputation_MacroPlan_MacroPlan_ManufactureLTImputation.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_InitTestData#12.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_InitTestDataByYear.qbl 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | 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_MacroPlan/Method_MappingActualPISPIPData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Apply.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_CreateOrUpdate.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_NewStaticMethod.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Refresh.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer#25.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Apply#202.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Apply.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate0.qbl 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Refresh#1.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Refresh.qbl 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonGenerateTestData_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Component_ListManufactureLT#943.def 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Response_ButtonLoad_OnClick#417.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Response_ListManufactureLT_943_MenuApply_OnClick.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/_ROOT_Component_FormManufactureLT.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/ManufactureLT.vw 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_ManufactureLTImputation_GlobalOTDTable_GlobalOTDTable_ManufactureLT.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation ManufactureLTImputation_GlobalOTDTable_GlobalOTDTable_ManufactureLTImputation
{
  #keys: '1[414384.0.964611377]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDTable
  {
    #keys: '3[414384.0.964611379][414384.0.964611378][414384.0.964611380]'
    Cardinality: '0to1'
    ObjectDefinition: ManufactureLTImputation
    OwningSide: 'Reference'
  }
  RelationSide.RightSide ManufactureLTImputation
  {
    #keys: '3[414384.0.964611382][414384.0.964611381][414384.0.964611383]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDTable
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_ManufactureLTImputation_MacroPlan_MacroPlan_ManufactureLTImputation.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_GlobalDTOTable/Method_InitTestData#12.qbl
@@ -10,6 +10,7 @@
    productCodeList := selectuniquevalues( macroPlan, Product_MP, item, item.ID() );
    debuginfo( "productCodeList : " + [String]productCodeList.Size() );
    
    this.Global_MappingAnnualBudgetData( relflush );
    if( this.Global_MappingAnnualBudgetData( relsize ) = 0 ) {
      debuginfo( "create Global_MappingAnnualBudgetData test data" );
      id := 1;
_Main/BL/Type_GlobalDTOTable/Method_InitTestDataByYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
Quintiq file version 2.0
#parent: #root
Method InitTestDataByYear (
  MacroPlan macroPlan,
  CapacityAndSaleBudgeFilterYears years
)
{
  TextBody:
  [*
    // yypsybs Oct-7-2023 (created)
    productCodeList := selectuniquevalues( macroPlan, Product_MP, item, item.ID() );
    debuginfo( "productCodeList : " + [String]productCodeList.Size() );
    this.Global_MappingAnnualBudgetData( relflush );
    debuginfo( "create Global_MappingAnnualBudgetData test data" );
    id := 1;
    traverse( years, Elements, year ) {
      for( i := 1; i <= productCodeList.Size(); i := i + 1 ) {
        productCode := productCodeList.Element( i - 1 );
        mappingAnnualBudget := this.Global_MappingAnnualBudgetData( relnew,
                                                                    ID := [String]id,
                                                                    YearNo := [String]year.YearNo(),
                                                                    BusinessType := "事业部" + [String](productCode.Length() mod 3),
                                                                    ProductID := productCode);
        id := id + 1;
        mappingAnnualBudget.MonthlyModCapacity1( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity2( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity3( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity4( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity5( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity6( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity7( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity8( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity9( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity10( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity11( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlyModCapacity12( [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity1(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity2(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity3(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity4(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity5(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity6(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity7(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity8(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity9(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity10(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity11(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySheetCapacity12(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales1(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales2(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales3(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales4(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales5(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales6(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales7(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales8(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales9(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales10(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales11(  [String]Real::Random( 20000.0, 30000.0 ) );
        mappingAnnualBudget.MonthlySales12(  [String]Real::Random( 20000.0, 30000.0 ) );
      }
    }
    result2 := selectset( this, Global_MappingAnnualBudgetData, item, true );
    debuginfo( "test MappingAnnualBudget size : " + [String]result2.Size() );
  *]
}
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -63,7 +63,7 @@
                MaterialType:= ObjProduct.ParentID();
                MaterialName:=ObjProduct.Name();
              }
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode());
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode(),GlobData);
              if( not isnull( ObjUnit))
              {
                StockPoint:= ObjUnit.Name();
@@ -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_GetUnitBySKU.qbl
@@ -2,7 +2,8 @@
#parent: #root
StaticMethod SM_GetUnitBySKU (
  MacroPlan Owner,
  String SKU
  String SKU,
  GlobalOTDTable GlobData
) as Unit
{
  Description: '通过SKU获取库存点信息'
@@ -11,7 +12,7 @@
    Obj :=null( Unit,constcontent );
    if( not isnull( Owner) and SKU.Length()>0)
    {
      OrgCode := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
      OrgCode := select( GlobData,Global_MappingOperationBOM,ObjM,ObjM.ProductCode()=SKU);
      if( not isnull( OrgCode))
      {
        Obj := select( Owner,Unit,ObjU,ObjU.ID()=  OrgCode.OrganCode());
_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
@@ -170,9 +170,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)
_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
@@ -24,7 +24,7 @@
      if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
      product := select( this,MappingProduct,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
      product := select( globalOTDTable,Global_MappingProduct_MP,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
      if( not isnull( product)){
      if( not isnull(businessTypes)){
      
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
@@ -76,7 +76,7 @@
    }
    if( createPurchaseSupplyMaterial ) {
        toCreateBomList := selectuniquevalues( bomList, Elements, item, 
                                               item.ComponentType() = "P", item.OrganCode() + item.ComponentCode());
                                               item.ComponentType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.ComponentCode());
        traverse( toCreateBomList, Elements, key ) {
            boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.ComponentCode() = key );
            bom := boms.First();
_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
@@ -10,7 +10,7 @@
    // yypsybs Aug-15-2023 (created)
    
    defaultOld := UnitOfMeasure_MP::FindDefault( this );
    defaultNew := select( this, MappingUnitOfMeasure, item, true, item.IsDefault() );
    defaultNew := select( globalotdtable, Global_MappingUnitOfMeasure_MP, item, true, item.IsDefault() );
    
    if( not isnull( defaultOld ) and not isnull( defaultNew )
        and defaultOld.Name() <> defaultNew.Name() ) {
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Apply.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Apply (
  ManufactureLTImputations toApply
  ManufactureLTImputations toApply,
  MacroPlan macroPlan
)
{
  TextBody:
@@ -9,7 +10,7 @@
    // yypsybs Aug-28-2023 (created)
    traverse( toApply, Elements, parent ) {
      traverse( parent, ManufactureLTProcessSection, child ) {
        ManufactureLTProcessSection::Apply( child );
        ManufactureLTProcessSection::Apply( child, macroPlan );
      }
    }
  *]
_Main/BL/Type_ManufactureLTImputation/StaticMethod_CreateOrUpdate.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateOrUpdate (
  MacroPlan macroPlan,
  GlobalOTDTable parent,
  String orgCode,
  String productId,
  String desc
@@ -10,9 +10,9 @@
  TextBody:
  [*
    // yypsybs Aug-25-2023 (created)
    value := select( macroPlan, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId );
    value := select( parent, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId );
    if( isnull( value ) ) {
        value := macroPlan.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := desc );
        value := parent.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := desc );
    } else {
        value.Describe( desc );  
    }
_Main/BL/Type_ManufactureLTImputation/StaticMethod_NewStaticMethod.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Refresh.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Refresh (
  ManufactureLTImputations toRefresh
  ManufactureLTImputations toRefresh,
  MacroPlan macroPlan
)
{
  TextBody:
@@ -9,7 +10,7 @@
    // yypsybs Aug-28-2023 (created)
    traverse( toRefresh, Elements, parent ) {
      traverse( parent, ManufactureLTProcessSection, child ) {
        ManufactureLTProcessSection::Apply( child );
        ManufactureLTProcessSection::Apply( child, macroPlan );
      }
    }
  *]
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer#25.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Transfer (
  MacroPlan macroPlan,
  GlobalOTDTable parent
)
{
  TextBody:
  [*
    // yypsybs Oct-11-2023 (created)
    traverse( macroPlan, Routing.RoutingStep.Operation, item ) {
         ManufactureLTProcessSection::CreateOrUpdate( item, parent );
    }
  *]
}
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Apply#202.qbl
@@ -1,14 +1,15 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Apply (
  ManufactureLTProcessSection toApply
  ManufactureLTProcessSection toApply,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    // yypsybs Aug-28-2023 (created)
    parent := toApply.ManufactureLTImputation();
    toUpdate := select( toApply, ManufactureLTImputation.MacroPlan.Routing.RoutingStep.Operation, op,
    toUpdate := select( macroPlan, Routing.RoutingStep.Operation, op,
                        op.RoutingID() = parent.OrgCode() + "_" + parent.SkuID() 
                        and op.RoutingStepName() = toApply.ProcessSection() + "_" + toApply.Sequence()
                        and op.Name() = ifexpr( toApply.Line() <> "", 
@@ -18,7 +19,7 @@
      toUpdate.UserLeadTime( Duration::Days( toApply.EditLT() ) );
      toApply.SystemLT( toApply.EditLT() );
    } else {
      info( "operation to update not found" );
      debuginfo(  "operation to update not found" );
    }
  *]
}
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Apply.qbl
@@ -1,14 +1,15 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Apply (
  ManufactureLTProcessSections toApply
  ManufactureLTProcessSections toApply,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    // yypsybs Aug-28-2023 (created)
    traverse( toApply, Elements, child ) {
      ManufactureLTProcessSection::Apply( child );
      ManufactureLTProcessSection::Apply( child, macroPlan );
    }
  *]
}
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateOrUpdate (
  Operation op
  Operation op,
  GlobalOTDTable parent
) as ManufactureLTProcessSection
{
  TextBody:
@@ -31,9 +32,11 @@
    }
    child := null( ManufactureLTProcessSection );
    //if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) {
    //    parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" );
    //    info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() );
    //    child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" );
      ltParent := ManufactureLTImputation::CreateOrUpdate( parent, orgCode, productId, "" );
      info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() );
      child := ManufactureLTProcessSection::CreateOrUpdate( ltParent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" );
    //} else {
    //  info( "skip operation" );
    //}
    return child;
  *]
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate0.qbl
@@ -1,6 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateOrUpdate (
  GlobalOTDTable parent,
  MacroPlan macroPlan,
  String orgCode,
  String productId,
@@ -17,15 +18,15 @@
  TextBody:
  [*
    // yypsybs Aug-25-2023 (created)
    parent := select( macroPlan, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId );
    if( isnull( parent ) ) {
        parent := macroPlan.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := parentDesc );
    ltParent := select( parent, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId );
    if( isnull( ltParent ) ) {
        ltParent := parent.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := parentDesc );
    } else {
        parent.Describe( parentDesc );
        ltParent.Describe( parentDesc );
    }
    child := select( parent, ManufactureLTProcessSection, item, item.ProcessSection() = processSection and item.Sequence() = seq and item.Line() = line );
    child := select( ltParent, ManufactureLTProcessSection, item, item.ProcessSection() = processSection and item.Sequence() = seq and item.Line() = line );
    if( isnull( child ) ) {
        child := parent.ManufactureLTProcessSection( relnew,
        child := ltParent.ManufactureLTProcessSection( relnew,
                                                     ProcessSection := processSection, Sequence := seq, Line := line, SystemLT := systemLt, 
                                                     Edited := edited, EditLT := editLt, Describe := childDesc );
    } else {
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Refresh#1.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_Refresh.qbl
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -6,7 +6,7 @@
  [*
    // Disabled button to prevent the possibility of multiple firing
    
    macroPlanOld := MacroPlan;
    //macroPlanOld := MacroPlan;
    
    btnOK.Enabled( false, '' )
    
@@ -110,7 +110,7 @@
    }
    
    macroPlanNew := MacroPlan;
    ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
    //ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
    
    // sync data
    if( data.EnableSync() ) {
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def
@@ -38,6 +38,6 @@
  ]
  Properties:
  [
    Taborder: 2
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MPSync );
    return not isnull( GlobalOTDTable );
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonGenerateTestData_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: ButtonGenerateTestData
Response OnClick () id:Response_FormCapacityAndSaleBudge_ButtonGenerateTestData_OnClick
{
  #keys: '[414384.0.971540692]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      GlobalOTDTable.InitTestDataByYear( MacroPlan, DataHolderCapacityAndSaleBudgeFilterYear.Data() );
      Global_MappingAnnualBudgetData::SetOrgCodeFromForecast( GlobalOTDTable );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def
@@ -12,8 +12,6 @@
    [*
      MPSync::TestData( MPSync, MacroPlan );
      GlobalOTDTable.InitTestData();
      GlobalOTDTable.InitTestData( MacroPlan );
      Global_MappingAnnualBudgetData::SetOrgCodeFromForecast( GlobalOTDTable );
      GlobalOTDTable.RefreshCapacityAndSaleBudgeFilter( true );
    *]
  }
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def
@@ -16,7 +16,7 @@
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 0
        Taborder: 1
      ]
    }
    Component ButtonExportTest
@@ -27,10 +27,21 @@
      [
        Image: 'EXPORT1'
        Label: '导出测试'
        Taborder: 1
        Taborder: 2
        Visible: false
      ]
    }
    Component ButtonGenerateTestData
    {
      #keys: '[414384.0.971540693]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Label: '根据筛选月份生成测试数据'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Component_ListManufactureLT#943.def
@@ -11,8 +11,8 @@
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'MacroPlan'
        Source: 'MacroPlan'
        DataType: 'GlobalOTDTable'
        Source: 'GlobalOTDTable'
        Taborder: 0
        Transformation: 'ManufactureLTImputation'
      ]
@@ -37,7 +37,7 @@
  ]
  Properties:
  [
    Taborder: 0
    Taborder: 1
  ]
  ResponseDefinitions:
  [
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Response_ButtonLoad_OnClick#417.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: ButtonLoad_657
Response OnClick () id:Response_PanelPRDataButton_ButtonLoad_OnClick_417
{
  #keys: '[414384.0.967076760]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      ManufactureLTImputation::Transfer( MacroPlan, GlobalOTDTable );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/Response_ListManufactureLT_943_MenuApply_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: ListManufactureLT_943
Response OnClick (
  structured[ManufactureLTImputation] selection
) id:Response_ListManufactureLT_943_MenuApply_OnClick
{
  #keys: '[414384.0.967590502]'
  CanBindMultiple: false
  DefinitionID => /ListManufactureLT_943/Responsedef_ListManufactureLT_943_WebMenu_OnClick
  GroupServerCalls: true
  Initiator: 'MenuApply'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      ManufactureLTImputation::Apply( selection, MacroPlan );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormManufactureLT/_ROOT_Component_FormManufactureLT.def
@@ -8,6 +8,17 @@
  Children:
  [
    #child: ListManufactureLT_943
    Component ButtonLoad id:ButtonLoad_657
    {
      #keys: '[414384.0.967076761]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'THICK_ARROW_DOWN_BLUE'
        Label: '重新加载'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/ManufactureLT.vw
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,239 @@
Quintiq file version 2.0
{
  viewcontents
  {
    forms
    {
      form_legacy_1
      {
        title: 'Scenario manager'
        shown: true
        componentID: 'FormScenarioManager'
        layout
        {
          mode: 'open'
          rowPosition: 1
          rowSpan: 8
          columnPosition: 1
          columnSpan: 5
        }
        components
        {
          FormScenarioManager_ListScenario
          {
          }
          FormScenarioManager_DataSetLevelScenario
          {
            groupDepth: -1
            column_All_constraints
            {
              columnId: 'All constraints'
              dataPath: 'All constraints'
              dataType: 'string'
              title: 'All constraints'
              index: 0
              subtotals: ''
              width: 90
            }
            column_Name
            {
              columnId: 'Name'
              dataPath: 'Name'
              dataType: 'string'
              title: '名称'
              index: 1
              subtotals: ''
              width: 197
            }
            column_ChangedBy
            {
              columnId: 'ChangedBy'
              dataPath: 'ChangedBy'
              dataType: 'string'
              title: 'Changed by'
              index: 2
              subtotals: ''
              width: 91
            }
            column_ChangedOn
            {
              columnId: 'ChangedOn'
              dataPath: 'ChangedOn'
              dataType: 'datetime'
              title: 'Changed on'
              index: 3
              subtotals: ''
              width: 99
            }
            column_StorageMode
            {
              columnId: 'StorageMode'
              dataPath: 'StorageMode'
              dataType: 'string'
              title: 'StorageMode'
              index: 4
              subtotals: ''
              width: 40
            }
          }
        }
      }
      form_FormOptimizerPuzzles
      {
        title: 'Optimizer Puzzles'
        shown: false
        componentID: 'FormOptimizerPuzzles'
        layout
        {
          mode: 'dockright'
          index: 0
        }
        components
        {
          FormOptimizerPuzzles_ListOptimizerPuzzles
          {
          }
          FormOptimizerPuzzles_DataSetLevelOptimizerPuzzles
          {
            groupDepth: -1
            column_All_constraints
            {
              columnId: 'All constraints'
              dataPath: 'All constraints'
              dataType: 'string'
              title: 'All constraints'
              index: 0
              subtotals: ''
              width: 32
            }
            column_Name
            {
              columnId: 'Name'
              dataPath: 'Name'
              dataType: 'string'
              title: '名称'
              index: 1
              subtotals: ''
              width: 109
            }
            column_Description
            {
              columnId: 'Description'
              dataPath: 'Description'
              dataType: 'string'
              title: '描述'
              index: 2
              subtotals: ''
              width: 207
            }
          }
        }
      }
      form_FormKPI
      {
        title: 'KPI Dashboard'
        shown: false
        componentID: 'FormKPI'
        layout
        {
          mode: 'dockright'
          index: 1
        }
        components
        {
          FormKPI_PanelKPI
          {
            sizeRatio: 1
            activeChild: 'PanelKPISelection'
          }
          FormKPI_PanelKPIDashboard
          {
            sizeRatio: 1
          }
          FormKPI_PanelKPISelection
          {
            sizeRatio: 1
          }
          FormKPI_ListKPISelection
          {
            QuillViewData
            {
              Food_KPISetting: 'Cost of sales;Fulfillment;Fulfillment target;Inventory holding cost;Labor cost;Margin;Safety stock;Sales;Sourcing cost;Total CO2 emission;Transportation cost;Volume'
            }
          }
          FormKPI_DataSetLevelKPISelection
          {
            groupDepth: -1
            column_All_constraints
            {
              columnId: 'All constraints'
              dataPath: 'All constraints'
              dataType: 'string'
              title: 'All constraints'
              index: 0
              subtotals: ''
              width: 32
            }
            column_Name
            {
              columnId: 'Name'
              dataPath: 'Name'
              dataType: 'string'
              title: '名称'
              index: 1
              subtotals: ''
              width: 200
            }
          }
        }
      }
      form_SWF_DialogWorkflowParameter
      {
        title: 'S&OP Workflow Parameters'
        shown: true
        componentID: 'SWF_DialogWorkflowParameter'
        layout
        {
          mode: 'dockright'
          index: 2
        }
        components
        {
          SWF_DialogWorkflowParameter_PanelCurrentDate
          {
            sizeRatio: 1
          }
          SWF_DialogWorkflowParameter_PanelIntegration
          {
            sizeRatio: 1
          }
          SWF_DialogWorkflowParameter_PanelSynchronizeRoles
          {
            sizeRatio: 1
          }
          SWF_DialogWorkflowParameter_PanelRequestDatasetSync
          {
            sizeRatio: 1
          }
          SWF_DialogWorkflowParameter_PanelKickQueues
          {
            sizeRatio: 1
          }
        }
      }
    }
    userconfigurableinformation
    {
    }
    page: 'ActionBarPageData'
    group: ''
    index: 1
    image: 'CODE_LINE'
    description: '制造LT'
  }
  formatversion: 2
  id: 'ManufactureLT'
  name: 'ManufactureLT'
  isglobal: false
  isroot: true
}