遍历ArrayList hashmap

private List getskushuLst(List shokushuLst, String tryWork,KoteiAnkenkensakuForm theform){

List<HashMap> ldt = new ArrayList();
List<HashMap>ldt2 = new ArrayList();
List<HashMap>skushuLst = new ArrayList();

String[] checkedSid = tryWork.split(",");
String sId="";
HashMap infoMap = new HashMap();
String chbKibou12=ClientDBDao.delStrNulls(theform.getChbHissu12());
int i=0;
int j=0;
while(i<checkedSid.length){
String chkid=checkedSid[i];
while(j<shokushuLst.size()){
infoMap=(HashMap)shokushuLst.get(j);
sId=(String)infoMap.get("S_ID");
if(chkid.equals(sId)){
infoMap.put("checkFlg","1");
//【希望】チェックボックスチェックか或いはチェックない、設定する
if(!chbKibou12.equals("1")){
chbKibou12="1";
}
infoMap.put("No",j);
ldt.add(infoMap);
shokushuLst.remove(j);
break;
}
j=j+1;
}
i=i+1;
j=0;
}
HashMap iMap = new HashMap();
for(int k=0;k<shokushuLst.size();k++){
iMap=(HashMap)shokushuLst.get(k);
iMap.put("checkFlg","0");
iMap.put("No","");
ldt2.add(iMap) ;
}
HashMap tempMap = new HashMap();
int no;
for(int n=0;n<ldt.size();n++){
tempMap=(HashMap)ldt.get(n);
ldt2.add(tempMap);
}
String strNo="";
HashMap tempMap2 = new HashMap();
for(int n=0;n<ldt2.size();n++){
tempMap2=(HashMap)ldt2.get(n);
strNo=tempMap2.get("No").toString();
if(!"".equals(strNo)&& strNo!=null){
no=Integer.parseInt(strNo);
ldt2.remove(n);
ldt2.add(no,tempMap2);
}
}
HashMap tempMap3 = new HashMap();
for(int n=0;n<ldt2.size();n++){
tempMap3=(HashMap)ldt2.get(n);
tempMap3.remove("No");
skushuLst.add(tempMap3);
}

theform.setChbKibou12(chbKibou12);
return skushuLst;
}



	private void getStm_langMap(TrackingMailEntryActionForm trackingMailEntryActionForm,UserAccount userAccount,ServiceBase service) throws Exception {
Map<String, String> stm_langMap=service.getGeneralMapWithoutCode(ApConstant.SGC_KEY1_LANG,userAccount);
Set<Entry<String, String>> set = stm_langMap.entrySet();
Iterator<Entry<String, String>> it = set.iterator();
while(it.hasNext()) {
Map.Entry<String, String> me = (Map.Entry<String, String>)it.next();
if(me.getKey().equals("zh")){
stm_langMap.entrySet().remove(me);
}
}
trackingMailEntryActionForm.setStm_langMap(stm_langMap);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值