Commit 7f1c90c2 by 潘际乾

Platform.dbFetchFields函数赋值修改

parent b3a1c7fd
...@@ -39,7 +39,9 @@ event $dadrcv order 500 ...@@ -39,7 +39,9 @@ event $dadrcv order 500
sql = Platform.sqlAndCondition( "INR = " + Platform.sqlLit( rcvKey ), Platform.sdbEtyGenTblSql( recTbl, "", "", "" ) ); sql = Platform.sqlAndCondition( "INR = " + Platform.sqlLit( rcvKey ), Platform.sdbEtyGenTblSql( recTbl, "", "", "" ) );
inr = ""; inr = "";
Platform.dbExecuteSql( "select INR from " + recTbl + " " + sql ); Platform.dbExecuteSql( "select INR from " + recTbl + " " + sql );
Platform.dbFetchFields( "", inr ); Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound ) if( Platform.errorCode() == tdOdbcNotFound )
{ {
......
...@@ -294,7 +294,11 @@ String swtPrtMT103Body(#setgll argsetgll) ...@@ -294,7 +294,11 @@ String swtPrtMT103Body(#setgll argsetgll)
sql = "select extkey , seracc from act where serbic='" + rec53 + "' and OTHBIC='" + snd53 + "' AND TYP='DB' AND CUR='" + cur + "' "; sql = "select extkey , seracc from act where serbic='" + rec53 + "' and OTHBIC='" + snd53 + "' AND TYP='DB' AND CUR='" + cur + "' ";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbFetchFields( "", extkey, "", seracc ); Argument<String> extkeyBox = new Argument<>();
Argument<String> seraccBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox, "", seraccBox );
extkey = extkeyBox.value;
seracc = seraccBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.isEmpty( $acc53b ) ) if( Platform.isEmpty( $acc53b ) )
......
...@@ -7,7 +7,9 @@ void getacc53for202cov(String extkey,String covcur,Argument<String> covact) ...@@ -7,7 +7,9 @@ void getacc53for202cov(String extkey,String covcur,Argument<String> covact)
{ {
sql = "select seracc from ACT where SERBIC='" + extkey + "' and cur='" + covcur + "'"; sql = "select seracc from ACT where SERBIC='" + extkey + "' and cur='" + covcur + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", act ); Argument<String> actBox = new Argument<>();
Platform.dbFetchFields( "", actBox );
act = actBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -110,7 +110,11 @@ void getFepEntries(Argument<Boolean> argfirstcall) ...@@ -110,7 +110,11 @@ void getFepEntries(Argument<Boolean> argfirstcall)
Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfep\ptyinr.getValue() ); Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfep\ptyinr.getValue() );
ptynam = ""; ptynam = "";
ptyextkey = ""; ptyextkey = "";
Platform.dbFetchFields( "NAM", ptynam, "EXTKEY", ptyextkey ); Argument<String> ptynamBox = new Argument<>();
Argument<String> ptyextkeyBox = new Argument<>();
Platform.dbFetchFields( "NAM", ptynamBox, "EXTKEY", ptyextkeyBox );
ptynam = ptynamBox.value;
ptyextkey = ptyextkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -21,7 +21,8 @@ boolean isFeeCodSettled(String argfeecod,IModule arggrp) ...@@ -21,7 +21,8 @@ boolean isFeeCodSettled(String argfeecod,IModule arggrp)
else else
{ {
Platform.dbExecuteSQL( "Select count(*) from FEP Where OBJTYP = ? AND OBJINR = ? AND FEECOD = ?", objTyp, objInr, argfeecod ); Platform.dbExecuteSQL( "Select count(*) from FEP Where OBJTYP = ? AND OBJINR = ? AND FEECOD = ?", objTyp, objInr, argfeecod );
Platform.dbFetchFields( "", fepCnt ); Platform.dbFetchFields( "", fepCntBox );
fepCnt = fepCntBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.cacheWrite( fepCnt, lbl ); Platform.cacheWrite( fepCnt, lbl );
} }
......
...@@ -224,7 +224,9 @@ void registerSettlementCorrCha() ...@@ -224,7 +224,9 @@ void registerSettlementCorrCha()
postfind = ""; postfind = "";
postsql = "select REG from CTY where CTY.COD='" + loccty + "'"; postsql = "select REG from CTY where CTY.COD='" + loccty + "'";
Platform.dbExecuteSql( postsql ); Platform.dbExecuteSql( postsql );
Platform.dbFetchFields( "", postfind ); Argument<String> postfindBox = new Argument<>();
Platform.dbFetchFields( "", postfindBox );
postfind = postfindBox.value;
if( ! ( Platform.errorCode() == 228 ) ) if( ! ( Platform.errorCode() == 228 ) )
{ {
switch( postfind ) switch( postfind )
...@@ -266,7 +268,9 @@ void registerSettlementCorrCha() ...@@ -266,7 +268,9 @@ void registerSettlementCorrCha()
find = ""; find = "";
sql = "select REG from CTY where CTY.COD='" + loccty + "'"; sql = "select REG from CTY where CTY.COD='" + loccty + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", find ); Argument<String> findBox = new Argument<>();
Platform.dbFetchFields( "", findBox );
find = findBox.value;
/** /**
if not ( ErrorCode == 228 ) then if not ( ErrorCode == 228 ) then
$line = StreamSearch( $DHLFEE, "DHL" + $FIND ) $line = StreamSearch( $DHLFEE, "DHL" + $FIND )
......
...@@ -122,7 +122,11 @@ void recalcSetfogBog() ...@@ -122,7 +122,11 @@ void recalcSetfogBog()
Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfcp\dbtptyinr.getValue() ); Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfcp\dbtptyinr.getValue() );
ptynam = ""; ptynam = "";
ptyextkey = ""; ptyextkey = "";
Platform.dbFetchFields( "NAM", ptynam, "EXTKEY", ptyextkey ); Argument<String> ptynamBox = new Argument<>();
Argument<String> ptyextkeyBox = new Argument<>();
Platform.dbFetchFields( "NAM", ptynamBox, "EXTKEY", ptyextkeyBox );
ptynam = ptynamBox.value;
ptyextkey = ptyextkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -46,7 +46,9 @@ void defActSub() ...@@ -46,7 +46,9 @@ void defActSub()
ptyInrSql = "select MAX(INR) from pty where extkey = '" + swfcod + "'"; ptyInrSql = "select MAX(INR) from pty where extkey = '" + swfcod + "'";
Platform.dbExecuteSql( ptyInrSql ); Platform.dbExecuteSql( ptyInrSql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", ptyInr ); Argument<String> ptyInrBox = new Argument<>();
Platform.dbFetchFields( "", ptyInrBox );
ptyInr = ptyInrBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
//$actlst = \SETMOD\GLEMOD.GetAvailAcc ( DSP, ACCCUR, $ptyInr, self, AMT ) //$actlst = \SETMOD\GLEMOD.GetAvailAcc ( DSP, ACCCUR, $ptyInr, self, AMT )
......
...@@ -41,7 +41,9 @@ default settlementdetail ($trdint,$trdout,$trnman,$xrttim,$buyrat,$selrat,$midra ...@@ -41,7 +41,9 @@ default settlementdetail ($trdint,$trdout,$trnman,$xrttim,$buyrat,$selrat,$midra
sql = "select trnman from pty where inr = '" + $rolptyinr.getValue() + "'"; sql = "select trnman from pty where inr = '" + $rolptyinr.getValue() + "'";
trnman = ""; trnman = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", trnman ); Argument<String> trnmanBox = new Argument<>();
Platform.dbFetchFields( "", trnmanBox );
trnman = trnmanBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.isEmpty( trnman ) ) if( Platform.isEmpty( trnman ) )
......
...@@ -20,7 +20,9 @@ default $branch order 1000 ...@@ -20,7 +20,9 @@ default $branch order 1000
sql = "select branch from bch where inr in (select bchkeyinr from act where extkey='" + Platform.trim( $act.getValue() ) + "')"; sql = "select branch from bch where inr in (select bchkeyinr from act where extkey='" + Platform.trim( $act.getValue() ) + "')";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
// DBFetchFields( "branch", $branch ) // DBFetchFields( "branch", $branch )
Platform.dbFetchFields( "branch", actbranch ); Argument<String> actbranchBox = new Argument<>();
Platform.dbFetchFields( "branch", actbranchBox );
actbranch = actbranchBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -41,7 +41,9 @@ default $\setmod\setglg\setgll order 1000 ...@@ -41,7 +41,9 @@ default $\setmod\setglg\setgll order 1000
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", zmzjcflg ); Argument<String> zmzjcflgBox = new Argument<>();
Platform.dbFetchFields( "", zmzjcflgBox );
zmzjcflg = zmzjcflgBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -29,7 +29,9 @@ event $setpan order 3000 ...@@ -29,7 +29,9 @@ event $setpan order 3000
idtype = ""; idtype = "";
sql = "select idtype from pty where extkey='" + extkey + "'"; sql = "select idtype from pty where extkey='" + extkey + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", idtype ); Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", idtypeBox );
idtype = idtypeBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.compareTo( idtype , "D" ) == 0 || Platform.compareTo( idtype , "F" ) == 0 ) if( Platform.compareTo( idtype , "D" ) == 0 || Platform.compareTo( idtype , "F" ) == 0 )
{ {
......
...@@ -2,7 +2,7 @@ void getSwfcodTelFax(Argument<String> swfcod,Argument<String> tel,Argument<Strin ...@@ -2,7 +2,7 @@ void getSwfcodTelFax(Argument<String> swfcod,Argument<String> tel,Argument<Strin
{ {
String strsql = "select swfcod,tel,fax from bch where lev='0'"; String strsql = "select swfcod,tel,fax from bch where lev='0'";
Platform.dbExecuteSql( strsql ); Platform.dbExecuteSql( strsql );
Platform.dbFetchFields( "", swfcod.value, "", tel.value, "", fax.value ); Platform.dbFetchFields( "", swfcod, "", tel, "", fax );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -5,13 +5,13 @@ void getbchanaccbch(String bchinr,String accbchinr,Argument<String> bchkey,Argum ...@@ -5,13 +5,13 @@ void getbchanaccbch(String bchinr,String accbchinr,Argument<String> bchkey,Argum
String sqlstr = "select branch from bch where inr='" + vbchinr + "'"; String sqlstr = "select branch from bch where inr='" + vbchinr + "'";
String sqlstr1 = "select branch from bch where inr='" + vaccbchinr + "'"; String sqlstr1 = "select branch from bch where inr='" + vaccbchinr + "'";
Platform.dbExecuteSql( sqlstr ); Platform.dbExecuteSql( sqlstr );
Platform.dbFetchFields( "", bchkey.value ); Platform.dbFetchFields( "", bchkey );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.dbExecuteSql( sqlstr1 ); Platform.dbExecuteSql( sqlstr1 );
Platform.dbFetchFields( "", accbch.value ); Platform.dbFetchFields( "", accbch );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -76,7 +76,9 @@ void getACTInformation_set() ...@@ -76,7 +76,9 @@ void getACTInformation_set()
{ {
branch = ""; branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() ); Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
// $Ret = \SYSMOD.CallInterface ( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt ) // $Ret = \SYSMOD.CallInterface ( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
...@@ -15,7 +15,9 @@ static void getaccbank(String ptyextkey) ...@@ -15,7 +15,9 @@ static void getaccbank(String ptyextkey)
sql = "select bchkeyinr from act where serptyinr in (select inr from pty where extkey='" + ptyextkey + "') AND TYP='DB' AND CUR='" + cur + "' "; sql = "select bchkeyinr from act where serptyinr in (select inr from pty where extkey='" + ptyextkey + "') AND TYP='DB' AND CUR='" + cur + "' ";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", inr ); Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
// if not IsEmpty( $INR ) then // if not IsEmpty( $INR ) then
Platform.dbRead( $\setmod\actbch, " WHERE INR='" + inr + "'" ); Platform.dbRead( $\setmod\actbch, " WHERE INR='" + inr + "'" );
......
...@@ -39,7 +39,11 @@ void getClrAmt(Argument<Integer> clramt) ...@@ -39,7 +39,11 @@ void getClrAmt(Argument<Integer> clramt)
objinr = ""; objinr = "";
sql = "select objtyp,objinr from ORD WHERE INR='" + ordinr + "'"; sql = "select objtyp,objinr from ORD WHERE INR='" + ordinr + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", objtyp, "", objinr ); Argument<String> objtypBox = new Argument<>();
Argument<String> objinrBox = new Argument<>();
Platform.dbFetchFields( "", objtypBox, "", objinrBox );
objtyp = objtypBox.value;
objinr = objinrBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( ! Platform.isEmpty( objtyp ) && ! Platform.isEmpty( objinr ) ) if( ! Platform.isEmpty( objtyp ) && ! Platform.isEmpty( objinr ) )
...@@ -65,7 +69,11 @@ void getClrAmt(Argument<Integer> clramt) ...@@ -65,7 +69,11 @@ void getClrAmt(Argument<Integer> clramt)
if( ! Platform.isEmpty( sqlclr ) ) if( ! Platform.isEmpty( sqlclr ) )
{ {
Platform.dbExecuteSql( sqlclr ); Platform.dbExecuteSql( sqlclr );
Platform.dbFetchFields( "", cur, "", amt ); Argument<String> curBox = new Argument<>();
Argument<Integer> amtBox = new Argument<>();
Platform.dbFetchFields( "", curBox, "", amtBox );
cur = curBox.value;
amt = amtBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -4,7 +4,9 @@ void existFCD() ...@@ -4,7 +4,9 @@ void existFCD()
String fcdSql = "select INR from FCD where PNTTYP='SPT' AND PNTINR = ?"; String fcdSql = "select INR from FCD where PNTTYP='SPT' AND PNTINR = ?";
String fcdInr = ""; String fcdInr = "";
Platform.dbExecuteSQL( fcdSql, $spt\inr.getValue() ); Platform.dbExecuteSQL( fcdSql, $spt\inr.getValue() );
Platform.dbFetchFields( "", fcdInr ); Argument<String> fcdInrBox = new Argument<>();
Platform.dbFetchFields( "", fcdInrBox );
fcdInr = fcdInrBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.compareTo(fcdInr, "") != 0 ) if( Platform.compareTo(fcdInr, "") != 0 )
{ {
......
...@@ -3,7 +3,7 @@ void getOreCre(Argument<String> creusr,Argument<String> bchkeyinr) ...@@ -3,7 +3,7 @@ void getOreCre(Argument<String> creusr,Argument<String> bchkeyinr)
creusr.value = ""; creusr.value = "";
bchkeyinr.value = ""; bchkeyinr.value = "";
Platform.dbExecuteSQL( "select USR, BCHKEYINR from ORE where ORDINR = ? and typ='CRE' ", $\ordmod\ord\inr.getValue() ); Platform.dbExecuteSQL( "select USR, BCHKEYINR from ORE where ORDINR = ? and typ='CRE' ", $\ordmod\ord\inr.getValue() );
Platform.dbFetchFields( "", creusr.value, "", bchkeyinr.value ); Platform.dbFetchFields( "", creusr, "", bchkeyinr );
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
\ No newline at end of file
...@@ -30,7 +30,9 @@ void check103Msg() ...@@ -30,7 +30,9 @@ void check103Msg()
sql = "SELECT RELFLG FROM TRN WHERE OBJTYP = 'CLR' AND INIFRM = 'CLIOPN' AND OBJINR = '" + $clr\inr.getValue() + "' AND RELFLG IN ('W', 'F', 'R')"; sql = "SELECT RELFLG FROM TRN WHERE OBJTYP = 'CLR' AND INIFRM = 'CLIOPN' AND OBJINR = '" + $clr\inr.getValue() + "' AND RELFLG IN ('W', 'F', 'R')";
relFlg = ""; relFlg = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", relFlg ); Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.compareTo( relFlg , "W" ) == 0 ) if( Platform.compareTo( relFlg , "W" ) == 0 )
......
...@@ -9,7 +9,11 @@ void autoBindCshMsg() ...@@ -9,7 +9,11 @@ void autoBindCshMsg()
String sptinr202 = ""; String sptinr202 = "";
String smhinr202 = ""; String smhinr202 = "";
Platform.dbExecuteSQL( "select inr,smhinr from spt where objref like ? and relcur=? and relamt=? and objtyp=? and msgtyp in ('202','910') and delflg=' '", ref103 + "%", $\spt\relcur.getValue(), $\spt\relamt.getValue(), $\spt\objtyp.getValue() ); Platform.dbExecuteSQL( "select inr,smhinr from spt where objref like ? and relcur=? and relamt=? and objtyp=? and msgtyp in ('202','910') and delflg=' '", ref103 + "%", $\spt\relcur.getValue(), $\spt\relamt.getValue(), $\spt\objtyp.getValue() );
Platform.dbFetchFields( "", sptinr202, "", smhinr202 ); Argument<String> sptinr202Box = new Argument<>();
Argument<String> smhinr202Box = new Argument<>();
Platform.dbFetchFields( "", sptinr202Box, "", smhinr202Box );
sptinr202 = sptinr202Box.value;
smhinr202 = smhinr202Box.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
int can = 0; int can = 0;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
......
...@@ -33,7 +33,9 @@ event $unbind order 1000 ...@@ -33,7 +33,9 @@ event $unbind order 1000
if( Platform.prompt( #CT000151 ) ) if( Platform.prompt( #CT000151 ) )
{ {
Platform.dbExecuteSQL( "select inr from smh where grpinr = ? and msgtyp in ('202','910')", $\spt\smhinr.getValue() ); Platform.dbExecuteSQL( "select inr from smh where grpinr = ? and msgtyp in ('202','910')", $\spt\smhinr.getValue() );
Platform.dbFetchFields( "", inr ); Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
......
...@@ -15,7 +15,9 @@ void deleteClearMsg() ...@@ -15,7 +15,9 @@ void deleteClearMsg()
sta = ""; sta = "";
Platform.dbExecuteSQL( "select sta from clr where srctyp='SPT' and srcinr=?", sptinr ); Platform.dbExecuteSQL( "select sta from clr where srctyp='SPT' and srcinr=?", sptinr );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", sta ); Argument<String> staBox = new Argument<>();
Platform.dbFetchFields( "", staBox );
sta = staBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.compareTo( sta , "E" ) == 0 ) if( Platform.compareTo( sta , "E" ) == 0 )
...@@ -33,7 +35,9 @@ void deleteClearMsg() ...@@ -33,7 +35,9 @@ void deleteClearMsg()
relflg = ""; relflg = "";
Platform.dbExecuteSQL( "select relflg from (select relflg from trn where objtyp = 'CLR' and objinr = (select inr from clr where srctyp = 'SPT' and srcinr = ? ) order by inr desc ) where rownum = 1 ", sptinr ); Platform.dbExecuteSQL( "select relflg from (select relflg from trn where objtyp = 'CLR' and objinr = (select inr from clr where srctyp = 'SPT' and srcinr = ? ) order by inr desc ) where rownum = 1 ", sptinr );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", relflg ); Argument<String> relflgBox = new Argument<>();
Platform.dbFetchFields( "", relflgBox );
relflg = relflgBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( ! Platform.isEmpty( relflg ) ) if( ! Platform.isEmpty( relflg ) )
......
...@@ -5,7 +5,9 @@ void updateMsgSta103(String smhinr) ...@@ -5,7 +5,9 @@ void updateMsgSta103(String smhinr)
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "select sta from clr where smhinr=?", smhinr ); Platform.dbExecuteSQL( "select sta from clr where smhinr=?", smhinr );
int err = Platform.errorCode(); int err = Platform.errorCode();
Platform.dbFetchFields( "", sta ); Argument<String> staBox = new Argument<>();
Platform.dbFetchFields( "", staBox );
sta = staBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
String sql = NULLSTR; String sql = NULLSTR;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
......
...@@ -32,7 +32,13 @@ void setSmhFieldsForTco(IStream argstm) ...@@ -32,7 +32,13 @@ void setSmhFieldsForTco(IStream argstm)
if( ! Platform.isEmpty( smhInr ) ) if( ! Platform.isEmpty( smhInr ) )
{ {
Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT from SMH where INR = ?", smhInr ); Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT from SMH where INR = ?", smhInr );
Platform.dbFetchFields( "", msgTyp, "", sndKey, "", relCur, "", relAmt ); Argument<String> msgTypBox = new Argument<>();
Argument<String> sndKeyBox = new Argument<>();
Argument<String> relCurBox = new Argument<>();
Platform.dbFetchFields( "", msgTypBox, "", sndKeyBox, "", relCurBox, "", relAmt );
msgTyp = msgTypBox.value;
sndKey = sndKeyBox.value;
relCur = relCurBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -12,7 +12,9 @@ void delEntryWithoutRelease() ...@@ -12,7 +12,9 @@ void delEntryWithoutRelease()
relflg = ""; relflg = "";
Platform.dbExecuteSQL( "select relflg from trn where inr in (select creobjinr from spt where creobjtyp='TRN' and inr=? )", sptinr ); Platform.dbExecuteSQL( "select relflg from trn where inr in (select creobjinr from spt where creobjtyp='TRN' and inr=? )", sptinr );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", relflg ); Argument<String> relflgBox = new Argument<>();
Platform.dbFetchFields( "", relflgBox );
relflg = relflgBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.compareTo(relflg, "R") != 0 && Platform.compareTo(relflg, "F") != 0 ) if( Platform.compareTo(relflg, "R") != 0 && Platform.compareTo(relflg, "F") != 0 )
......
...@@ -26,7 +26,9 @@ void addRcvBch2Stm(IStream argstm) ...@@ -26,7 +26,9 @@ void addRcvBch2Stm(IStream argstm)
sptinr1 = Platform.getStreamfield( line, 1, "\t" ); sptinr1 = Platform.getStreamfield( line, 1, "\t" );
sqlhinmsg = sqlbopnet + Platform.sqlLit( sptinr1 ); sqlhinmsg = sqlbopnet + Platform.sqlLit( sptinr1 );
Platform.dbExecuteSql( sqlhinmsg ); Platform.dbExecuteSql( sqlhinmsg );
Platform.dbFetchFields( "", hinmsg ); Argument<String> hinmsgBox = new Argument<>();
Platform.dbFetchFields( "", hinmsgBox );
hinmsg = hinmsgBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
//############################### //###############################
...@@ -36,7 +38,9 @@ void addRcvBch2Stm(IStream argstm) ...@@ -36,7 +38,9 @@ void addRcvBch2Stm(IStream argstm)
sql = "select bchname from bch where inr in (select bchkeyinr from spt where inr=" + Platform.sqlLit( sptinr ) + ")"; sql = "select bchname from bch where inr in (select bchkeyinr from spt where inr=" + Platform.sqlLit( sptinr ) + ")";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", bchnam ); Argument<String> bchnamBox = new Argument<>();
Platform.dbFetchFields( "", bchnamBox );
bchnam = bchnamBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
//$line = $line + TAB + $bchnam //$line = $line + TAB + $bchnam
......
...@@ -14,11 +14,17 @@ default $usrcon order 1000 ...@@ -14,11 +14,17 @@ default $usrcon order 1000
Platform.streamClear( b ); Platform.streamClear( b );
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( bchsql ); Platform.dbExecuteSql( bchsql );
Platform.dbFetchFields( "", extkey, "", nam ); Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
Platform.streamInsert( b, 0, extkey + "\t" + nam ); Platform.streamInsert( b, 0, extkey + "\t" + nam );
Platform.dbFetchFields( "", extkey, "", nam ); Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -42,7 +42,9 @@ event $delnet order 1000 ...@@ -42,7 +42,9 @@ event $delnet order 1000
{ {
sqlSptExtkey = "Select extkey from spt where inr = " + Platform.sqlLit( sptInr ); sqlSptExtkey = "Select extkey from spt where inr = " + Platform.sqlLit( sptInr );
Platform.dbExecuteSql( sqlSptExtkey ); Platform.dbExecuteSql( sqlSptExtkey );
Platform.dbFetchFields( "", extkey ); Argument<String> extkeyBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox );
extkey = extkeyBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
/**if IsEmpty( SPT\EXTKEY ) then /**if IsEmpty( SPT\EXTKEY ) then
...@@ -63,7 +65,17 @@ event $delnet order 1000 ...@@ -63,7 +65,17 @@ event $delnet order 1000
fax2 = ""; fax2 = "";
idtype = ""; idtype = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype ); Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
//######### //#########
......
...@@ -42,7 +42,9 @@ default $delnet order 1000 ...@@ -42,7 +42,9 @@ default $delnet order 1000
error = Platform.errorCode(); error = Platform.errorCode();
if( error == 0 ) if( error == 0 )
{ {
Platform.dbFetchFields( "", cortyp ); Argument<String> cortypBox = new Argument<>();
Platform.dbFetchFields( "", cortypBox );
cortyp = cortypBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.compareTo( cortyp , "TCO" ) == 0 && Platform.compareTo( $selfrm.getValue() , "CPTOPN" ) == 0 ) if( Platform.compareTo( cortyp , "TCO" ) == 0 && Platform.compareTo( $selfrm.getValue() , "CPTOPN" ) == 0 )
...@@ -66,7 +68,9 @@ default $delnet order 1000 ...@@ -66,7 +68,9 @@ default $delnet order 1000
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", nbsaplref ); Argument<String> nbsaplrefBox = new Argument<>();
Platform.dbFetchFields( "", nbsaplrefBox );
nbsaplref = nbsaplrefBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -13,7 +13,13 @@ static void getNraHzBank(IStream branch) ...@@ -13,7 +13,13 @@ static void getNraHzBank(IStream branch)
{ {
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
if( Platform.isEmpty( values ) ) if( Platform.isEmpty( values ) )
...@@ -25,7 +31,10 @@ static void getNraHzBank(IStream branch) ...@@ -25,7 +31,10 @@ static void getNraHzBank(IStream branch)
values = values + "\r\n" + inr; values = values + "\r\n" + inr;
} }
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname ); Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -96,7 +96,9 @@ event $bakbut order 1000 ...@@ -96,7 +96,9 @@ event $bakbut order 1000
smhinr = ""; smhinr = "";
sql = "select smhinr from spt where inr = '" + sptinr + "'"; sql = "select smhinr from spt where inr = '" + sptinr + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", smhinr ); Argument<String> smhinrBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox );
smhinr = smhinrBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
if( err != 0 || err != tdOdbcNotFound ) if( err != 0 || err != tdOdbcNotFound )
{ {
...@@ -110,7 +112,9 @@ event $bakbut order 1000 ...@@ -110,7 +112,9 @@ event $bakbut order 1000
// $sql = "select FPSSID from smh where inr='RG000525 // $sql = "select FPSSID from smh where inr='RG000525
sql = "select FPSSID from fps where tranid='RECIEVE' and trim(filnam)=(select trim(docfil) || '.' || trim(docfxt) from smh where inr='" + smhinr + "')"; sql = "select FPSSID from fps where tranid='RECIEVE' and trim(filnam)=(select trim(docfil) || '.' || trim(docfxt) from smh where inr='" + smhinr + "')";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", fpssid ); Argument<String> fpssidBox = new Argument<>();
Platform.dbFetchFields( "", fpssidBox );
fpssid = fpssidBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
if( err != 0 && err != tdOdbcNotFound ) if( err != 0 && err != tdOdbcNotFound )
{ {
......
...@@ -29,7 +29,23 @@ event onPanelShow $smscpol2 order 100 ...@@ -29,7 +29,23 @@ event onPanelShow $smscpol2 order 100
sql = "Select TELNO,TELNO2,ERRCODE,ERRORMSG,ERRCODE2,ERRORMSG2,SMSTXT,SNDDAT from sms where sptinr=" + Platform.sqlLit( sptinr ); sql = "Select TELNO,TELNO2,ERRCODE,ERRORMSG,ERRCODE2,ERRORMSG2,SMSTXT,SNDDAT from sms where sptinr=" + Platform.sqlLit( sptinr );
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
tmpresult = ""; tmpresult = "";
Platform.dbFetchFields( "", telno1, "", telno2, "", errcode, "", errormsg, "", errcode2, "", errormsg2, "", smstxt, "", snddat ); Argument<String> telno1Box = new Argument<>();
Argument<String> telno2Box = new Argument<>();
Argument<String> errcodeBox = new Argument<>();
Argument<String> errormsgBox = new Argument<>();
Argument<String> errcode2Box = new Argument<>();
Argument<String> errormsg2Box = new Argument<>();
Argument<String> smstxtBox = new Argument<>();
Argument<String> snddatBox = new Argument<>();
Platform.dbFetchFields( "", telno1Box, "", telno2Box, "", errcodeBox, "", errormsgBox, "", errcode2Box, "", errormsg2Box, "", smstxtBox, "", snddatBox );
telno1 = telno1Box.value;
telno2 = telno2Box.value;
errcode = errcodeBox.value;
errormsg = errormsgBox.value;
errcode2 = errcode2Box.value;
errormsg2 = errormsg2Box.value;
smstxt = smstxtBox.value;
snddat = snddatBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -197,12 +197,18 @@ event $prtbop order 1000 ...@@ -197,12 +197,18 @@ event $prtbop order 1000
{ {
sql = "select nam1 from pty where extkey = ? "; sql = "select nam1 from pty where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() ); Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", nam1 ); Argument<String> nam1Box = new Argument<>();
Platform.dbFetchFields( "", nam1Box );
nam1 = nam1Box.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
sql = "select tel2 , fax2 from adr where extkey = ? "; sql = "select tel2 , fax2 from adr where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() ); Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", tel, "", fax2 ); Argument<String> telBox = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Platform.dbFetchFields( "", telBox, "", fax2Box );
tel = telBox.value;
fax2 = fax2Box.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -17,7 +17,9 @@ event $save order 1000 ...@@ -17,7 +17,9 @@ event $save order 1000
sql = "select extkey from pty where EXTKEY='" + $newextkey.getValue() + "'"; sql = "select extkey from pty where EXTKEY='" + $newextkey.getValue() + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
relFlg = ""; relFlg = "";
Platform.dbFetchFields( "", relFlg ); Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.isEmpty( relFlg ) ) if( Platform.isEmpty( relFlg ) )
......
...@@ -236,12 +236,18 @@ event $vewbop order 1000 ...@@ -236,12 +236,18 @@ event $vewbop order 1000
{ {
sql = "select nam1 from pty where extkey = ? "; sql = "select nam1 from pty where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() ); Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", nam1 ); Argument<String> nam1Box = new Argument<>();
Platform.dbFetchFields( "", nam1Box );
nam1 = nam1Box.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
sql = "select tel2 , fax2 from adr where extkey = ? "; sql = "select tel2 , fax2 from adr where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() ); Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", tel, "", fax2 ); Argument<String> telBox = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Platform.dbFetchFields( "", telBox, "", fax2Box );
tel = telBox.value;
fax2 = fax2Box.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -23,14 +23,24 @@ void delete910or202BindMsg() ...@@ -23,14 +23,24 @@ void delete910or202BindMsg()
frm = ""; frm = "";
Platform.dbExecuteSQL( " select smhinr , delflg , msgtyp,frm from spt where inr = ? and msgtyp in ('202','910') ", sptinr ); Platform.dbExecuteSQL( " select smhinr , delflg , msgtyp,frm from spt where inr = ? and msgtyp in ('202','910') ", sptinr );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", smhinr, "", delflg, "", msgtyp, "", frm ); Argument<String> smhinrBox = new Argument<>();
Argument<String> delflgBox = new Argument<>();
Argument<String> msgtypBox = new Argument<>();
Argument<String> frmBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox, "", delflgBox, "", msgtypBox, "", frmBox );
smhinr = smhinrBox.value;
delflg = delflgBox.value;
msgtyp = msgtypBox.value;
frm = frmBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.isEmpty( delflg ) && ( Platform.compareTo( msgtyp , "910" ) == 0 || Platform.compareTo( msgtyp , "202" ) == 0 ) && Platform.compareTo( frm , "CPTADV" ) == 0 ) if( Platform.isEmpty( delflg ) && ( Platform.compareTo( msgtyp , "910" ) == 0 || Platform.compareTo( msgtyp , "202" ) == 0 ) && Platform.compareTo( frm , "CPTADV" ) == 0 )
{ {
Platform.dbExecuteSQL( "select inr from smh where grpinr = ( select grpinr from smh where inr= ? ) and grpinr != ' ' and msgtyp='103' ", smhinr ); Platform.dbExecuteSQL( "select inr from smh where grpinr = ( select grpinr from smh where inr= ? ) and grpinr != ' ' and msgtyp='103' ", smhinr );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", v103inr ); Argument<String> v103inrBox = new Argument<>();
Platform.dbFetchFields( "", v103inrBox );
v103inr = v103inrBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( ! Platform.isEmpty( v103inr ) ) if( ! Platform.isEmpty( v103inr ) )
......
...@@ -4,7 +4,9 @@ void addnewsptforcnd() ...@@ -4,7 +4,9 @@ void addnewsptforcnd()
String sql = "select * from ACT where typ not in('LO') AND EXTKEY='" + $cndp1\cnd\pyeact.getValue() + "'"; String sql = "select * from ACT where typ not in('LO') AND EXTKEY='" + $cndp1\cnd\pyeact.getValue() + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
int relFlg = 0; int relFlg = 0;
Platform.dbFetchFields( "", relFlg ); Argument<Integer> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
int ignore = Platform.errorCode(); int ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.compareTo( $cndp1\cnd\systyp , "HVPS" ) == 0 ) if( Platform.compareTo( $cndp1\cnd\systyp , "HVPS" ) == 0 )
......
...@@ -22,7 +22,9 @@ default $buttco order 1000 ...@@ -22,7 +22,9 @@ default $buttco order 1000
error = Platform.errorCode(); error = Platform.errorCode();
if( error == 0 ) if( error == 0 )
{ {
Platform.dbFetchFields( "", msgtyp ); Argument<String> msgtypBox = new Argument<>();
Platform.dbFetchFields( "", msgtypBox );
msgtyp = msgtypBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -56,7 +56,9 @@ void gettcoinfo(String filename) ...@@ -56,7 +56,9 @@ void gettcoinfo(String filename)
rptno = ""; rptno = "";
if( error == 0 ) if( error == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Argument<String> rptnoBox = new Argument<>();
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -15,7 +15,11 @@ event $query order 1000 ...@@ -15,7 +15,11 @@ event $query order 1000
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
relFlg = ""; relFlg = "";
relNam = ""; relNam = "";
Platform.dbFetchFields( "", relFlg, "", relNam ); Argument<String> relFlgBox = new Argument<>();
Argument<String> relNamBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox, "", relNamBox );
relFlg = relFlgBox.value;
relNam = relNamBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( ! Platform.isEmpty( relFlg ) ) if( ! Platform.isEmpty( relFlg ) )
......
...@@ -8,7 +8,9 @@ static String setTelno(String inr) ...@@ -8,7 +8,9 @@ static String setTelno(String inr)
{ {
sql = "Select t21tel33n from Spt where inr =" + Platform.sqlLit( sptInr ); sql = "Select t21tel33n from Spt where inr =" + Platform.sqlLit( sptInr );
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", telno ); Argument<String> telnoBox = new Argument<>();
Platform.dbFetchFields( "", telnoBox );
telno = telnoBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
return telno; return telno;
......
...@@ -7,7 +7,9 @@ static String selectNam(String inr) ...@@ -7,7 +7,9 @@ static String selectNam(String inr)
{ {
sql = "Select T21BEN59 from Spt where inr =" + Platform.sqlLit( inr ); sql = "Select T21BEN59 from Spt where inr =" + Platform.sqlLit( inr );
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", t21ben59 ); Argument<String> t21ben59Box = new Argument<>();
Platform.dbFetchFields( "", t21ben59Box );
t21ben59 = t21ben59Box.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
return t21ben59; return t21ben59;
......
...@@ -27,7 +27,25 @@ void smshmdsnd() ...@@ -27,7 +27,25 @@ void smshmdsnd()
smhF21 = Platform.mid( smhF21, 1, 2 ); smhF21 = Platform.mid( smhF21, 1, 2 );
String act59 = Platform.trim( $spt\act59.getValue() ); String act59 = Platform.trim( $spt\act59.getValue() );
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype, "", tel4, "", fax4, "", tel5, "", fax5 ); Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Argument<String> tel4Box = new Argument<>();
Argument<String> fax4Box = new Argument<>();
Argument<String> tel5Box = new Argument<>();
Argument<String> fax5Box = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox, "", tel4Box, "", fax4Box, "", tel5Box, "", fax5Box );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
tel4 = tel4Box.value;
fax4 = fax4Box.value;
tel5 = tel5Box.value;
fax5 = fax5Box.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
switch( smhF21 ) switch( smhF21 )
......
...@@ -57,7 +57,13 @@ event $smsbut order 1000 ...@@ -57,7 +57,13 @@ event $smsbut order 1000
tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr ); tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( tmpsql ); Platform.dbExecuteSql( tmpsql );
tmpresult = ""; tmpresult = "";
Platform.dbFetchFields( "", tmpresult, "", act59, "", v50nam ); Argument<String> tmpresultBox = new Argument<>();
Argument<String> act59Box = new Argument<>();
Argument<String> v50namBox = new Argument<>();
Platform.dbFetchFields( "", tmpresultBox, "", act59Box, "", v50namBox );
tmpresult = tmpresultBox.value;
act59 = act59Box.value;
v50nam = v50namBox.value;
ignore1 = Platform.errorCode(); ignore1 = Platform.errorCode();
$spt\extkey = tmpresult; $spt\extkey = tmpresult;
$spt\inr = tmpsptinr; $spt\inr = tmpsptinr;
...@@ -81,7 +87,17 @@ event $smsbut order 1000 ...@@ -81,7 +87,17 @@ event $smsbut order 1000
fax2 = ""; fax2 = "";
idtype = ""; idtype = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype ); Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
$telno = tel2; $telno = tel2;
...@@ -159,7 +175,11 @@ event $smsbut order 1000 ...@@ -159,7 +175,11 @@ event $smsbut order 1000
sbtjzt = Platform.getStreamfield( line, 27, "\t" ); sbtjzt = Platform.getStreamfield( line, 27, "\t" );
extkeysql = "select extkey,(Select IDTYPE from pty where extkey = spt.extkey ) from spt where inr =" + Platform.sqlLit( tmpsptinr ); extkeysql = "select extkey,(Select IDTYPE from pty where extkey = spt.extkey ) from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( extkeysql ); Platform.dbExecuteSql( extkeysql );
Platform.dbFetchFields( "", sptExtkey, "", ptyIdType ); Argument<String> sptExtkeyBox = new Argument<>();
Argument<String> ptyIdTypeBox = new Argument<>();
Platform.dbFetchFields( "", sptExtkeyBox, "", ptyIdTypeBox );
sptExtkey = sptExtkeyBox.value;
ptyIdType = ptyIdTypeBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
// 客户号为空,发送状态为"未发送","发送失败",提交状态为"已提交",客户类型为非对公客户 则不支持批量短信重发。 // 客户号为空,发送状态为"未发送","发送失败",提交状态为"已提交",客户类型为非对公客户 则不支持批量短信重发。
...@@ -199,7 +219,13 @@ event $smsbut order 1000 ...@@ -199,7 +219,13 @@ event $smsbut order 1000
tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr ); tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( tmpsql ); Platform.dbExecuteSql( tmpsql );
tmpresult = ""; tmpresult = "";
Platform.dbFetchFields( "", tmpresult, "", act59, "", v50nam ); Argument<String> tmpresultBox = new Argument<>();
Argument<String> act59Box = new Argument<>();
Argument<String> v50namBox = new Argument<>();
Platform.dbFetchFields( "", tmpresultBox, "", act59Box, "", v50namBox );
tmpresult = tmpresultBox.value;
act59 = act59Box.value;
v50nam = v50namBox.value;
ignore1 = Platform.errorCode(); ignore1 = Platform.errorCode();
$spt\extkey = tmpresult; $spt\extkey = tmpresult;
$spt\inr = tmpsptinr; $spt\inr = tmpsptinr;
...@@ -212,7 +238,17 @@ event $smsbut order 1000 ...@@ -212,7 +238,17 @@ event $smsbut order 1000
fax2 = ""; fax2 = "";
idtype = ""; idtype = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype ); Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
$telno = tel2; $telno = tel2;
......
...@@ -38,7 +38,19 @@ void setSmhFields(IStream argstm) ...@@ -38,7 +38,19 @@ void setSmhFields(IStream argstm)
if( ! Platform.isEmpty( smhInr ) ) if( ! Platform.isEmpty( smhInr ) )
{ {
Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT,PRTFLG,PRTUSR , F121 from SMH where INR = ?", smhInr ); Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT,PRTFLG,PRTUSR , F121 from SMH where INR = ?", smhInr );
Platform.dbFetchFields( "", msgTyp, "", sndKey, "", relCur, "", relAmt, "", prtflg, "", prtusr, "", f121 ); Argument<String> msgTypBox = new Argument<>();
Argument<String> sndKeyBox = new Argument<>();
Argument<String> relCurBox = new Argument<>();
Argument<String> prtflgBox = new Argument<>();
Argument<String> prtusrBox = new Argument<>();
Argument<String> f121Box = new Argument<>();
Platform.dbFetchFields( "", msgTypBox, "", sndKeyBox, "", relCurBox, "", relAmt, "", prtflgBox, "", prtusrBox, "", f121Box );
msgTyp = msgTypBox.value;
sndKey = sndKeyBox.value;
relCur = relCurBox.value;
prtflg = prtflgBox.value;
prtusr = prtusrBox.value;
f121 = f121Box.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -19,7 +19,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t ...@@ -19,7 +19,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
inifrmSql = "select inifrm from trn where inr = '" + vtrninr + "'"; inifrmSql = "select inifrm from trn where inr = '" + vtrninr + "'";
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( inifrmSql ); Platform.dbExecuteSql( inifrmSql );
Platform.dbFetchFields( "", retunInifrm ); Argument<String> retunInifrmBox = new Argument<>();
Platform.dbFetchFields( "", retunInifrmBox );
retunInifrm = retunInifrmBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -10,7 +10,9 @@ void cliSaveTRN() ...@@ -10,7 +10,9 @@ void cliSaveTRN()
String sql = "SELECT INR FROM BCH WHERE BRANCH = '" + $heq\accbch.getValue() + "'"; String sql = "SELECT INR FROM BCH WHERE BRANCH = '" + $heq\accbch.getValue() + "'";
String accBchInr = ""; String accBchInr = "";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", accBchInr ); Argument<String> accBchInrBox = new Argument<>();
Platform.dbFetchFields( "", accBchInrBox );
accBchInr = accBchInrBox.value;
int ignore = Platform.errorCode(); int ignore = Platform.errorCode();
$trn\accbchinr = accBchInr; $trn\accbchinr = accBchInr;
$trn\branchinr = $heq\inr; $trn\branchinr = $heq\inr;
......
...@@ -31,7 +31,11 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t ...@@ -31,7 +31,11 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", objTyp, "", objInr ); Argument<String> objTypBox = new Argument<>();
Argument<String> objInrBox = new Argument<>();
Platform.dbFetchFields( "", objTypBox, "", objInrBox );
objTyp = objTypBox.value;
objInr = objInrBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -9,7 +9,9 @@ String getSmhInr(String argtrninr) ...@@ -9,7 +9,9 @@ String getSmhInr(String argtrninr)
} }
else else
{ {
Platform.dbFetchFields( "", smhinr ); Argument<String> smhinrBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox );
smhinr = smhinrBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -15,7 +15,11 @@ void getGLErelAMT(String inifrm,String trninr,Argument<String> reloricur,Argumen ...@@ -15,7 +15,11 @@ void getGLErelAMT(String inifrm,String trninr,Argument<String> reloricur,Argumen
default: default:
} }
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", glecur, "", gleamt ); Argument<String> glecurBox = new Argument<>();
Argument<Integer> gleamtBox = new Argument<>();
Platform.dbFetchFields( "", glecurBox, "", gleamtBox );
glecur = glecurBox.value;
gleamt = gleamtBox.value;
int err = Platform.errorCode(); int err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( ! Platform.isEmpty( glecur ) && gleamt != 0 ) if( ! Platform.isEmpty( glecur ) && gleamt != 0 )
......
...@@ -5,7 +5,9 @@ static void gethndtyp(String objtyp,String objinr,Argument<String> hndtyp) ...@@ -5,7 +5,9 @@ static void gethndtyp(String objtyp,String objinr,Argument<String> hndtyp)
Platform.dbExecuteSql( "select hndtyp from " + objtyp + " where inr='" + objinr + "'" ); Platform.dbExecuteSql( "select hndtyp from " + objtyp + " where inr='" + objinr + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vhndtyp ); Argument<String> vhndtypBox = new Argument<>();
Platform.dbFetchFields( "", vhndtypBox );
vhndtyp = vhndtypBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
hndtyp.value = vhndtyp; hndtyp.value = vhndtyp;
......
...@@ -28,7 +28,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -28,7 +28,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( arc ) ) if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( arc ) )
{ {
Platform.dbExecuteSql( "select BCHKEYINR from " + arc + " where INR = " + Platform.sqlLit( objinr ) ); Platform.dbExecuteSql( "select BCHKEYINR from " + arc + " where INR = " + Platform.sqlLit( objinr ) );
Platform.dbFetchFields( "", bchkeyinr ); Argument<String> bchkeyinrBox = new Argument<>();
Platform.dbFetchFields( "", bchkeyinrBox );
bchkeyinr = bchkeyinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -37,7 +39,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -37,7 +39,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
} }
String vbchkey = ""; String vbchkey = "";
Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) ); Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) );
Platform.dbFetchFields( "", vbchkey ); Argument<String> vbchkeyBox = new Argument<>();
Platform.dbFetchFields( "", vbchkeyBox );
vbchkey = vbchkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -62,7 +66,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -62,7 +66,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" ); Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", upbranch ); Argument<String> upbranchBox = new Argument<>();
Platform.dbFetchFields( "", upbranchBox );
upbranch = upbranchBox.value;
if( Platform.compareTo( vbchkey , upbranch ) == 0 && Platform.errorCode() == 0 ) if( Platform.compareTo( vbchkey , upbranch ) == 0 && Platform.errorCode() == 0 )
{ {
checkbch.value = true; checkbch.value = true;
...@@ -85,7 +91,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -85,7 +91,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select nam1 from pty where extkey='" + extkey + "'" ); Platform.dbExecuteSql( "select nam1 from pty where extkey='" + extkey + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", nam1.value ); Platform.dbFetchFields( "", nam1 );
if( Platform.errorCode() != 0 ) if( Platform.errorCode() != 0 )
{ {
// nam1 = 'R0000006 // nam1 = 'R0000006
...@@ -101,7 +107,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -101,7 +107,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
// DBFetchFields( "", $newinr ) // DBFetchFields( "", $newinr )
Platform.dbFetchFields( "", ptyinr ); Argument<String> ptyinrBox = new Argument<>();
Platform.dbFetchFields( "", ptyinrBox );
ptyinr = ptyinrBox.value;
if( Platform.errorCode() != 0 ) if( Platform.errorCode() != 0 )
{ {
ptyinr = " "; ptyinr = " ";
...@@ -112,7 +120,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex ...@@ -112,7 +120,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select nam1 from pty where inr='" + ptyinr + "'" ); Platform.dbExecuteSql( "select nam1 from pty where inr='" + ptyinr + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", nam1.value ); Platform.dbFetchFields( "", nam1 );
if( Platform.errorCode() != 0 ) if( Platform.errorCode() != 0 )
{ {
nam1.value = #CT000010; nam1.value = #CT000010;
......
void getcpdetail(String objtyp,String objinr,Argument<String> paybank,Argument<String> orcnam,Argument<String> paytyp) void getcpdetail(String objtyp,String objinr,Argument<String> paybank,Argument<String> orcnam,Argument<String> paytyp)
{ {
String vpaybank = ""; // String vpaybank = "";
String vorcnam = ""; // String vorcnam = "";
String vpaytyp = ""; // String vpaytyp = "";
if( Platform.compareTo( objtyp , "CPD" ) == 0 ) if( Platform.compareTo( objtyp , "CPD" ) == 0 )
{ {
// DBRead( \BIMEMU\CPDGRP\REC, "where inr=" + objinr ) // DBRead( \BIMEMU\CPDGRP\REC, "where inr=" + objinr )
Platform.dbExecuteSql( "select pybnam,orcnam,paytyp from cpd where inr='" + objinr + "'" ); Platform.dbExecuteSql( "select pybnam,orcnam,paytyp from cpd where inr='" + objinr + "'" );
Platform.dbFetchFields( "", vpaybank, "", vorcnam, "", vpaytyp ); Platform.dbFetchFields( "", paybank, "", orcnam, "", paytyp );
paybank.value = vpaybank; // paybank.value = vpaybank;
orcnam.value = vorcnam; // orcnam.value = vorcnam;
paytyp.value = vpaytyp; // paytyp.value = vpaytyp;
if( Platform.errorCode() != 0 ) if( Platform.errorCode() != 0 )
{ {
vorcnam = #CT000012; // vorcnam = #CT000012;
orcnam.value = #CT000012;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -24,7 +24,11 @@ void subpenaType(String act,String dbtcdt,String trmtyp) ...@@ -24,7 +24,11 @@ void subpenaType(String act,String dbtcdt,String trmtyp)
int ignore = 0; int ignore = 0;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", sacttrmcod, "", snam ); Argument<String> sacttrmcodBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "", sacttrmcodBox, "", snamBox );
sacttrmcod = sacttrmcodBox.value;
snam = snamBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -17,7 +17,11 @@ static void getTermTypField_subp(String trmtyp,Argument<String> act_id,Argument< ...@@ -17,7 +17,11 @@ static void getTermTypField_subp(String trmtyp,Argument<String> act_id,Argument<
Platform.dbExecuteSql( "SELECT TRMTYP, NAM FROM TRM WHERE TRMCOD ='" + trmtyp + "'" ); Platform.dbExecuteSql( "SELECT TRMTYP, NAM FROM TRM WHERE TRMCOD ='" + trmtyp + "'" );
while( Platform.errorCode() <= 0 ) while( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "TRMTYP", strmtyp, "NAM", snam ); Argument<String> strmtypBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "TRMTYP", strmtypBox, "NAM", snamBox );
strmtyp = strmtypBox.value;
snam = snamBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
act_id.value = strmtyp; act_id.value = strmtyp;
......
...@@ -4,7 +4,9 @@ String getRef(String cliextkey,String objinr,String objtyp) ...@@ -4,7 +4,9 @@ String getRef(String cliextkey,String objinr,String objtyp)
//DBExecuteSQL( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY ='R0000216 //DBExecuteSQL( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY ='R0000216
Platform.dbExecuteSql( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY LIKE '" + Platform.mid( cliextkey, 1, 10 ) + "%') AND objtyp='" + objtyp + "' AND OBJINR='" + objinr + "' " ); Platform.dbExecuteSql( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY LIKE '" + Platform.mid( cliextkey, 1, 10 ) + "%') AND objtyp='" + objtyp + "' AND OBJINR='" + objinr + "' " );
int err = Platform.errorCode(); int err = Platform.errorCode();
Platform.dbFetchFields( "", fileds ); Argument<String> filedsBox = new Argument<>();
Platform.dbFetchFields( "", filedsBox );
fileds = filedsBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
return fileds; return fileds;
......
...@@ -12,7 +12,19 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -12,7 +12,19 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( objtyp ) ) if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( objtyp ) )
{ {
Platform.dbExecuteSql( "select PYEPTYINR, ORCPTYINR, ORIPTYINR, PAYTYPE, PAYTYP, BCHKEYINR from " + objtyp + " where INR = " + Platform.sqlLit( objinr ) ); Platform.dbExecuteSql( "select PYEPTYINR, ORCPTYINR, ORIPTYINR, PAYTYPE, PAYTYP, BCHKEYINR from " + objtyp + " where INR = " + Platform.sqlLit( objinr ) );
Platform.dbFetchFields( "", pyeptyinr, "", orcptyinr, "", oriptyinr, "", vpaytype, "", paytyp, "", bchkeyinr ); Argument<String> pyeptyinrBox = new Argument<>();
Argument<String> orcptyinrBox = new Argument<>();
Argument<String> oriptyinrBox = new Argument<>();
Argument<String> vpaytypeBox = new Argument<>();
Argument<String> paytypBox = new Argument<>();
Argument<String> bchkeyinrBox = new Argument<>();
Platform.dbFetchFields( "", pyeptyinrBox, "", orcptyinrBox, "", oriptyinrBox, "", vpaytypeBox, "", paytypBox, "", bchkeyinrBox );
pyeptyinr = pyeptyinrBox.value;
orcptyinr = orcptyinrBox.value;
oriptyinr = oriptyinrBox.value;
vpaytype = vpaytypeBox.value;
paytyp = paytypBox.value;
bchkeyinr = bchkeyinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -22,7 +34,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -22,7 +34,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( pyeptyinr ) ) if( ! Platform.isEmpty( pyeptyinr ) )
{ {
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( pyeptyinr ) ); Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( pyeptyinr ) );
Platform.dbFetchFields( "", pyenam1 ); Argument<String> pyenam1Box = new Argument<>();
Platform.dbFetchFields( "", pyenam1Box );
pyenam1 = pyenam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -32,7 +46,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -32,7 +46,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( orcptyinr ) ) if( ! Platform.isEmpty( orcptyinr ) )
{ {
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( orcptyinr ) ); Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( orcptyinr ) );
Platform.dbFetchFields( "", orcnam1 ); Argument<String> orcnam1Box = new Argument<>();
Platform.dbFetchFields( "", orcnam1Box );
orcnam1 = orcnam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -42,7 +58,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -42,7 +58,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( oriptyinr ) ) if( ! Platform.isEmpty( oriptyinr ) )
{ {
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( oriptyinr ) ); Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( oriptyinr ) );
Platform.dbFetchFields( "", orinam1 ); Argument<String> orinam1Box = new Argument<>();
Platform.dbFetchFields( "", orinam1Box );
orinam1 = orinam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -51,7 +69,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -51,7 +69,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
} }
String bchkey = ""; String bchkey = "";
Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) ); Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) );
Platform.dbFetchFields( "", bchkey ); Argument<String> bchkeyBox = new Argument<>();
Platform.dbFetchFields( "", bchkeyBox );
bchkey = bchkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -74,7 +94,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume ...@@ -74,7 +94,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" ); Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", upbranch ); Argument<String> upbranchBox = new Argument<>();
Platform.dbFetchFields( "", upbranchBox );
upbranch = upbranchBox.value;
if( Platform.compareTo( bchkey , upbranch ) == 0 && Platform.errorCode() == 0 ) if( Platform.compareTo( bchkey , upbranch ) == 0 && Platform.errorCode() == 0 )
{ {
checkbch.value = true; checkbch.value = true;
......
...@@ -5,7 +5,9 @@ void getcpdobjtyp(String objinr,Argument<String> paytyp) ...@@ -5,7 +5,9 @@ void getcpdobjtyp(String objinr,Argument<String> paytyp)
Platform.dbExecuteSql( "select paytyp from cpd where inr='" + objinr + "'" ); Platform.dbExecuteSql( "select paytyp from cpd where inr='" + objinr + "'" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vpaytyp ); Argument<String> vpaytypBox = new Argument<>();
Platform.dbFetchFields( "", vpaytypBox );
vpaytyp = vpaytypBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
paytyp.value = vpaytyp; paytyp.value = vpaytyp;
......
...@@ -8,7 +8,13 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin ...@@ -8,7 +8,13 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
int ignore = 0; int ignore = 0;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", acttrmcod, "", trmtyp, "", snam ); Argument<String> acttrmcodBox = new Argument<>();
Argument<String> trmtypBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "", acttrmcodBox, "", trmtypBox, "", snamBox );
acttrmcod = acttrmcodBox.value;
trmtyp = trmtypBox.value;
snam = snamBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -99,7 +105,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin ...@@ -99,7 +105,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
Platform.dbExecuteSql( "SELECT FXTYP FROM FXD WHERE INR ='" + objinr + "'" ); Platform.dbExecuteSql( "SELECT FXTYP FROM FXD WHERE INR ='" + objinr + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", fxtyp ); Argument<String> fxtypBox = new Argument<>();
Platform.dbFetchFields( "", fxtypBox );
fxtyp = fxtypBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -251,7 +259,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin ...@@ -251,7 +259,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
printB( title3, dat, nam1, act, amount, sf, txt1, info3, hxdh, sbnum ); printB( title3, dat, nam1, act, amount, sf, txt1, info3, hxdh, sbnum );
frame = ""; frame = "";
Platform.dbExecuteSQL( "SELECT INIFRM FROM TRN WHERE INR=?", $\trn\inr.getValue() ); Platform.dbExecuteSQL( "SELECT INIFRM FROM TRN WHERE INR=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", frame ); Argument<String> frameBox = new Argument<>();
Platform.dbFetchFields( "", frameBox );
frame = frameBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -9,7 +9,9 @@ void printA(String title,String dat,String shm,String act,String amount,String t ...@@ -9,7 +9,9 @@ void printA(String title,String dat,String shm,String act,String amount,String t
if( ! Platform.isEmpty( act ) ) if( ! Platform.isEmpty( act ) )
{ {
Platform.dbExecuteSql( "select nam from act where extkey = " + Platform.sqlLit( act ) ); Platform.dbExecuteSql( "select nam from act where extkey = " + Platform.sqlLit( act ) );
Platform.dbFetchFields( "", actnam ); Argument<String> actnamBox = new Argument<>();
Platform.dbFetchFields( "", actnamBox );
actnam = actnamBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -23,7 +25,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t ...@@ -23,7 +25,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t
String times = ""; String times = "";
String strname = ""; String strname = "";
Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() ); Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", times, "", strname ); Argument<String> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Platform.dbFetchFields( "", timesBox, "", strnameBox );
times = timesBox.value;
strname = strnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -43,7 +49,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t ...@@ -43,7 +49,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t
String branch = ""; String branch = "";
String bchname = ""; String bchname = "";
Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() ); Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() );
Platform.dbFetchFields( "", branch, "", bchname ); Argument<String> branchBox = new Argument<>();
Argument<String> bchnameBox = new Argument<>();
Platform.dbFetchFields( "", branchBox, "", bchnameBox );
branch = branchBox.value;
bchname = bchnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -8,7 +8,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s ...@@ -8,7 +8,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s
String times = ""; String times = "";
String strname = ""; String strname = "";
Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() ); Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", times, "", strname ); // Platform.dbFetchFields( "", times, "", strname );
Argument<String> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Platform.dbFetchFields( "", timesBox, "", strnameBox );
times = timesBox.value;
strname = strnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
...@@ -64,7 +69,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s ...@@ -64,7 +69,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s
String branch = ""; String branch = "";
String bchname = ""; String bchname = "";
Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() ); Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() );
Platform.dbFetchFields( "", branch, "", bchname ); // Platform.dbFetchFields( "", branch, "", bchname );
Argument<String> branchBox = new Argument<>();
Argument<String> bchnameBox = new Argument<>();
Platform.dbFetchFields( "", branchBox, "", bchnameBox );
branch = branchBox.value;
bchname = bchnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -4,6 +4,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -4,6 +4,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
int ignore = 0; int ignore = 0;
String ownref = NULLSTR; String ownref = NULLSTR;
String type = NULLSTR; String type = NULLSTR;
Argument<String> rptnoBox = new Argument<>();
Argument<String> ownrefBox = new Argument<>();
switch( objtyp ) switch( objtyp )
{ {
case "BRD": case "BRD":
...@@ -12,7 +14,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -12,7 +14,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBC WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" ); Platform.dbExecuteSql( "SELECT rptno FROM DBC WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -21,7 +24,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -21,7 +24,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBF WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" ); Platform.dbExecuteSql( "SELECT rptno FROM DBF WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -34,7 +38,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -34,7 +38,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" ); Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -43,7 +48,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -43,7 +48,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" ); Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -54,7 +60,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -54,7 +60,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "'" ); Platform.dbExecuteSql( "SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", ownref ); Platform.dbFetchFields( "", ownrefBox );
ownref = ownrefBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -64,7 +71,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -64,7 +71,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE='" + ownref + "'" ); Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -73,7 +81,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -73,7 +81,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE='" + ownref + "'" ); Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -84,7 +93,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -84,7 +93,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBB WHERE BUSCODE='" + ownref + "'" ); Platform.dbExecuteSql( "SELECT rptno FROM DBB WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -93,7 +103,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -93,7 +103,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBE WHERE BUSCODE='" + ownref + "'" ); Platform.dbExecuteSql( "SELECT rptno FROM DBE WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", rptno ); Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -103,10 +114,12 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -103,10 +114,12 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
default: default:
} }
String hx = ""; String hx = "";
Argument<String> hxBox = new Argument<>();
Platform.dbExecuteSql( "SELECT refnos FROM dbm WHERE rptno='" + rptno + "'" ); Platform.dbExecuteSql( "SELECT refnos FROM dbm WHERE rptno='" + rptno + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", hx ); Platform.dbFetchFields( "", hxBox );
hx = hxBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
...@@ -115,7 +128,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String ...@@ -115,7 +128,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT refnos FROM dbr WHERE rptno='" + rptno + "'" ); Platform.dbExecuteSql( "SELECT refnos FROM dbr WHERE rptno='" + rptno + "'" );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", hx ); Platform.dbFetchFields( "", hxBox );
hx = hxBox.value;
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -19,9 +19,15 @@ void svsLoadSavedContent() ...@@ -19,9 +19,15 @@ void svsLoadSavedContent()
String content = ""; String content = "";
String cot = ""; String cot = "";
String con = ""; String con = "";
Argument<String> fldBox = new Argument<>();
Argument<String> cotBox = new Argument<>();
Argument<String> conBox = new Argument<>();
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "FLD", fld, "COT", cot, "CON", con ); Platform.dbFetchFields( "FLD", fldBox, "COT", cotBox, "CON", conBox );
fld = fldBox.value;
cot = cotBox.value;
con = conBox.value;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
content = Platform.mid( cot, 1, 1 ) + con; content = Platform.mid( cot, 1, 1 ) + con;
......
...@@ -12,7 +12,9 @@ static String sptStaOfOtherEntryForObj(IModule argmod) ...@@ -12,7 +12,9 @@ static String sptStaOfOtherEntryForObj(IModule argmod)
{ {
Platform.dbExecuteSQL( "Select distinct STA from SPT where DELFLG = ' ' and OBJTYP = ? and OBJINR = ? and INR <> ?", objTyp, objInr, $\sysmod\spt\inr.getValue() ); Platform.dbExecuteSQL( "Select distinct STA from SPT where DELFLG = ' ' and OBJTYP = ? and OBJINR = ? and INR <> ?", objTyp, objInr, $\sysmod\spt\inr.getValue() );
sptSta = ""; sptSta = "";
Platform.dbFetchFields( "", sptSta ); Argument<String> sptStaBox = new Argument<>();
Platform.dbFetchFields( "", sptStaBox );
sptSta = sptStaBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -52,7 +52,21 @@ static void menuPrint() ...@@ -52,7 +52,21 @@ static void menuPrint()
{ {
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( strsql, trninr1 ); Platform.dbExecuteSQL( strsql, trninr1 );
Platform.dbFetchFields( "", inr, "", trninr, "", times, "", strname, "", filename, "", title1, "", status ); Argument<String> inrBox = new Argument<>();
Argument<String> trninrBox = new Argument<>();
Argument<Integer> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Argument<String> filenameBox = new Argument<>();
Argument<String> title1Box = new Argument<>();
Argument<String> statusBox = new Argument<>();
Platform.dbFetchFields( "", inrBox, "", trninrBox, "", timesBox, "", strnameBox, "", filenameBox, "", title1Box, "", statusBox );
inr = inrBox.value;
trninr = trninrBox.value;
times = timesBox.value;
strname = strnameBox.value;
filename = filenameBox.value;
title1 = title1Box.value;
status = statusBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( Platform.isEmpty( inr ) ) if( Platform.isEmpty( inr ) )
......
...@@ -26,7 +26,11 @@ void allUsrGetStream(IStream argstm) ...@@ -26,7 +26,11 @@ void allUsrGetStream(IStream argstm)
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
while( Platform.errorCode() <= 0 ) while( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam ); Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "EXTKEY", extkeyBox, "NAM", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.streamInsert( argstm, 0, extkey + "\t" + nam ); Platform.streamInsert( argstm, 0, extkey + "\t" + nam );
......
...@@ -26,7 +26,12 @@ void allUsgGetStream(IStream argstm) ...@@ -26,7 +26,12 @@ void allUsgGetStream(IStream argstm)
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
while( Platform.errorCode() <= 0 ) while( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam ); // Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam );
Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "EXTKEY", extkeyBox, "NAM", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.streamInsert( argstm, 0, extkey + "\t" + nam ); Platform.streamInsert( argstm, 0, extkey + "\t" + nam );
......
...@@ -85,7 +85,11 @@ void sptQueUpdate(#spt argspt) ...@@ -85,7 +85,11 @@ void sptQueUpdate(#spt argspt)
{ {
msgtyp = ""; msgtyp = "";
sndkey = ""; sndkey = "";
Platform.dbFetchFields( "MSGTYP", msgtyp, "SNDKEY", sndkey ); Argument<String> msgtypBox = new Argument<>();
Argument<String> sndkeyBox = new Argument<>();
Platform.dbFetchFields( "MSGTYP", msgtypBox, "SNDKEY", sndkeyBox );
msgtyp = msgtypBox.value;
sndkey = sndkeyBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
$que\addref = "MT " + msgtyp; $que\addref = "MT " + msgtyp;
......
...@@ -53,7 +53,9 @@ void getptyfields(String rol,String ptyfileds,Argument<String> ptyval) ...@@ -53,7 +53,9 @@ void getptyfields(String rol,String ptyfileds,Argument<String> ptyval)
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
vptyfileds = ""; vptyfileds = "";
Platform.dbFetchFields( "", vptyfileds ); Argument<String> vptyfiledsBox = new Argument<>();
Platform.dbFetchFields( "", vptyfiledsBox );
vptyfileds = vptyfiledsBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
ptyval.value = vptyfileds; ptyval.value = vptyfileds;
......
...@@ -70,12 +70,15 @@ void getbranch() ...@@ -70,12 +70,15 @@ void getbranch()
return ; // #### goto ENDDO return ; // #### goto ENDDO
} }
branch = ""; branch = "";
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
streamcount = streamcount + 1; streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch ); Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch ); Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -78,12 +78,15 @@ void getbchkey_cp() ...@@ -78,12 +78,15 @@ void getbchkey_cp()
return ; // #### goto ENDDO return ; // #### goto ENDDO
} }
branch = ""; branch = "";
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
streamcount = streamcount + 1; streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch ); Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch ); Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -71,12 +71,15 @@ void getbranch_cp() ...@@ -71,12 +71,15 @@ void getbranch_cp()
return ; // #### goto ENDDO return ; // #### goto ENDDO
} }
branch = ""; branch = "";
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
streamcount = streamcount + 1; streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch ); Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch ); Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -81,12 +81,15 @@ void getbchkey() ...@@ -81,12 +81,15 @@ void getbchkey()
return ; // #### goto ENDDO return ; // #### goto ENDDO
} }
branch = ""; branch = "";
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
streamcount = streamcount + 1; streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch ); Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch ); Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -37,14 +37,17 @@ static String upBCHKEYsqlofbch(String bchnam) ...@@ -37,14 +37,17 @@ static String upBCHKEYsqlofbch(String bchnam)
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
branch = ""; branch = "";
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
if( Platform.streamSearch( bRANCHinr, branch ) <= 0 ) if( Platform.streamSearch( bRANCHinr, branch ) <= 0 )
{ {
Platform.streamInsert( bRANCHinr, 0, branch ); Platform.streamInsert( bRANCHinr, 0, branch );
} }
Platform.dbFetchFields( "", branch ); Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
......
...@@ -244,6 +244,8 @@ void getReferance(Argument<String> ref) ...@@ -244,6 +244,8 @@ void getReferance(Argument<String> ref)
int lengidref = 0; int lengidref = 0;
int nCou = 0; int nCou = 0;
int cou = 0; int cou = 0;
Argument<Integer> nCouBox = new Argument<>();
Argument<Integer> couBox = new Argument<>();
if( Platform.compareTo( sTrname , #CT000517 ) == 0 || Platform.compareTo( sTrname , #CT000518 ) == 0 ) if( Platform.compareTo( sTrname , #CT000517 ) == 0 || Platform.compareTo( sTrname , #CT000518 ) == 0 )
{ {
sIsExist = refIsExist( "GC", "\\GIDGRP\\REC\\INR" ); sIsExist = refIsExist( "GC", "\\GIDGRP\\REC\\INR" );
...@@ -259,7 +261,8 @@ void getReferance(Argument<String> ref) ...@@ -259,7 +261,8 @@ void getReferance(Argument<String> ref)
} }
Platform.dbExecuteSql( "SELECT COUNT(*) FROM GCD WHERE OWNREF LIKE '" + sTrnref + "__'" ); Platform.dbExecuteSql( "SELECT COUNT(*) FROM GCD WHERE OWNREF LIKE '" + sTrnref + "__'" );
nCou = 0; nCou = 0;
Platform.dbFetchFields( "", nCou ); Platform.dbFetchFields( "", nCouBox );
nCou = nCouBox.value;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
} }
...@@ -269,7 +272,8 @@ void getReferance(Argument<String> ref) ...@@ -269,7 +272,8 @@ void getReferance(Argument<String> ref)
//因此此处count取业务表与spt表的和 //因此此处count取业务表与spt表的和
Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" ); Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" );
cou = 0; cou = 0;
Platform.dbFetchFields( "", cou ); Platform.dbFetchFields( "", couBox );
cou = couBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
//--------------end-------------------------------- //--------------end--------------------------------
...@@ -295,7 +299,8 @@ void getReferance(Argument<String> ref) ...@@ -295,7 +299,8 @@ void getReferance(Argument<String> ref)
} }
Platform.dbExecuteSql( "SELECT COUNT(*) FROM BRD WHERE OWNREF LIKE '" + sTrnref + "__'" ); Platform.dbExecuteSql( "SELECT COUNT(*) FROM BRD WHERE OWNREF LIKE '" + sTrnref + "__'" );
nCou = 0; nCou = 0;
Platform.dbFetchFields( "", nCou ); Platform.dbFetchFields( "", nCouBox );
nCou = nCouBox.value;
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
} }
...@@ -305,7 +310,8 @@ void getReferance(Argument<String> ref) ...@@ -305,7 +310,8 @@ void getReferance(Argument<String> ref)
//因此此处count取业务表与spt表的和 //因此此处count取业务表与spt表的和
Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" ); Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" );
cou = 0; cou = 0;
Platform.dbFetchFields( "", cou ); Platform.dbFetchFields( "", couBox );
cou = couBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
nCou = nCou + cou; nCou = nCou + cou;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -36,7 +36,9 @@ void getptyfields1(String rol,String ptyfileds,Argument<String> ptyval) ...@@ -36,7 +36,9 @@ void getptyfields1(String rol,String ptyfileds,Argument<String> ptyval)
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
vptyfileds = ""; vptyfileds = "";
Platform.dbFetchFields( "", vptyfileds ); Argument<String> vptyfiledsBox = new Argument<>();
Platform.dbFetchFields( "", vptyfiledsBox );
vptyfileds = vptyfiledsBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
ptyval.value = vptyfileds; ptyval.value = vptyfileds;
......
...@@ -5,7 +5,9 @@ static String getAccbch() ...@@ -5,7 +5,9 @@ static String getAccbch()
if( ! Platform.isEmpty( $\sysmod\wrkbch\bchkey ) ) if( ! Platform.isEmpty( $\sysmod\wrkbch\bchkey ) )
{ {
Platform.dbExecuteSql( "SELECT ACCBCH FROM BCH WHERE BRANCH = '" + $\sysmod\wrkbch\bchkey.getValue() + "'" ); Platform.dbExecuteSql( "SELECT ACCBCH FROM BCH WHERE BRANCH = '" + $\sysmod\wrkbch\bchkey.getValue() + "'" );
Platform.dbFetchFields( "", accbch ); Argument<String> accbchBox = new Argument<>();
Platform.dbFetchFields( "", accbchBox );
accbch = accbchBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -16,7 +16,9 @@ static boolean checkFinStatus(String objtyp,String objinr) ...@@ -16,7 +16,9 @@ static boolean checkFinStatus(String objtyp,String objinr)
relFlg = ""; relFlg = "";
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
Platform.dbFetchFields( "", relFlg ); Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
} }
} }
int ignore = Platform.errorCode(); int ignore = Platform.errorCode();
......
...@@ -24,7 +24,9 @@ String getRef(String strntbl,int nlen) ...@@ -24,7 +24,9 @@ String getRef(String strntbl,int nlen)
//收单行模式取单证中心为代表机构 //收单行模式取单证中心为代表机构
sql = "select bchflg from bch where branch='" + Platform.trim( $\sysmod\bch\upbchkey.getValue() ) + "'"; sql = "select bchflg from bch where branch='" + Platform.trim( $\sysmod\bch\upbchkey.getValue() ) + "'";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "bchflg", dbjgtxt ); Argument<String> dbjgtxtBox = new Argument<>();
Platform.dbFetchFields( "bchflg", dbjgtxtBox );
dbjgtxt = dbjgtxtBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -60,7 +60,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -60,7 +60,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", zhxz.value, "", yefx.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", zhxz, "", yefx );
err = Platform.errorCode(); err = Platform.errorCode();
} }
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
...@@ -80,7 +80,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -80,7 +80,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye );
err = Platform.errorCode(); err = Platform.errorCode();
yefx.value = "1"; yefx.value = "1";
} }
...@@ -101,7 +101,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -101,7 +101,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", zhxz.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", zhxz );
err = Platform.errorCode(); err = Platform.errorCode();
yefx.value = "1"; yefx.value = "1";
} }
...@@ -122,7 +122,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -122,7 +122,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye );
err = Platform.errorCode(); err = Platform.errorCode();
yefx.value = "0"; yefx.value = "0";
} }
...@@ -143,7 +143,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -143,7 +143,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", yefx.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", yefx );
err = Platform.errorCode(); err = Platform.errorCode();
} }
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
...@@ -163,7 +163,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St ...@@ -163,7 +163,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 ); Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khmc.value, "", zhye.value ); Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khmc, "", zhye );
err = Platform.errorCode(); err = Platform.errorCode();
if( zhye.value >= 0 ) if( zhye.value >= 0 )
{ {
......
...@@ -17,14 +17,18 @@ String runTrngetData(String srvnam,String calltp,String trninr,String itfinr,Str ...@@ -17,14 +17,18 @@ String runTrngetData(String srvnam,String calltp,String trninr,String itfinr,Str
branchinr = ""; branchinr = "";
branch = ""; branch = "";
Platform.dbExecuteSql( "select distinct branchinr from gle where objINR ='" + $acg\objinr.getValue() + "' and objtyp='" + $acg\objtyp.getValue() + "' and trninr ='" + $acg\trninr.getValue() + "'" ); Platform.dbExecuteSql( "select distinct branchinr from gle where objINR ='" + $acg\objinr.getValue() + "' and objtyp='" + $acg\objtyp.getValue() + "' and trninr ='" + $acg\trninr.getValue() + "'" );
Platform.dbFetchFields( "", branchinr ); Argument<String> branchinrBox = new Argument<>();
Platform.dbFetchFields( "", branchinrBox );
branchinr = branchinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.dbExecuteSql( "select distinct branch from bch where INR ='" + branchinr + "'" ); Platform.dbExecuteSql( "select distinct branch from bch where INR ='" + branchinr + "'" );
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
......
...@@ -27,7 +27,9 @@ static boolean isRegistrationMode(String frm) ...@@ -27,7 +27,9 @@ static boolean isRegistrationMode(String frm)
sql = "select stb.txt from atp,stb where atp.cod='" + frm + "' and stb.tbl='TRNLEV' and stb.uil='EN' and stb.cod=atp.trnlev "; sql = "select stb.txt from atp,stb where atp.cod='" + frm + "' and stb.tbl='TRNLEV' and stb.uil='EN' and stb.cod=atp.trnlev ";
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", runflg ); Argument<String> runflgBox = new Argument<>();
Platform.dbFetchFields( "", runflgBox );
runflg = runflgBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -9,7 +9,9 @@ String getBchcode(String argbranch) ...@@ -9,7 +9,9 @@ String getBchcode(String argbranch)
String outfields = ""; String outfields = "";
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select branch from BCH where INR = ?", argbranch ); Platform.dbExecuteSQL( "Select branch from BCH where INR = ?", argbranch );
Platform.dbFetchFields( "", outfields ); Argument<String> outfieldsBox = new Argument<>();
Platform.dbFetchFields( "", outfieldsBox );
outfields = outfieldsBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound ) if( Platform.errorCode() == tdOdbcNotFound )
{ {
......
...@@ -5,7 +5,9 @@ static String getBchPtyinr(String upbchkey) ...@@ -5,7 +5,9 @@ static String getBchPtyinr(String upbchkey)
int error = 0; int error = 0;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", ptyinr ); Argument<String> ptyinrBox = new Argument<>();
Platform.dbFetchFields( "", ptyinrBox );
ptyinr = ptyinrBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -7,7 +7,9 @@ static String getBchinr(String bchkey) ...@@ -7,7 +7,9 @@ static String getBchinr(String bchkey)
Platform.dbExecuteSql( "select inr from bch where branch='" + bchkey + "' " ); Platform.dbExecuteSql( "select inr from bch where branch='" + bchkey + "' " );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", bchinr ); Argument<String> bchinrBox = new Argument<>();
Platform.dbFetchFields( "", bchinrBox );
bchinr = bchinrBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -16,7 +16,9 @@ void getPtyGS(String ptyinr,Argument<String> idtype) ...@@ -16,7 +16,9 @@ void getPtyGS(String ptyinr,Argument<String> idtype)
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", typ ); Argument<String> typBox = new Argument<>();
Platform.dbFetchFields( "", typBox );
typ = typBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -15,7 +15,9 @@ void getPtyAccMng(String ptyinr,String argptspta,String rol,String fileds,Argume ...@@ -15,7 +15,9 @@ void getPtyAccMng(String ptyinr,String argptspta,String rol,String fileds,Argume
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", returnVar ); Argument<String> returnVarBox = new Argument<>();
Platform.dbFetchFields( "", returnVarBox );
returnVar = returnVarBox.value;
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
} }
......
...@@ -70,7 +70,9 @@ static void getACTInformation() ...@@ -70,7 +70,9 @@ static void getACTInformation()
{ {
branch = ""; branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() ); Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
//$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt ) //$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
...@@ -56,7 +56,13 @@ static void getHzBank(IStream branch) ...@@ -56,7 +56,13 @@ static void getHzBank(IStream branch)
{ {
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
if( Platform.isEmpty( values ) ) if( Platform.isEmpty( values ) )
...@@ -68,7 +74,10 @@ static void getHzBank(IStream branch) ...@@ -68,7 +74,10 @@ static void getHzBank(IStream branch)
values = values + "\r\n" + inr; values = values + "\r\n" + inr;
} }
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname ); Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -7,7 +7,9 @@ static String getActBchinr(String bchkey) ...@@ -7,7 +7,9 @@ static String getActBchinr(String bchkey)
Platform.dbExecuteSql( "select inr from bch where branch in (select accbch from bch where branch='" + bchkey + "' )" ); Platform.dbExecuteSql( "select inr from bch where branch in (select accbch from bch where branch='" + bchkey + "' )" );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
Platform.dbFetchFields( "", accbchinr ); Argument<String> accbchinrBox = new Argument<>();
Platform.dbFetchFields( "", accbchinrBox );
accbchinr = accbchinrBox.value;
error = Platform.errorCode(); error = Platform.errorCode();
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -6,7 +6,9 @@ static int getXRTFEILDRAT(String cur,String forratnam) ...@@ -6,7 +6,9 @@ static int getXRTFEILDRAT(String cur,String forratnam)
String endDatSql = " ENDDAT > " + Platform.sqlDate( Platform.today() ); String endDatSql = " ENDDAT > " + Platform.sqlDate( Platform.today() );
String sqlWhere = sqlrat + " AND " + begDatSql + " AND " + endDatSql; String sqlWhere = sqlrat + " AND " + begDatSql + " AND " + endDatSql;
Platform.dbExecuteSql( sqlWhere ); Platform.dbExecuteSql( sqlWhere );
Platform.dbFetchFields( "", forrat ); Argument<Integer> forratBox = new Argument<>();
Platform.dbFetchFields( "", forratBox );
forrat = forratBox.value;
int err = Platform.errorCode(); int err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
return forrat; return forrat;
......
...@@ -395,7 +395,9 @@ void getXDInfo() ...@@ -395,7 +395,9 @@ void getXDInfo()
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
// PromptOK( 'RG000966 // PromptOK( 'RG000966
Platform.dbFetchFields( "", ownref1 ); Argument<String> ownref1Box = new Argument<>();
Platform.dbFetchFields( "", ownref1Box );
ownref1 = ownref1Box.value;
error = Platform.errorCode(); error = Platform.errorCode();
// PromptOK( 'RG000967 // PromptOK( 'RG000967
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
...@@ -24,7 +24,7 @@ void getTrnUSG(Argument<String> grp) ...@@ -24,7 +24,7 @@ void getTrnUSG(Argument<String> grp)
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( rousql ); Platform.dbExecuteSql( rousql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", grp.value ); Platform.dbFetchFields( "", grp );
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -9,7 +9,9 @@ String getBchnam(String argbranch) ...@@ -9,7 +9,9 @@ String getBchnam(String argbranch)
String outfields = ""; String outfields = "";
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select bchname from BCH where INR = ?", argbranch ); Platform.dbExecuteSQL( "Select bchname from BCH where INR = ?", argbranch );
Platform.dbFetchFields( "", outfields ); Argument<String> outfieldsBox = new Argument<>();
Platform.dbFetchFields( "", outfieldsBox );
outfields = outfieldsBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound ) if( Platform.errorCode() == tdOdbcNotFound )
{ {
......
...@@ -7,7 +7,7 @@ static void getUSRname(String usrkey,Argument<String> usrname) ...@@ -7,7 +7,7 @@ static void getUSRname(String usrkey,Argument<String> usrname)
{ {
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select NAM from USR where EXTKEY = ?", usrkey ); Platform.dbExecuteSQL( "Select NAM from USR where EXTKEY = ?", usrkey );
Platform.dbFetchFields( "", usrname.value ); Platform.dbFetchFields( "", usrname );
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -62,7 +62,13 @@ static void getHzBankKEY(IStream branch) ...@@ -62,7 +62,13 @@ static void getHzBankKEY(IStream branch)
{ {
Platform.sqlSetDirtyRead(); Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 ) while( Platform.errorCode() == 0 )
{ {
if( Platform.isEmpty( values ) ) if( Platform.isEmpty( values ) )
...@@ -74,7 +80,10 @@ static void getHzBankKEY(IStream branch) ...@@ -74,7 +80,10 @@ static void getHzBankKEY(IStream branch)
values = values + "\r\n" + inr; values = values + "\r\n" + inr;
} }
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname ); Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname ); Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
Platform.sqlSetCommittedRead(); Platform.sqlSetCommittedRead();
......
...@@ -14,7 +14,8 @@ String getBchFields(String argfld,String whrsql) ...@@ -14,7 +14,8 @@ String getBchFields(String argfld,String whrsql)
sql = "SELECT " + argfld + " FROM BCH " + whrsql; sql = "SELECT " + argfld + " FROM BCH " + whrsql;
Platform.dbExecuteSql( sql ); Platform.dbExecuteSql( sql );
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbFetchFields( "", fldval ); Platform.dbFetchFields( "", fldvalBox );
fldval=fldvalBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
err = Platform.errorCode(); err = Platform.errorCode();
if( ! Platform.isEmpty( fldval ) ) if( ! Platform.isEmpty( fldval ) )
......
...@@ -60,7 +60,9 @@ static void getACTInformationNew() ...@@ -60,7 +60,9 @@ static void getACTInformationNew()
{ {
branch = ""; branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() ); Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch ); Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode(); err = Platform.errorCode();
Platform.dbCloseCursor(); Platform.dbCloseCursor();
//$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt ) //$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment