lazhen
2024-10-17 b3d5100ea886235b873e324e7f62d3e42a1f2176
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已修改32个文件
已添加10个文件
已删除3个文件
591 ■■■■■ 文件已修改
_Main/BL/Type_Archive/StaticMethod_Archive.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Function_CalcDate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalColumn/Function_CalcName.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_AnnualPlanReport.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_ScheduleSummary.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_AnnualPlanReport.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValues.qbl 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanNewCapability/Attribute_Factory.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanNewCapability/Attribute_ProductID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Component_pnlContent.def 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlContent_ddslProductID_OnCreated.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlContent_ddslProductionLine_OnCreated.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogPackagingPlanCapability/Component_lstContent.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_MatrixEditor.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bExport_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_MatrixEditor#988.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bExport_OnClick#891.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnCreated.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Archive/StaticMethod_Archive.qbl
@@ -12,7 +12,7 @@
  TextBody:
  [*
    code             := respJSON.Get( "code" ).GetNumber();
    archiveFileJSONs := respJSON.Get( "archiveFiles" );
    archiveFileJSONs := guard( respJSON.Get( "archiveFiles" ),JSON::Array().Build() );
    //info( archiveFileJSONs.AsString() );
    
    if ( code = 200 or code = 201 ) {
_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl
@@ -11,38 +11,40 @@
      priority := 1 ;
    }else if( element.LikeUserLocale( "<name>产线</name>" )){
      priority := 2 ;
    }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
    }else if( element.LikeUserLocale( "<name>    </name>" )){
      priority := 3 ;
    }else if( element.LikeUserLocale( "<name>产地</name>" )){
    }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
      priority := 4 ;
    }else if( element.LikeUserLocale( "<name>车型</name>" )){
    }else if( element.LikeUserLocale( "<name>产地</name>" )){
      priority := 5 ;
    }else if( element.LikeUserLocale( "<name>发动机零件号</name>" )){
    }else if( element.LikeUserLocale( "<name>车型</name>" )){
      priority := 6 ;
    }else if( element.LikeUserLocale( "<name>发动机四位码</name>" )){
    }else if( element.LikeUserLocale( "<name>发动机零件号</name>" )){
      priority := 7 ;
    }else if( element.LikeUserLocale( "<name>生产天数</name>" )){
    }else if( element.LikeUserLocale( "<name>发动机四位码</name>" )){
      priority := 8 ;
    }else if( element.LikeUserLocale( "<name>加班/欠工时长</name>" )){
    }else if( element.LikeUserLocale( "<name>生产天数</name>" )){
      priority := 9 ;
    }else if( element.LikeUserLocale( "<name>平日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>加班/欠工时长</name>" )){
      priority := 10 ;
    }else if( element.LikeUserLocale( "<name>休息日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>平日加班时长</name>" )){
      priority := 11 ;
    }else if( element.LikeUserLocale( "<name>节假日加班时长</name>" )){
    }else if( element.LikeUserLocale( "<name>休息日加班时长</name>" )){
      priority := 12 ;
    }else if( element.LikeUserLocale( "<name>欠工时长</name>" )){
    }else if( element.LikeUserLocale( "<name>节假日加班时长</name>" )){
      priority := 13 ;
    }else if( element.LikeUserLocale( "<name>加班/欠工费</name>" )){
    }else if( element.LikeUserLocale( "<name>欠工时长</name>" )){
      priority := 14 ;
    }else if( element.LikeUserLocale( "<name>平日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>加班/欠工费</name>" )){
      priority := 15 ;
    }else if( element.LikeUserLocale( "<name>休息日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>平日加班费</name>" )){
      priority := 16 ;
    }else if( element.LikeUserLocale( "<name>节假日加班费</name>" )){
    }else if( element.LikeUserLocale( "<name>休息日加班费</name>" )){
      priority := 17 ;
    }else if( element.LikeUserLocale( "<name>欠工费</name>" )){
    }else if( element.LikeUserLocale( "<name>节假日加班费</name>" )){
      priority := 18 ;
    }else if( element.LikeUserLocale( "<name>欠工费</name>" )){
      priority := 19 ;
    }else{
      //  <column><name>2020/04/01</name>
      priority := [Number]element.SubString( 14,10 ).ReplaceAll( "/","") ;
_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl
@@ -21,7 +21,6 @@
       }onerror{
         info( element );
       }
    }
  *]
}
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl
@@ -15,13 +15,13 @@
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,CustomIndex := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,CustomIndex := 2);
    
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,CustomIndex := 3);
    column3  := table.LocalColumn( relnew,CustomName := "生产天数" ,CustomIndex := 3);
    
    column4  := table.LocalColumn( relnew,Name := "加班/欠工时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,Name := "节假日加班时长" ,CustomIndex := 6);
    column4  := table.LocalColumn( relnew,CustomName := "加班/欠工时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,CustomName := "节假日加班时长" ,CustomIndex := 6);
    
    column6  := table.LocalColumn( relnew,Name := "加班/欠工费" ,CustomIndex := 8);
    column7 := table.LocalColumn( relnew,Name := "节假日加班费" ,CustomIndex := 10);
    column6  := table.LocalColumn( relnew,CustomName := "加班/欠工费" ,CustomIndex := 8);
    column7 := table.LocalColumn( relnew,CustomName := "节假日加班费" ,CustomIndex := 10);
    
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    
@@ -73,13 +73,13 @@
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      // èŠ‚å‡æ—¥åŠ ç­ 
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      // ä¼‘息日加班 
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      // å¹³æ—¶åŠ ç­
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      
      if( shiftPlan.Outcome() <> "" ){
        workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
@@ -144,7 +144,7 @@
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "周六" ) or shiftPlan.DefaultRemark().LikeUserLocale( "周日" ) )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
          qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
        }
      }
