package straumann;
|
|
import java.lang.reflect.Array;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
import straumann.bean.SeriesBean;
|
|
import foundation.callable.Callable;
|
import foundation.data.Entity;
|
import foundation.data.EntitySet;
|
import foundation.persist.sql.NamedSQL;
|
import foundation.persist.sql.SQLRunner;
|
|
public class ChartConsole extends Callable{
|
|
@Override
|
protected void doReceive(String[] paths) throws Exception {
|
if (paths.length == 2) {
|
String operator = paths[1];
|
|
if ("getChartOperator".equalsIgnoreCase(operator)) {
|
getChartOperator();
|
}
|
}
|
|
}
|
|
private void getChartOperator() throws Exception {
|
String sqlName = request.getParameter("sqlname");
|
String xType = request.getParameter("xtype");
|
List<SeriesBean> categoryList = new ArrayList<SeriesBean>();
|
NamedSQL namedSQL = NamedSQL.getInstance("getDistributorTotalKPI");
|
EntitySet entitySet = SQLRunner.getEntitySet(namedSQL);
|
|
for (Entity entity : entitySet) {
|
String category = entity.getString("category");
|
SeriesBean seriesBean = new SeriesBean();
|
seriesBean.setName(category);
|
|
for (int i = 0; i < categoryList.size(); i++) {
|
|
}
|
}
|
|
if(xType.equalsIgnoreCase("month")){
|
|
}
|
else if (xType.equalsIgnoreCase("quarter")) {
|
|
}
|
|
}
|
}
|