From b3805b18b19f773610283444e0a9bd479930109f Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 23 九月 2024 18:07:19 +0800
Subject: [PATCH] 报表界面优化处理,换型损失导入导出添加日期
---
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
index 466849e..2e8db80 100644
--- a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
@@ -20,19 +20,32 @@
macroplan.ChangeLossSettingExcel( relflush );
error( e.GeneralInformation() );
}
+ clsset := construct( ChangeLossSettings );
//閬嶅巻澶勭悊瀵煎叆鐨勬暟鎹�
traverse( macroplan, ChangeLossSettingExcel, excel ){
cls := selectobject( macroplan, ChangeLossSetting, cls, cls.ProductFirst().ID() = excel.Product1()
and cls.ProductSecond().ID() = excel.Product2()
- and cls.Unit().ID() = excel.Unit() );
+ and cls.Unit().ID() = excel.Unit()
+ and cls.StartDate() = excel.StartDate()
+ and cls.EndDate() = excel.EndDate() );
if( isnull( cls ) ){
- cls := macroplan.ChangeLossSetting( relnew, ChangeLossNr := [Number]excel.ChangeLossNumber() );
product1 := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product1() );
product2 := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product2() );
unit := selectobject( macroplan, Unit, unit, unit.ID() = excel.Unit() );
- cls.ProductFirst( relset, product1 );
- cls.ProductSecond( relset, product2 );
- cls.Unit( relset, unit );
+ feedback := '';
+ if( ChangeLossSetting::ValidateInput( feedback, macroplan, null( ChangeLossSetting ), unit, product1, product2, excel.StartDate(), excel.EndDate(), [Number]excel.ChangeLossNumber() ) ){
+ cls := macroplan.ChangeLossSetting( relnew, ChangeLossNr := [Number]excel.ChangeLossNumber() );
+
+ cls.ProductFirst( relset, product1 );
+ cls.ProductSecond( relset, product2 );
+ cls.Unit( relset, unit );
+ clsset.Add( cls );
+ }else{
+ traverse( clsset, Elements, e ){
+ e.Delete();
+ }
+ error( feedback );
+ }
}else {
cls.ChangeLossNr( [Number]excel.ChangeLossNumber() );
}
--
Gitblit v1.9.3