锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产区在线观看成人精品,亚洲v日韩v综合v精品v,中文一区在线播放http://www.aygfsteel.com/17learning/category/50367.html鎴戠殑鍗氬錛歨ttp://blog.sina.com.cn/17learningzh-cnSun, 19 May 2013 17:15:49 GMTSun, 19 May 2013 17:15:49 GMT60鍦ㄥ悓涓寮犳暟鎹簱琛ㄤ腑浣跨敤Map緇熻鏁版嵁http://www.aygfsteel.com/17learning/archive/2012/09/12/387602.html綆″厛椋?/dc:creator>綆″厛椋?/author>Wed, 12 Sep 2012 15:57:00 GMThttp://www.aygfsteel.com/17learning/archive/2012/09/12/387602.htmlhttp://www.aygfsteel.com/17learning/comments/387602.htmlhttp://www.aygfsteel.com/17learning/archive/2012/09/12/387602.html#Feedback0http://www.aygfsteel.com/17learning/comments/commentRss/387602.htmlhttp://www.aygfsteel.com/17learning/services/trackbacks/387602.html
               String startDate = req.getParameter("startDate"); 
String endDate = req.getParameter("endDate");
UserVO users = (UserVO) req.getSession().getAttribute("users");
List<ReportBaseVO> titleList = MessageCountService.titleList();  //琛ㄥ垪
List<ReportBaseVO> mentList=MessageCountService.findMentList(users,messType); //琛ㄨ
                List<ReportDataVO> dataList=MessageCountService.findData(users,messType,startDate,endDate); //鏁版嵁闆?br /> Map<String,String> dataMap = ReportService.getReport(dataList); //瑁呭叆Map
2銆佹柟娉曞疄鐜幫細
//0錛氭弧鎰?1錛氶潪甯告弧鎰?錛氫笉婊℃剰 
public static List<ReportBaseVO> titleList(){
List<ReportBaseVO> list = new ArrayList<ReportBaseVO>();
ReportBaseVO vo1 = new ReportBaseVO();
vo1.setCode("0");
vo1.setName("婊℃剰");
list.add(vo1);
ReportBaseVO vo2 = new ReportBaseVO();
vo2.setCode("1");
vo2.setName("鍩烘湰婊℃剰");
list.add(vo2);
ReportBaseVO vo3 = new ReportBaseVO();
vo3.setCode("2");
vo3.setName("涓嶆弧鎰?);
list.add(vo3);
return list;
}

public static List<ReportBaseVO> findMentList(UserVO users,String type){
List<ReportBaseVO> list = new ArrayList<ReportBaseVO>();
         
if((users.isHave("0") && ("1".equals(type)||type==null||"".equals(type)))||users.isHave("1") && ("1".equals(type)||type==null||"".equals(type))){
ReportBaseVO vo1 = new ReportBaseVO();
vo1.setCode("1");
vo1.setName("灞闀夸俊綆?);
list.add(vo1);
}
}

public static List<ReportDataVO> findData(UserVO users, String messType,String startDate,String endDate){
               List<ReportDataVO> list = new ArrayList<ReportDataVO>();
String sql="select APPRAISAL as titleId,MESS_TYPE as mentId,count(ID) as count from act_message where DELETE_FLAG='0' and APPRAISAL<>'' and MESS_TYPE='1' group by MESS_TYPE,APPRAISAL";
List<ReportDataVO> reportDataList = DBBeanUtil.execute(conn, new ReportDataVO(),sql);
list.addAll(reportDataList);
return list;
}

public static Map<String,String> getReport(List<ReportDataVO> paraList){
Map<String, String> reportMap = new HashMap<String, String>();
for(int i=0;i<paraList.size();i++){
ReportDataVO p = paraList.get(i);
reportMap.put(p.getMentId()+"_"+p.getTitleId(), String.valueOf(p.getCount()));
}
return reportMap;
}

3銆侀亶鍘嗘暟鎹細
Map<String,String> dataMap = ReportService.getReport(dataList);
String[][] data = new String[mentList.size()][titleList.size()];
for (int i = 0; i < mentList.size(); i++) {
mentList.get(i).getName();  
int typeAll=0;
for (int j = 0; j < titleList.size(); j++) {
String dateMa=mentList.get(i).getCode()+ "_" + titleList.get(j).getCode();
//             out.print("titleList.get(j).getCode():"+titleList.get(j).getCode());
String content = dataMap.get(dateMa);//IsTurn0
if (content == null || "".equals(content)) {
content = "0";
}
data[i][j] = content;
typeAll=Integer.parseInt(content)+typeAll;
}
BigDecimal point = new BigDecimal(0);
BigDecimal mcount=new BigDecimal(data[i][0]).add(new BigDecimal(data[i][1]));//婊℃剰鍙戝竷浠舵暟
BigDecimal atotal=mcount.add(new BigDecimal(data[i][2]));//鍏卞彂甯冧歡鏁?/div>
if(atotal.compareTo(new BigDecimal(0))!=0){
point = new BigDecimal(100).multiply(mcount.divide(atotal,2, RoundingMode.HALF_UP));
}
}


]]>Struts2杞爜鎿嶄綔http://www.aygfsteel.com/17learning/archive/2012/05/17/J2EE.html綆″厛椋?/dc:creator>綆″厛椋?/author>Thu, 17 May 2012 03:15:00 GMThttp://www.aygfsteel.com/17learning/archive/2012/05/17/J2EE.htmlhttp://www.aygfsteel.com/17learning/comments/378383.htmlhttp://www.aygfsteel.com/17learning/archive/2012/05/17/J2EE.html#Feedback0http://www.aygfsteel.com/17learning/comments/commentRss/378383.htmlhttp://www.aygfsteel.com/17learning/services/trackbacks/378383.html   FlowChart fcName;
  URLEncoder.encode(fcName.getFlowChartName(),"UTF-8")
2銆佸湪鎺ュ彈欏甸潰杞爜錛?br />  String fcName= new String(request.getParameter("fcName").getBytes("ISO-8859-1"),"UTF-8");
3銆丣avaScript浼犱腑鏂囧肩粰Action鍑虹幇涔辯爜闂瑙e喅
new String(newFileName.getBytes("ISO-8859-1"),"UTF-8") ;
澶氬涓鐐?nbsp;



]]>
主站蜘蛛池模板: 马山县| 霞浦县| 嘉善县| 平昌县| 册亨县| 高碑店市| 公主岭市| 安岳县| 苗栗县| 三门县| 会理县| 临泽县| 琼结县| 来凤县| 正阳县| 云阳县| 隆回县| 阿坝县| 望城县| 邵东县| 泰来县| 贵南县| 沙田区| 隆安县| 苍南县| 庄浪县| 沈丘县| 三河市| 伊宁市| 贺州市| 肇州县| 京山县| 彰武县| 渑池县| 密云县| 太湖县| 虞城县| 新邵县| 富宁县| 错那县| 西林县|