IT-KIMI_SHI\SINOIT.KIMI
2018-06-01 64c40fb427bff513f575f11e4c1e7bd9a1bfe3e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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")) {
            
        }
        
    }
}