|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
@ -60,9 +62,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.time.LocalDate; |
|
|
import java.time.LocalDate; |
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
import java.util.ArrayList; |
|
|
import java.util.*; |
|
|
import java.util.Date; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
import java.util.concurrent.ExecutionException; |
|
|
import java.util.concurrent.ExecutorService; |
|
|
import java.util.concurrent.ExecutorService; |
|
|
import java.util.concurrent.Future; |
|
|
import java.util.concurrent.Future; |
|
@ -73,7 +73,8 @@ import java.util.concurrent.Future; |
|
|
public class DemoController { |
|
|
public class DemoController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private StatsDemoService demoService; |
|
|
private StatsDemoService demoService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private RedisUtils redisUtils; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ExecutorService executorService; |
|
|
private ExecutorService executorService; |
|
|
|
|
|
|
|
@ -1084,16 +1085,21 @@ public class DemoController { |
|
|
@RequestParam(name = "startDate",required = false)String startDate, |
|
|
@RequestParam(name = "startDate",required = false)String startDate, |
|
|
@RequestParam(name = "endDate",required = false)String endDate |
|
|
@RequestParam(name = "endDate",required = false)String endDate |
|
|
){ |
|
|
){ |
|
|
|
|
|
|
|
|
long start = System.currentTimeMillis(); |
|
|
long start = System.currentTimeMillis(); |
|
|
|
|
|
Set<String> result = new LinkedHashSet<>(); |
|
|
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)){ |
|
|
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)){ |
|
|
List<String> daysBetween = DateUtils.getDaysBetween(startDate, endDate); |
|
|
List<String> daysBetween = DateUtils.getDaysBetween(startDate, endDate); |
|
|
daysBetween.forEach(d -> { |
|
|
daysBetween.forEach(d -> { |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectGridData(customerId,d); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectGridData(customerId,d); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectOrgData(customerId,d); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectOrgData(customerId,d); |
|
|
|
|
|
result.add(d); |
|
|
|
|
|
redisUtils.hSet(RedisKeys.getBackDoorbizExcuteResult("gridandorgdailynew"),customerId,result,3*24*60*60L); |
|
|
}); |
|
|
}); |
|
|
}else { |
|
|
}else { |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectGridData(customerId,dateId); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectGridData(customerId,dateId); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectOrgData(customerId,dateId); |
|
|
screenProjectCategoryGridAndOrgDailyService.extractCategoryProjectOrgData(customerId,dateId); |
|
|
|
|
|
redisUtils.hSet(RedisKeys.getBackDoorbizExcuteResult("gridandorgdailynew"),customerId,result,3*24*60*60L); |
|
|
} |
|
|
} |
|
|
long end = System.currentTimeMillis(); |
|
|
long end = System.currentTimeMillis(); |
|
|
long l = (end - start) / 1000; |
|
|
long l = (end - start) / 1000; |
|
|