|
|
@ -943,9 +943,25 @@ public class DemoController { |
|
|
|
@Autowired |
|
|
|
private ScreenProjectCategoryOrgDailyService screenProjectCategoryOrgDailyService; |
|
|
|
|
|
|
|
@PostMapping("orgdaily") |
|
|
|
public Result orgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ |
|
|
|
@PostMapping("gridandorgdaily") |
|
|
|
public Result orgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId, |
|
|
|
@RequestParam(name = "startDate",required = false)String startDate, |
|
|
|
@RequestParam(name = "endDate",required = false)String endDate |
|
|
|
){ |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)){ |
|
|
|
List<String> daysBetween = DateUtils.getDaysBetween(startDate, endDate); |
|
|
|
daysBetween.forEach(d -> { |
|
|
|
projectCategoryGridDailyService.extractProjectCategoryData(customerId,d); |
|
|
|
screenProjectCategoryOrgDailyService.extractProjectCategoryOrgData(customerId,d); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
projectCategoryGridDailyService.extractProjectCategoryData(customerId,dateId); |
|
|
|
screenProjectCategoryOrgDailyService.extractProjectCategoryOrgData(customerId,dateId); |
|
|
|
} |
|
|
|
long end = System.currentTimeMillis(); |
|
|
|
long l = (end - start) / 1000; |
|
|
|
log.info("gridAndOrgDaily耗时" + l+ "s"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|