日期:2014-05-19 浏览次数:20738 次
<s:iterator value="newInsuranceList" id="newInsuranceList" status="index"> <tr> <td align="center"><%=n++ %></td> <td align="center"> <a href="infoNewInsurance.action?newInsurance.insuranceInformationId=<s:property value='#newInsuranceList.insuranceInformationId'/>" style="cursor:pointer;" target="_blank"> <s:property value="#newInsuranceList.name"/> </a> </td> <td align="center"> <s:property value='newInsuranceType.name'/> </td> <td align="center"> <s:property value='#newInsuranceList.feeRate'/> </td> <td align="center"> <s:property value='#newInsuranceList.procedureRate'/> </td> <td align="center"> <s:property value='#newInsuranceList.directorDiscountRate'/> </td> <td align="center"> <s:property value='#newInsuranceList.managerDiscountRate'/> td> </tr> </s:iterator>
public String list(){ try{ newInsuranceList = newInsuranceService.findAllByFlag(); int typeId = 0; if(newInsuranceList.size() > 0 && newInsuranceList != null){ for(int i = 0; i<newInsuranceList.size(); i++){ typeId = newInsuranceList.get(i).getTypeId(); System.out.println("// Debug typeId = " + typeId); if(typeId > 0){ newInsuranceType = newInsuranceTypeService.findById(typeId); System.out.println("// Debug name = " + newInsuranceType.getName()); } } } return "list"; }catch (Exception e) { log.error(e.getMessage(), e); return ERROR; } }
public String list(){ try{ //创建一个新的 List List list = new ArrayList(); newInsuranceList = newInsuranceService.findAllByFlag(); int typeId = 0; if(newInsuranceList.size() > 0 && newInsuranceList != null){ for(int i = 0; i<newInsuranceList.size(); i++){ //创建一个 Map Map<String,Object> map = new HashMap<String,Object>(); //用对象接收 (Object ) typeId = newInsuranceList.get(i).getTypeId(); //加入页面要显示的值,依次得到你想要输出的值 map.put("feeRate",newInsuranceList.get(i).getFeeRate()); map.put("procedureRate",newInsuranceList.get(i).getProcedureRate()); map.put("directorDiscountRate",newInsuranceList.get(i).getDirectorDiscountRate()); map.put("managerDiscountRate",newInsuranceList.get(i).getManagerDiscountRate()); System.out.println("// Debug typeId = " + typeId); if(typeId > 0){ newInsuranceType = newInsuranceTypeService.findById(typeId); System.out.println("// Debug name = " + newInsuranceTy