|
@@ -492,10 +492,20 @@ end;
|
|
|
|
|
|
procedure TrmBillsGatherData.FilterBillsNode(ANode: TsdIDTreeNode;
|
|
|
AProjectIndex: Integer);
|
|
|
+
|
|
|
+ function CanGatherNode: Boolean;
|
|
|
+ begin
|
|
|
+ case GatherType of
|
|
|
+ bgtFinal11: Result := ANode.Rec.ValueByName('TotalPrice').AsFloat <> 0;
|
|
|
+ else Result := True;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
var
|
|
|
GclNode: TGclGatherNode;
|
|
|
begin
|
|
|
- if not Assigned(ANode) then Exit;
|
|
|
+ if not Assigned(ANode) or not CanGatherNode then Exit;
|
|
|
+
|
|
|
GclNode := FGclList.GetGclGatherNode(ANode.Rec);
|
|
|
with ANode.Rec do
|
|
|
begin
|
|
@@ -535,7 +545,7 @@ begin
|
|
|
AddBills(FProjectData.BillsCompileData.BillsCompileTree.FindNode(2).FirstChild, nil, AProjectIndex, AProject);
|
|
|
bgtFinal09: // 09表 取第三部分及其后所有项目节
|
|
|
AddBills(FProjectData.BillsCompileData.BillsCompileTree.FindNode(3), nil, AProjectIndex, AProject);
|
|
|
- bgtGcl, bgtFinal07, bgtFinal11, bgtFinal19:
|
|
|
+ bgtGcl, bgtFinal07, bgtFinal11, bgtFinal19: // 汇总工程量清单
|
|
|
FilterBills(FProjectData.BillsCompileData.BillsCompileTree.FirstNode, AProjectIndex);
|
|
|
bgtFinal12: // 不做数据汇总,直接流水式写入数据
|
|
|
WriteFlowData(FProjectData);
|
|
@@ -547,7 +557,7 @@ begin
|
|
|
AddBillsList(FProjectData.BillsCompileData.BillsCompileTree.FindNode(48), nil, AProjectIndex, AProject);
|
|
|
bgtG_Final06_1: // 粤竣06-1表 仅汇总土地及其子节点
|
|
|
AddBillsList(FProjectData.BillsCompileData.BillsCompileTree.FindNode(21), nil, AProjectIndex, AProject);
|
|
|
- else
|
|
|
+ else // 标准汇总方式,分项清单
|
|
|
AddBills(FProjectData.BillsCompileData.BillsCompileTree.FirstNode, nil, AProjectIndex, AProject)
|
|
|
end;
|
|
|
|
|
@@ -752,6 +762,12 @@ begin
|
|
|
stnNode := ATree.Items[iIndex];
|
|
|
if stnNode.ID >= 100 then Continue;
|
|
|
FixedIDNode := FFixedIDList.GetFixedIDBillsNode(stnNode.ID);
|
|
|
+
|
|
|
+ FixedIDNode.TotalPrice := FixedIDNode.TotalPrice
|
|
|
+ + stnNode.Rec.ValueByName('TotalPrice').AsFloat;
|
|
|
+ FixedIDNode.TotalPrice :=
|
|
|
+ + stnNode.Rec.ValueByName('TotalPrice').AsFloat;
|
|
|
+
|
|
|
FixedIDNode.AddGatherTotalPrice := FixedIDNode.AddGatherTotalPrice
|
|
|
+ stnNode.Rec.ValueByName('AddGatherTotalPrice').AsFloat;
|
|
|
FixedIDNode.P_AddGatherTotalPrice[AProjectIndex] :=
|
|
@@ -835,7 +851,7 @@ procedure TrmBillsGatherData.WriteProjectsGclData;
|
|
|
procedure WriteFixedIDBillsData07(AProjectIndex: Integer);
|
|
|
var
|
|
|
fTotalPrice, fP_TotalPrice, fAddGatherTotalPrice, fP_AddGatherTotalPrice: Double;
|
|
|
- Node17, Node45, Node40, Node51: TFixedIDBillsNode;
|
|
|
+ Node54, Node45, Node40, Node51: TFixedIDBillsNode;
|
|
|
begin
|
|
|
fTotalPrice := FGclList.GatherNode.TotalPrice;
|
|
|
fP_TotalPrice := FGclList.GatherNode.P_TotalPrice[AProjectIndex];
|
|
@@ -851,14 +867,14 @@ procedure TrmBillsGatherData.WriteProjectsGclData;
|
|
|
cdsProjectGclBills.Post;
|
|
|
Inc(FSerialNo);
|
|
|
// 工程项目调价合计
|
|
|
- Node17 := FFixedIDList.FixedIDBillsNode(17);
|
|
|
- WriteFixedIDData(AProjectIndex, Node17, '工程项目调价合计');
|
|
|
- if Assigned(Node17) then
|
|
|
+ Node54 := FFixedIDList.FixedIDBillsNode(54);
|
|
|
+ WriteFixedIDData(AProjectIndex, Node54, '工程项目调价合计');
|
|
|
+ if Assigned(Node54) then
|
|
|
begin
|
|
|
- fTotalPrice := fTotalPrice + Node17.TotalPrice;
|
|
|
- fP_TotalPrice := fP_TotalPrice + Node17.P_TotalPrice[AProjectIndex];
|
|
|
- fAddGatherTotalPrice := fAddGatherTotalPrice + Node17.AddGatherTotalPrice;
|
|
|
- fP_AddGatherTotalPrice := fP_AddGatherTotalPrice + Node17.P_AddGatherTotalPrice[AProjectIndex];
|
|
|
+ fTotalPrice := fTotalPrice + Node54.TotalPrice;
|
|
|
+ fP_TotalPrice := fP_TotalPrice + Node54.P_TotalPrice[AProjectIndex];
|
|
|
+ fAddGatherTotalPrice := fAddGatherTotalPrice + Node54.AddGatherTotalPrice;
|
|
|
+ fP_AddGatherTotalPrice := fP_AddGatherTotalPrice + Node54.P_AddGatherTotalPrice[AProjectIndex];
|
|
|
end;
|
|
|
// 工程项目索赔合计
|
|
|
Node45 := FFixedIDList.FixedIDBillsNode(45);
|