From ea578007e86bdc01430bc8b9683d8e69eb2438e5 Mon Sep 17 00:00:00 2001 From: hongji.li <hongji.a.li@capgemini.com> Date: 星期一, 06 十一月 2023 17:40:26 +0800 Subject: [PATCH] 优化交易汇总报表 --- _Main/BL/Type_SummaryOfInboundTransaction/StaticMethod_FlushData.qbl | 50 ++++++++++++ _Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Component_ListSummaryOfInboundTransaction.def | 2 _Main/UI/MacroPlannerWebApp/Views/年度产销复盘.vw | 172 +++++++++++++++++++++++++++++++++++++++++++ _Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Response_pButton_bFlushData_OnClick.def | 2 4 files changed, 223 insertions(+), 3 deletions(-) diff --git a/_Main/BL/Type_SummaryOfInboundTransaction/StaticMethod_FlushData.qbl b/_Main/BL/Type_SummaryOfInboundTransaction/StaticMethod_FlushData.qbl index e941bd0..b7bf786 100644 --- a/_Main/BL/Type_SummaryOfInboundTransaction/StaticMethod_FlushData.qbl +++ b/_Main/BL/Type_SummaryOfInboundTransaction/StaticMethod_FlushData.qbl @@ -1,7 +1,55 @@ Quintiq file version 2.0 #parent: #root StaticMethod FlushData ( - GlobalOTDSOP globalOTDSOP + GlobalOTDSOP globalOTDSOP, + const GlobalOTDTable globalOTDTable ) { + TextBody: + [* + globalOTDSOP.SummaryOfInboundTransaction( relflush ); + + traverse ( globalOTDTable, Global_MappingSummaryOfInboundTransaction, gmsoit ) { + targetSummaryOfInboundTransaction := select( globalOTDSOP, SummaryOfInboundTransaction, tempSOIBT, + tempSOIBT.Item() = gmsoit.Item() and + tempSOIBT.OrganCode() = gmsoit.OrganCode() and + tempSOIBT.OrganName() = gmsoit.OrganName() and + tempSOIBT.PlantName() = gmsoit.PlantName() ); + + if ( isnull( targetSummaryOfInboundTransaction ) ) { + targetSummaryOfInboundTransaction := globalOTDSOP.SummaryOfInboundTransaction( relnew, Item := gmsoit.Item(), + OrganCode := gmsoit.OrganCode(), + OrganName := gmsoit.OrganName(), + PlantName := gmsoit.PlantName() + ); + } + + if ( gmsoit.TransactionDate().Month() = 1 ) { + targetSummaryOfInboundTransaction.Total1( targetSummaryOfInboundTransaction.Total1() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 2 ) { + targetSummaryOfInboundTransaction.Total2( targetSummaryOfInboundTransaction.Total2() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 3 ) { + targetSummaryOfInboundTransaction.Total3( targetSummaryOfInboundTransaction.Total3() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 4 ) { + targetSummaryOfInboundTransaction.Total4( targetSummaryOfInboundTransaction.Total4() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 5 ) { + targetSummaryOfInboundTransaction.Total5( targetSummaryOfInboundTransaction.Total5() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 6 ) { + targetSummaryOfInboundTransaction.Total6( targetSummaryOfInboundTransaction.Total6() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 7 ) { + targetSummaryOfInboundTransaction.Total7( targetSummaryOfInboundTransaction.Total7() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 8 ) { + targetSummaryOfInboundTransaction.Total8( targetSummaryOfInboundTransaction.Total8() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 9 ) { + targetSummaryOfInboundTransaction.Total9( targetSummaryOfInboundTransaction.Total9() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 10 ) { + targetSummaryOfInboundTransaction.Total10( targetSummaryOfInboundTransaction.Total10() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 11 ) { + targetSummaryOfInboundTransaction.Total11( targetSummaryOfInboundTransaction.Total11() + gmsoit.TransactionQTY() ); + } else if ( gmsoit.TransactionDate().Month() = 12 ) { + targetSummaryOfInboundTransaction.Total12( targetSummaryOfInboundTransaction.Total2() + gmsoit.TransactionQTY() ); + } + + } + *] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Component_ListSummaryOfInboundTransaction.def b/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Component_ListSummaryOfInboundTransaction.def index 0bbe502..21a5163 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Component_ListSummaryOfInboundTransaction.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Component_ListSummaryOfInboundTransaction.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Item","title":"鐗╂枡缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Item"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrganCode","title":"缁勭粐缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrganCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrganName","title":"缁勭粐鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrganName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlantName","title":"宸ュ巶鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlantName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total1","title":"1鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total2","title":"2鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total3","title":"3鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total4","title":"4鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total5","title":"5鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total5"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total6","title":"6鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total6"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total7","title":"7鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total7"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total8","title":"8鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total8"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total9","title":"9鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total9"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total10","title":"10鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total10"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total11","title":"11鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total11"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Total12","title":"12鏈堟眹鎬绘暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Total12"}}]' ContextMenu: 'listContextMenuSummaryOfInboundTransaction' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Response_pButton_bFlushData_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Response_pButton_bFlushData_OnClick.def index 7dcd7e2..bbf38d2 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Response_pButton_bFlushData_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormSummaryOfInboundTransaction/Response_pButton_bFlushData_OnClick.def @@ -9,7 +9,7 @@ { Body: [* - SummaryOfInboundTransaction::FlushData( GlobalOTDSOP ); + SummaryOfInboundTransaction::FlushData( GlobalOTDSOP, GlobalOTDTable ); *] GroupServerCalls: false } diff --git "a/_Main/UI/MacroPlannerWebApp/Views/\345\271\264\345\272\246\344\272\247\351\224\200\345\244\215\347\233\230.vw" "b/_Main/UI/MacroPlannerWebApp/Views/\345\271\264\345\272\246\344\272\247\351\224\200\345\244\215\347\233\230.vw" index 7558c72..d6fafb3 100644 --- "a/_Main/UI/MacroPlannerWebApp/Views/\345\271\264\345\272\246\344\272\247\351\224\200\345\244\215\347\233\230.vw" +++ "b/_Main/UI/MacroPlannerWebApp/Views/\345\271\264\345\272\246\344\272\247\351\224\200\345\244\215\347\233\230.vw" @@ -367,6 +367,178 @@ } } } + form_FormSummaryOfInboundTransaction + { + title: 'QTIANMA_JITUAN::FormSummaryOfInboundTransaction' + shown: true + componentID: 'QTIANMA_JITUAN::FormSummaryOfInboundTransaction' + layout + { + mode: 'open' + rowPosition: 35 + rowSpan: 12 + columnPosition: 1 + columnSpan: 12 + } + components + { + FormSummaryOfInboundTransaction_pButton + { + sizeRatio: 1 + } + FormSummaryOfInboundTransaction_ListSummaryOfInboundTransaction + { + } + FormSummaryOfInboundTransaction_DataSetLevelSummaryOfInboundTransaction + { + groupDepth: -1 + column_Item + { + columnId: 'Item' + dataPath: 'Item' + dataType: 'string' + index: 0 + subtotals: '' + width: 150 + } + column_OrganCode + { + columnId: 'OrganCode' + dataPath: 'OrganCode' + dataType: 'string' + index: 1 + subtotals: '' + width: 150 + } + column_OrganName + { + columnId: 'OrganName' + dataPath: 'OrganName' + dataType: 'string' + index: 2 + subtotals: '' + width: 150 + } + column_PlantName + { + columnId: 'PlantName' + dataPath: 'PlantName' + dataType: 'string' + index: 3 + subtotals: '' + width: 150 + } + column_Total1 + { + columnId: 'Total1' + dataPath: 'Total1' + dataType: 'real' + index: 4 + subtotals: '' + width: 150 + } + column_Total2 + { + columnId: 'Total2' + dataPath: 'Total2' + dataType: 'real' + index: 5 + subtotals: '' + width: 150 + } + column_Total3 + { + columnId: 'Total3' + dataPath: 'Total3' + dataType: 'real' + index: 6 + subtotals: '' + width: 150 + } + column_Total4 + { + columnId: 'Total4' + dataPath: 'Total4' + dataType: 'real' + index: 7 + subtotals: '' + width: 150 + } + column_Total5 + { + columnId: 'Total5' + dataPath: 'Total5' + dataType: 'real' + index: 8 + subtotals: '' + width: 150 + } + column_Total6 + { + columnId: 'Total6' + dataPath: 'Total6' + dataType: 'real' + index: 9 + subtotals: '' + width: 150 + } + column_Total7 + { + columnId: 'Total7' + dataPath: 'Total7' + dataType: 'real' + index: 10 + subtotals: '' + width: 150 + } + column_Total8 + { + columnId: 'Total8' + dataPath: 'Total8' + dataType: 'real' + index: 11 + subtotals: '' + width: 150 + } + column_Total9 + { + columnId: 'Total9' + dataPath: 'Total9' + dataType: 'real' + index: 12 + subtotals: '' + width: 150 + } + column_Total10 + { + columnId: 'Total10' + dataPath: 'Total10' + dataType: 'real' + index: 13 + subtotals: '' + width: 150 + } + column_Total11 + { + columnId: 'Total11' + dataPath: 'Total11' + dataType: 'real' + index: 14 + subtotals: '' + width: 150 + } + column_Total12 + { + columnId: 'Total12' + dataPath: 'Total12' + dataType: 'real' + index: 15 + subtotals: '' + width: 150 + } + } + } + } } userconfigurableinformation { -- Gitblit v1.9.3