pDto.put("product", "1");
List alist = g4Reader.queryForList("Demo.getFcfDataList", pDto);;
List aSetList = new ArrayList();
for (int i = 0; i < alist.size(); i++) {
Dto dto = (BaseDto)alist.get(i);
Set set = new Set();
set.setValue(dto.getAsString("value"));
aSetList.add(set);
}
dataSet1.setData(aSetList);
dataList.add(dataSet1);
DataSet dataSet2 = new DataSet();
dataSet2.setSeriesname("产品B");
dataSet2.setColor("44BC2F");
dataSet2.setShowValues(new Boolean(false));
pDto.put("product", "2");
List blist = blist = g4Reader.queryForList("Demo.getFcfDataList", pDto);
List bSetList = new ArrayList();
for (int i = 0; i < blist.size(); i++) {
Dto dto = (BaseDto)blist.get(i);
Set set = new Set();
set.setValue(dto.getAsString("value"));
bSetList.add(set);
}
dataSet2.setData(bSetList);
dataList.add(dataSet2);
DataSet dataSet3 = new DataSet();
dataSet3.setSeriesname("合计");
dataSet3.setColor("3CBBD7");
dataSet3.setShowValues(new Boolean(false));
dataSet3.setParentYAxis(G4Constants.REPORT2Y_SECOND);
List sumlist = g4Reader.queryForList("Demo.getFcfSumDataList", pDto);
List sumSetList = new ArrayList();
for (int i = 0; i < sumlist.size(); i++) {
Dto dto = (BaseDto)sumlist.get(i);
Set set = new Set();
set.setValue(dto.getAsString("value"));
sumSetList.add(set);
}
dataSet3.setData(sumSetList);
dataList.add(dataSet3);
return dataList;