|
@@ -8,6 +8,7 @@ import com.jjt.calc.domain.TwinCalcDay;
|
|
|
import com.jjt.calc.domain.TwinFormulaInfo;
|
|
|
import com.jjt.calc.domain.TwinPanHeadInfo;
|
|
|
import com.jjt.calc.service.ITwinCalcDayService;
|
|
|
+import com.jjt.calc.service.ITwinCalcHourService;
|
|
|
import com.jjt.calc.service.ITwinFormulaInfoService;
|
|
|
import com.jjt.calc.service.ITwinPanHeadInfoService;
|
|
|
import com.jjt.common.constant.CacheConstants;
|
|
@@ -16,6 +17,8 @@ import com.jjt.utils.AsyncService;
|
|
|
import com.jjt.utils.IotService;
|
|
|
import com.jjt.utils.Tools;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
@@ -42,6 +45,8 @@ public class ApiServiceImpl implements IApiService {
|
|
|
@Resource
|
|
|
private ITwinCalcDayService twinCalcDayService;
|
|
|
@Resource
|
|
|
+ private ITwinCalcHourService twinCalcHourService;
|
|
|
+ @Resource
|
|
|
private ITwinPanHeadInfoService panHeadInfoService;
|
|
|
@Resource
|
|
|
private ITwinDeviceService deviceService;
|
|
@@ -49,11 +54,12 @@ public class ApiServiceImpl implements IApiService {
|
|
|
private IotService iotService;
|
|
|
@Resource
|
|
|
private AsyncService asyncService;
|
|
|
-
|
|
|
@Resource
|
|
|
private ITwinFormulaInfoService twinFormulaInfoService;
|
|
|
@Resource
|
|
|
private RedisCache redisCache;
|
|
|
+ @Resource
|
|
|
+ private Environment env;
|
|
|
|
|
|
/**
|
|
|
* 首页统计数据
|
|
@@ -337,12 +343,18 @@ public class ApiServiceImpl implements IApiService {
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
-// String flag = "false";
|
|
|
-// String bl = env.getProperty("data.bl");
|
|
|
-// if (bl != null && flag.equals(bl)) {
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// curr();
|
|
|
-// today();
|
|
|
+ String[] activeProfiles = env.getActiveProfiles();
|
|
|
+ System.err.println("================");
|
|
|
+ System.err.println("================");
|
|
|
+ System.err.println("================");
|
|
|
+ System.err.println("================");
|
|
|
+ System.err.println("================");
|
|
|
+ for (String profile : activeProfiles) {
|
|
|
+ System.err.println("Active Profile: " + profile);
|
|
|
+ }
|
|
|
+
|
|
|
+// twinCalcHourService.calc2Curr();
|
|
|
+//// curr();
|
|
|
+//// today();
|
|
|
}
|
|
|
}
|