/**
* 查看
* @throws UnsupportedEncodingException
*/
public String ckList() throws UnsupportedEncodingException{
ValueStack vs=getValueStack();
String byzd3 = getRequest().getParameter("byzd3");
byzd3 = new String(byzd3.getBytes("ISO-8859-1"),"UTF-8");
String xlccmc = getRequest().getParameter("xlccmc");
xlccmc = new String(xlccmc.getBytes("ISO-8859-1"),"UTF-8");
model.setByzd3(byzd3);
model.setXlccmc(xlccmc);
List<ByspqModel> list = zghydxJyfajyltjService.getCkList(model);
vs.set("list", list);
return "ckList";
}
/**
* 获取就业方案就业率统计
*/
@Override
public List<HashMap<String,String>> getCxJyfajyltjList(ByspqModel model) {
List<HashMap<String,String>> list = dao.getCxJyfajyltjList(model);
HashMap<String,String> map = dao.getCxJyfajylzjList(model);
List<HashMap<String,String>> hlist = new ArrayList<HashMap<String,String>>();
for(int i=0; i <list.size();i++){
HashMap<String,String> m = new HashMap<String,String>();
float b = 0;
float c = 0;
float d = 0;
DecimalFormat decimalFormat=new DecimalFormat("0.00");
if(!"0".equals(String.valueOf(map.get("B")))){
b = (float)Integer.parseInt(String.valueOf(list.get(i).get("B")))/Integer.parseInt(String.valueOf(map.get("B")))*100;
}
if(!"0".equals(String.valueOf(map.get("C")))){
c = (float)Integer.parseInt(String.valueOf(list.get(i).get("C")))/Integer.parseInt(String.valueOf(map.get("C")))*100;
}
if(!"0".equals(String.valueOf(map.get("D")))){
d = (float)Integer.parseInt(String.valueOf(list.get(i).get("D")))/Integer.parseInt(String.valueOf(map.get("D")))*100;
}
m.put("A", String.valueOf(list.get(i).get("A")));
m.put("B", String.valueOf(list.get(i).get("B"))+"("+String.valueOf(decimalFormat.format(b)) + "%)");
m.put("C", String.valueOf(list.get(i).get("C"))+"("+String.valueOf(decimalFormat.format(c)) + "%)");
m.put("D", String.valueOf(list.get(i).get("D"))+"("+String.valueOf(decimalFormat.format(d)) + "%)");
m.put("E", String.valueOf(list.get(i).get("E")));
hlist.add(m);
}
return hlist;
}