소스 검색

哈白定制汇总表,支表2/3/14/3-1/4-1

MaiXinRong 9 년 전
부모
커밋
3d0a407c11

+ 20 - 0
DataModules/DealPaymentDm.pas

@@ -53,6 +53,8 @@ type
     function GetAllowTotalPrice(AID: Integer; ATotalPrice: Double): Double;
     procedure UpdateTotalPrice(AID: Integer; ATotalPrice: Double);
 
+    function DealPayRecord(const AName: string): TsdDataRecord;
+
     function PlanStr(ARec: TsdDataRecord): string;
 
     function GetStartedPrice(AID: Integer): Double;
@@ -712,4 +714,22 @@ begin
   end;
 end;
 
+function TDealPaymentData.DealPayRecord(
+  const AName: string): TsdDataRecord;
+var
+  iRec: Integer;
+  Rec: TsdDataRecord;
+begin
+  Result := nil;
+  for iRec := 0 to sddDealPayment.RecordCount - 1 do
+  begin
+    Rec := sddDealPayment.Records[iRec];
+    if SameText(AName, Rec.ValueByName('Name').AsString) then
+    begin
+      Result := Rec;
+      Break;
+    end;
+  end;
+end;
+
 end.

+ 360 - 0
DataModules/ReportMemoryDm/rmHaBaiCustomizedDm.dfm

@@ -0,0 +1,360 @@
+object rmHaBaiCustomizedData: TrmHaBaiCustomizedData
+  OldCreateOrder = False
+  Left = 723
+  Top = 455
+  Height = 154
+  Width = 339
+  object cdsCustom2: TClientDataSet
+    Active = True
+    Aggregates = <>
+    Params = <>
+    Left = 32
+    Top = 48
+    Data = {
+      E20000009619E0BD010000001800000009000000000003000000E20007436861
+      707465720400010000000000044E616D6501004A000000010005574944544802
+      000200C8000A546F74616C507269636508000400000000000B43546F74616C50
+      7269636508000400000000000B47546F74616C50726963650800040000000000
+      13456E64476174686572546F74616C5072696365080004000000000013507265
+      476174686572546F74616C507269636508000400000000001343757247617468
+      6572546F74616C507269636508000400000000000750657263656E7408000400
+      000000000000}
+    object cdsCustom2Chapter: TIntegerField
+      FieldName = 'Chapter'
+    end
+    object cdsCustom2Name: TWideStringField
+      FieldName = 'Name'
+      Size = 100
+    end
+    object cdsCustom2TotalPrice: TFloatField
+      FieldName = 'TotalPrice'
+    end
+    object cdsCustom2CTotalPrice: TFloatField
+      FieldName = 'CTotalPrice'
+    end
+    object cdsCustom2GTotalPrice: TFloatField
+      FieldName = 'GTotalPrice'
+    end
+    object cdsCustom2EndGatherTotalPrice: TFloatField
+      FieldName = 'EndGatherTotalPrice'
+    end
+    object cdsCustom2PreGatherTotalPrice: TFloatField
+      FieldName = 'PreGatherTotalPrice'
+    end
+    object cdsCustom2CurGatherTotalPrice: TFloatField
+      FieldName = 'CurGatherTotalPrice'
+    end
+    object cdsCustom2Percent: TFloatField
+      FieldName = 'Percent'
+    end
+  end
+  object cdsCustom3: TClientDataSet
+    Active = True
+    Aggregates = <>
+    IndexFieldNames = 'ChapterID;InnerPartID;IndexCode'
+    Params = <>
+    Left = 104
+    Top = 48
+    Data = {
+      900100009619E0BD010000001800000010000000000003000000900109436861
+      70746572494404000100000000000B496E6E6572506172744944040001000000
+      000009496E646578436F64650100490000000100055749445448020002003200
+      06425F436F646501004A0000000100055749445448020002006400044E616D65
+      02004A000000010005574944544802000200900105556E69747301004A000000
+      0100055749445448020002002800055072696365080004000000000008517561
+      6E7469747908000400000000000A546F74616C50726963650800040000000000
+      115072654761746865725175616E746974790800040000000000135072654761
+      74686572546F74616C5072696365080004000000000011456E64476174686572
+      5175616E74697479080004000000000013456E64476174686572546F74616C50
+      726963650800040000000000114375724761746865725175616E746974790800
+      04000000000013437572476174686572546F74616C5072696365080004000000
+      00000750657263656E7408000400000000000000}
+    object cdsCustom3ChapterID: TIntegerField
+      FieldName = 'ChapterID'
+    end
+    object cdsCustom3InnerPartID: TIntegerField
+      FieldName = 'InnerPartID'
+    end
+    object cdsCustom3IndexCode: TStringField
+      FieldName = 'IndexCode'
+      Size = 50
+    end
+    object cdsCustom3B_Code: TWideStringField
+      FieldName = 'B_Code'
+      Size = 50
+    end
+    object cdsCustom3Name: TWideStringField
+      FieldName = 'Name'
+      Size = 200
+    end
+    object cdsCustom3Units: TWideStringField
+      FieldName = 'Units'
+    end
+    object cdsCustom3Price: TFloatField
+      FieldName = 'Price'
+    end
+    object cdsCustom3Quantity: TFloatField
+      FieldName = 'Quantity'
+    end
+    object cdsCustom3TotalPrice: TFloatField
+      FieldName = 'TotalPrice'
+    end
+    object cdsCustom3PreGatherQuantity: TFloatField
+      FieldName = 'PreGatherQuantity'
+    end
+    object cdsCustom3PreGatherTotalPrice: TFloatField
+      FieldName = 'PreGatherTotalPrice'
+    end
+    object cdsCustom3EndGatherQuantity: TFloatField
+      FieldName = 'EndGatherQuantity'
+    end
+    object cdsCustom3EndGatherTotalPrice: TFloatField
+      FieldName = 'EndGatherTotalPrice'
+    end
+    object cdsCustom3CurGatherQuantity: TFloatField
+      FieldName = 'CurGatherQuantity'
+    end
+    object cdsCustom3CurGatherTotalPrice: TFloatField
+      FieldName = 'CurGatherTotalPrice'
+    end
+    object cdsCustom3Percent: TFloatField
+      FieldName = 'Percent'
+    end
+  end
+  object cdsCustom14: TClientDataSet
+    Active = True
+    Aggregates = <>
+    IndexFieldNames = 'IndexCode'
+    Params = <>
+    Left = 176
+    Top = 48
+    Data = {
+      DC0000009619E0BD010000001800000008000000000003000000DC0009496E64
+      6578436F646501004A000000010005574944544802000200640006425F436F64
+      6501004A0000000100055749445448020002006400044E616D6502004A000000
+      010005574944544802000200900105556E69747301004A000000010005574944
+      54480200020028000550726963650800040000000000085175616E7469747908
+      000400000000000A546F74616C507269636508000400000000000F4365727469
+      666963617465436F646501004A00000001000557494454480200020064000000}
+    object cdsCustom14IndexCode: TWideStringField
+      FieldName = 'IndexCode'
+      Size = 50
+    end
+    object cdsCustom14B_Code: TWideStringField
+      FieldName = 'B_Code'
+      Size = 50
+    end
+    object cdsCustom14Name: TWideStringField
+      FieldName = 'Name'
+      Size = 200
+    end
+    object cdsCustom14Units: TWideStringField
+      FieldName = 'Units'
+    end
+    object cdsCustom14Price: TFloatField
+      FieldName = 'Price'
+    end
+    object cdsCustom14Quantity: TFloatField
+      FieldName = 'Quantity'
+    end
+    object cdsCustom14TotalPrice: TFloatField
+      FieldName = 'TotalPrice'
+    end
+    object cdsCustom14CertificateCode: TWideStringField
+      FieldName = 'CertificateCode'
+      Size = 50
+    end
+  end
+  object cdsCustomProj: TClientDataSet
+    Active = True
+    Aggregates = <>
+    FieldDefs = <
+      item
+        Name = 'ProjectID'
+        DataType = ftInteger
+      end
+      item
+        Name = 'ProjectName'
+        DataType = ftWideString
+        Size = 200
+      end
+      item
+        Name = 'ChapterID'
+        DataType = ftInteger
+      end
+      item
+        Name = 'InnerPartID'
+        DataType = ftInteger
+      end
+      item
+        Name = 'IndexCode'
+        DataType = ftWideString
+        Size = 50
+      end
+      item
+        Name = 'B_Code'
+        DataType = ftWideString
+        Size = 50
+      end
+      item
+        Name = 'Name'
+        DataType = ftWideString
+        Size = 200
+      end
+      item
+        Name = 'Units'
+        DataType = ftWideString
+        Size = 20
+      end
+      item
+        Name = 'Price'
+        DataType = ftFloat
+      end
+      item
+        Name = 'Quantity'
+        DataType = ftFloat
+      end
+      item
+        Name = 'TotalPrice'
+        DataType = ftFloat
+      end
+      item
+        Name = 'CurGatherQuantity'
+        DataType = ftFloat
+      end
+      item
+        Name = 'CurGatherTotalPrice'
+        DataType = ftFloat
+      end
+      item
+        Name = 'EndGatherQuantity'
+        DataType = ftFloat
+      end
+      item
+        Name = 'EndGatherTotalPrice'
+        DataType = ftFloat
+      end
+      item
+        Name = 'P_CurGatherQuantity'
+        DataType = ftFloat
+      end
+      item
+        Name = 'P_CurGatherTotalPrice'
+        DataType = ftFloat
+      end
+      item
+        Name = 'P_EndGatherQuantity'
+        DataType = ftFloat
+      end
+      item
+        Name = 'P_EndGatherTotalPrice'
+        DataType = ftFloat
+      end
+      item
+        Name = 'CurPercent'
+        DataType = ftFloat
+      end
+      item
+        Name = 'EndPercent'
+        DataType = ftFloat
+      end>
+    IndexDefs = <
+      item
+        Name = 'DEFAULT_ORDER'
+      end
+      item
+        Name = 'CHANGEINDEX'
+      end>
+    IndexFieldNames = 'ProjectID;ChapterID;InnerPartID;IndexCode'
+    Params = <>
+    StoreDefs = True
+    Left = 264
+    Top = 48
+    Data = {
+      2C0200009619E0BD0100000018000000150000000000030000002C020950726F
+      6A656374494404000100000000000B50726F6A6563744E616D6502004A000000
+      0100055749445448020002009001094368617074657249440400010000000000
+      0B496E6E6572506172744944040001000000000009496E646578436F64650100
+      4A000000010005574944544802000200640006425F436F646501004A00000001
+      00055749445448020002006400044E616D6502004A0000000100055749445448
+      02000200900105556E69747301004A0000000100055749445448020002002800
+      0550726963650800040000000000085175616E7469747908000400000000000A
+      546F74616C50726963650800040000000000114375724761746865725175616E
+      74697479080004000000000013437572476174686572546F74616C5072696365
+      080004000000000011456E644761746865725175616E74697479080004000000
+      000013456E64476174686572546F74616C507269636508000400000000001350
+      5F4375724761746865725175616E74697479080004000000000015505F437572
+      476174686572546F74616C5072696365080004000000000013505F456E644761
+      746865725175616E74697479080004000000000015505F456E64476174686572
+      546F74616C507269636508000400000000000A43757250657263656E74080004
+      00000000000A456E6450657263656E74080004000000000001000D4445464155
+      4C545F4F524445520200820000000000}
+    object cdsCustomProjProjectID: TIntegerField
+      FieldName = 'ProjectID'
+    end
+    object cdsCustomProjProjectName: TWideStringField
+      FieldName = 'ProjectName'
+      Size = 200
+    end
+    object cdsCustomProjChapterID: TIntegerField
+      FieldName = 'ChapterID'
+    end
+    object cdsCustomProjInnerPartID: TIntegerField
+      FieldName = 'InnerPartID'
+    end
+    object cdsCustomProjIndexCode: TWideStringField
+      FieldName = 'IndexCode'
+      Size = 50
+    end
+    object cdsCustomProjB_Code: TWideStringField
+      FieldName = 'B_Code'
+      Size = 50
+    end
+    object cdsCustomProjName: TWideStringField
+      FieldName = 'Name'
+      Size = 200
+    end
+    object cdsCustomProjUnits: TWideStringField
+      FieldName = 'Units'
+    end
+    object cdsCustomProjPrice: TFloatField
+      FieldName = 'Price'
+    end
+    object cdsCustomProjQuantity: TFloatField
+      FieldName = 'Quantity'
+    end
+    object cdsCustomProjTotalPrice: TFloatField
+      FieldName = 'TotalPrice'
+    end
+    object cdsCustomProjCurGatherQuantity: TFloatField
+      FieldName = 'CurGatherQuantity'
+    end
+    object cdsCustomProjCurGatherTotalPrice: TFloatField
+      FieldName = 'CurGatherTotalPrice'
+    end
+    object cdsCustomProjEndGatherQuantity: TFloatField
+      FieldName = 'EndGatherQuantity'
+    end
+    object cdsCustomProjEndGatherTotalPrice: TFloatField
+      FieldName = 'EndGatherTotalPrice'
+    end
+    object cdsCustomProjP_CurGatherQuantity: TFloatField
+      FieldName = 'P_CurGatherQuantity'
+    end
+    object cdsCustomProjP_CurGatherTotalPrice: TFloatField
+      FieldName = 'P_CurGatherTotalPrice'
+    end
+    object cdsCustomProjP_EndGatherQuantity: TFloatField
+      FieldName = 'P_EndGatherQuantity'
+    end
+    object cdsCustomProjP_EndGatherTotalPrice: TFloatField
+      FieldName = 'P_EndGatherTotalPrice'
+    end
+    object cdsCustomProjCurPercent: TFloatField
+      FieldName = 'CurPercent'
+    end
+    object cdsCustomProjEndPercent: TFloatField
+      FieldName = 'EndPercent'
+    end
+  end
+end

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1184 - 0
DataModules/ReportMemoryDm/rmHaBaiCustomizedDm.pas


