|
@@ -2,12 +2,16 @@ package com.fdkankan.sale.controller;
|
|
|
|
|
|
import com.fdkankan.sale.common.ResultData;
|
|
import com.fdkankan.sale.common.ResultData;
|
|
import com.fdkankan.sale.service.impl.DataCountService;
|
|
import com.fdkankan.sale.service.impl.DataCountService;
|
|
|
|
+import com.fdkankan.sale.vo.response.DataGroupByCount;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/sale/dataCount")
|
|
@RequestMapping("/sale/dataCount")
|
|
public class DataCountController {
|
|
public class DataCountController {
|
|
@@ -17,18 +21,23 @@ public class DataCountController {
|
|
|
|
|
|
/**
|
|
/**
|
|
*工单趋势统计
|
|
*工单趋势统计
|
|
- * @param cameraType 0看看,1看见,2深时
|
|
|
|
* @param type 0:日 ,1:周,2:月
|
|
* @param type 0:日 ,1:周,2:月
|
|
* @param startTime 开始时间
|
|
* @param startTime 开始时间
|
|
* @param endTime 结束时间
|
|
* @param endTime 结束时间
|
|
*/
|
|
*/
|
|
@GetMapping("/repairAddTrend")
|
|
@GetMapping("/repairAddTrend")
|
|
- public ResultData repairAddTrend(@RequestParam(required = false,defaultValue = "0") Integer cameraType,
|
|
|
|
|
|
+ public ResultData repairAddTrend(
|
|
@RequestParam(required = false,defaultValue = "0") Integer type,
|
|
@RequestParam(required = false,defaultValue = "0") Integer type,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String endTime){
|
|
@RequestParam(required = false) String endTime){
|
|
-
|
|
|
|
- return ResultData.ok( dataCountService.repairAddTrend(cameraType,type,startTime,endTime));
|
|
|
|
|
|
+ List<DataGroupByCount> kkList = dataCountService.repairAddTrend(0, type, startTime, endTime);
|
|
|
|
+ List<DataGroupByCount> kjList = dataCountService.repairAddTrend(1, type, startTime, endTime);
|
|
|
|
+ List<DataGroupByCount> ssList = dataCountService.repairAddTrend(2, type, startTime, endTime);
|
|
|
|
+ HashMap<String,Object> map = new HashMap<>();
|
|
|
|
+ map.put("kkList",kkList);
|
|
|
|
+ map.put("kjList",kjList);
|
|
|
|
+ map.put("ssList",ssList);
|
|
|
|
+ return ResultData.ok(map );
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|