Browse Source

入口

master
zxc 4 years ago
parent
commit
b27c14afed
  1. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -943,9 +943,25 @@ public class DemoController {
@Autowired @Autowired
private ScreenProjectCategoryOrgDailyService screenProjectCategoryOrgDailyService; private ScreenProjectCategoryOrgDailyService screenProjectCategoryOrgDailyService;
@PostMapping("orgdaily") @PostMapping("gridandorgdaily")
public Result orgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ public Result orgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId,
screenProjectCategoryOrgDailyService.extractProjectCategoryOrgData(customerId,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(); return new Result();
} }

Loading…
Cancel
Save