@@ -183,14 +183,14 @@
      rowKey := row.CustomName();
      unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
      
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
      
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,qiangongCell.RealValue() ));
    }
    
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
@@ -15,17 +15,17 @@
    //column1  := table.LocalColumn( relnew,Name := "工厂" ,CustomIndex := 1);
    //column2  := table.LocalColumn( relnew,Name := "产线" ,CustomIndex := 2);
    
    column3  := table.LocalColumn( relnew,Name := "生产天数" ,CustomIndex := 3);
    column3  := table.LocalColumn( relnew,CustomName := "生产天数" ,CustomIndex := 3);
    
    column4  := table.LocalColumn( relnew,Name := "平日加班时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,Name := "休息日加班时长" ,CustomIndex := 5);
    column6  := table.LocalColumn( relnew,Name := "节假日加班时长" ,CustomIndex := 6);
    column7  := table.LocalColumn( relnew,Name := "欠工时长" ,CustomIndex := 7);
    column4  := table.LocalColumn( relnew,CustomName := "平日加班时长" ,CustomIndex := 4);
    column5  := table.LocalColumn( relnew,CustomName := "休息日加班时长" ,CustomIndex := 5);
    column6  := table.LocalColumn( relnew,CustomName := "节假日加班时长" ,CustomIndex := 6);
    column7  := table.LocalColumn( relnew,CustomName := "欠工时长" ,CustomIndex := 7);
    
    column8  := table.LocalColumn( relnew,Name := "平日加班费" ,CustomIndex := 8);
    column9  := table.LocalColumn( relnew,Name := "休息日加班费" ,CustomIndex := 9);
    column10 := table.LocalColumn( relnew,Name := "节假日加班费" ,CustomIndex := 10);
    column11 := table.LocalColumn( relnew,Name := "欠工费" ,CustomIndex := 11);
    column8  := table.LocalColumn( relnew,CustomName := "平日加班费" ,CustomIndex := 8);
    column9  := table.LocalColumn( relnew,CustomName := "休息日加班费" ,CustomIndex := 9);
    column10 := table.LocalColumn( relnew,CustomName := "节假日加班费" ,CustomIndex := 10);
    column11 := table.LocalColumn( relnew,CustomName := "欠工费" ,CustomIndex := 11);
    
    units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
    
@@ -76,14 +76,14 @@
      // gongchangCell := LocalCell_Default::GetCell(  rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
      // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      // èŠ‚å‡æ—¥åŠ ç­ 
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      // ä¼‘息日加班 
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      // å¹³æ—¶åŠ ç­
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      if( shiftPlan.Outcome() <> "" ){
        workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
        if( shiftPlan.IsHoliday() ){
@@ -145,7 +145,7 @@
        }
      }else{
        if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "周六" ) or shiftPlan.DefaultRemark().LikeUserLocale( "周日" ) )){
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
          qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
          qiangongCell.RealValue( qiangongCell.RealValue() + 8 );
        }
      }
@@ -185,30 +185,30 @@
      unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
      
      // èŠ‚å‡æ—¥åŠ ç­è´¹
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column10.Name(), cellIndexTree, cells, row, column10 );
      jiejiariCell := LocalCell_Default::GetCell(  rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
      jiejiarifeiCell := LocalCell_Default::GetCell(  rowKey + column10.CustomName(), cellIndexTree, cells, row, column10 );
      jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
      
      // ä¼‘息日加班费
      xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
      xiuxifeiCell := LocalCell_Default::GetCell(  rowKey + column9.Name(), cellIndexTree, cells, row, column9 );
      xiuxiCell := LocalCell_Default::GetCell(  rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
      xiuxifeiCell := LocalCell_Default::GetCell(  rowKey + column9.CustomName(), cellIndexTree, cells, row, column9 );
      xiuxifeiCell.RealValue( EmployeeCost::GetSalary( unit,breakDayMultiplier,xiuxiCell.RealValue()));
      
      // å¹³æ—¶åŠ ç­è´¹
      jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
      jiabanfeiCell := LocalCell_Default::GetCell(  rowKey + column8.Name(), cellIndexTree, cells, row, column8 );
      jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
      jiabanfeiCell := LocalCell_Default::GetCell(  rowKey + column8.CustomName(), cellIndexTree, cells, row, column8 );
      jiabanfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier ,jiabanCell.RealValue()));
      
      // æ¬ å·¥è´¹
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
      qiangongCell := LocalCell_Default::GetCell(  rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
      qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
      
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column11.Name(), cellIndexTree, cells, row, column11 );
      qiangongfeiCell := LocalCell_Default::GetCell(  rowKey + column11.CustomName(), cellIndexTree, cells, row, column11 );
      qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,qiangongMultiplier,qiangongCell.RealValue() ));
      
      
      // å·¥ä½œæ—¥
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
      workingDayCell.RealValue( workingDayCell.RealValue() );
    }
    
_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl
@@ -14,7 +14,7 @@
    cells := selectsortedset( column, LocalCell.astype( LocalCell_Default ), cell,
                                  exists( rows,Elements,element,element = cell.LocalRow()), cell.LocalRow().Index());
    if( type = "data" ){
      columnXML := "<column><name>" + column.Name() + "</name><type>String</type>";
      columnXML := "<column><name>" + column.Name() + "</name><type>Number</type>";
      traverse ( cells, Elements, cell ) {
        cellXML := '<cell value="' + cell.RealValue().Format( "N(Dec)" ) + '"/>'
        columnXML := columnXML + cellXML;
@@ -22,7 +22,7 @@
      columnXML := columnXML + "</column>";
    }
    if( type = "attribute" ){
      columnXML1 := "<column><name>产线</name><type>String</type>";
      columnXML1 := "<column><name>    </name><type>String</type>";
      traverse ( cells, Elements, cell ) {
        cellXML := '<cell value="' + cell.LocalRow().Name() + '"/>'
        columnXML1 := columnXML1 + cellXML;
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl
@@ -30,7 +30,7 @@
          // 2023/01/01
          index := [Number]generalColumn.Name().ReplaceAll( "/", "" );
        }
        column := localTable.LocalColumn( relnew, Name := generalColumn.Name(),CustomIndex := index );
        column := localTable.LocalColumn( relnew, CustomName := generalColumn.Name(),CustomIndex := index );
        columns.Add( column );
        columnTree.Root().AddChild( tempHandle,columns.Size() - 1 );
      }
_Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl
@@ -45,7 +45,7 @@
      localRowHandle := localRowIndexTree.GetHandle( rowKey );
      localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
      if( isnull( localRowIndex )){
        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey );
        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),ProductID := row.ProductID(),CustomName := row.ProductID() + " > " + row.ProductionLine(),Remark := rowKey );
        localRows.Add( localRow );
        localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
      }
@@ -62,7 +62,7 @@
      localRowHandle := localRowIndexTree.GetHandle( rowKey );
      localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
      if( isnull( localRowIndex )){
        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey );
        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),ProductID := row.ProductID(),CustomName := row.ProductID() + " > " + row.ProductionLine(),Remark := rowKey );
        localRows.Add( localRow );
        localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
      }
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -70,9 +70,13 @@
        }
      }
    }
    traverse( table,MP_Column,column,column.MP_Cell( relsize ) = 0 ){
      column.Delete(); 
    }
    return table;
  *]
}
_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute CustomName
{
  #keys: '3[414996.1.141371567][414996.1.141371566][414996.1.141371568]'
  ValueType: String
}
_Main/BL/Type_LocalColumn/Function_CalcDate.qbl
@@ -6,7 +6,7 @@
  [*
    // rislai Jun-28-2024 (created)
    if( not this.IsAttrbuteColumn() ){
      names := this.Name().Tokenize( "/" );
      names := this.CustomName().Tokenize( "/" );
      this.Date( ifexpr( this.CustomDate() <> Date::MinDate(),this.CustomDate(),guard( Date::Construct( [Number]names.Element( 0 ),[Number]names.Element( 1 ),[Number]names.Element( 2 )),Date::MinDate() )));
    }
  *]
