62 lines
1.7 KiB
Java
62 lines
1.7 KiB
Java
package com.amarsoft.acct.accounting.web;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import com.amarsoft.are.lang.StringX;
|
|
import com.amarsoft.awe.util.SqlObject;
|
|
import com.amarsoft.awe.util.Transaction;
|
|
|
|
public class DistinctAccount {
|
|
private String objectNo;
|
|
private String objectType;
|
|
private String accountIndicator;
|
|
private String serialNo;
|
|
|
|
public String getObjectNo() {
|
|
return objectNo;
|
|
}
|
|
|
|
public void setObjectNo(String objectNo) {
|
|
this.objectNo = objectNo;
|
|
}
|
|
|
|
public String getObjectType() {
|
|
return objectType;
|
|
}
|
|
|
|
public void setObjectType(String objectType) {
|
|
this.objectType = objectType;
|
|
}
|
|
|
|
public String getAccountIndicator() {
|
|
return accountIndicator;
|
|
}
|
|
|
|
public void setAccountIndicator(String accountIndicator) {
|
|
this.accountIndicator = accountIndicator;
|
|
}
|
|
|
|
public String getSerialNo() {
|
|
return serialNo;
|
|
}
|
|
|
|
|
|
public void setSerialNo(String serialNo) {
|
|
this.serialNo = serialNo;
|
|
}
|
|
|
|
//获取数据库中的存款账户的个数,防止重复添加重复提交
|
|
public String getAccountNumber(Transaction Sqlca) throws SQLException{
|
|
SqlObject sqlo = new SqlObject(
|
|
"select count(*) from acct_business_account where "
|
|
+ "ObjectNo=:ObjectNo and ObjectType=:ObjectType and AccountIndicator =:AccountIndicator "
|
|
+ "and SerialNo <> :SerialNo and status = '0'");
|
|
SqlObject resultObj = sqlo.setParameter("ObjectType",objectType).setParameter("ObjectNo",objectNo).setParameter("SerialNo", serialNo).setParameter("AccountIndicator", accountIndicator);
|
|
if(resultObj==null) return "false";
|
|
System.out.println(objectType+"-"+this.objectNo+""+serialNo+""+accountIndicator);
|
|
String result = Sqlca.getString(resultObj);
|
|
if(StringX.isEmpty(result)) return "false";
|
|
return result;
|
|
}
|
|
}
|