+ 15 - 1
Units/PhaseData.pas

@@ -56,6 +56,7 @@ type
     {½ö´ò¿ªÏîÄ¿ÊôÐÔ}
     procedure SimpleOpen(const AProjectName: string);
     procedure SimpleSave;
+    procedure SimpleOpen2(const AProjectName: string);
 
     procedure CreateNewAuditData;
     procedure CopyPreData;
@@ -191,8 +192,8 @@ begin
   FConnection.Open(AProjectName);
   UpdatePhaseDataBase;
   FPhaseProperty.Open;
-  FPhasePayData.Open(FConnection.Connection);
   CheckAuditCount;
+  FPhasePayData.Open(FConnection.Connection);
 end;
 
 procedure TPhaseData.SimpleSave;
@@ -318,4 +319,17 @@ begin
   end;
 end;
 
+procedure TPhaseData.SimpleOpen2(const AProjectName: string);
+begin
+  FConnection.Open(AProjectName);
+  UpdatePhaseDataBase;
+  FPhaseProperty.Open;
+  CheckAuditCount;
+  FStageIndex := FPhaseProperty.AuditCount;
+  FStageData.TableName := StageTableName[FStageIndex];
+  FStageData.Open(FConnection.Connection);
+  FPhasePayData.Open(FConnection.Connection);
+  FZJJLData.Open(FConnection.Connection);
+end;
+
 end.