_Main/BL/Type_LocalColumn/Function_CalcName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcName
{
  TextBody:
  [*
    // Akari Oct-16-2024 (created)
    value := ifexpr( this.CustomName() <> "", this.CustomName(),this.Date().Format( "Y/M2/D2"))
    this.Name( value );
  *]
}
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
@@ -39,7 +39,6 @@
          columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
          if( not isnull( columnIndex )){
            column := columns.Element( columnIndex.GetValueAsNumber() );
            row.MP_Cell( relnew,MP_Cell_AnnualPlanReport,MP_Column := column ,NewSupply := pispippl.NewSupplyQuantity());
          }
        }
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
@@ -14,6 +14,11 @@
    startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
    endDate := maxselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
    
    localCells := construct( LocalCell_Defaults );
    localCellIndexTree := NamedValueTree::Create();
    localRows := construct( LocalRows );
    localRowIndexTree := NamedValueTree::Create();
    localColumns := construct( LocalColumns );
    localColumnIndexTree := NamedValueTree::Create();
    for( i := startDate; i <= endDate; i := i + 1 ){
@@ -35,7 +40,17 @@
       localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
    }
    traverse( tables,Elements.MP_Row,row ){
       localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
       localRowHandle := localRowIndexTree.GetHandle( row.ProductID() + row.StockingPointID() );
       localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
       localRow := null( LocalRow );
       if( isnull( localRowIndex )){
         localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
         localRows.Add( localRow );
         localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
       }else{
         localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
       }
       traverse( row,MP_Cell.astype( MP_Cell_AnnualPlanReport ),cell ){
         localColumnHandle := localColumnIndexTree.GetHandle( cell.MP_Column().Date().AsQUILL() );
         localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
@@ -43,26 +58,83 @@
           localColumn := localColumns.Element( localColumnIndex.GetValueAsNumber() );
           localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := localColumn );
           localCell.RealValue( cell.NewSupply() );
           localCellHandle := localCellIndexTree.GetHandle( localRow.ProductID() + localRow.StockingPointID() + localColumn.CustomDate().AsQUILL() + localColumn.TimeUnit() );
           localCells.Add( localCell );
           localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
         }
       }
    }
    owner := maxselect( owners,Elements,element,element.StartOfPlanning() );
    traverse( owner,Product_MP.ProductInStockingPoint_MP,pisp_mp ){
      pispippls := selectset( pisp_mp,ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),pispippl,
                                        pispippl.Period_MP().StartDate() > endDate
                                    and pispippl.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day());
      if( pispippls.Size() <> 0 ){
        localRowHandle := localRowIndexTree.GetHandle( pisp_mp.ProductID() + pisp_mp.StockingPointID() );
        localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
        localRow := null( LocalRow );
        if( isnull( localRowIndex )){
          localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.Name(),ProductID := pisp_mp.ProductID(),StockingPointID := pisp_mp.StockingPointID(),Index := localTable.GetRowIndexCache() );
          localRows.Add( localRow );
          localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
        }else{
          localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
        }
        traverse( pispippls,Elements,pispippl ){
          columnHandle := localColumnIndexTree.GetHandle( pispippl.Period_MP().StartDate().AsQUILL() );
          columnIndex := guard( localColumnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
          if( not isnull( columnIndex )){
            column := localColumns.Element( columnIndex.GetValueAsNumber() );
            localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := column );
            localCell.RealValue( pispippl.NewSupplyQuantity() );
          }
        }
      }
    }
    traverse( localTable,LocalRow,row ){
      traverse( localTable,LocalColumn,column,column.TimeUnit() = "Week" ){
        value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
                      cell.LocalColumn().TimeUnit() = "Day" and 
                      cell.LocalColumn().CustomDate() >= column.CustomDate() and 
                      cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextWeek(),cell.RealValue());
        row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
        localCells.Add( localCell );
        localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
      }
      traverse( localTable,LocalColumn,column,column.TimeUnit() = "Month" ){
        value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
                      cell.LocalColumn().TimeUnit() = "Day" and 
                      cell.LocalColumn().CustomDate() >= column.CustomDate() and 
                      cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextMonth(),cell.RealValue());
        row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
        localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
        localCells.Add( localCell );
        localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
      }
    }
    
    traverse( localTable,LocalColumn,column,column.LocalCell( relsize ) = 0 ){
      column.Delete();
    }
    //traverse( localTable,LocalRow,row ){
    //  traverse( localTable,LocalColumn,column ){
    //    localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
    //    localCellIndex := guard( localCellIndexTree.Root().Child( localCellHandle ),null( NamedValue ));
    //    if( isnull( localCellIndex )){
    //      localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := 0.0 );
    //      localCells.Add( localCell );
    //      localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
    //    }
    //  }
    //}
    return localTable;
  *]
}
_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_AnnualPlanReport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateMP_Tables_AnnualPlanReport (
  const MacroPlans owners
) as owning MP_Tables
{
  TextBody:
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "计划汇总" )){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
      if( not isnull( table )){
        table.Delete();
      }
      table :=  MP_Cell_AnnualPlanReport::Create( owner );
      tables.Add( table );
    }
    return &tables;
  *]
}
_Main/BL/Type_MP_Table/StaticMethod_CreateMP_Tables_ScheduleSummary.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateMP_Tables_ScheduleSummary (
  const MacroPlans owners
) as owning MP_Tables
{
  TextBody:
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "计划汇总" )){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
      if( not isnull( table )){
        table.Delete();
      }
      table :=  MP_Cell_ScheduleSummary::Create( owner );
      tables.Add( table );
    }
    return &tables;
  *]
}
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_AnnualPlanReport.qbl
@@ -8,7 +8,7 @@
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "计划汇总" )){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_AnnualPlanReport::Create( owner );
_Main/BL/Type_MP_Table/StaticMethod_GetMP_Tables_ScheduleSummary.qbl
@@ -8,7 +8,7 @@
  [*
    // Akari Aug-19-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
    traverse( owners,Elements,owner ,owner.MDSMacroPlan().Description().LikeUserLocale( "计划汇总" )){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_ScheduleSummary::Create( owner );
_Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl
@@ -31,8 +31,8 @@
    
    traverse( this,NewOfflinePlanRow,row,row.Type() = "1" ){
      productID := row.ProductID();
      // productLine := row.ProductionLine();
      localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := productID );
      productLine := row.ProductionLine();
      localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := productID + " > " + productLine,ProductID := productID );
      traverse( row,NewOfflinePlanCell,cell,cell.NewOfflinePlanColumn().StartDate() >= macroPlan.StartOfPlanning().Date() ){
        localColumnHandle := localColumnIndexTree.GetHandle( cell.NewOfflinePlanColumn().StartDate().AsQUILL() );
        localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -22,15 +22,8 @@
      // åˆ›å»ºè¡Œ
      ppr := select( macroPlan, PackagingPlanRow, tempPPR, tempPPR.ProductID() = pisp.ProductID() and tempPPR.Factory() = factory );
      if ( isnull( ppr ) ) {
        ppr := macroPlan.PackagingPlanRow( relnew, ProductID := pisp.ProductID(), StockingPointID := pisp.StockingPointID(), Factory := factory, Category := guard( pisp.Product_MP().ParentID(), "" ) );
        ppr := macroPlan.PackagingPlanRow( relnew, ProductID := pisp.ProductID(), Factory := factory, Category := guard( pisp.Product_MP().ParentID(), "" ) );
      }
      // å‡ºå‘地库存点Trip
      originTrips      := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation )      and
                                     TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) );
      // ç›®çš„地库存点Trip
      destinationTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and
                                     TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) );
      
      // å¾ªçޝpispippl
      traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispipl, not pispipl.IsPeriodFrozen() ) {
@@ -44,24 +37,32 @@
        cell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = ppc );
        if ( isnull( cell ) ) {
          cell := ppr.PackagingPlanCell( relnew );
          cell.NetDemand( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() );
          cell.NetDemand( pispipl.InventoryLevelEnd() + pispipl.NewSupplyQuantity() - pispipl.DependentDemandAndSalesDemandQuantity() );
          cell.EndingInventory( pispipl.InventoryLevelEnd() );
          cell.PackagingPlanColumn( relset, ppc );
        } else {
          cell.NetDemand( cell.NetDemand() + ( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() ) );
          cell.NetDemand( cell.NetDemand() + ( pispipl.InventoryLevelEnd() + pispipl.NewSupplyQuantity() - pispipl.DependentDemandAndSalesDemandQuantity() ) );
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
        }
        
        // è®¾ç½®è°ƒå‡º
        outs := selectset( originTrips, Elements, tempT, tempT.Departure().Date() = pispipl.Start().Date() );
        traverse ( outs, Elements.ProductInTrip, outPIT, outPIT.ProductID() = pisp.ProductID() ) {
          cell.Out( cell.Out() + outPIT.Quantity() );
        traverse ( pispipl, AsDeparturePISPIP, pit,
                   pit.Quantity()                > 0                                                                         and
                   pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation )      and
                   TransferPlanRow::IdentifyTheFactory( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() )
                  )
        {
          cell.Out( cell.Out() + pit.Quantity() );
        }
        
        // è®¾ç½®è°ƒè¿›
        transferIns := selectset( destinationTrips, Elements, tempT, tempT.Arrival().Date() = pispipl.Start().Date() );
        traverse ( transferIns, Elements.ProductInTrip, tiPIT, tiPIT.ProductID() = pisp.ProductID() ) {
          cell.TransferIn( cell.TransferIn() + tiPIT.Quantity() );
        traverse ( pispipl, AsArrivalPISPIP, pit,
                   pit.Quantity()              > 0                                                                           and
                   pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and
                   TransferPlanRow::IdentifyTheFactory( pit.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( pit.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() )
                  )
        {
          cell.TransferIn( cell.TransferIn() + pit.Quantity() );
        }
        
        // é•¿æ˜¥å·¥åŽ‚ç‰¹æ®Šæƒ…å†µè®¾ç½®åŒ…è£…åº“å­˜å’ŒéžåŒ…è£…åº“å­˜
@@ -94,6 +95,7 @@
    Transaction::Transaction().Propagate( relation( PackagingPlanCell, Next ) );
    
    // è®¾ç½®åŒ…装&拆包-数量
    PackagingPlanCell::SetPackagingAndUnpackingValues( macroPlan );
    //traverse ( macroPlan, PackagingPlanRow, ppr, ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Bosch" ) or ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Components (Spain)" ) ) {
    //  traverse ( ppr, PackagingPlanCell, ppc/*, ppc.StartDate() = Date::Construct( 2020, 4, 1 )*/ ) {
    //    // è®¾ç½®åŒ…装数量
_Main/BL/Type_PackagingPlanCell/StaticMethod_SetPackagingAndUnpackingValues.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SetPackagingAndUnpackingValues (
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    // è®¾ç½®åŒ…装值(符合lotsize和一日最大包装量)
    traverse ( macroPlan, PackagingPlanRow, ppr, ppr.Factory() = "大连工厂" and ppr.ProductID() = "06K103011CM" ) {
      traverse ( ppr, PackagingPlanCell, ppcell, ppcell.StartDate() <= Date::Construct( 2025, 1, 3 ) ) {
        // Product_MP
        pmp                     := select( macroPlan, Product_MP, tempPMP, tempPMP.IsLeaf() and tempPMP.ID() = ppr.ProductID() );
        // åŒ…装lotsize
        ppls                    := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppr.Factory() and
                                           tempPPLS.ProductID() = ifexpr( exists( macroPlan, PackagingPlanLotSize, tempPPLS1, tempPPLS1.ProductID() = pmp.ID() ),
                                                                          pmp.ID(),
                                                                          pmp.ParentID() ) );
        // ä¸€æ—¥åŒ…装容量
        ppnc                    := select( macroPlan, PackagingPlanNewCapability, tempPPNC, tempPPNC.Factory() = ppr.Factory() and
                                           tempPPNC.ProductID() = ifexpr( exists( macroPlan, PackagingPlanNewCapability, tempPPNC1, tempPPNC1.ProductID() = pmp.ID() ),
                                                                          pmp.ID(),
                                                                          pmp.ParentID() ) );
        // Unit
        u                       := select( macroPlan, Unit, tempU, tempU.ID().Regex( ppr.FactoryAbbreviation() + " " + ppr.Category() ) );
        // åŒ…装库存出现负值,需要设置包装量
        if ( ppcell.PackagingInventory() < 0 and not isnull( ppls ) and not isnull( ppnc ) ) {
          // éœ€è¦åŒ…装的数量
          needPackagingQuantity := abs( ppcell.PackagingInventory() ).Round( 0 );
          // åŒ…装开始的索引
          indexPPCell           := ppcell.Previous();
          info( "产线名:", u.ID(), "    å¼€å§‹æ—¶é—´ï¼š", ppcell.StartDate().Format( "Y-M2-D2" ), "    åŒ…装库存数量:", ppcell.PackagingInventory(), "    éœ€è¦åŒ…装的数量:", needPackagingQuantity,
                "    åŒ…装lotsize:",guard( ppls.LotSize(), 0 ), "    æœ€å¤§åŒ…装容量:", ppnc.MaximumDailyPackagingQuantity() );
          while ( not isnull( indexPPCell ) and needPackagingQuantity > 0 ) {
            // èƒ½åŒ…装的数量
            canPackagingQuantity  := ifexpr( ceil( needPackagingQuantity / ppls.LotSize() ) < floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ),
                                             ceil( needPackagingQuantity / ppls.LotSize() ),
                                             floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ) ) * ppls.LotSize();
            info( "开始包装的日期:", indexPPCell.StartDate().Format( "Y-M2-D2" ), "    èƒ½åŒ…装的数量:", canPackagingQuantity );
            indexPPCell.Package( canPackagingQuantity );
            needPackagingQuantity := needPackagingQuantity - canPackagingQuantity;
            indexPPCell           := indexPPCell.Previous();
          }
        }
      }
    }
    // è®¾ç½®åŒ…装值(符合大类下所有产品包装量加和不能大于最大包装量)
  *]
}
_Main/BL/Type_PackagingPlanNewCapability/Attribute_Factory.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Factory
{
  #keys: '3[415754.0.412692725][415754.0.412692724][415754.0.412692726]'
  Description: '工厂'
  ValueType: String
}
_Main/BL/Type_PackagingPlanNewCapability/Attribute_ProductID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductID
{
  #keys: '3[415754.0.412692742][415754.0.412692741][415754.0.412692743]'
  Description: '产品ID'
  ValueType: String
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Component_pnlContent.def
@@ -5,14 +5,15 @@
  BaseType: 'WebPanel'
  Children:
  [
    Component ddslProductionLine
    Component ddslFactory
    {
      #keys: '[413988.0.1596148502]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.ProductionLine'
        DataBinding: 'DataHolderDialogData.Data.Factory'
        Label: 'Production line'
        Strings: '大连工厂;长春工厂'
        Taborder: 0
      ]
    }
@@ -24,7 +25,7 @@
      [
        DataBinding: 'DataHolderDialogData.Data.MaximumDailyPackagingQuantity'
        Label: 'Maximum daily packaging quantity'
        Taborder: 1
        Taborder: 2
      ]
    }
    Component npMaximumDailyUnpackingQuantity
