|
@@ -324,7 +324,7 @@ end;
|
|
|
|
|
|
procedure TrpgGatherData.UpdateDataBase(ASpecialProjTypes: TStrings);
|
|
|
const
|
|
|
- sUpdateSql = 'Insert Into %s (BillsID, ProjID, ProjType,' +
|
|
|
+ sUpdateSql = 'Insert Into %s (ID, ProjID, ProjType,' +
|
|
|
' OrgQuantity, OrgTotalPrice, OrgTotalPrice_Rc,' +
|
|
|
' MisQuantity, MisTotalPrice, MisTotalPrice_Rc,' +
|
|
|
' OthQuantity, OthTotalPrice, OthTotalPrice_Rc,' +
|
|
@@ -348,18 +348,33 @@ const
|
|
|
' PreGatherQuantity, PreGatherTotalPrice, PreGatherTotalPrice_Rc,' +
|
|
|
' EndDealQuantity, EndDealTotalPrice, EndDealTotalPrice_Rc,' +
|
|
|
' EndQcQuantity, EndQcTotalPrice, EndQcTotalPrice_Rc,' +
|
|
|
- ' EndGatherQuantity, EndGatherTotalPrice, EndGatherTotalPrice_Rc,' +
|
|
|
- ' Select BillsID, %d, %d,'+
|
|
|
- ' 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'+ // 台账明细
|
|
|
+ ' EndGatherQuantity, EndGatherTotalPrice, EndGatherTotalPrice_Rc)' +
|
|
|
+ ' Select ID, %d, %d,'+
|
|
|
+ ' 0, 0, 0,'+ // Org
|
|
|
+ ' 0, 0, 0,'+ // Mis
|
|
|
+ ' 0, 0, 0,'+ // Oth
|
|
|
' 0, 0, 0,'+ // 台账
|
|
|
- ' 0, 0, '''', 0, 0, '''', 0, 0, '''','+ // 台账--设计数量、经济指标
|
|
|
- ' 0, 0, '''', 0, 0, '''','+ // 计量--设计数量
|
|
|
- ' 0, 0, '''', 0, 0, '''', 0, 0, '''','+ // 计量--经济指标
|
|
|
- ' 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'+ // 累计数据
|
|
|
- ' 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'+ // 本期
|
|
|
- ' 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'+ // 截止上期
|
|
|
- ' 0, 0, 0, 0, 0, 0, 0, 0, 0, 0'+ // 截止本期
|
|
|
- ' From r_Bills_Gather';
|
|
|
+ ' 0, 0, '''','+ // DgnQuantity
|
|
|
+ ' 0, 0, '''','+ // DgnPrice
|
|
|
+ ' 0, 0, '''','+ // DgnPrice_Rc
|
|
|
+ ' 0, 0, '''','+ // DealDgnQuantity
|
|
|
+ ' 0, 0, '''','+ // CDgnQuantity
|
|
|
+ ' 0, 0, '''','+ // FinalDgnQuantity
|
|
|
+ ' 0, 0, '''','+ // FinalDgnPrice
|
|
|
+ ' 0, 0, '''','+ // FinalDgnPrice_Rc
|
|
|
+ ' 0, 0, 0,'+ // AddDeal
|
|
|
+ ' 0, 0, 0,'+ // AddQc
|
|
|
+ ' 0, 0, 0,'+ // AddGather
|
|
|
+ ' 0, 0, 0,'+ // CurDeal
|
|
|
+ ' 0, 0, 0,'+ // CurQc
|
|
|
+ ' 0, 0, 0,'+ // CurGather
|
|
|
+ ' 0, 0, 0,'+ // PreDeal
|
|
|
+ ' 0, 0, 0,'+ // PreQc
|
|
|
+ ' 0, 0, 0,'+ // PreGather
|
|
|
+ ' 0, 0, 0,'+ // EndDeal
|
|
|
+ ' 0, 0, 0,'+ // EndQc
|
|
|
+ ' 0, 0, 0'+ // EndGather
|
|
|
+ ' From r_Bills';
|
|
|
var
|
|
|
Updater: TScUpdater;
|
|
|
iProj, iSpecialProjCount: Integer;
|
|
@@ -379,7 +394,7 @@ begin
|
|
|
end;
|
|
|
|
|
|
for iProj := iSpecialProjCount to ASpecialProjTypes.Count - 1 do
|
|
|
- ExecuteSql(Format(sUpdateSql, [SBills_SProj+IntToStr(iProj+1), iProj, iProj+1]));
|
|
|
+ ExecuteSql(Format(sUpdateSql, [SBills_SProj+IntToStr(iProj+1), -3, iProj+1]));
|
|
|
end;
|
|
|
end;
|
|
|
|