From 3bf31c5cd7f27d710ad70e07ec97b65c359daf50 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期三, 09 十月 2024 20:29:05 +0800
Subject: [PATCH] 长春料架优化
---
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def | 12 ++++++
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl | 9 ++++
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl | 24 ++++++------
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def | 45 ++++++++++++++++++++++
4 files changed, 78 insertions(+), 12 deletions(-)
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/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
+ }
+}
--
Gitblit v1.9.3