📄 updnottc.pas
字号:
unit updNOTTC;
interface
uses sysUtils, dbtables, bde, updBASE;
type
TUpdateNOTTC = class(TBaseUpdateUnit)
private
function update_byNOTI09(xQrySource: TQuery): Boolean;
function update_byNOTI10(xQrySource: TQuery): Boolean;
function update_byACRI03(xQrySource: TQuery): Boolean;
function update_byACPI03(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
uses LibStrs,CONSTDEF;
function TUpdateNOTTC.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
try
self.setDBname(xQrySource.DatabaseName);
if compareText(self.SourceTxnCode, 'TXNNOTI09') = 0 then
Result := update_byNOTI09(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNNOTI10') = 0 then
Result := update_byNOTI10(xQrySource)
else
if (compareText(self.SourceTxnCode, 'TXNACRI03') = 0) then
Result := update_byACRI03(xQrySource)
else
if (compareText(self.SourceTxnCode, 'TXNACPI03') = 0) then
Result := update_byACPI03(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query2.close;
end;
xMsg := self.Msg;
end;
function TUpdateNOTTC.update_byNOTI09(xQrySource: TQuery): Boolean;
var
mTD004: String;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'NOTTC';
With xQrySource do
self.Msg[2] := FieldByName('TL001').asString+' '+
FieldByName('TL002').asString+' '+
FieldByName('TL003').asString;
if not (xQrySource.FieldByName('TL008').asString='4') then Exit;
if not ((xQrySource.FieldByName('MQ003').asString='85')
or (xQrySource.FieldByName('MQ003').asString='87')) then Exit;
try
with self.Query1 do
begin
close;
SQL.clear;
RequestLive := False;
SQL.add('select TD002,TD004,A.FLAG from $$NOTTC A,$$NOTTD ');
SQL.add(' where TC001=TD001 AND TC001=:TC001 ORDER BY TD002 DESC ');
ParamByName('TC001').asString := xQrySource.FieldByName('TL010').asString;
Open;
first;
if not eof then //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -