From 7a687fce2b000f2c3414d757b78849921dcfade5 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期四, 10 十月 2024 17:55:55 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_PackagingPlanRow/Method_FilterProduct.qbl | 5
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl | 142 ++++++----
_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl | 3
_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl | 7
_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl | 4
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def | 45 +++
_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw | 10
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl | 14
_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl | 5
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp | 5
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def | 2
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl | 24
_Main/BL/Type_ChangeLossSetting/Function_CalcShowChangeLossNumber.qbl | 13 +
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl | 2
_Main/BL/Type_FinancialProductionRow/Method_Initialize#110.qbl | 2
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl | 24
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def | 12
_Main/BL/Type_EnginePipelineRow/Attribute_ShowName.qbl | 7
_Main/BL/Type_PackagingPlanRow/Function_CalcName.qbl | 2
_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQty.qbl | 8
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl | 9
_Main/BL/Type_FinancialProductionImportData/Function_CalcQuantity.qbl | 2
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl | 10
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_MatrixEditorTable.def | 2
_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl | 2
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_dhSelectedFactory_OnCreated.def | 16 +
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl | 4
_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_DLRentOtherCost.qbl | 8
_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl | 3
_Main/BL/Type_EnginePipelineRow/StaticMethod_CraeteCellValueForRow.qbl | 4
_Main/BL/Type_PackagingPlanCell/Function_CalcUnpackagedInventory.qbl | 3
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl | 32 +-
_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl | 6
_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl | 4
_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl | 22 +
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl | 2
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def | 1
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl | 4
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def | 11
_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl | 16
_Main/BL/Type_PackagingPlanCell/Attribute_CC_PackagingInventory.qbl | 8
_Main/BL/Type_ChangeLossSetting/Attribute_ShowChangeLossNumber.qbl | 7
_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_MatrixEditorTable.def | 2
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl | 1
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnUserSelectionChanged.def | 16 +
_Main/Sys/Repr/Global/MachiningPipelineCell.qrp | 8
/dev/null | 8
_Main/BL/Type_EnginePipelineReport/Method_GenerateNew.qbl | 180 +++++++++++++
_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl | 8
_Main/BL/Type_PackagingPlanCell/Attribute_CC_UnpackagedInventory.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def | 4
51 files changed, 578 insertions(+), 169 deletions(-)
diff --git a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
index ce8bc30..1d69434 100644
--- a/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -13,7 +13,10 @@
// 鎵捐閰嶇嚎琛�
oprs := selectsortedset( opt, OfflinePlanRow, tempOPR,
tempOPR.ProductionLine() = "DL MoMo"
- // or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM"
+ or
+ tempOPR.ProductionLine() = "CC MoMo"
+ or
+ tempOPR.ProductionLine() = "DL ZKM"
,
tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() );
opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() );
@@ -43,17 +46,17 @@
);
u := select( macroPlan, Unit, tempU, tempU.ID() = pl );
- drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "鎺掔┖", false ) );
- lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "閾虹嚎", false ) );
+ drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "鎷夌┖" ), false ) );
+ lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "閾虹嚎" ), false ) );
// 澶勭悊鎺掔┖
- info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊鎺掔┖--------------------------" );
+ info( "褰撳墠浜х嚎锛�", pl, " 澶勭悊鎷夌┖--------------------------" );
traverse ( drainPs, Elements, p ) {
traverse ( p, ExplicitTimeInterval, eti ) {
info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
// 鍓嶄竴澶╂棩鍘�
aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = ( eti.Start().Date() - 1 ) );
- info( "闇�瑕佹帓绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
+ info( "闇�瑕佹媺绌虹殑涓婄嚎璁″垝鏃堕棿锛�", aopc.ColumnDate().Format( "Y-M2-D2" ) );
aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
aopr := maxselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
@@ -70,6 +73,15 @@
traverse ( lineLyingPs, Elements, p ) {
traverse ( p, ExplicitTimeInterval, eti ) {
info( "寮�濮嬫椂闂达細", eti.Start().Format( "Y-M2-D2" ), " 缁撴潫鏃堕棿锛�", eti.End().Format( "Y-M2-D2" ) );
+ info( "闇�瑕侀摵绾跨殑涓婄嚎璁″垝鏃堕棿锛�", eti.Start().Format( "Y-M2-D2" ) );
+ aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = eti.Start().Date() );
+ aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
+ exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
+ aopr := minselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
+ [Number]tempAOPC.Value().ReplaceAll( "#0", "" ) );
+ cell := select( macroPlan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanRow().ProductionLine() = pl and tempAOPC.AssemblyOnlinePlanColumn() = aopc and
+ tempAOPC.AssemblyOnlinePlanRow().Type() = "1" and tempAOPC.AssemblyOnlinePlanRow().ProductID() = aopr.AssemblyOnlinePlanRow().ProductID() );
+ cell.Value( [String] ( [Number]cell.Value() + targetQuantity ) );
}
}
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQty.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQty.qbl
new file mode 100644
index 0000000..1467ced
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CCRentQty
+{
+ #keys: '3[415136.0.1184074701][415136.0.1184074700][415136.0.1184074702]'
+ Description: '闀挎槬澶栫搴撴暟閲�'
+ ValueType: Real
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQuantity.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQuantity.qbl
deleted file mode 100644
index cfd2692..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_CCRentQuantity.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute CCRentQuantity
-{
- #keys: '3[415136.0.1160164759][415136.0.1160164758][415136.0.1160164760]'
- Description: '闀挎槬澶栫搴撴暟閲�'
- ValueType: Number
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_DLRentOtherCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_DLRentOtherCost.qbl
new file mode 100644
index 0000000..84c8e7d
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_DLRentOtherCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DLRentOtherCost
+{
+ #keys: '3[415136.0.1184074682][415136.0.1184074681][415136.0.1184074683]'
+ Description: '澶ц繛澶栫搴撳叾浠栬垂鐢�'
+ ValueType: Real
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl
index d9421bb..1e59ade 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl
@@ -4,10 +4,10 @@
{
TextBody:
[*
- // 鐢勫叞楦� Aug-12-2024 (created)
+ // 鐢勫叞楦� Aug-12-2024 (created)
value := this.CCRentInCost() + this.CCRentOutOfCost() + this.CCLongTransCost() + this.CCShorTransCost() + this.CCRentStorCost()
- + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost()
+ + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost()
this.EstimateTotalCost( value );
*]
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
index 8d773b6..305d174 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
@@ -107,31 +107,31 @@
}
//澶栫搴撳叆搴撹垂鐢�
rententercostcellElement := xmlDOM.CreateElement( "cell" );
- rententercostcellElement.SetAttribute( "value", [String]c.RentInCost() );
+ rententercostcellElement.SetAttribute( "value", c.RentInCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( rententercostcellElement );
//澶栫搴撳嚭搴撹垂鐢�
rentoutcostcellElement := xmlDOM.CreateElement( "cell" );
- rentoutcostcellElement.SetAttribute( "value", [String]c.RentOutOfCost() );
+ rentoutcostcellElement.SetAttribute( "value", c.RentOutOfCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( rentoutcostcellElement );
//鍘傚唴鍒板绉熷簱杩愯緭璐圭敤
factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
- factorytorenttranscostcellElement.SetAttribute( "value", [String]c.WerkToRentTransCost() );
+ factorytorenttranscostcellElement.SetAttribute( "value", c.WerkToRentTransCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( factorytorenttranscostcellElement );
//澶栫搴撲粨鍌ㄨ垂鐢�
rentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
- rentstoragecostcellElement.SetAttribute( "value", [String]c.RentStorCost() );
+ rentstoragecostcellElement.SetAttribute( "value", c.RentStorCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( rentstoragecostcellElement );
//棰勮鎬昏垂鐢�
estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
- estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimateTotalCost() );
+ estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( estimatedtotalcostcellElement );
//绯绘暟
coefficientcellElement := xmlDOM.CreateElement( "cell" );
- coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() );
+ coefficientcellElement.SetAttribute( "value", c.Coefficient().Format( 'N(Dec)' ) );
columnelement.AppendChild( coefficientcellElement );
//鎬昏垂鐢�
totalcostcellElement := xmlDOM.CreateElement( "cell" );
- totalcostcellElement.SetAttribute( "value", [String]c.AllCost() );
+ totalcostcellElement.SetAttribute( "value", c.AllCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( totalcostcellElement );
}
tableElement.AppendChild( columnelement );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index 69c2ade..3f5377f 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -154,7 +154,7 @@
if( not isnull( enginecost ) ){
periodtime := pispip.Start().StartOfMonth().Date();
periodname := periodtime.Format( "M2/D2/Y" );
- quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+ quantity := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
index 977a5d1..dae30bc 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
@@ -147,51 +147,51 @@
}
//闀挎槬澶栫搴撳叆搴撹垂鐢�
ccrententercostcellElement := xmlDOM.CreateElement( "cell" );
- ccrententercostcellElement.SetAttribute( "value", [String]c.CCRentInCost() );
+ ccrententercostcellElement.SetAttribute( "value", c.CCRentInCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( ccrententercostcellElement );
//闀挎槬澶栫搴撳嚭搴撹垂鐢�
ccrentoutcostcellElement := xmlDOM.CreateElement( "cell" );
- ccrentoutcostcellElement.SetAttribute( "value", [String]c.CCRentOutOfCost() );
+ ccrentoutcostcellElement.SetAttribute( "value", c.CCRentOutOfCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( ccrentoutcostcellElement );
//闀挎槬闀块�旇繍杈撹垂鐢�
cclongtranscostcellElement := xmlDOM.CreateElement( "cell" );
- cclongtranscostcellElement.SetAttribute( "value", [String]c.CCLongTransCost() );
+ cclongtranscostcellElement.SetAttribute( "value", c.CCLongTransCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( cclongtranscostcellElement );
//闀挎槬鐭�旇繍杈撹垂鐢�
ccshorttranscostcellElement := xmlDOM.CreateElement( "cell" );
- ccshorttranscostcellElement.SetAttribute( "value", [String]c.CCShorTransCost() );
+ ccshorttranscostcellElement.SetAttribute( "value", c.CCShorTransCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( ccshorttranscostcellElement );
//闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�
ccrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
- ccrentstoragecostcellElement.SetAttribute( "value", [String]c.CCRentStorCost() );
+ ccrentstoragecostcellElement.SetAttribute( "value", c.CCRentStorCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( ccrentstoragecostcellElement );
//澶ц繛澶栫搴撳叆搴撹垂鐢�
dlrententercostcellElement := xmlDOM.CreateElement( "cell" );
- dlrententercostcellElement.SetAttribute( "value", [String]c.DLRentInCost() );
+ dlrententercostcellElement.SetAttribute( "value", c.DLRentInCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( dlrententercostcellElement );
//澶ц繛澶栫搴撳嚭搴撹垂鐢�
dlrentoutcostcellElement := xmlDOM.CreateElement( "cell" );
- dlrentoutcostcellElement.SetAttribute( "value", [String]c.DLRentOutOfCost() );
+ dlrentoutcostcellElement.SetAttribute( "value", c.DLRentOutOfCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( dlrentoutcostcellElement );
//鍘傚唴鍒板绉熷簱杩愯緭璐圭敤
factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
- factorytorenttranscostcellElement.SetAttribute( "value", [String]c.WerkToDLRentTransCost() );
+ factorytorenttranscostcellElement.SetAttribute( "value", c.WerkToDLRentTransCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( factorytorenttranscostcellElement );
//澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�
dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
- dlrentstoragecostcellElement.SetAttribute( "value", [String]c.DLRentStorCost() );
+ dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentStorCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( dlrentstoragecostcellElement );
//棰勮鎬昏垂鐢�
estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
- estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimateTotalCost() );
+ estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( estimatedtotalcostcellElement );
//绯绘暟
coefficientcellElement := xmlDOM.CreateElement( "cell" );
- coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() );
+ coefficientcellElement.SetAttribute( "value", c.Coefficient().Format( 'N(Dec)' ) );
columnelement.AppendChild( coefficientcellElement );
//鎬昏垂鐢�
totalcostcellElement := xmlDOM.CreateElement( "cell" );
- totalcostcellElement.SetAttribute( "value", [String]c.AllCost() );
+ totalcostcellElement.SetAttribute( "value", c.AllCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( totalcostcellElement );
}
tableElement.AppendChild( columnelement );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
index bb63502..fe1aaa7 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
@@ -62,7 +62,7 @@
if( not isnull( enginecost ) ){
products.Add( product );
cell := selectobject( row, Cell, cell, cell.Column() = column );
- cell.CCRentQuantity( cell.CCRentQuantity() + quantity );
+ cell.CCRentQty( cell.CCRentQty() + quantity );
//闀挎槬澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环
entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
//闀挎槬澶栫搴撳嚭搴撹垂鐢�: 鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index 47d9f59..aa66e0d 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -35,11 +35,11 @@
traverse( owner, StockingPoint_MP, stockingpoint, stockingpoint.ID().EndsWith( '澶栫搴�' ) ){
// unit := stockingpoint.Unit();
// parentunits := unit.GetAllParent();
- //鏄惁灞炰簬闀挎槬澶栫搴�
+ //鏄惁灞炰簬闀挎槬澶栫搴撶敤浜庨暱鏄ュ绉熷簱浠撳偍璐圭敤
isccrent := stockingpoint.ID().StartsWith( '闀挎槬' ) or stockingpoint.ID().StartsWith( 'CC' );
- //鏄惁灞炰簬澶ц繛鍙戝姩鏈虹殑闀挎槬澶栫搴�
+ //鏄惁灞炰簬澶ц繛鍙戝姩鏈虹殑闀挎槬澶栫搴撶敤浜庨暱鏄ュ叆搴�/鍑哄簱璐圭敤
isdltoccrent := stockingpoint.ID().StartsWith( '澶ц繛鍙戝姩鏈虹殑闀挎槬' );
- //鏄惁灞炰簬澶ц繛澶栫搴�
+ //鏄惁灞炰簬澶ц繛澶栫搴撶敤浜庡ぇ杩炲绉熷簱浠撳偍璐圭敤
isdlrent := stockingpoint.ID().StartsWith( '澶ц繛' ) or stockingpoint.ID().StartsWith( 'DL' );
if( isccrent or isdlrent ){
traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf()
@@ -63,16 +63,15 @@
enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
and engine.Factory() = ccfactory );
if( not isnull( enginecost ) ){
- quantity := [Number]pispip.NewSupplyQuantity();
if( isccrent ){
- cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
- cell.CCRentStorCost( cell.CCRentStorCost() + cost );
+ cost := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+ cell.CCRentStorCost( cell.CCRentStorCost() + cost );//闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�
}else{
- cell.CCRentQuantity( cell.CCRentQuantity() + quantity );
- //闀挎槬澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环
- entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+ cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() );
+ //闀挎槬澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环
+ entercost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
//闀挎槬澶栫搴撳嚭搴撹垂鐢�: 鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环
- outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice();
+ outcost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice();
cell.CCRentInCost( cell.CCRentInCost() + entercost );
cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost );
}
@@ -82,8 +81,8 @@
enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
and engine.Factory() = dlfactory );
if( not isnull( enginecost ) ){
- cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
- cell.DLRentStorCost( cell.DLRentStorCost() + cost );
+ cost := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+ cell.DLRentStorCost( cell.DLRentStorCost() + cost );//澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�
}
}
}
@@ -242,18 +241,23 @@
enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower()
and engine.MLB_MQB() = product.MQBMLB()
and engine.Factory() = ccfactory );
+ //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+ transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = '闀挎槬澶栫搴�'
+ and trans.Destination() = '瀹㈡埛搴�'
+ and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) );
if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
products.Add( forecast.Product_MP() );
row := table.GetRow( forecast.ProductID() );
traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){
enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() );
+ transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= psdip.StartDate() and trans.EndDate() >= psdip.StartDate() );
if( not isnull( enginecost ) ){
periodtime := psdip.StartDate().StartOfMonth();
periodname := periodtime.Format( "M2/D2/Y" );
// info( '-------------------------', periodname, periodtime );
column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
// info( '-------------------------', column.Name() );
- cost := ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+ cost := ceil( ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
cell := selectobject( row, Cell, cell, cell.Column() = column );
cell.CCShorTransCost( cell.CCShorTransCost() + cost );
}
@@ -269,7 +273,7 @@
e.RowNr( i );
i := i + 1;
}
- info( '-------------------------------------end---------------------------------' );
+ info( '-------------------------------------end----------------------------------' );
//
showtable.Generate( search, products );
*]
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
index 691a01c..8445a49 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
@@ -8,13 +8,15 @@
{
TextBody:
[*
- // 鐢勫叞楦� Jun-24-2024 (created)
+ // 鐢勫叞楦� Jun-24-2024 (created)
cell := selectobject( this, Cell, cell, cell.Column() = column );
- quantity := [Number]fpcell.Value() - cell.CCRentQuantity();
+ quantity := fpcell.Quantity() - cell.CCRentQty();
//鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+ othercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OtherPrice();
value := cell.DLRentInCost() + cost;
cell.DLRentInCost( value );
+ cell.DLRentOtherCost( cell.DLRentOtherCost() + othercost );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
index 50f77e6..2c253f0 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
@@ -10,7 +10,7 @@
[*
// 鐢勫叞楦� Jun-24-2024 (created)
cell := selectobject( this, Cell, cell, cell.Column() = column );
- quantity := [Number]fscell.Value() - cell.CCRentQuantity();
+ quantity := [Number]fscell.Value() - cell.CCRentQty();
//鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
index f17862c..9a3cdd1 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -38,7 +38,7 @@
and tempLCMR.StartDate() <= ccerc.StartDate() and tempLCMR.EndDate() >= ccerc.StartDate().StartOfNextMonth() );
// 杩愯緭鎴愭湰鍙傛暟
- lct := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "鍙戝姩鏈�" and tempLCT.Origin() = "CC 鍘傚唴搴�" and tempLCT.Destination() = "闀挎槬澶栫搴�" );
+ lct := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "鍙戝姩鏈烘枡鏋�" and tempLCT.Origin() = "闀挎槬澶栫搴�" and tempLCT.Destination() = "CC 鍘傚唴搴�" );
// 褰撳墠鏈堟湯鏈�鍚庝竴澶╂棩鏈�
lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1;
@@ -65,6 +65,7 @@
tempFSID.StartDate().Year() = ccerc.StartDate().Year() and
tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
tempFSID.Quantity() );
+
cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) );
// 澶栫搴撳嚭搴撹垂鐢紙鍙戝姩鏈轰骇閲� / 鍖呰瀹归噺[鍚戜笂鍙栨暣] * 鏂欐灦鍑哄簱鍗曚环锛�
@@ -87,6 +88,7 @@
tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = "闀挎槬澶栫搴�",
tempPIT.Quantity()
);
+ // info( "鏃堕棿锛�", ccerc.StartDate().Format( "Y-M2-D2" ), " 杩愯緭鏁版嵁锛�", transportationQuantity, " 杩愯緭鍗曚环锛�", lct.TransportPrice() );
cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) );
// 澶栫搴撲粨鍌ㄨ垂鐢細鏂欐灦鎬绘暟閲� - 鍙戝姩鏈哄簱瀛� / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級锛屽啀涔樹互绌烘枡鏋朵粨鍌ㄥ崟浠峰緱鍒扮┖鏂欐灦浠撳偍璐圭敤銆傚彂鍔ㄦ満搴撳瓨鍙朅ctual inventories閲屽彇鍒伴暱鏄ュ绉熷簱璇ュ彂鍔ㄦ満鐨勪粨鍌ㄩ噺锛屾枡鏋舵�绘暟閲忛渶瑕佹墜鍔ㄧ淮鎶ゃ��
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
index 1f82c2f..8ce70a3 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
@@ -16,7 +16,7 @@
firstColumn := xmlDOM.CreateElement( "column" );
firstName := xmlDOM.CreateElement( "name" );
firstType := xmlDOM.CreateElement( "type" );
- firstName.TextContent( "" );
+ firstName.TextContent( "*" );
firstType.TextContent( "String" );
firstColumn.AppendChild( firstName );
firstColumn.AppendChild( firstType );
@@ -40,7 +40,7 @@
secondColumn := xmlDOM.CreateElement( "column" );
secondName := xmlDOM.CreateElement( "name" );
secondType := xmlDOM.CreateElement( "type" );
- secondName.TextContent( "" );
+ secondName.TextContent( "*" );
secondType.TextContent( "String" );
secondColumn.AppendChild( secondName );
secondColumn.AppendChild( secondType );
@@ -66,43 +66,43 @@
cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Name() );
traverse ( cells, Elements, c ) {
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks() ); // 鏂欐灦鎬绘暟閲�
+ cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // 鏂欐灦鎬绘暟閲�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves() ); // 绌烘枡鏋舵暟閲�
+ cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // 绌烘枡鏋舵暟閲�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses() ); // 澶栫搴撳叆搴撹垂鐢�
+ cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses().Round( 0 ) ); // 澶栫搴撳叆搴撹垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses() ); // 澶栫搴撳嚭搴撹垂鐢�
+ cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses().Round( 0 ) ); // 澶栫搴撳嚭搴撹垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts() ); // 澶栫搴撹繍杈撹垂鐢�
+ cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // 澶栫搴撹繍杈撹垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees() ); // 澶栫搴撲粨鍌ㄨ垂鐢�
+ cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees().Round( 0 ) ); // 澶栫搴撲粨鍌ㄨ垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.CleaningCost() ); // 娓呮礂璐圭敤
+ cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // 娓呮礂璐圭敤
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.EstimatedTotalCost() ); // 棰勮鎬昏垂鐢�
+ cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // 棰勮鎬昏垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.Coefficient() ); // 绯绘暟
+ cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // 绯绘暟
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.TotalCost() ); // 鎬昏垂鐢�
+ cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // 鎬昏垂鐢�
cellColumn.AppendChild( cell );
}
tableElement.AppendChild( cellColumn );
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
new file mode 100644
index 0000000..ab510db
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Import (
+ MacroPlan macroPlan,
+ GeneralExcelImportAndExportDataTable table
+)
+{
+ TextBody: '//traverse ('
+}
diff --git a/_Main/BL/Type_ChangeLossSetting/Attribute_ShowChangeLossNumber.qbl b/_Main/BL/Type_ChangeLossSetting/Attribute_ShowChangeLossNumber.qbl
new file mode 100644
index 0000000..d4aa014
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSetting/Attribute_ShowChangeLossNumber.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ShowChangeLossNumber
+{
+ #keys: '3[415136.0.1184074662][415136.0.1184074661][415136.0.1184074663]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_ChangeLossSetting/Function_CalcShowChangeLossNumber.qbl b/_Main/BL/Type_ChangeLossSetting/Function_CalcShowChangeLossNumber.qbl
new file mode 100644
index 0000000..4cf78cc
--- /dev/null
+++ b/_Main/BL/Type_ChangeLossSetting/Function_CalcShowChangeLossNumber.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcShowChangeLossNumber
+{
+ TextBody:
+ [*
+ // 鐢勫叞楦� Oct-10-2024 (created)
+
+ value := [String]this.ChangeLossNumber();
+
+ this.ShowChangeLossNumber( value );
+ *]
+}
diff --git a/_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl b/_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
index ebd5300..892d832 100644
--- a/_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
+++ b/_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
@@ -29,13 +29,15 @@
feedback := Translations::MP_LibCal_Event_ValidDatePeriod();
}
if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and not ( cls.StartDate() > enddate or cls.EndDate() < startdate )
- and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 )
- or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
+ and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){
+ // and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 )
+ // or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
feedback := Translations::MP_ChangeLossSetting_Exist()
}
if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and not ( cls.StartDate() > enddate or cls.EndDate() < startdate )
- and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 )
- or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
+ and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){
+ // and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 )
+ // or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
feedback := Translations::MP_ChangeLossSetting_DateCoincide()
}
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
index cd19c53..5d5baa7 100644
--- a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
+++ b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
@@ -23,13 +23,13 @@
models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() );
cellnr := 5 + models.Size();
//鍚堣琛�
- sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '鐢熶骇', rows.Size() * cellnr, true );
+ sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '鎬讳骇閲�', rows.Size() * cellnr, true );
sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '澶ц繛浜ч噺', sumrowproduction.RowNr() + 1, false );
sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '闀挎槬浜ч噺', sumrowproduction.RowNr() + 2, false );
- sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '闇�姹�', sumrowproduction.RowNr() + 3, false );
+ sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '鎬婚渶姹�', sumrowproduction.RowNr() + 3, false );
rowno := sumrowproduction.RowNr() + 4;
traverse( models, Elements, model ){
- EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model, rowno, false );
+ EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( '闇�姹�' ), rowno, false );
rowno := rowno + 1;
}
sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '搴撳瓨', rowno, false );
@@ -38,10 +38,10 @@
rownr := 0;
traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){
- showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '鐢熶骇', rownr, true );;
+ showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '鎬荤敓浜�', rownr, true );;
showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '澶ц繛浜ч噺', rownr + 1, false );
showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '闀挎槬浜ч噺', rownr + 2, false );
- showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '闇�姹�', rownr + 3, false );
+ showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '鎬婚渶姹�', rownr + 3, false );
rownr := rownr + 4;
modelsnr := rownr + 3;
models := construct( Strings );
@@ -50,7 +50,7 @@
traverse( uniquemodels, Elements, e ){
if( rownr < modelsnr ){
- EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e, rownr, false );
+ EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( '闇�姹�' ), rownr, false );
models.Add( e );
rownr := rownr + 1;
}
@@ -114,8 +114,8 @@
sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) );
traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){
- demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) );
- sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) );
+ demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '闇�姹�' ) ) );
+ sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '闇�姹�' ) ) );
if( not isnull( demandrow ) ){
demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() );
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
index f579568..fa38c09 100644
--- a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
@@ -29,10 +29,9 @@
}
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
- periodname := start.Format( "M2/D2/Y" );
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
- this.Column( relnew, Name := periodname, StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}
}
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_GenerateNew.qbl b/_Main/BL/Type_EnginePipelineReport/Method_GenerateNew.qbl
new file mode 100644
index 0000000..43b285e
--- /dev/null
+++ b/_Main/BL/Type_EnginePipelineReport/Method_GenerateNew.qbl
@@ -0,0 +1,180 @@
+Quintiq file version 2.0
+#parent: #root
+Method GenerateNew (
+ EnginePipelineSearch search,
+ Product_MPs products
+)
+{
+ TextBody:
+ [*
+ // 鐢勫叞楦� Jun-25-2024 (created)
+ table := selectobject( this, Source.Report, report, not report.IsShow() );
+ //娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
+ this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() );
+ Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) );
+ Transaction::Transaction().Propagate( attribute( EnginePipelineCell, ProductionQuantity ) );
+ Transaction::Transaction().Propagate( attribute( EnginePipelineCell, DemandQuantity ) );
+ //杩囨护鍚庣殑浜у搧id
+ productids := selectuniquevalues( products, Elements, product, true, product.ID() );
+ rows := selectsortedset( table, Row, row, row.RowNr() );
+ //鏄剧ず鍒�
+ productcolumn := selectobject( this, Column, column, column.Index() = 0 );
+ attricolumn := selectobject( this, Column, column, column.Index() = 1 );
+ models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() );
+ cellnr := 5 + models.Size();
+ //鍚堣琛�
+ sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '鎬讳骇閲�', rows.Size() * cellnr, true );
+ sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '澶ц繛浜ч噺', sumrowproduction.RowNr() + 1, false );
+ sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '闀挎槬浜ч噺', sumrowproduction.RowNr() + 2, false );
+ sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '鎬婚渶姹�', sumrowproduction.RowNr() + 3, false );
+ rowno := sumrowproduction.RowNr() + 4;
+ traverse( models, Elements, model ){
+ EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( '闇�姹�' ), rowno, false );
+ rowno := rowno + 1;
+ }
+ sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '搴撳瓨', rowno, false );
+
+ //琛岃鏁�
+ rownr := 0;
+ traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){
+
+ //浜у搧鏄剧ず琛�
+ showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '鎬荤敓浜�', rownr, true );;
+ showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '澶ц繛浜ч噺', rownr + 1, false );
+ showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '闀挎槬浜ч噺', rownr + 2, false );
+ showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '鎬婚渶姹�', rownr + 3, false );
+ rownr := rownr + 4;
+ modelsnr := rownr + 3;
+ models := construct( Strings );
+ uniquemodels := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() );
+ //闇�姹傛樉绀�
+ traverse( uniquemodels, Elements, e ){
+
+ if( rownr < modelsnr ){
+ EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( '闇�姹�' ), rownr, false );
+ models.Add( e );
+ rownr := rownr + 1;
+ }
+ }
+ //绌洪渶姹傝ˉ鍏�
+ for( rownr := rownr; rownr < modelsnr; rownr ++ ){
+
+ EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '', rownr, false );
+ }
+ showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '搴撳瓨', rownr, false );
+
+ // traverse( this, Column, column ){
+ // //鏌ヨ鏃堕棿绫诲瀷涓篸ay鐨勫崟鍏冩牸
+ // daycells := selectset( row, Cell, daycell, daycell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() and
+ // cell.Column().StartDate() >= column.StartDate() and
+ // cell.Column().StartDate() <= column.EndaDate() );
+ traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
+
+ column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() );
+
+ if( not isnull( column ) ){
+
+ //鐢熶骇
+ production := column.CellValue( relnew, Value := [String]cell.ProductionQuantity() );
+ showrowproduction.CellValue( relinsert, production );
+ sumproduction := selectobject( column, CellValue, c, c.Row() = sumrowproduction );
+
+ if( isnull( sumproduction ) ){
+ sumproduction := column.CellValue( relnew, Value := [String]0 );
+ sumrowproduction.CellValue( relinsert, sumproduction );
+ }
+ sumproduction.Value( [String]( [Real]sumproduction.Value() + cell.ProductionQuantity() ) );
+
+ //澶ц繛浜ч噺
+ dlproductionquantity := guard( cell.Production().DLProduction(), 0 );
+ dlproduction := column.CellValue( relnew, Value := [String]dlproductionquantity );
+ showrowdlproduction.CellValue( relinsert, dlproduction );
+ sumdlproduction := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction );
+
+ if( isnull( sumdlproduction ) ){
+ sumdlproduction := column.CellValue( relnew, Value := [String]0 );
+ sumrowdlproduction.CellValue( relinsert, sumdlproduction );
+ }
+ sumdlproduction.Value( [String]( [Real]sumdlproduction.Value() + dlproductionquantity ) );
+
+ //闀挎槬浜ч噺
+ ccproductionquantity := guard( cell.Production().CCProduction(), 0 );
+ ccproduction := column.CellValue( relnew, Value := [String]ccproductionquantity );
+ showrowccproduction.CellValue( relinsert, ccproduction );
+ sumccproduction := selectobject( column, CellValue, c, c.Row() = sumrowccproduction );
+
+ if( isnull( sumccproduction ) ){
+ sumccproduction := column.CellValue( relnew, Value := [String]0 );
+ sumrowccproduction.CellValue( relinsert, sumccproduction );
+ }
+ sumccproduction.Value( [String]( [Real]sumccproduction.Value() + ccproductionquantity ) );
+
+ //闇�姹�
+ totaldemand := column.CellValue( relnew, Value := [String]cell.DemandQuantity() );
+ showrowdemand.CellValue( relinsert, totaldemand );
+ sumdemand := selectobject( column, CellValue, c, c.Row() = sumrowdemand );
+ if( isnull( sumdemand ) ){
+ sumdemand := column.CellValue( relnew, Value := [String]0 );
+ sumrowdemand.CellValue( relinsert, sumdemand );
+ }
+ sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) );
+
+ traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){
+ demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '闇�姹�' ) ) );
+ sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '闇�姹�' ) ) );
+
+ if( not isnull( demandrow ) ){
+ demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() );
+ demandrow.CellValue( relinsert, demandcell );
+ }
+ if( not isnull( sumdemandrow ) ){
+ sumdemandcell := selectobject( column, CellValue, c, c.Row() = sumdemandrow );
+ if( isnull( sumdemandcell ) ){
+ sumdemandcell := column.CellValue( relnew, Value := [String]0 );
+ sumdemandrow.CellValue( relinsert, sumdemandcell );
+ }
+ sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demand.Quantity() ) );
+ }
+ }
+
+ for( demandr := showrowdemand.RowNr() + 1; demandr < showrowinventory.RowNr(); demandr := demandr + 1 ){
+ demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = row.Name() );
+ if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){
+ demandcell := column.CellValue( relnew, Value := '' );
+ demandrow.CellValue( relinsert, demandcell );
+ }
+ }
+
+
+ //搴撳瓨
+ inventory := column.CellValue( relnew, Value := [String]cell.InventoryQuantity() );
+ showrowinventory.CellValue( relinsert, inventory );
+ suminventory := selectobject( column, CellValue, c, c.Row() = sumrowinventory );
+ if( isnull( suminventory ) ){
+ suminventory := column.CellValue( relnew, Value := [String]0 );
+ sumrowinventory.CellValue( relinsert, suminventory );
+ }
+ suminventory.Value( [String]( [Real]suminventory.Value() + cell.InventoryQuantity() ) );
+
+ }
+ }
+ }
+ traverse( this, Column, column ){
+ for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){
+ demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = 'SUM' );
+ // info( '------------------14----------------' );
+ if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){
+ demandcell := column.CellValue( relnew, Value := '' );
+ demandrow.CellValue( relinsert, demandcell );
+ }
+ }
+ }
+
+ rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() );
+ i := 0;
+ traverse( rows, Elements, e ){
+ e.RowNr( i );
+ i := i + 1;
+ }
+ *]
+}
diff --git a/_Main/BL/Type_EnginePipelineRow/Attribute_ShowName.qbl b/_Main/BL/Type_EnginePipelineRow/Attribute_ShowName.qbl
new file mode 100644
index 0000000..bfdefe3
--- /dev/null
+++ b/_Main/BL/Type_EnginePipelineRow/Attribute_ShowName.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ShowName
+{
+ #keys: '3[415136.0.1185710016][415136.0.1185710015][415136.0.1185710017]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_EnginePipelineRow/StaticMethod_CraeteCellValueForRow.qbl b/_Main/BL/Type_EnginePipelineRow/StaticMethod_CraeteCellValueForRow.qbl
index bef755c..98c8ffe 100644
--- a/_Main/BL/Type_EnginePipelineRow/StaticMethod_CraeteCellValueForRow.qbl
+++ b/_Main/BL/Type_EnginePipelineRow/StaticMethod_CraeteCellValueForRow.qbl
@@ -21,6 +21,10 @@
acell := attricolumn.CellValue( relnew, Value := attriname );
row.CellValue( relinsert, pcell );
row.CellValue( relinsert, acell );
+ traverse( table, Column, column, column.Index() > 1 ){
+ cell := column.CellValue( relnew, Value := '0' );
+ row.CellValue( relinsert, cell );
+ }
return row;
*]
}
diff --git a/_Main/BL/Type_FinancialProductionImportData/Function_CalcQuantity.qbl b/_Main/BL/Type_FinancialProductionImportData/Function_CalcQuantity.qbl
index eb3e7a1..9dc13b7 100644
--- a/_Main/BL/Type_FinancialProductionImportData/Function_CalcQuantity.qbl
+++ b/_Main/BL/Type_FinancialProductionImportData/Function_CalcQuantity.qbl
@@ -6,7 +6,7 @@
[*
// 鐢勫叞楦� Aug-8-2024 (created)
- value := guard( [Number]this.Cell().Value(), 0 );
+ value := guard( [Number]this.Cell().Quantity(), 0 );
this.Quantity( value );
*]
diff --git "a/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl" "b/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
index bdd6e85..5662263 100644
--- "a/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
+++ "b/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
@@ -13,7 +13,7 @@
cell := column.FinancialProductionCell( relnew, Quantity := 0 );
this.FinancialProductionCell( relinsert, cell );
- if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){
+ if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay()){
importdata := product.MacroPlan().FPImportData( relnew, Generation := product.Generation()
, MqbMlb := product.MQBMLB()
, Power := product.Power()
diff --git a/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl b/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
index 658b23c..a6d4f72 100644
--- a/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
+++ b/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
@@ -10,10 +10,10 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- cell := column.FinancialSalesCell( relnew, Value := '' );
+ cell := column.FinancialSalesCell( relnew, Value := '0' );
this.FinancialSalesCell( relinsert, cell );
- if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){
+ if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay() ){
importdata := product.MacroPlan().FSImportData( relnew, Generation := product.Generation()
, MqbMlb := product.MQBMLB()
, Power := product.Power()
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
index 4afd265..5d0c8a8 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -9,6 +9,7 @@
[*
// 鐢勫叞楦� Jun-24-2024 (created)
owner.FinancialSalesSource( relflush );
+ owner.FSImportData( relflush );
products := construct( Product_MPs );
allunit := FinancialSalesReport::GetDefaultAllUnit();
ccunit := FinancialSalesReport::GetDefaultCCUnit();
diff --git a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
index 3af1676..257071d 100644
--- a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
@@ -28,16 +28,17 @@
this.InventorySummaryColumn( relnew, Name := periodname, StartDate := periodtime, EndaDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() );
}
}else if( timeunit = Translations::MP_GlobalParameters_Week() ){
+ weekstartstr := ' KW';
for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
- this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}else if( timeunit = Translations::MP_GlobalParameters_Month() ){
for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){
monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();
- this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
+ this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM" ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
}
}
}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
index a1b13f7..dd97f73 100644
--- a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -47,10 +47,10 @@
products.Add( pisp.Product_MP() );
period := pispip.Period_MP();
periodtime := period.Start().Date();
- periodname := periodtime.Format( "M2/D2/Y" );
+ // periodname := periodtime.Format( "M2/D2/Y" );
//澶╋紝閫夋嫨鏃ラ绮掑害鏃讹紝鏈熸湯搴撳瓨锛屾渶灏忓簱瀛橈紝鏈�澶у簱瀛樺拰骞冲潎搴撳瓨鐨勬暟鍊间繚鎸佷竴鑷�
- daycolumn := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.StartDate() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() );
+ daycolumn := selectobject( table, InventorySummaryColumn, column, column.StartDate() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() );
quantity := ifexpr( pispip.Period_MP().IsHistorical(), [Number]pispip.ActualInventoryLevelEnd(), [Number]pispip.PlannedInventoryLevelEnd() );
factoryrow.SetCellValue( daycolumn, quantity );
allrow.SetCellValue( daycolumn, quantity );
diff --git a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
index a421f47..2bac9e3 100644
--- a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
@@ -30,10 +30,9 @@
}
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
- periodname := start.Format( "M2/D2/Y" );
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
- this.Column( relnew, Name := periodname, StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}
}
diff --git a/_Main/BL/Type_PackagingPlanCell/Attribute_CC_PackagingInventory.qbl b/_Main/BL/Type_PackagingPlanCell/Attribute_CC_PackagingInventory.qbl
new file mode 100644
index 0000000..0cd9269
--- /dev/null
+++ b/_Main/BL/Type_PackagingPlanCell/Attribute_CC_PackagingInventory.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CC_PackagingInventory
+{
+ #keys: '3[415754.0.351286657][415754.0.351286656][415754.0.351286658]'
+ Description: '闀挎槬宸ュ巶鍖呰搴撳瓨'
+ ValueType: Real
+}
diff --git a/_Main/BL/Type_PackagingPlanCell/Attribute_CC_UnpackagedInventory.qbl b/_Main/BL/Type_PackagingPlanCell/Attribute_CC_UnpackagedInventory.qbl
new file mode 100644
index 0000000..99356b8
--- /dev/null
+++ b/_Main/BL/Type_PackagingPlanCell/Attribute_CC_UnpackagedInventory.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CC_UnpackagedInventory
+{
+ #keys: '3[415754.0.351197962][415754.0.351197961][415754.0.351197963]'
+ Description: '闀挎槬宸ュ巶闈炲寘瑁呭簱瀛�'
+ ValueType: Real
+}
diff --git a/_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl b/_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl
index 37445f4..628ac49 100644
--- a/_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl
+++ b/_Main/BL/Type_PackagingPlanCell/Function_CalcPackagingInventory.qbl
@@ -6,11 +6,13 @@
[*
// lihongji Jul-26-2024 (created)
- value := this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() +
- guard( this.Previous().Package(), 0.0 ) -
+ value := ifexpr( this.PackagingPlanRow().Factory() = "闀挎槬宸ュ巶", this.CC_PackagingInventory(),
+ this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() +
+ guard( this.Package(), 0.0 ) -
ifexpr( this.TransferIn() > 0.0, 0, this.Unpacking() ),
0.0 )
- - this.Out();
+ - this.Out()
+ );
this.PackagingInventory( value );
*]
diff --git a/_Main/BL/Type_PackagingPlanCell/Function_CalcUnpackagedInventory.qbl b/_Main/BL/Type_PackagingPlanCell/Function_CalcUnpackagedInventory.qbl
index f1ca4e3..68d9aa1 100644
--- a/_Main/BL/Type_PackagingPlanCell/Function_CalcUnpackagedInventory.qbl
+++ b/_Main/BL/Type_PackagingPlanCell/Function_CalcUnpackagedInventory.qbl
@@ -6,7 +6,8 @@
[*
// lihongji Jul-24-2024 (created)
- value := guard( this.EndingInventory() - this.PackagingInventory(), 0.0 );
+ value := ifexpr( this.PackagingPlanRow().Factory() = "闀挎槬宸ュ巶", this.CC_UnpackagedInventory(),
+ guard( this.EndingInventory() - this.PackagingInventory(), 0.0 ) );
this.UnpackagedInventory( value );
*]
diff --git a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
index 88d7ea9..9eb8dff 100644
--- a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -13,21 +13,26 @@
planPre := macroPlan.PackagingPlanColumn( relnew, StartDate := macroPlan.StartOfPlanning().Date() - 1 );
// 鐢熸垚鎶ヨ〃
- traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() ) {
+ traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and
+ ( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "DL" ) or pisp.StockingPointID().Regex( "澶ц繛" ) or pisp.StockingPointID().Regex( "闀挎槬" ) ) ) {
+ // 褰撳墠pisp鎵�澶勫湴鐐�
+ factory := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "闀挎槬" ), "闀挎槬宸ュ巶", "澶ц繛宸ュ巶" );
+ factoryAbbreviation := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "闀挎槬" ), "CC", "DL" );
+
// 鍒涘缓琛�
- ppr := select( macroPlan, PackagingPlanRow, tempPPR, tempPPR.ProductID() = pisp.ProductID() and tempPPR.StockingPointID() = pisp.StockingPointID() );
+ 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 := "澶ц繛宸ュ巶", Category := "ZKG" );
+ ppr := macroPlan.PackagingPlanRow( relnew, ProductID := pisp.ProductID(), StockingPointID := pisp.StockingPointID(), Factory := factory, Category := guard( pisp.Product_MP().ParentID(), "" ) );
}
- // 鍒涘缓璁″垝鍓嶄竴澶╂牸瀛�
- planPreCell := ppr.PackagingPlanCell( relnew, PackagingPlanColumn := planPre, InitialPackagingInventory := 200 );
-
// 鍑哄彂鍦板簱瀛樼偣Trip
- originTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID() = pisp.StockingPointID() );
+ 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() = pisp.StockingPointID() );
+ 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() ) {
// 鍒涘缓鍒�
ppc := select( macroPlan, PackagingPlanColumn, tempPPC, tempPPC.StartDate() = pispipl.Start().Date() );
@@ -38,25 +43,48 @@
// 鍒涘缓鍗曞厓鏍�
cell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = ppc );
if ( isnull( cell ) ) {
- cell := ppr.PackagingPlanCell( relnew, NetDemand := pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity(), EndingInventory := pispipl.InventoryLevelEnd() );
+ cell := ppr.PackagingPlanCell( relnew );
+ cell.NetDemand( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() );
+ cell.EndingInventory( pispipl.InventoryLevelEnd() );
cell.PackagingPlanColumn( relset, ppc );
+ } else {
+ cell.NetDemand( cell.NetDemand() + ( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() ) );
+ cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
}
- // 璁剧疆璋冨嚭&璋冭繘
+ // 璁剧疆璋冨嚭
outs := selectset( originTrips, Elements, tempT, tempT.Departure().Date() = pispipl.Start().Date() );
- traverse ( outs, Elements, out ) {
- cell.Out( cell.Out() + out.Quantity() );
+ traverse ( outs, Elements.ProductInTrip, outPIT, outPIT.ProductID() = pisp.ProductID() ) {
+ cell.Out( cell.Out() + outPIT.Quantity() );
}
+ // 璁剧疆璋冭繘
transferIns := selectset( destinationTrips, Elements, tempT, tempT.Arrival().Date() = pispipl.Start().Date() );
- traverse ( transferIns, Elements, ti ) {
- cell.TransferIn( cell.TransferIn() + ti.Quantity() );
+ traverse ( transferIns, Elements.ProductInTrip, tiPIT, tiPIT.ProductID() = pisp.ProductID() ) {
+ cell.TransferIn( cell.TransferIn() + tiPIT.Quantity() );
+ }
+
+ // 闀挎槬宸ュ巶鐗规畩鎯呭喌璁剧疆鍖呰搴撳瓨鍜岄潪鍖呰搴撳瓨
+ if ( factory = "闀挎槬宸ュ巶" ) {
+ if ( pisp.StockingPointID().Regex( "澶栫搴�" ) ) {
+ cell.CC_PackagingInventory( pispipl.InventoryLevelEnd() );
+ } else if ( pisp.StockingPointID().Regex( "绾胯竟搴�" ) ) {
+ cell.CC_UnpackagedInventory( pispipl.InventoryLevelEnd() );
+ }
}
// 璁剧疆鍓嶄竴澶╁簱瀛�
if ( pispipl.Start().Date() = macroPlan.StartOfPlanning().Date() ) {
- // prePISPIPL := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf );
- planPreCell.EndingInventory( 2000 );
+ prePISPIPL := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); // 鍓嶄竴涓猵ispippl
+ // 鍒涘缓璁″垝鍓嶄竴澶╂牸瀛�
+ preCell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = planPre );
+ if ( isnull( preCell ) ) {
+ preCell := ppr.PackagingPlanCell( relnew );
+ preCell.EndingInventory( prePISPIPL.InventoryLevelEnd() );
+ preCell.PackagingPlanColumn( relset, planPre );
+ } else {
+ preCell.EndingInventory( preCell.EndingInventory() + prePISPIPL.InventoryLevelEnd() );
+ }
}
}
}
@@ -66,46 +94,46 @@
Transaction::Transaction().Propagate( relation( PackagingPlanCell, Next ) );
// 璁剧疆鍖呰&鎷嗗寘-鏁伴噺
- 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 )*/ ) {
- // 璁剧疆鍖呰鏁伴噺
- if ( ppc.PackagingInventory() < ppc.Out() ) { // 鍖呰搴撳瓨鏄惁灏忎簬璋冨嚭
- prePPC := ppc.Previous();
- needPackagingQuantity := ppc.Out() - prePPC.PackagingInventory();
- while ( not isnull( prePPC ) and needPackagingQuantity > 0.0 ) {
- // 鑾峰彇鍖呰lotsize
- ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and
- tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() );
-
- // 鑾峰彇鏈�澶у寘瑁呮暟閲�
- maxPackageReflection := Reflection::FindAttribute( "PackagingPlanCapability", ppc.PackagingPlanRow().FactoryAbbreviation() + "_" + ppc.PackagingPlanRow().Category() + "_Package" );
- // maxPackageQuantity := maxPackageReflection.GetNumber( macroPlan.PackagingPlanCapability() ); // 姝ゅ闇�瑕佷慨鏀�
- maxPackageQuantity := 100000;
-
- // 鑾峰彇鏈�缁堝寘瑁呮暟閲�
- finalPackagingQuantity := minvalue( ceil( needPackagingQuantity / ppls.LotSize() ), ceil( ( maxPackageQuantity - prePPC.Package() ) / ppls.LotSize() ) ) * ppls.LotSize();
- needPackagingQuantity := needPackagingQuantity - finalPackagingQuantity;
-
- // 璁剧疆鍖呰鍊�
- prePPC.Package( prePPC.Package() + finalPackagingQuantity );
-
- //debuginfo( "闇�瑕佸寘瑁呮暟閲忥細", needPackagingQuantity, " lotsize: ", ppls.LotSize(), " 鏈�澶у寘瑁呮暟閲忥細", maxPackageQuantity, " 鏈�缁堣ˉ鐨勬暟閲忥細", finalPackagingQuantity );
- PackagingPlanCell::CalculationPackagingPlanProperties();
-
- prePPC := prePPC.Previous();
- }
- }
-
- // 璁剧疆鎷嗗寘鏁伴噺
- if ( ppc.TransferIn() > 0.0 ) { // 鏈夎皟鍏ユ暟閲�
- // 鑾峰彇鍖呰lotsize
- ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and
- tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() );
-
- // 璁剧疆鎷嗗寘鍊�
- ppc.Unpacking( ppc.TransferIn() );
- }
- }
- }
+ //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 )*/ ) {
+ // // 璁剧疆鍖呰鏁伴噺
+ // if ( ppc.PackagingInventory() < ppc.Out() ) { // 鍖呰搴撳瓨鏄惁灏忎簬璋冨嚭
+ // prePPC := ppc.Previous();
+ // needPackagingQuantity := ppc.Out() - prePPC.PackagingInventory();
+ // while ( not isnull( prePPC ) and needPackagingQuantity > 0.0 ) {
+ // // 鑾峰彇鍖呰lotsize
+ // ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and
+ // tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() );
+ //
+ // // 鑾峰彇鏈�澶у寘瑁呮暟閲�
+ // maxPackageReflection := Reflection::FindAttribute( "PackagingPlanCapability", ppc.PackagingPlanRow().FactoryAbbreviation() + "_" + ppc.PackagingPlanRow().Category() + "_Package" );
+ //// maxPackageQuantity := maxPackageReflection.GetNumber( macroPlan.PackagingPlanCapability() ); // 姝ゅ闇�瑕佷慨鏀�
+ // maxPackageQuantity := 100000;
+ //
+ // // 鑾峰彇鏈�缁堝寘瑁呮暟閲�
+ // finalPackagingQuantity := minvalue( ceil( needPackagingQuantity / ppls.LotSize() ), ceil( ( maxPackageQuantity - prePPC.Package() ) / ppls.LotSize() ) ) * ppls.LotSize();
+ // needPackagingQuantity := needPackagingQuantity - finalPackagingQuantity;
+ //
+ // // 璁剧疆鍖呰鍊�
+ // prePPC.Package( prePPC.Package() + finalPackagingQuantity );
+ //
+ // //debuginfo( "闇�瑕佸寘瑁呮暟閲忥細", needPackagingQuantity, " lotsize: ", ppls.LotSize(), " 鏈�澶у寘瑁呮暟閲忥細", maxPackageQuantity, " 鏈�缁堣ˉ鐨勬暟閲忥細", finalPackagingQuantity );
+ // PackagingPlanCell::CalculationPackagingPlanProperties();
+ //
+ // prePPC := prePPC.Previous();
+ // }
+ // }
+ //
+ // // 璁剧疆鎷嗗寘鏁伴噺
+ // if ( ppc.TransferIn() > 0.0 ) { // 鏈夎皟鍏ユ暟閲�
+ // // 鑾峰彇鍖呰lotsize
+ // ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and
+ // tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() );
+ //
+ // // 璁剧疆鎷嗗寘鍊�
+ // ppc.Unpacking( ppc.TransferIn() );
+ // }
+ // }
+ //}
*]
}
diff --git a/_Main/BL/Type_PackagingPlanRow/Function_CalcName.qbl b/_Main/BL/Type_PackagingPlanRow/Function_CalcName.qbl
index e7b2259..9a558f8 100644
--- a/_Main/BL/Type_PackagingPlanRow/Function_CalcName.qbl
+++ b/_Main/BL/Type_PackagingPlanRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
[*
// lihongji Jul-24-2024 (created)
- value := guard( this.ProductID() + " in " + this.StockingPointID(), this.ProductID() );
+ value := guard( this.ProductID(), "" );
this.Name( value );
*]
diff --git a/_Main/BL/Type_PackagingPlanRow/Method_FilterProduct.qbl b/_Main/BL/Type_PackagingPlanRow/Method_FilterProduct.qbl
index 7d7fb98..6f7e08b 100644
--- a/_Main/BL/Type_PackagingPlanRow/Method_FilterProduct.qbl
+++ b/_Main/BL/Type_PackagingPlanRow/Method_FilterProduct.qbl
@@ -1,12 +1,13 @@
Quintiq file version 2.0
#parent: #root
Method FilterProduct (
- Product_MPs products
+ Product_MPs products,
+ String factory
) declarative remote as Boolean
{
TextBody:
[*
- flag := exists( products, Elements, tempP, tempP.ID() = this.ProductID() );
+ flag := exists( products, Elements, tempP, tempP.ID() = this.ProductID() ) and this.Factory() = factory;
return flag;
*]
diff --git a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
index 73cbf58..b00f219 100644
--- a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
@@ -14,7 +14,12 @@
// 鐢熸垚璋冩嫧璁″垝
traverse ( macroPlan, Unit, u, u.HasCapacityTypeTransportQuantity() ) {
traverse ( u, Lane.LaneLeg.Trip, t ) {
- traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "鏈哄姞浠�" ) ) {
+ originFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ); // 璧峰宸ュ巶
+ destinationFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ); // 鐩爣宸ュ巶
+ traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and // 鏁伴噺澶т簬0
+ exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "鏈哄姞浠�" ) and // 鍙彇鏈哄姞浠�
+ originFactory <> destinationFactory // 璧峰宸ュ巶涓嶈兘鍜岀洰鏍囧伐鍘備竴鑷�
+ ) {
// 鎵捐
tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ),
TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ),
diff --git a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
index d2bf8d1..9fbd9c5 100644
--- a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
@@ -42,6 +42,11 @@
AttributeKey: '[415136.0.1160164787]'
Synonym: '澶ц繛澶栫搴撳叆搴撹垂鐢�'
}
+ AttributeRepresentation DLRentOtherCost
+ {
+ AttributeKey: '[415136.0.1184074681]'
+ Synonym: '澶ц繛澶栫搴撳叾浠栬垂鐢�'
+ }
AttributeRepresentation DLRentOutOfCost
{
AttributeKey: '[415136.0.1160164795]'
diff --git a/_Main/Sys/Repr/Global/MachiningPipelineCell.qrp b/_Main/Sys/Repr/Global/MachiningPipelineCell.qrp
index 0e40a27..77a9570 100644
--- a/_Main/Sys/Repr/Global/MachiningPipelineCell.qrp
+++ b/_Main/Sys/Repr/Global/MachiningPipelineCell.qrp
@@ -15,12 +15,12 @@
AttributeRepresentation CCProductionQty
{
AttributeKey: '[415136.0.886711530]'
- Synonym: 'CC鐢熶骇璁″垝'
+ Synonym: 'CC鏈哄姞璁″垝'
}
AttributeRepresentation CCTransferQty
{
AttributeKey: '[415136.0.894481175]'
- Synonym: 'CC璋冩嫧璁″垝'
+ Synonym: 'CC to DL'
}
AttributeRepresentation DLAssemblyPlanQty
{
@@ -35,12 +35,12 @@
AttributeRepresentation DLProductionQty
{
AttributeKey: '[415136.0.894481151]'
- Synonym: 'DL鐢熶骇璁″垝'
+ Synonym: 'DL鏈哄姞璁″垝'
}
AttributeRepresentation DLTransferQty
{
AttributeKey: '[415136.0.894481185]'
- Synonym: 'DL璋冩嫧璁″垝'
+ Synonym: 'DL to CC'
}
AttributeRepresentation TotalInventoryQty
{
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_dhSelectedFactory_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_dhSelectedFactory_OnCreated.def
new file mode 100644
index 0000000..3b61644
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_dhSelectedFactory_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: dhSelectedFactory
+Response OnCreated () id:Response_MacroPlanner_ApplicationMacroPlanner_dhSelectedFactory_OnCreated
+{
+ #keys: '[415754.0.350439844]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebComponent_OnCreated'
+ QuillAction
+ {
+ Body:
+ [*
+ this.Data( "澶ц繛宸ュ巶" );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
index fb261de..e834e94 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
@@ -212,5 +212,16 @@
Taborder: 58
]
}
+ Component dhSelectedFactory
+ {
+ #keys: '[415754.0.350439827]'
+ BaseType: 'WebDataHolder'
+ Databinding: 'String*'
+ Properties:
+ [
+ Description: '鍖呰璁″垝鎵�閫夊伐鍘�'
+ Taborder: 59
+ ]
+ }
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def
index 633af51..19447a9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def
@@ -22,6 +22,18 @@
Properties:
[
Image: 'EXPORT1'
+ Label: '瀵煎嚭'
+ Taborder: 2
+ ]
+ }
+ Component bImport
+ {
+ #keys: '[415754.0.345743565]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Image: 'IMPORT1'
+ Label: '瀵煎叆'
Taborder: 1
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def
new file mode 100644
index 0000000..5ea145f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: pHeader/bImport
+Response OnClick () id:Response_pHeader_bImport_OnClick
+{
+ #keys: '[415754.0.345782016]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan );
+ *]
+ QuillAction
+ {
+ Body:
+ [*
+ try {
+ uploadJsonString := Application.GetFile();
+ if ( uploadJsonString <> "" ) {
+ uploadJson := JSON::Parse( uploadJsonString );
+ Archive::VerifyTheFileName( uploadJson );
+
+ fileName := uploadJson.Get( "name" ).GetString();
+ base64String := uploadJson.Get( "data" ).GetString();
+
+ webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+
+ generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName );
+ generalExcelImportAndExportDataSource.ReadStructure();
+
+ selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+
+ CC_EngineRackCell::Import( MacroPlan, selection );
+
+ // 鍚庣画鍒犻櫎
+ generalExcelImportAndExportDataSource.Delete();
+
+ WebMessageBox::Success( Translations::A_VWED_Success() );
+ }
+ } onerror {
+ WebMessageBox::Error( e.GeneralInformation() );
+ }
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
index 19e17fb..e09da9c 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting\043568.def"
@@ -28,7 +28,7 @@
]
Properties:
[
- Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNumber"}}]'
+ Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShowChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShowChangeLossNumber"}}]'
ContextMenu: 'listContextMenuChangeLossSetting'
Taborder: 2
]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_MatrixEditorTable.def
index 8bfb505..bb6c8c4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Component_MatrixEditorTable.def
@@ -26,7 +26,7 @@
]
Properties:
[
- Attributes: 'CCRentInCost;CCRentOutOfCost;CCLongTransCost;CCShorTransCost;CCRentStorCost;DLRentInCost;DLRentOutOfCost;WerkToDLRentTransCost;DLRentStorCost;EstimateTotalCost;Coefficient;AllCost'
+ Attributes: 'CCRentInCost;CCRentOutOfCost;CCLongTransCost;CCShorTransCost;CCRentStorCost;DLRentInCost;DLRentOutOfCost;WerkToDLRentTransCost;DLRentStorCost;DLRentOtherCost;EstimateTotalCost;Coefficient;AllCost'
Column: 'Column'
Row: 'Row'
Taborder: 0
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_MatrixEditorTable.def
index b681d32..1b36875 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormEnginePipelineReport/Component_MatrixEditorTable.def
@@ -53,7 +53,7 @@
]
Properties:
[
- Legend: 'RowNr'
+ Legend: 'ShowName'
SortCriteria: 'RowNr'
Taborder: 1
]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def
index 153bc7a..c33b1c6 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_MatrixEditor493.def
@@ -45,8 +45,8 @@
Properties:
[
DataType: 'MacroPlan'
- FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderCheckedProduct'
- FixedFilter: 'object.FilterProduct( products )'
+ FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderCheckedProduct;factory:QLibMacroPlannerWebUI::ApplicationMacroPlanner.dhSelectedFactory'
+ FixedFilter: 'object.FilterProduct( products, factory )'
Source: 'MacroPlan'
Taborder: 0
Transformation: 'PackagingPlanRow'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def
index 9200e4d..f81dab7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Component_pHeader.def
@@ -61,6 +61,7 @@
BaseType: 'WebDropDownStringList'
Properties:
[
+ InitialValue: '澶ц繛宸ュ巶'
Label: '宸ュ巶'
Sorting: 'none'
Strings: '澶ц繛宸ュ巶;闀挎槬宸ュ巶'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnUserSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnUserSelectionChanged.def
new file mode 100644
index 0000000..825a1ff
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_pHeader_ddslFactorySelection_OnUserSelectionChanged.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pHeader/ddslFactorySelection
+Response OnUserSelectionChanged () id:Response_pHeader_ddslFactorySelection_OnUserSelectionChanged
+{
+ #keys: '[415754.0.350720104]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebDropDownStringList_OnUserSelectionChanged'
+ QuillAction
+ {
+ Body:
+ [*
+ dhSelectedFactory.Data( this.Text() );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw b/_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw
index 3bafc0d..5a964f4 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw
@@ -78,14 +78,14 @@
subtotals: ''
width: 150
}
- column_ChangeLossNumber
+ column_ShowChangeLossNumber
{
- columnId: 'ChangeLossNumber'
- dataPath: 'ChangeLossNumber'
- dataType: 'real'
+ columnId: 'ShowChangeLossNumber'
+ dataPath: 'ShowChangeLossNumber'
+ dataType: 'string'
index: 5
subtotals: ''
- width: 183
+ width: 150
}
}
}
--
Gitblit v1.9.3