Authored by tanling

页面调试

@@ -47,7 +47,6 @@ public class MktCostReportFormController { @@ -47,7 +47,6 @@ public class MktCostReportFormController {
47 try { 47 try {
48 // PageMktReportFormRspBO result = mktCostReportFormService.getMktReportForm(mktReportFormReqVO); 48 // PageMktReportFormRspBO result = mktCostReportFormService.getMktReportForm(mktReportFormReqVO);
49 49
50 - Gson result = new Gson();  
51 MktReportFormRspBO mktReportFormRspBO = new MktReportFormRspBO(); 50 MktReportFormRspBO mktReportFormRspBO = new MktReportFormRspBO();
52 List<String> dateIdStrList = Lists.newArrayList(); 51 List<String> dateIdStrList = Lists.newArrayList();
53 List<BigDecimal> totalActuralCostList = Lists.newArrayList(); 52 List<BigDecimal> totalActuralCostList = Lists.newArrayList();
@@ -63,7 +62,7 @@ public class MktCostReportFormController { @@ -63,7 +62,7 @@ public class MktCostReportFormController {
63 List<Integer> iosNewUdidList = Lists.newArrayList(); 62 List<Integer> iosNewUdidList = Lists.newArrayList();
64 List<Integer> androidNewUdidList = Lists.newArrayList(); 63 List<Integer> androidNewUdidList = Lists.newArrayList();
65 64
66 - for (Integer i = 6; i >=0; i++){ 65 + for (Integer i = 6; i >=0; i--){
67 dateIdStrList.add("2017042" + i.toString()); 66 dateIdStrList.add("2017042" + i.toString());
68 totalActuralCostList.add(new BigDecimal(5000 - i * 100)); 67 totalActuralCostList.add(new BigDecimal(5000 - i * 100));
69 iosActualCostList.add(new BigDecimal(4000 - i * 80)); 68 iosActualCostList.add(new BigDecimal(4000 - i * 80));
@@ -99,8 +98,7 @@ public class MktCostReportFormController { @@ -99,8 +98,7 @@ public class MktCostReportFormController {
99 98
100 99
101 100
102 - result.toJson(mktReportFormRspBO);  
103 - return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("success").build(); 101 + return new ApiResponse.ApiResponseBuilder().code(200).data(mktReportFormRspBO).message("success").build();
104 } catch (Exception e){ 102 } catch (Exception e){
105 logger.warn("getMktReportForm occurs Exception e {}",e.getMessage()); 103 logger.warn("getMktReportForm occurs Exception e {}",e.getMessage());
106 return new ApiResponse.ApiResponseBuilder().code(500).message("失败").build(); 104 return new ApiResponse.ApiResponseBuilder().code(500).message("失败").build();
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
63 <value>/LoginController/loginForPid.do</value> 63 <value>/LoginController/loginForPid.do</value>
64 <value>/batch/export.do</value> 64 <value>/batch/export.do</value>
65 <value>/batch/import</value> 65 <value>/batch/import</value>
  66 + <value>/mktReportForm/getMktReportForm</value>
66 </list> 67 </list>
67 </property> 68 </property>
68 <property name="excludeMethods"> 69 <property name="excludeMethods">
@@ -48,51 +48,49 @@ @@ -48,51 +48,49 @@
48 </table> 48 </table>
49 <script type="text/javascript"> 49 <script type="text/javascript">
50 $(function(){ 50 $(function(){
51 -// $.ajax({  
52 -// type: "POST",  
53 -// url: contextPath + "/mktReportForm/followPriceOperate", 51 + $.ajax({
  52 + type: "POST",
  53 + url: contextPath + "/mktReportForm/getMktReportForm",
54 // data: JSON.stringify(json), 54 // data: JSON.stringify(json),
55 -// dataType: "json",  
56 -// contentType: "application/json; charset=utf-8",  
57 -// success: function(data){  
58 -// if (data.code == CODE_SUCCESS) {  
59 -//  
60 -// } else {  
61 -// window.self.$.messager.alert("失败", data.message, "error");  
62 -// }  
63 -// }  
64 -// }); 55 + dataType: "json",
  56 + contentType: "application/json; charset=utf-8",
  57 + success: function(data){
  58 + if (data.code == 200) {
  59 + debugger;
  60 + // 曝光量
  61 + var exposureOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.totalActualCostList,data.data.totalExpoureNumList,[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  62 + drawEchart('exposure',exposureOption);
65 63
  64 + var exposureIosOption = getEchartOption("ios端市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.iosActualCostList,data.data.iosExpoureNumList,[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  65 + drawEchart('exposure_ios',exposureIosOption);
66 66
67 - // 曝光量  
68 - var exposureOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
69 - drawEchart('exposure',exposureOption); 67 + var exposureAndroidOption = getEchartOption("android市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.androidActualCost,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  68 + drawEchart('exposure_android',exposureAndroidOption);
70 69
71 - var exposureIosOption = getEchartOption("ios端市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
72 - drawEchart('exposure_ios',exposureIosOption); 70 + // 激活
  71 + var activeOption = getEchartOption("市场费用/激活量",['实际费用','激活量','市场费用/激活量'],data.data.dateIdStrList,data.data.totalActualCostList,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  72 + drawEchart('active',activeOption);
73 73
74 - var exposureAndroidOption = getEchartOption("android市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
75 - drawEchart('exposure_android',exposureAndroidOption); 74 + var activeIosOption = getEchartOption("ios端市场费用/激活量",['实际费用','激活量','市场费用/激活量'],data.data.dateIdStrList,data.data.iosActualCostList,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  75 + drawEchart('active_ios',activeIosOption);
76 76
77 - // 激活  
78 - var activeOption = getEchartOption("市场费用/激活量",['实际费用','激活量','市场费用/激活量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
79 - drawEchart('active',activeOption); 77 + var activeAndroidOption = getEchartOption("android端市场费用/激活量",['实际费用','激活量','市场费用/激活量'],data.data.dateIdStrList,data.data.androidActualCost,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  78 + drawEchart('active_android',activeAndroidOption);
80 79
81 - var activeIosOption = getEchartOption("ios端市场费用/激活量",['实际费用','激活量','市场费用/激活量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
82 - drawEchart('active_ios',activeIosOption); 80 + // 新客
  81 + var newuserOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.androidActualCost,data.data.totalActualCostList,[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  82 + drawEchart('newuser',newuserOption);
83 83
84 - var activeAndroidOption = getEchartOption("android端市场费用/激活量",['实际费用','激活量','市场费用/激活量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
85 - drawEchart('active_android',activeAndroidOption); 84 + var newuserIosOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.iosActualCostList,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  85 + drawEchart('newuser_ios',newuserIosOption);
86 86
87 - // 新客  
88 - var newuserOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
89 - drawEchart('newuser',newuserOption);  
90 -  
91 - var newuserIosOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
92 - drawEchart('newuser_ios',newuserIosOption);  
93 -  
94 - var newuserAndroidOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);  
95 - drawEchart('newuser_android',newuserAndroidOption); 87 + var newuserAndroidOption = getEchartOption("市场费用/曝光量",['实际费用','曝光量','市场费用/曝光量'],data.data.dateIdStrList,data.data.androidActualCost,[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]);
  88 + drawEchart('newuser_android',newuserAndroidOption);
  89 + } else {
  90 + window.self.$.messager.alert("失败", data.message, "error");
  91 + }
  92 + }
  93 + });
96 }); 94 });
97 95
98 function drawEchart(ele, option){ 96 function drawEchart(ele, option){