本方账户校验逻辑修改
This commit is contained in:
parent
0d1854e29b
commit
a448fbc581
@ -94,10 +94,10 @@
|
||||
var id="<%=id%>";
|
||||
var sParams = "accountType="+accountType+",accType="+accType+",state="+state+",FbSdk="+FbSdk+",ownId="+ownId;
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.reckon.copydata.CalcRentCompare", "compare",sParams );
|
||||
if(sReturn=="null"||(sReturn!="null"&&state!="0010")||(sReturn!="null"&&state=="0010"&&FbSdk!="Y")||(sReturn!="null"&&state=="0010"&&FbSdk=="Y"&&accountType!="out_account"&&accountType!="inAndOut_account")||sReturn==id){
|
||||
if(sReturn=="null"||sReturn==id){
|
||||
as_save("myiframe0","parent.AsDialog.ClosePage()");
|
||||
}else{
|
||||
alert("启用状态下的银企直连账户只能存在一个,请检查!");
|
||||
alert("相同类型的账户只能存在一个,请检查(银行账号类型 ,是否为企银直连,银行账户用途,状态等字段)!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ public class CalcRentCompare implements BizObjectCompare{
|
||||
public void setAccType(String accType) {
|
||||
this.accType = accType;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
@ -92,8 +93,13 @@ public class CalcRentCompare implements BizObjectCompare{
|
||||
}
|
||||
|
||||
public String compare(JBOTransaction tx) throws JBOException{
|
||||
String sql ="select id from O where O.state_='0010' and O.ACC_TYPE='0010' and O.FbSdk='Y' and (O.account_type='out_account' or O.account_type='inAndOut_account') and own_id=:ownId ";
|
||||
BizObject bo = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME,sql).setParameter("ownId", ownId).getSingleResult(false);
|
||||
String sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and O.FbSdk='Y' and (O.account_type='out_account' or O.account_type='inAndOut_account')";
|
||||
if("in_account".equals(accountType)){
|
||||
sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and (O.account_type='in_account' or O.account_type='inAndOut_account') and account_purpose='default'";
|
||||
}else if("inAndOut_account".equals(accountType)){
|
||||
sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and (account_purpose='default' or O.FbSdk='Y')";
|
||||
}
|
||||
BizObject bo = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME,sql).getSingleResult(false);
|
||||
if(bo==null||"".equals(bo)){
|
||||
return "null";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user