Commit e0a20f6d by Gan

A-D T-V Update

parent d556855d
......@@ -26,7 +26,13 @@ boolean doConfirm(#trn argtrn)
if( ! checkServiceWfe( argtrn, "CNF" ) )
{
destnum = 0;
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
updateServiceWfe( argtrn, "CNF" ); // Update status of WFE entry for release
$$argtrn\inftxt = inftxttmp;
$$argtrn\infdsp = infdsptmp;
Platform.sdbUpdate( argtrn );
Platform.dbCommit();
updategrid( argtrn );
return true; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
}
sigWrite( "E", argtrn, "SG3" ); // external confirmation entered`
String setflg = Platform.mid( $$argtrn\relreq.getValue(), 3, 1 );
......
......@@ -10,7 +10,7 @@ boolean checkServiceWfe(#trn argtrn,String service)
{
if( Platform.errorCode() == 1000 )
{
return true // No Wfe-entry for service REL for this TRN;
return true; // No Wfe-entry for service REL for this TRN;
}
else
{
......
......@@ -30,5 +30,5 @@ String getTrsUsrForSig(#trn argtrn,String argsigidx)
}
}
}
return "";
}
\ No newline at end of file
......@@ -6,17 +6,11 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
boolean prompt = Platform.prompt( #CT000049 );
BigDecimal destnum = null;
String queHldFlg = NULLSTR;
if( prompt == 2 )
{
destnum = new BigDecimal("0");
queHldFlg = " ";
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
//检核牌价是否变化
if( checkXrtChg( $$argtrn\inr.getValue() ) )
/*if( checkXrtChg( $$argtrn\inr.getValue() ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}*/
//新增结售汇,更新汇率处理
boolean getXrtReturn = false;
Argument<Boolean> getXrtReturnBox = new Argument<Boolean>("",getXrtReturn);
......@@ -29,19 +23,7 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
{
destnum = new BigDecimal("0");
Platform.errorMessage( #CT000072 );
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
//Settemod 如果包含保证金和内部户进行提示
boolean chkbusflg = false;
if( Platform.checkActBusTyp( argtrn ) )
{
chkbusflg = Platform.prompt( #CT000057, "交易中包含保证金账户或内部户,是否继续授权? " );
if( chkbusflg == 2 )
{
destnum = new BigDecimal("0");
queHldFlg = " ";
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
//! brtset bctset cptopn 交易提示一下如果结算贷款登记时绑定过借据号
String jjh = NULLSTR;
......@@ -66,7 +48,7 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
{
Platform.errorMessage( #CT000058, Platform.mid( $$argtrn\ownref.getValue(), 3 ) );
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
}
queHldFlg = "D";
......@@ -80,7 +62,7 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
Platform.errorMessage( #CT000028, $$argtrn\inr.getValue(), GetLockUID, GetLockDateTime );
destnum = new BigDecimal("0");
queHldFlg = " ";
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
Platform.reraise();
}
......@@ -93,17 +75,17 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
Platform.errorMessage( #CT000029, $$argtrn\inr.getValue(), GetLockUID, GetLockDateTime );
destnum = new BigDecimal("0");
queHldFlg = " ";
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
Platform.reraise();
}
// Checking the current status after locking the TRN
if( !( Platform.compareTo( $$argtrn\relflg , "X") ) == 0 && !( Platform.compareTo( $$argtrn\relflg , "W") ) == 0 )
if( ( Platform.compareTo( $$argtrn\relflg , "X") ) != 0 && ( Platform.compareTo( $$argtrn\relflg , "W") ) != 0 )
{
Platform.errorMessage( #CT000030 );
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
// Checking the commit status after locking the TRN
if( Platform.compareTo($$argtrn\comflg, "D" )== 0 )
......@@ -111,7 +93,7 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
Platform.errorMessage( #CT000031 );
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
destnum = new BigDecimal(argrelnum);
// Force reread of WFEs
......@@ -122,14 +104,14 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
{
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
}
//检查服务状态是否有,"E" or "F" ,如果有,必须先进行处理才能RELEASE
if( ! checkWfeStat() )
{
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitLabel
}
// check wether user already gave signature
destnum = setSign( argtrn, argrelnum );
......@@ -137,13 +119,13 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
{
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
if( ! checkPDP( argtrn ) )
{
queHldFlg = "D";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
// 资金报价交易有时间控制,超过时间不允许Release
Date time = null;
......@@ -159,30 +141,9 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
Platform.errorMessage( #CT000050 );
queHldFlg = " ";
destnum = new BigDecimal("0");
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
return destnum; // #######TODO 改写 LABEL与GOTO #### goto ExitNoUpdateLabel
}
}
/**
// 融资交易隔日不让Release的控制
if not CheckFinance( ArgTRN ) then
Error( 'LG000056' )
$QueHldFlg = " "
$destnum = 0
goto ExitNoUpdateLabel
endif
**/
/**
//检核牌价是否变化
if CheckXrtChg( argtrn\inr ) then
goto ExitNoUpdateLabel
endif
**/
/**
//新增结售汇,更新汇率处理
if Checkgletimeandamt( argtrn\inr ) then
ExitEvent
endif
**/
//gleXrtChgAfterRelease( argtrn\inr )
if( Platform.compareTo( $$argtrn\relres , $$argtrn\relreq ) == 0 )
{
......@@ -199,26 +160,6 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
$$argtrn\relflg = "W";
}
}
//CHANGE BY ZYF ,ORDER XXF
/**
//额度确认
//不管是否收单行模式,都在TRNREL中真正占用和归还额度
//if IsEmpty( ORDMOD\ORD\SDHFLG ) then
if argtrn\relflg == "R" then
// 最后一步,直接更新数据库表
$Boolean = LsnDoRelease( ArgTrn\OrdInr )
else
// 非最后一步,只检查
$Boolean = LsnProcessEntry( ArgTrn\OrdInr, "CHK" )
endif
if not $Boolean then
ShowError
$QueHldFlg = " "
$destnum = 0
goto ExitNoUpdateLabel
endif
//endif
**/
int err = 0;
IStream msgStream = new StreamImpl();
if( Platform.compareTo( $$argtrn\relflg , "R" ) == 0 )
......@@ -379,7 +320,6 @@ BigDecimal doRelease(#trn argtrn,int argrelnum)
updategrid( argtrn );
Platform.SetAttributeStream( $trnstm.getValue(), tdAttrSelected, lines );
}
return destnum;
// #######TODO 改写 LABEL与GOTO #### label ExitNoUpdateLabel
Platform.dbRollback();
return destnum;
......
......@@ -111,7 +111,7 @@ boolean checkXrtChg(String trninr)
}
Platform.DBFetch( $wrkgle );
}
if( buytyp == 1 )
/*if( buytyp == 1 )
{
prompt = Platform.prompt( #CT000061, buycur, buymidratbefore, buymidratchage );
if( prompt == 1 )
......@@ -134,7 +134,7 @@ boolean checkXrtChg(String trninr)
{
return true;
}
}
}*/
return false;
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ void gleXrtChgBeforRelease(String trninr)
int err = Platform.errorCode();
//配置文件控制开关
String bascur = NULLSTR;
int amtuse = 0;
BigDecimal amtuse = new BigDecimal("0");
String sql = NULLSTR;
int error = 0;
int j = 0;
......@@ -28,7 +28,6 @@ void gleXrtChgBeforRelease(String trninr)
if( Platform.compareTo( flg , "Y" ) == 0 )
{
bascur = "CNY";
amtuse = 0;
//在复核之前更新存在结售汇的gle汇率等相关信息
sql = "where trninr = '" + trninr + "'";
Platform.DBReadSet( $wrkglelst, sql );
......@@ -92,7 +91,7 @@ void gleXrtChgBeforRelease(String trninr)
curxrtcur = "";
Argument<String> curxrtcurBox = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox, amtuseBox );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox, amtuseBox );
curxrtcur = curxrtcurBox.value;
amtuse = amtuseBox.value;
......@@ -134,7 +133,7 @@ void gleXrtChgBeforRelease(String trninr)
curxrtcur = "";
Argument<String> curxrtcurBox1 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox1 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox1, amtuseBox1 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox1, amtuseBox1 );
curxrtcur = curxrtcurBox1.value;
amtuse = amtuseBox1.value;
......@@ -177,7 +176,7 @@ void gleXrtChgBeforRelease(String trninr)
curxrtcur = "";
Argument<String> curxrtcurBox2 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox2 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox2, amtuseBox2 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox2, amtuseBox2 );
curxrtcur = curxrtcurBox2.value;
amtuse = amtuseBox2.value;
......@@ -218,7 +217,7 @@ void gleXrtChgBeforRelease(String trninr)
curxrtcur = "";
Argument<String> curxrtcurBox3 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox3 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox3, amtuseBox3 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox3, amtuseBox3 );
curxrtcur = curxrtcurBox3.value;
amtuse = amtuseBox3.value;
......
......@@ -12,7 +12,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
int err = Platform.errorCode();
//配置文件控制开关
String bascur = NULLSTR;
int amtuse = 0;
BigDecimal amtuse = new BigDecimal("0");
String sql = NULLSTR;
int error = 0;
String cur = NULLSTR;
......@@ -32,7 +32,6 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
if( Platform.compareTo( flg , "Y" ) == 0 )
{
bascur = "CNY";
amtuse = 0;
//在复核之前更新存在结售汇的gle汇率等相关信息
sql = "where trninr = '" + trninr + "'";
Platform.DBReadSet( $wrkglelst, sql );
......@@ -119,7 +118,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
curxrtcur = "";
Argument<String> curxrtcurBox = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox, amtuseBox );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox, amtuseBox );
curxrtcur = curxrtcurBox.value;
amtuse = amtuseBox.value;
......@@ -171,7 +170,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
curxrtcur = "";
Argument<String> curxrtcurBox1 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox1 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox1, amtuseBox1 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox1, amtuseBox1 );
curxrtcur = curxrtcurBox1.value;
amtuse = amtuseBox1.value;
......@@ -225,7 +224,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
curxrtcur = "";
Argument<String> curxrtcurBox2 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox2 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox2, amtuseBox2 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), Platform.numDiv(1 , relrat), new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox2, amtuseBox2 );
curxrtcur = curxrtcurBox2.value;
amtuse = amtuseBox2.value;
......@@ -277,7 +276,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
curxrtcur = "";
Argument<String> curxrtcurBox3 = new Argument<String>("",curxrtcur);
Argument<BigDecimal> amtuseBox3 = new Argument<BigDecimal>("",amtuse);
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, 1, $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox3, amtuseBox3 );
amt = $\cbsmod\xrtmod.amtConvRates( $wrkglelst[i]\sysamt.getValue(), relrat, new BigDecimal(1), $xrt\cur.getValue(), $wrkxrt\cur.getValue(), curxrtcurBox3, amtuseBox3 );
curxrtcur = curxrtcurBox3.value;
amtuse = amtuseBox3.value;
......@@ -576,7 +575,7 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
}
else
{
if( Platform.getStreamfield3Param( cnttxt, 1, "|" ) = "08" )
if( Platform.getStreamfield3Param( cnttxt, 1, "|" ) == "08" )
{
cnttxt = Platform.setStreamfieldforacg( cnttxt, 10, paijia, "|" );
cnttxt = Platform.setStreamfieldforacg( cnttxt, 12, Platform.fmtAmount( amt, $wrkxrt\cur.getValue() ), "|" );
......
......@@ -13,7 +13,7 @@ event $diadel order 1000
String flg = NULLSTR;
int pos = 0;
String pth = NULLSTR;
if( Platform.prompt( #CT001005, nam ) == tdPromptOK )
if( true )
{
$diarec\donflg = "X";
Platform.setModified( $diarec\donflg.getValue() );
......
......@@ -54,13 +54,13 @@ void saveNewDiaries()
}
else
{
if( frm = "BOTSET" || frm = "BETSET" )
if( frm == "BOTSET" || frm == "BETSET" )
{
$diarec\ownusg = "OU";
}
else
{
if( frm = "BRTSET" || frm = "BRTUDP" )
if( frm == "BRTSET" || frm == "BRTUDP" )
{
$diarec\ownusg = "IN";
}
......
......@@ -43,7 +43,7 @@ void trnDiaSetDonePickedDia(#dia argdia)
// set the diary entry to done if this entry have not been
// modified manually
flg = internalCtlGetFlgOfLbl( lbl );
if( !( Platform.compareTo( Platform.mid( flg, 2, 1 ) , "M") ) == 0 )
if( ( Platform.compareTo( Platform.mid( flg, 2, 1 ) , "M") ) != 0 )
{
$diarec\donflg = "X";
Platform.setModified( $diarec\donflg.getValue() );
......
......@@ -15,7 +15,7 @@ boolean isOpenDiariesExists()
if( Platform.isEmpty( $diachk\donflg ) )
{
res = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return res; // #######TODO 改写 LABEL与GOTO #### goto done
}
}
}
......
......@@ -17,7 +17,7 @@ void trndiaRptVerFooter()
{
ver = "0000";
}
Platform.GetUser( Platform.getLoginUser(), usrnam, pf, uil, state, admin, desig );
/*Platform.GetUser( Platform.getLoginUser(), usrnam, pf, uil, state, admin, desig );
String line = Platform.getText( #LI001083, ver, usrnam, Platform.fmtDateLong( Platform.today() ), Platform.fmtTime( Platform.Time() ) );
if( Platform.compareTo( Platform.getContext( tdContextFORM ) , "RPTLAN" ) == 0 )
{
......@@ -38,6 +38,6 @@ void trndiaRptVerFooter()
Platform.beginfooter ( "last-page" );
Platform.printTempUsing( "trndia.footerlast", line);
Platform.endfooter();
}
}*/
}
\ No newline at end of file
......@@ -26,7 +26,45 @@ String sigUsrRelFlg(#trn argtrn,String user,String iniuser,BigDecimal amt,String
ubrFlg = true;
//add by zt
//如果查到了交易代码就不用在去查BUSSEC了
return ; // #######TODO 改写 LABEL与GOTO #### goto ubrdone
if( Platform.compareTo( relGrp , "N" ) == 0 )
{
return " ";
}
// Compute amount in USR\RELCUR ( middlerate)
BigDecimal checkamt = $\cbsmod\xrtmod.amtConvTypes( fromcur, amt, "M", relCur, "M", Platform.today() );
// if own transaction, sign only posssible if amount not exceeding 2nd amount
if( Platform.compareTo( user , iniuser ) == 0 )
{
if( Platform.compareTo(relAmt2nd , 0)<=0 )
{
// if no own amount, user cannot sign own transactions at all
return " ";
}
else
{
if( Platform.compareTo(checkamt , relAmt2nd)<=0 )
{
return "A";
}
else
{
return "B";
}
}
}
else
{
// signature is qualified ( =A) if amount does not exceed USR\RELAMT amount
// otherwise signature is unqualified ( =B)
if( Platform.compareTo(checkamt , relAmt)<=0 )
{
return "A";
}
else
{
return "B";
}
}
//----end------------
}
else
......
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