|
@@ -16,10 +16,15 @@ type
|
|
|
FGatherData: TstgGatherData;
|
|
|
FResultForm: TstgResultForm;
|
|
|
|
|
|
+ FHintPosition: Integer;
|
|
|
+
|
|
|
+ procedure LoadHint(const ATenderName: string);
|
|
|
+
|
|
|
procedure LoadSumBaseFile;
|
|
|
procedure GatherSubTenderFiles;
|
|
|
procedure CheckErrorData;
|
|
|
procedure SaveGatherResult;
|
|
|
+ procedure ShowGatherResult;
|
|
|
public
|
|
|
constructor Create;
|
|
|
destructor Destroy; override;
|
|
@@ -32,6 +37,9 @@ type
|
|
|
|
|
|
implementation
|
|
|
|
|
|
+uses
|
|
|
+ ProgressHintFrm, SysUtils;
|
|
|
+
|
|
|
{ TstgGatherControl }
|
|
|
|
|
|
procedure TstgGatherControl.CheckErrorData;
|
|
@@ -63,10 +71,17 @@ end;
|
|
|
|
|
|
procedure TstgGatherControl.Gather;
|
|
|
begin
|
|
|
+ FHintPosition := 0;
|
|
|
+ ShowProgressHint('正在导入总包基准文件数据...', FProjects.Count + 2);
|
|
|
LoadSumBaseFile;
|
|
|
GatherSubTenderFiles;
|
|
|
+ UpdateProgressHint('正在检查汇总结果...');
|
|
|
+ UpdateProgressPosition(FProjects.Count + 1);
|
|
|
CheckErrorData;
|
|
|
+ UpdateProgressPosition(FProjects.Count + 2);
|
|
|
SaveGatherResult;
|
|
|
+ CloseProgressHint;
|
|
|
+ ShowGatherResult;
|
|
|
end;
|
|
|
|
|
|
procedure TstgGatherControl.GatherSubTenderFiles;
|
|
@@ -75,12 +90,20 @@ var
|
|
|
begin
|
|
|
vGather := TstgSubTenderFileGather.Create;
|
|
|
try
|
|
|
+ vGather.LoadHint := LoadHint;
|
|
|
vGather.GatherTo(FGatherCacheData, FProjects);
|
|
|
finally
|
|
|
vGather.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TstgGatherControl.LoadHint(const ATenderName: string);
|
|
|
+begin
|
|
|
+ Inc(FHintPosition);
|
|
|
+ UpdateProgressHint(Format('正在汇总分包标段"%s"...', [ATenderName]));
|
|
|
+ UpdateProgressPosition(FHintPosition);
|
|
|
+end;
|
|
|
+
|
|
|
procedure TstgGatherControl.LoadSumBaseFile;
|
|
|
var
|
|
|
vLoader: TstgSumBaseFileLoader;
|
|
@@ -94,10 +117,14 @@ begin
|
|
|
end;
|
|
|
|
|
|
procedure TstgGatherControl.SaveGatherResult;
|
|
|
+begin
|
|
|
+ FGatherData.LoadGatherData(FGatherCacheData);
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TstgGatherControl.ShowGatherResult;
|
|
|
var
|
|
|
Form: TstgResultForm;
|
|
|
begin
|
|
|
- FGatherData.LoadGatherData(FGatherCacheData);
|
|
|
Form := TstgResultForm.Create(nil);
|
|
|
try
|
|
|
Form.SetGatherData(FGatherData);
|