Prechádzať zdrojové kódy

1. ProjGather: Copy DealBills
2. Bills, Add B_CodeChapter Field For Report

MaiXinRong 8 rokov pred
rodič
commit
ca4e1034e1

+ 4 - 1
DataModules/BillsDm.dfm

@@ -261,6 +261,9 @@ object BillsData: TBillsData
       6D6506094E6F64654C6576656C094669656C644E616D6506094E6F64654C6576
       656C0844617461547970650203084461746153697A6502040549734B6579080F
       4E65656450726F636573734E616D650909507265636973696F6E02000453697A
-      6502000000}
+      6502000001044E616D65060D425F436F646543686170746572094669656C644E
+      616D65060D425F436F6465436861707465720844617461547970650203084461
+      746153697A6502040549734B6579080F4E65656450726F636573734E616D6509
+      09507265636973696F6E02000453697A6502000000}
   end
 end

+ 13 - 0
DataModules/BillsDm.pas

@@ -176,6 +176,16 @@ procedure TBillsData.Save;
     end;
   end;
 
+  function GetB_CodeChapter(const AB_Code: string): Integer;
+  var
+    iValue, iError: Integer;
+  begin
+    Result := -1;
+    Val(AB_Code, iValue, iError);
+    if iValue > 0 then
+      Result := iValue div 100;
+  end;
+
   procedure SaveReportsRela;
   var
     iIndex: Integer;
@@ -218,6 +228,9 @@ procedure TBillsData.Save;
           end;
 
           stnNode.Rec.SetIntValue(stnNode.Rec.NodeLevel, stnNode.Level);
+
+          // ¹¤³ÌÁ¿Çåµ¥ËùÊôÕ¼¶
+          stnNode.Rec.SetIntValue(stnNode.Rec.B_CodeChapter, GetB_CodeChapter(stnNode.Rec.B_Code.AsString));
         end;
     finally
       sddBills.EndUpdate;

+ 1 - 0
Report/ProjGather/rpgGatherControl.pas

@@ -73,6 +73,7 @@ begin
   try
     FProjectData.SaveTempDataBaseFile(sTempFile);
     CopyTables(sTempFile, 'ProjProperties');
+    CopyTables(sTempFile, 'DealBills');
   finally
     if FileExists(sTempFile) then
       DeleteFile(sTempFile);

+ 1 - 1
Units/Connections.pas

@@ -8,7 +8,7 @@ uses
 const
   ProductName = 'Measure';
   EmptyFileVersion = '1.0.0.0';
-  FileVersion = '1.0.1.11';
+  FileVersion = '1.0.1.12';
   EncryptVersion = 'Auto1.0';
   SAdoConnectStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;' +
                    'User ID=Admin;Password='''';Persist Security Info=True';

+ 5 - 3
Units/DataBaseTables.pas

@@ -104,7 +104,7 @@ const
 
   {헌데鑒앴 -- 憩瑯긍서썹충}
   SBills = 'Bills';
-  tdBills: array [0..85] of TScFieldDef =(
+  tdBills: array [0..86] of TScFieldDef =(
     (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
     (FieldName: 'ParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
     (FieldName: 'NextSiblingID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
@@ -126,9 +126,11 @@ const
     // 묏넋좆헌데탤埼긍뵀
     (FieldName: 'IndexCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 覽섬만淃ID
-    (FieldName: 'ChapterParentID'; FieldType: ftInteger; size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    (FieldName: 'ChapterParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 쌘듐꿔늴
+    (FieldName: 'NodeLevel'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     //
-    (FieldName: 'NodeLevel'; FieldType: ftInteger; size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    (FieldName: 'B_CodeChapter'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // --------- End   괩깊淚痰 -------
     (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

+ 3 - 0
Units/mDataRecord.pas

@@ -33,6 +33,7 @@ type
     FIndexCode: TsdValue;
     FChapterParentID: TsdValue;
     FNodeLevel: TsdValue;
+    FB_CodeChapter: TsdValue;
     // »ù´¡Êý¾Ý
     FCode: TsdValue;
     FB_Code: TsdValue;
@@ -123,6 +124,7 @@ type
     property IndexCode: TsdValue read FIndexCode;
     property ChapterParentID: TsdValue read FChapterParentID;
     property NodeLevel: TsdValue read FNodeLevel;
+    property B_CodeChapter: TsdValue read FB_CodeChapter;
 
     property Code: TsdValue read FCode;
     property B_Code: TsdValue read FB_Code;
@@ -516,6 +518,7 @@ begin
   FIndexCode := ValueByName('IndexCode');
   FChapterParentID := ValueByName('ChapterParentID');
   FNodeLevel := ValueByName('NodeLevel');
+  FB_CodeChapter := ValueByName('B_CodeChapter');
 
   FCode := ValueByName('Code');
   FB_Code := ValueByName('B_Code');