...
|
...
|
@@ -36,107 +36,6 @@ public class MktCostReportFormController { |
|
|
|
|
|
try {
|
|
|
MktReportFormRspBO mktReportFormRspBO = mktCostReportFormService.getMktReportForm(mktReportFormReqVO);
|
|
|
|
|
|
// MktReportFormRspBO mktReportFormRspBO = new MktReportFormRspBO();
|
|
|
// List<String> dateIdStrList = Lists.newArrayList();
|
|
|
// List<BigDecimal> totalActuralCostList = Lists.newArrayList();
|
|
|
// List<BigDecimal> iosActualCostList = Lists.newArrayList();
|
|
|
// List<BigDecimal> androidActualCostList = Lists.newArrayList();
|
|
|
// List<Integer> totalExpoureNumList = Lists.newArrayList();
|
|
|
// List<Integer> iosExpoureNumList = Lists.newArrayList();
|
|
|
// List<Integer> androidExpoureNumList = Lists.newArrayList();
|
|
|
// List<Integer> totalActiveList = Lists.newArrayList();
|
|
|
// List<Integer> iosActiveList = Lists.newArrayList();
|
|
|
// List<Integer> androidActiveList = Lists.newArrayList();
|
|
|
// List<Integer> totalNewUdidList = Lists.newArrayList();
|
|
|
// List<Integer> iosNewUdidList = Lists.newArrayList();
|
|
|
// List<Integer> androidNewUdidList = Lists.newArrayList();
|
|
|
// List<BigDecimal> totalActiveRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> iosActiveRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> androidActiveRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> totalExpoureRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> iosExpoureRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> androidExpoureRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> totalNewUdidRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> iosNewUdidRatio = Lists.newArrayList();
|
|
|
// List<BigDecimal> androidNewUdidRatio = Lists.newArrayList();
|
|
|
//
|
|
|
// for (Integer i = 0; i <=6; i++){
|
|
|
// dateIdStrList.add("2017042" + i.toString());
|
|
|
// totalActuralCostList.add(new BigDecimal(5000 - i * 100));
|
|
|
// iosActualCostList.add(new BigDecimal(4000 - i * 80));
|
|
|
// androidActualCostList.add(new BigDecimal(1000 - i * 20));
|
|
|
// totalExpoureNumList.add(1000 - i * 100);
|
|
|
// iosExpoureNumList.add(600 - i * 60);
|
|
|
// androidExpoureNumList.add(400 - i * 40);
|
|
|
// totalActiveList.add(2000 - i * 200);
|
|
|
// iosActiveList.add(1500 - i * 150);
|
|
|
// androidActiveList.add(500 - i * 50);
|
|
|
// totalNewUdidList.add(100 - i * 10);
|
|
|
// iosNewUdidList.add(70 - i * 7);
|
|
|
// androidNewUdidList.add(30 - i * 3);
|
|
|
//
|
|
|
// totalActiveRatio.add(getDivideData(totalActuralCostList.get(i), new BigDecimal(totalActiveList.get(i))));
|
|
|
// iosActiveRatio.add(getDivideData(iosActualCostList.get(i), new BigDecimal(iosActiveList.get(i))));
|
|
|
// androidActiveRatio.add(getDivideData(androidActualCostList.get(i), new BigDecimal(androidActiveList.get(i))));
|
|
|
// totalExpoureRatio.add(getDivideData(totalActuralCostList.get(i), new BigDecimal(totalExpoureNumList.get(i))));
|
|
|
// iosExpoureRatio.add(getDivideData(iosActualCostList.get(i), new BigDecimal(iosExpoureNumList.get(i))));
|
|
|
// androidExpoureRatio.add(getDivideData(androidActualCostList.get(i), new BigDecimal(androidExpoureNumList.get(i))));
|
|
|
// totalNewUdidRatio.add(getDivideData(totalActuralCostList.get(i), new BigDecimal(totalNewUdidList.get(i))));
|
|
|
// iosNewUdidRatio.add(getDivideData(iosActualCostList.get(i), new BigDecimal(iosNewUdidList.get(i))));
|
|
|
// androidNewUdidRatio.add(getDivideData(androidActualCostList.get(i), new BigDecimal(androidNewUdidList.get(i))));
|
|
|
// }
|
|
|
//
|
|
|
// mktReportFormRspBO.setDateIdStrList(dateIdStrList);
|
|
|
// mktReportFormRspBO.setTotalActualCostList(totalActuralCostList);
|
|
|
// mktReportFormRspBO.setIosActualCostList(iosActualCostList);
|
|
|
// mktReportFormRspBO.setAndroidActualCostList(androidActualCostList);
|
|
|
// mktReportFormRspBO.setTotalExposureNumList(totalExpoureNumList);
|
|
|
// mktReportFormRspBO.setIosExposureNumList(iosExpoureNumList);
|
|
|
// mktReportFormRspBO.setAndroidExposureNumList(androidExpoureNumList);
|
|
|
// mktReportFormRspBO.setTotalAppActiveList(totalActiveList);
|
|
|
// mktReportFormRspBO.setIosAppActiveList(iosActiveList);
|
|
|
// mktReportFormRspBO.setAndroidAppActiveList(androidActiveList);
|
|
|
// mktReportFormRspBO.setTotalNewUserList(totalNewUdidList);
|
|
|
// mktReportFormRspBO.setIosNewUserList(iosNewUdidList);
|
|
|
// mktReportFormRspBO.setAndroidNewUserList(androidNewUdidList);
|
|
|
//
|
|
|
// mktReportFormRspBO.setTopActualCost(Collections.max(totalActuralCostList));
|
|
|
//// mktReportFormRspBO.setTopAppActive(Collections.max(totalActiveList));
|
|
|
//// mktReportFormRspBO.setTopExpoureNum(Collections.max(totalExpoureNumList));
|
|
|
//// mktReportFormRspBO.setTopNewUdid(Collections.max(totalNewUdidList));
|
|
|
//
|
|
|
//
|
|
|
// mktReportFormRspBO.setTotalActiveRatioList(totalActiveRatio);
|
|
|
// mktReportFormRspBO.setIosActiveRatioList(iosActiveRatio);
|
|
|
// mktReportFormRspBO.setAndroidActiveRatioList(androidActiveRatio);
|
|
|
// mktReportFormRspBO.setTotalExposureRatioList(totalExpoureRatio);
|
|
|
// mktReportFormRspBO.setIosExposureRatioList(iosExpoureRatio);
|
|
|
// mktReportFormRspBO.setAndroidExposureRatioList(androidExpoureRatio);
|
|
|
// mktReportFormRspBO.setTotalNewUdidRatioList(totalNewUdidRatio);
|
|
|
// mktReportFormRspBO.setIosNewUdidRatioList(iosNewUdidRatio);
|
|
|
// mktReportFormRspBO.setAndroidNewUdidRatioList(androidNewUdidRatio);
|
|
|
//
|
|
|
//// mktReportFormRspBO.setTopActiveRatio(Collections.max(totalActiveRatio));
|
|
|
//// mktReportFormRspBO.setTopNewUdidRatio(Collections.max(totalNewUdidRatio));
|
|
|
//// mktReportFormRspBO.setTopExpoureRatio(Collections.max(totalExpoureRatio));
|
|
|
// BigDecimal topRatio = Collections.max(totalActiveRatio);
|
|
|
// if (topRatio.compareTo(Collections.max(totalNewUdidRatio)) < 0){
|
|
|
// topRatio = Collections.max(totalNewUdidRatio);
|
|
|
// } else if (topRatio.compareTo(Collections.max(totalExpoureRatio)) < 0){
|
|
|
// topRatio = Collections.max(totalExpoureRatio);
|
|
|
// }
|
|
|
// mktReportFormRspBO.setTopRatio(topRatio);
|
|
|
//
|
|
|
// Integer topExActNew = Collections.max(totalActiveList);
|
|
|
// if (topExActNew < Collections.max(totalExpoureNumList)){
|
|
|
// topExActNew = Collections.max(totalExpoureNumList);
|
|
|
// } else if (topExActNew < Collections.max(totalNewUdidList)){
|
|
|
// topExActNew = Collections.max(totalNewUdidList);
|
|
|
// }
|
|
|
// mktReportFormRspBO.setTopExposureActiveNewUdid(topExActNew);
|
|
|
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(mktReportFormRspBO).message("success").build();
|
|
|
} catch (Exception e){
|
|
|
logger.warn("getMktReportForm occurs Exception e {}",e.getMessage());
|
...
|
...
|
|