+ 22 - 0
Units/ProjectData.pas

@@ -113,6 +113,8 @@ type
     procedure OpenForReport(const AFileName: string);
     {OpenForReport2: OpenForReport的基础上打开最后一期数据}
     procedure OpenForReport2(const AFileName: string);
+    {OpenForReport3: OpenForReport2的基础上打开最后一个审核人数据,打开BillsMeasureTree不打开BillsCompileTree,链接BillsMeasureTree跟StageData}
+    procedure OpenForReport3(const AFileName: string);
     //-----------------------  End ---后台打开 ------------------------
 
     procedure SaveLastestPhaseMainData;
@@ -1488,4 +1490,24 @@ begin
   end;
 end;
 
+procedure TProjectData.OpenForReport3(const AFileName: string);
+begin
+  FProjectID := -1;
+  UnZipFile(AFileName, TempPath);
+  FConnection.Open(MainFileName);
+  UpdateProjectDataBase;
+  FProjProperties.Open(FConnection.Connection);
+  UpdateOldData;
+  FBillsData.Open(FConnection.Connection);
+  FBillsMeasureData.Open;
+  FDealPaymentData.Open(FConnection.Connection);
+  FBGLData.Open(FConnection.Connection);
+  if ProjProperties.PhaseCount > 0 then
+  begin
+    FPhaseIndex := ProjProperties.PhaseCount;
+    FPhaseData.SimpleOpen2(Format('%sPhase%d.dat', [TempPath, FPhaseIndex]));
+  end;
+  FBillsMeasureData.ResetTreeNodeStageRec;
+end;
+
 end.

+ 13 - 3
Units/ReportManager.pas

@@ -7,7 +7,7 @@ uses
   rmBGLExecutionDm, rmGclBillsAddDm, rmFxBillsAddDm, rmBillsGatherDm,
   rmGclBillsAuditCompareDm, rmDealInfosDm, rmXmjBGLDetailDm,
   rmOtherReport1Dm, rmGcl_XmjBillsDm, rmGclBillsPlaneDm,
-  rmMentalCustomized1Dm, rmCustomized2Dm,
+  rmMentalCustomized1Dm, rmCustomized2Dm, rmHaBaiCustomizedDm,
   rmTestFrm,
   ReportInteractInfo,
   Classes, ScFileArchiver, IniFiles, Graphics, DB, ProjectData,
@@ -207,6 +207,7 @@ type
     FrmGclBillsPlaneData: TrmGclBillsPlaneData;
     FrmMentalCustomized1Data: TrmMentalCustomized1Data;
     FrmCustomized2Data: TrmCustomized2Data;
+    FrmHaBaiCustomizedData: TrmHaBaiCustomizedData;
 
     FMemoryQuery: TADOQuery;
 
@@ -598,6 +599,7 @@ begin
   FrmGclBillsPlaneData := TrmGclBillsPlaneData.Create(nil);
   FrmMentalCustomized1Data := TrmMentalCustomized1Data.Create(nil);
   FrmCustomized2Data := TrmCustomized2Data.Create(nil);
+  FrmHaBaiCustomizedData := TrmHaBaiCustomizedData.Create(nil);
 
   FMemoryQuery := TADOQuery.Create(nil);
 
@@ -623,6 +625,7 @@ begin
 
   FMemoryQuery.Free;
 
+  FrmHaBaiCustomizedData.Free;
   FrmCustomized2Data.Free;
   FrmMentalCustomized1Data.Free;
   FrmGclBillsPlaneData.Free;
@@ -665,7 +668,7 @@ end;
 function TMemoryReportManager.GetMemoryDataSet(
   ADataSetID: Integer; AProjectData: TProjectData): TDataSet;
 begin
-  //ADataSetID := 44;
+  //ADataSetID := 49;
   case ADataSetID of
     1: Result := FrmGridHeaderData.AssginData(AProjectData);   // 몹깊깊庫
     2: Result := FrmGclBillsBGData.AssignData(AProjectData, rmtPhaseGather, rmgtGather); // 묏넋좆헌데[굶퍅供냥]
@@ -680,8 +683,10 @@ begin
     // 엄炬04, 05, 05-2, 04-1, 02,
        20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
        // 02/03꼬겻, 07꼬겻, 08꼬겻, 09꼬겻, 11꼬겻, 12꼬겻, 16꼬겻, 17꼬겻, 18꼬겻, 19꼬겻,
-       32, 33, 35, 36, 39, 40, 44:
+       32, 33, 35, 36, 39, 40, 44,
        // 讀엑9, 讀엑06-1, 讀엑04, 讀엑01, 묏넋좆헌데쏵똑[맵據멕밗애땍齡], [밤땜凉헤땍齡]셕좆삠悧깊
+       45, 46, 47, 48, 49:
+       // 코촁뮴벗겜땍齡깊(連깊2, 連깊3, 連깊14, 連깊3-1, 連깊4-1)
         Result := SelectProjectsAndAssignData(ADataSetID);
     14: Result := FrmGclBillsBGData.AssignData(AProjectData, rmtPhaseDeal, rmgtGather); // 묏넋좆헌데[굶퍅북谿]
     15: Result := FrmGclBillsBGData.AssignData(AProjectData, rmtPhaseQc, rmgtGather); // 묏넋좆헌데[굶퍅鑒좆긴뫘]
@@ -813,6 +818,11 @@ begin
       36: Result := FrmOtherReport1Data.AssignData(FTenders);
       39, 40: Result := FrmMentalCustomized1Data.AssignData(FTenders);
       44: Result := FrmCustomized2Data.AssignData(FTenders);
+      45: Result := FrmHaBaiCustomizedData.AssignData(FTenders, hbgt2);
+      46: Result := FrmHaBaiCustomizedData.AssignData(FTenders, hbgt3);
+      47: Result := FrmHaBaiCustomizedData.AssignData(FTenders, hbgt14);
+      48: Result := FrmHaBaiCustomizedData.AssignData(FTenders, hbgt3_1);
+      49: Result := FrmHaBaiCustomizedData.AssignData(FTenders, hbgt4_1);
       else Result := FrmBillsGatherData.AssignData(FTenders);
     end;
   end;