@@ -35,7 +36,18 @@
      [
        DataBinding: 'DataHolderDialogData.Data.MaximumDailyUnpackingQuantity'
        Label: 'Maximum daily unpacking quantity'
        Taborder: 2
        Taborder: 3
      ]
    }
    Component ddslProductID
    {
      #keys: '[415754.0.415211304]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.ProductID'
        Label: 'Product ID'
        Taborder: 1
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlActions_btnOk_OnClick.def
@@ -6,7 +6,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not exists( MacroPlan, PackagingPlanNewCapability, tempPPNC, true, tempPPNC.ProductionLine() = ddslProductionLine.Text() );
    return not exists( MacroPlan, PackagingPlanNewCapability, tempPPNC, true, tempPPNC.ProductionLine() = ddslFactory.Text() );
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlContent_ddslProductID_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: pnlContent/ddslProductID
Response OnCreated () id:Response_pnlContent_ddslProductID_OnCreated
{
  #keys: '[415754.0.415211358]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      pmpids := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.ID() );
      this.Strings( pmpids.Concatenate( ";" ) );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPackagingPlanNewCapability/Response_pnlContent_ddslProductionLine_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_DialogPackagingPlanCapability/Component_lstContent.def
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductionLine","title":"ProductionLine","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductionLine"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaximumDailyPackagingQuantity","title":"MaximumDailyPackagingQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaximumDailyPackagingQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaximumDailyUnpackingQuantity","title":"MaximumDailyUnpackingQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaximumDailyUnpackingQuantity"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Factory","title":"Factory","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Factory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaximumDailyPackagingQuantity","title":"MaximumDailyPackagingQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaximumDailyPackagingQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaximumDailyUnpackingQuantity","title":"MaximumDailyUnpackingQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaximumDailyUnpackingQuantity"}}]'
        ContextMenu: 'cmContent'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_MatrixEditor.def
@@ -46,7 +46,7 @@
          [
            DataType: 'LocalTable'
            FilterArguments: 'checkedProduct:QMacroPlanner::FormOfflinePlanChanges.dhFinelProduct'
            FixedFilter: 'exists( checkedProduct,Elements,product,product.ID() = object.Name() )'
            FixedFilter: 'exists( checkedProduct,Elements,product,product.ID() = object.ProductID())'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LocalRow'
_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bExport_OnClick.def
@@ -10,7 +10,7 @@
  {
    Body:
    [*
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,product,product.ID() = row.Name()) );
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,product,product.ID() = row.ProductID()));
      columns := selectset( dhTable.Data( ),LocalColumn,column,true );
      LocalCell_OfflinePlanComparison::AsyncExport( RecycleBin, rows, columns, MacroPlan );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def
@@ -29,7 +29,7 @@
          Properties:
          [
            DataType: 'RecycleBin'
            FixedFilter: 'object.Name() = MP_Cell_ScheduleSummary::GetTableName()'
            FixedFilter: 'object.Name() = MP_Cell_AnnualPlanReport::GetTableName()'
            Source: 'RecycleBin'
            Taborder: 0
            Transformation: 'ExportXMLManager'
@@ -39,16 +39,6 @@
      Properties:
      [
        Taborder: 1
      ]
    }
    Component bDownload id:bDownload_520
    {
      #keys: '[412672.1.111158091]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'DOWNLOAD'
        Taborder: 2
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def
@@ -10,7 +10,7 @@
    Body:
    [*
      rows := selectset( dhComparisonData854.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,entity,entity.ID() = row.ProductID()) and exists( dhFinelStockingPoint.Data(),Elements,entity,entity.DisplayName() = row.StockingPointID())); 
      columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
      columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data());
      LocalCell_Default::AsyncExport( RecycleBin,rows,columns );
      //Application.Download( "产出导入模板.xlsx",data.AsBinaryData() );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pExport/dhXMLDataListener_801
Response OnDataChanged () id:Response_pExport_dhXMLDataListener_OnDataChanged
{
  #keys: '[414996.1.140601534]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      if( not isnull( this.Data() )){
        binaryValue := dhXMLDataListener.Data( ).Export();
        Application.Download( MP_Cell_AnnualPlanReport::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        dhXMLDataListener.Data( ).Delete();
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def
@@ -13,7 +13,7 @@
      [
        DataBinding: 'dhBaseVersion.Data.Name'
        Label: '基准需求版本:'
        Taborder: 0
        Taborder: 1
      ]
    }
    Component ButtonDelete
@@ -24,7 +24,7 @@
      [
        Image: 'DELETE'
        Label: 'Delete'
        Taborder: 1
        Taborder: 0
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def
@@ -13,7 +13,7 @@
      [
        DataBinding: 'dhCompareVersion.Data.Name'
        Label: '对比需求版本:'
        Taborder: 0
        Taborder: 1
      ]
    }
    Component ButtonDelete2
@@ -24,7 +24,7 @@
      [
        Image: 'DELETE'
        Label: 'Delete'
        Taborder: 1
        Taborder: 0
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def
@@ -7,7 +7,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return isnull( dhBaseVersion.Data() ) or isnull( dhCompareVersion.Data() );
    return not isnull( dhBaseVersion.Data() ) and not isnull( dhCompareVersion.Data() );
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_MatrixEditor#988.def
@@ -46,7 +46,7 @@
          [
            DataType: 'LocalTable'
            FilterArguments: 'checkedProduct:QMacroPlanner::FormOfflinePlanComparison.dhFinelProduct'
            FixedFilter: 'exists( checkedProduct,Elements,product,product.ID() = object.Name() )'
            FixedFilter: 'exists( checkedProduct,Elements,product,product.ID() = object.ProductID())'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LocalRow'
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
@@ -48,7 +48,8 @@
      BaseType: 'WebLabel'
      Properties:
      [
        DataBinding: 'ddlOfflinePlanTable.Data.SaveDateTime'
        DataBinding: 'ddlOfflinePlanTable.Data.TableName'
        NumberOfColumns: 50
        Taborder: 4
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bExport_OnClick#891.def
@@ -10,7 +10,7 @@
  {
    Body:
    [*
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,product,product.ID() = row.Name()) );
      rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,product,product.ID() = row.ProductID()));
      columns := selectset( dhTable.Data( ),LocalColumn,column,true );
      LocalCell_ProductionComparison::AsyncExport( RecycleBin, rows, columns, MacroPlan );
    *]
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def
@@ -61,7 +61,6 @@
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        InitialValue: '大连工厂'
        Label: '工厂'
        Sorting: 'none'
        Strings: '大连工厂;长春工厂'
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: pHeader/ddslFactorySelection
Response OnCreated () id:Response_pHeader_ddslFactorySelection_OnCreated
{
  #keys: '[413988.1.1602019]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      this.Text( dhSelectedFactory.Data() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
@@ -9,11 +9,11 @@
  {
    Body:
    [*
      binaryValue := dhXMLDataListener.Data( ).Export();
      Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
      dhXMLDataListener.Data( ).Delete();
      if( not isnull( this.Data() )){
        binaryValue := dhXMLDataListener.Data( ).Export();
        Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        dhXMLDataListener.Data( ).Delete();
      }
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def
@@ -9,12 +9,16 @@
  {
    Body:
    [*
      traverse( dhXMLDataListener.Data(),Elements,element ){
        binaryValue := element.Export();
        Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
        element.Delete();
      try{
        traverse( dhXMLDataListener.Data(),Elements,element ){
          binaryValue := element.Export();
          Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
          element.Delete();
        }
      }onerror{
        traverse( dhXMLDataListener.Data(),Elements,element ){
          element.Delete();
        }
      }
    *]
    GroupServerCalls: false