From 4c14ac5d77b8173311eb597ecf2572821e723d7b Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 25 七月 2024 12:00:54 +0800
Subject: [PATCH] 批量不可用时间创建多出其他时间bug
---
_Main/BL/InfoMessages.qbl | 4 ++++
_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl | 26 ++++++++------------------
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl | 21 ++++++++-------------
3 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index 35fd453..6f487f3 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -90,6 +90,10 @@
{
DefaultText: 'Actual daily production data'
}
+ InfoMessage InterfaceDataset_ActualDailyProductionData_Secret
+ {
+ DefaultText: '527086842571391021'
+ }
InfoMessage InterfaceDataset_ActualDailyProductionData_URL
{
DefaultText: '/data-service/api/service/post-data/V1.101/e014325a6be14dab818303ef90c2968a'
diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
index ee7cfd8..7d86e89 100644
--- a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
@@ -45,26 +45,21 @@
result := httpinterface.Result();
loginfo.Response( result );
loginfo.Success( true );
- }
- }onerror{
- loginfo.ReturnMsg( e.GeneralInformation() );
- }
- if( loginfo.Name() = Translations::InterfaceDataset_ActualDailyProductionData_Name() ){//鐢熶骇瀹為檯鏁版嵁
-
- httpinterface.URL( Translations::InterfaceDataset_ActualDailyProductionData_URL() );
- httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
- httpinterface.PostMethod( true );
- try{
- httpinterface.AddHeader("Authorization",InterfaceLoginfo::CallToken())
+ } else if( loginfo.Name() = Translations::InterfaceDataset_ActualDailyProductionData_Name() ){//鐢熶骇瀹為檯鏁版嵁
+ httpinterface.URL( Translations::InterfaceDataset_ActualDailyProductionData_URL() );
+ httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
+ httpinterface.PostMethod( true );
+
+ httpinterface.AddHeader("Authorization",InterfaceLoginfo::CallToken( Translations::InterfaceDataset_ActualDailyProductionData_Secret() ))
httpinterface.Call( loginfo.RequestBody() );
result := httpinterface.Result();
loginfo.Response( result );
loginfo.Success( true );
- }onerror{
- loginfo.ReturnMsg( e.GeneralInformation() );
}
+ }onerror{
+ loginfo.ReturnMsg( e.GeneralInformation() );
}
//鍚庣画鍏叡澶勭悊
diff --git a/_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl b/_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl
index 0c5d133..5660545 100644
--- a/_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl
+++ b/_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl
@@ -44,7 +44,7 @@
//鏌ヨ鏄惁宸叉湁鍚屽悕鍦ㄦ壒閲忕晫闈㈠垱寤虹殑浜嬩欢s
event := selectobject( owner_i, Event, event, event.Subject() = subject_i
and event.EventType() = eventtype_i );
- info( '-------------', not isnull( event ), ismultiple );
+
//鍙湁閫氳繃鎵归噺鍒涘缓鐣岄潰涓斿凡鏈夊悓鍚嶄簨浠惰繘鍏ヤ笅闈㈡搷浣�
if( ismultiple and not isnull( event ) ){
lp := event.LeadingParticipation();
@@ -59,23 +59,13 @@
leadingETI := lp.CreateTimeInterval( starttime, endtime, event.Capacity() );
}
// info( '-----------------------2-----------------', lp.ExplicitTimeInterval( relsize ) );
- // if( not isnull( leadingETI ) ){
- // traverse( lp, Subscription, subscription, subscribers_i.Find( subscription.Calendar() ) >= 0 and
- // startDate <= subscription.Calendar().EndDate() and
- // endDate >= subscription.Calendar().StartDate() and
- // ( isnull( subscription.RecurrencePeriod() ) or
- // ( startDate <= subscription.RecurrencePeriod().EndDate() and
- // endDate >= subscription.RecurrencePeriod().StartDate() ) ) ){
- // info( '-----------------------1-----------------', subscription.ExplicitTimeInterval( relsize ) );
- // subscribingETI := subscription.CreateTimeInterval( starttime, endtime, event.Capacity() );
- //
- // if( not isnull( subscribingETI ) ){
- // subscribingETI.LeadingETI( relset, leadingETI );
- // }
- // info( '-----------------------4-----------------', subscription.ExplicitTimeInterval( relsize ) );
- // }
- // }
- // info( '-----------------------3-----------------', lp.ExplicitTimeInterval( relsize ) );
+ if( not isnull( leadingETI ) ){
+ traverse( lp, Subscription, subscription, subscribers_i.Find( subscription.Calendar() ) >= 0 ){
+ traverse( subscription, ExplicitTimeInterval, eti, not ( eti.Start() = starttime and eti.End() = endtime ) ){
+ eti.Delete();
+ }
+ }
+ }
} else {
event := LibCal_Event::CreateUpdateFromUI( owner_i, participation_i, subject_i, description_i, type_i, capacity_i, category_i, isDefault_i,
startDate_i, startTimeOfDay_i, endDate_i, endTimeOfDay_i, isAllDay_i,
--
Gitblit v1.9.3