|
@@ -692,7 +692,7 @@ end;
|
|
|
|
|
|
procedure TrmHaBaiCustomizedData.WriteReport4_1;
|
|
|
var
|
|
|
- iProject, iChapter, iSerialNo: Integer;
|
|
|
+ iProject, iChapter, iSerial: Integer;
|
|
|
sProjectName: string;
|
|
|
|
|
|
procedure WriteGclNodeData(AGclNode: TGclNode; AChapterID: Integer);
|
|
@@ -719,9 +719,7 @@ var
|
|
|
cdsCustomProjP_EndGatherTotalPrice.AsFloat := AGclNode.P_EndGatherTotalPrice[iProject];
|
|
|
cdsCustomProjCurPercent.AsFloat := AGclNode.CurPercent;
|
|
|
cdsCustomProjEndPercent.AsFloat := AGclNode.EndPercent;
|
|
|
- cdsCustomProjSerialNo.AsInteger := iSerialNo;
|
|
|
cdsCustomProj.Post;
|
|
|
- Inc(iSerialNo);
|
|
|
end;
|
|
|
|
|
|
procedure WriteGclChapterData(AGclChapter: TGclChapter);
|
|
@@ -752,20 +750,40 @@ var
|
|
|
cdsCustomProjP_EndGatherTotalPrice.AsFloat := AGclChapter.P_EndGatherTotalPrice[iProject];
|
|
|
cdsCustomProjCurPercent.AsFloat := AGclChapter.CurPercent;
|
|
|
cdsCustomProjEndPercent.AsFloat := AGclChapter.EndPercent;
|
|
|
- cdsCustomProjSerialNo.AsInteger := iSerialNo;
|
|
|
cdsCustomProj.Post;
|
|
|
- Inc(iSerialNo);
|
|
|
+ end;
|
|
|
+
|
|
|
+ procedure ResortSerialNo;
|
|
|
+ var
|
|
|
+ iSerialNo, iProject: Integer;
|
|
|
+ begin
|
|
|
+ iSerialNo := 1;
|
|
|
+ cdsCustomProj.First;
|
|
|
+ iProject := cdsCustomProjProjectID.AsInteger;
|
|
|
+ while not cdsCustomProj.Eof do
|
|
|
+ begin
|
|
|
+ if iProject <> cdsCustomProjProjectID.AsInteger then
|
|
|
+ begin
|
|
|
+ iProject := cdsCustomProjProjectID.AsInteger;
|
|
|
+ iSerialNo := 1;
|
|
|
+ end;
|
|
|
+ cdsCustomProj.Edit;
|
|
|
+ cdsCustomProjSerialNo.AsInteger := iSerialNo;
|
|
|
+ cdsCustomProj.Post;
|
|
|
+ Inc(iSerialNo);
|
|
|
+ cdsCustomProj.Next;
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
|
for iProject := 0 to FGclControl.ProjectCount - 1 do
|
|
|
begin
|
|
|
- iSerialNo := 1;
|
|
|
sProjectName := FGclControl.ProjectName[iProject];
|
|
|
for iChapter := 0 to FGclControl.GclChapterCount - 1 do
|
|
|
WriteGclChapterData(FGclControl.GclChapter[iChapter]);
|
|
|
WriteChapterGather(FGclControl.GclChapterGather, 'µÚ100ÕÂÖÁµÚ900Õ ºÏ¼Æ');
|
|
|
end;
|
|
|
+ ResortSerialNo;
|
|
|
end;
|
|
|
|
|
|
procedure TrmHaBaiCustomizedData.WriteFlowData;
|