日期:2014-05-16 浏览次数:20615 次
public class BindAction extends ActionSupport{
private String proString;
private String citString;
private String areString;
private String bankString;
private String proId;
private String citId;
private String areId;
private LoanInfoService loanInfoService;
public String bindPro(){
List<TDictProvince>list=this.loanInfoService.getProlist();
if(list.size()>0){
StringBuilder sb= new StringBuilder();
int size=list.size();
sb.append("[");
for (TDictProvince pro : list) {
size--;
sb.append("{provinceid:/"");//此处小红叉
sb.append(pro.getProvinceid());
sb.append("/",provincename:/"");
sb.append(pro.getProvincename());
sb.append("/"}");
if(size>0){
sb.append(",");
}
}
sb.append("]");
proString=sb.toString();
return SUCCESS;
}
public String bindCit() {
List<TDictCity>list=this.loanInfoService.getCitylistByProId(proId);
if(list.size()>0){
StringBuilder sb= new StringBuilder();
int size=list.size();
sb.append("[");
for (TDictCity pro : list) {
size--;
sb.append("{cityid:/"");//此处小红叉
sb.append(pro.getCityid());
sb.append("/",cityname:/"");
sb.append(pro.getCityname());
sb.append("/"}");
if(size>0){
sb.append(",");
}
}
sb.append("]");
citString=sb.toString();
System.out.println();
return SUCCESS;
}
public String bindAre() {
List<TDictregion>list=this.loanInfoService.getArealistByCitId(citId);
if(list.size()>0){
StringBuilder sb= new StringBuilder();
int size=list.size();
sb.append("[");
for (TDictregion pro : list) {
size--;
sb.append("{regionid:/"");//此处小红叉
sb.append(pro.getRegionid());
sb.append("/",regionname:/"");
sb.append(pro.getRegionname());
sb.append("/"}");
if(size>0){
sb.append(",");
}
}
sb.append("]");
areString=sb.toString();
return SUCCESS;
}
public String bindBank() {
List<TDictBankOutlets>list=this.loanInfoService.getBanklistByareId(areId);
if(list.size()>0){
StringBuilder sb= new StringBuilder();
int size=list.size();
sb.append("[");
for (TDictBankOutlets bank : list) {
size--;
sb.ap