Quellcode durchsuchen

其他台账,记录新增数据的审核人

MaiXinRong vor 8 Jahren
Ursprung
Commit
978d36977e

+ 13 - 10
DataModules/OtherMeasureOnceDm.dfm

@@ -28,23 +28,26 @@ object OtherMeasureOnceData: TOtherMeasureOnceData
       044E616D6506044E616D65094669656C644E616D6506044E616D650844617461
       547970650218084461746153697A6503FF000549734B6579080F4E6565645072
       6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D6506054D54797065094669656C644E616D6506054D5479706508446174
+      61547970650218084461746153697A6502140549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
       4E616D65060A546F74616C5072696365094669656C644E616D65060A546F7461
       6C50726963650844617461547970650206084461746153697A6502080549734B
       6579080F4E65656450726F636573734E616D650909507265636973696F6E0200
       0453697A6502000001044E616D6506074D656D6F537472094669656C644E616D
       6506074D656D6F5374720844617461547970650218084461746153697A6503FF
       000549734B6579080F4E65656450726F636573734E616D650909507265636973
-      696F6E02000453697A6502000001044E616D65060D4372656174655068617365
-      4944094669656C644E616D65060D437265617465506861736549440844617461
-      547970650203084461746153697A6502040549734B6579080F4E65656450726F
-      636573734E616D650909507265636973696F6E02000453697A6502000001044E
-      616D6506054D54797065094669656C644E616D6506054D547970650844617461
-      547970650218084461746153697A6502140549734B6579080F4E65656450726F
-      636573734E616D650909507265636973696F6E02000453697A6502000001044E
-      616D65060A4F6D4461746554696D65094669656C644E616D65060A4F6D446174
-      6554696D650844617461547970650218084461746153697A6502320549734B65
+      696F6E02000453697A6502000001044E616D65060A4F6D4461746554696D6509
+      4669656C644E616D65060A4F6D4461746554696D650844617461547970650218
+      084461746153697A6502320549734B6579080F4E65656450726F636573734E61
+      6D650909507265636973696F6E02000453697A6502000001044E616D65060D43
+      726561746550686173654944094669656C644E616D65060D4372656174655068
+      61736549440844617461547970650203084461746153697A6502040549734B65
       79080F4E65656450726F636573734E616D650909507265636973696F6E020004
-      53697A6502000000}
+      53697A6502000001044E616D65060D4372656174655374616765494409466965
+      6C644E616D65060D437265617465537461676549440844617461547970650203
+      084461746153697A6502040549734B6579080F4E65656450726F636573734E61
+      6D650909507265636973696F6E02000453697A6502000000}
   end
   object sdvOnce: TsdDataView
     Active = False

+ 1 - 0
DataModules/OtherMeasureOnceDm.pas

@@ -97,6 +97,7 @@ begin
   ARecord.ValueByName('ID').AsInteger := GetNewID;
   ARecord.ValueByName('SerialNo').AsInteger := GetNewSerialNo;
   ARecord.ValueByName('CreatePhaseID').AsInteger := TProjectData(FProjectData).PhaseIndex;
+  ARecord.ValueByName('CreateStageID').AsInteger := TProjectData(FProjectData).StageIndex;
 end;
 
 procedure TOtherMeasureOnceData.sdvOnceSetText(var Text: String;

+ 12 - 8
DataModules/OtherMeasurePhaseDm.dfm

@@ -42,20 +42,24 @@ object OtherMeasurePhaseData: TOtherMeasurePhaseData
       44094669656C644E616D65060D43726561746550686173654944084461746154
       7970650203084461746153697A6502040549734B6579080F4E65656450726F63
       6573734E616D650909507265636973696F6E02000453697A6502000001044E61
-      6D65060D437572546F74616C5072696365094669656C644E616D65060D437572
-      546F74616C50726963650844617461547970650206084461746153697A650208
+      6D65060D43726561746553746167654944094669656C644E616D65060D437265
+      617465537461676549440844617461547970650203084461746153697A650204
       0549734B6579080F4E65656450726F636573734E616D65090950726563697369
-      6F6E02000453697A6502000001044E616D65060D507265546F74616C50726963
-      65094669656C644E616D65060D507265546F74616C5072696365084461746154
+      6F6E02000453697A6502000001044E616D65060D437572546F74616C50726963
+      65094669656C644E616D65060D437572546F74616C5072696365084461746154
       7970650206084461746153697A6502080549734B6579080F4E65656450726F63
       6573734E616D650909507265636973696F6E02000453697A6502000001044E61
-      6D65060D456E64546F74616C5072696365094669656C644E616D65060D456E64
+      6D65060D507265546F74616C5072696365094669656C644E616D65060D507265
       546F74616C50726963650844617461547970650206084461746153697A650208
       0549734B6579080F4E65656450726F636573734E616D65090950726563697369
-      6F6E02000453697A6502000001044E616D65060D416464546F74616C50726963
-      65094669656C644E616D65060D416464546F74616C5072696365084461746154
+      6F6E02000453697A6502000001044E616D65060D456E64546F74616C50726963
+      65094669656C644E616D65060D456E64546F74616C5072696365084461746154
       7970650206084461746153697A6502080549734B6579080F4E65656450726F63
-      6573734E616D650909507265636973696F6E02000453697A6502000000}
+      6573734E616D650909507265636973696F6E02000453697A6502000001044E61
+      6D65060D416464546F74616C5072696365094669656C644E616D65060D416464
+      546F74616C50726963650844617461547970650206084461746153697A650208
+      0549734B6579080F4E65656450726F636573734E616D65090950726563697369
+      6F6E02000453697A6502000000}
   end
   object sdvPhase: TsdDataView
     Active = False

+ 5 - 0
DataModules/OtherMeasurePhaseDm.pas

@@ -159,6 +159,7 @@ end;
 
 procedure TOtherMeasurePhaseData.SaveDetailData;
 const
+  sClearSql = 'Delete From OMPhaseDetail where ID not in (Select distinct ID From OtherMeasurePhase)';
   sDeleteSql = 'Delete From OMPhaseDetail where (PhaseID = %d) and (StageID = %d)';
   sInsertSql = 'Insert Into OMPhaseDetail' +
                '  Select ID, %d As PhaseID, %d As StageID, PreTotalPrice, CurTotalPrice, EndTotalPrice' +
@@ -169,6 +170,9 @@ var
 begin
   if TProjectData(FProjectData).StageDataReadOnly then Exit;
 
+  // 被删除的数据,也不应保留明细
+  ExecuteSql(sdpPhase.Connection, sClearSql);
+
   iPhase := TProjectData(FProjectData).PhaseIndex;
   iStage := TProjectData(FProjectData).StageIndex;
 
@@ -185,6 +189,7 @@ begin
   ARecord.ValueByName('ID').AsInteger := GetNewID;
   ARecord.ValueByName('SerialNo').AsInteger := GetNewSerialNo;
   ARecord.ValueByName('CreatePhaseID').AsInteger := TProjectData(FProjectData).PhaseIndex;
+  ARecord.ValueByName('CreateStageID').AsInteger := TProjectData(FProjectData).StageIndex;
 end;
 
 procedure TOtherMeasurePhaseData.sdvPhaseAfterValueChanged(

+ 1 - 1
Units/Connections.pas

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

+ 7 - 3
Units/DataBaseTables.pas

@@ -693,7 +693,7 @@ const
 
   {其他台账 -- 全额计量}
   SOtherMeasureOnce = 'OtherMeasureOnce';
-  tdOtherMeasureOnce: array [0..8] of TScFieldDef = (
+  tdOtherMeasureOnce: array [0..9] of TScFieldDef = (
     (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
     // 排序
     (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
@@ -709,13 +709,15 @@ const
     (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 创建期数
     (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 创建审核人
+    (FieldName: 'CreateStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 日期
     (FieldName: 'OmDateTime'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
   );
 
   {其他台账 -- 分期计量}
   SOtherMeasurePhase = 'OtherMeasurePhase';
-  tdOtherMeasurePhase: array [0..11] of TScFieldDef =(
+  tdOtherMeasurePhase: array [0..12] of TScFieldDef =(
     (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
     // 排序
     (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
@@ -730,7 +732,9 @@ const
     // 备注
     (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 创建期数
-    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
+    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 创建审核人
+    (FieldName: 'CreateStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 以下为根据期数缓存DetailMeasure中数据
     // 本期计量
     (FieldName: 'CurTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),