|
@@ -289,17 +289,26 @@ type
|
|
|
property AuditStatus: Integer read FAuditStatus;
|
|
|
end;
|
|
|
|
|
|
+ TTenderZipCheckType = (zctAllPhase, zctLastPhase);
|
|
|
+
|
|
|
// Îļþ¼ìÑé
|
|
|
TTenderZipCompleteChecker = class
|
|
|
private
|
|
|
FFileName: string;
|
|
|
FTempFolder: string;
|
|
|
FProjectData: TProjectData;
|
|
|
+ FCheckType: TTenderZipCheckType;
|
|
|
|
|
|
function CheckMain: Boolean;
|
|
|
function CheckAllPhase: Boolean;
|
|
|
+ function CheckLastPhase: Boolean;
|
|
|
public
|
|
|
+ constructor Create;
|
|
|
+ destructor Destroy; override;
|
|
|
+
|
|
|
function CheckFileValid(const AFileName: string): Boolean;
|
|
|
+
|
|
|
+ property CheckType: TTenderZipCheckType read FCheckType write FCheckType;
|
|
|
end;
|
|
|
|
|
|
implementation
|
|
@@ -1199,12 +1208,20 @@ begin
|
|
|
FFileName := AFileName;
|
|
|
FTempFolder := GenerateTempFolder(GetTempFilePath);
|
|
|
try
|
|
|
- Result := UnZipFile(AFileName, FTempFolder) and CheckMain and CheckAllPhase;
|
|
|
+ case CheckType of
|
|
|
+ zctAllPhase: Result := UnZipFile(AFileName, FTempFolder) and CheckMain and CheckAllPhase;
|
|
|
+ zctLastPhase: Result := UnZipFile(AFileName, FTempFolder) and CheckMain and CheckLastPhase;
|
|
|
+ end;
|
|
|
finally
|
|
|
DeleteFileOrFolder(FTempFolder);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+function TTenderZipCompleteChecker.CheckLastPhase: Boolean;
|
|
|
+begin
|
|
|
+ Result := Assigned(FProjectData) and FProjectData.CheckPhaseFileComplete;
|
|
|
+end;
|
|
|
+
|
|
|
function TTenderZipCompleteChecker.CheckMain: Boolean;
|
|
|
begin
|
|
|
Result := False;
|
|
@@ -1222,4 +1239,14 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+constructor TTenderZipCompleteChecker.Create;
|
|
|
+begin
|
|
|
+ FCheckType := zctAllPhase;
|
|
|
+end;
|
|
|
+
|
|
|
+destructor TTenderZipCompleteChecker.Destroy;
|
|
|
+begin
|
|
|
+ inherited;
|
|
|
+end;
|
|
|
+
|
|
|
end.
|