提交 f5c6cef9 authored 作者: zhoushaopan's avatar zhoushaopan

feat(装备申请模块,装备配发模块.装备退回,装备维修,装备自查,装备使用报告): 新增单位id字段

新增单位id字段
上级 db5aabb4
...@@ -17,9 +17,13 @@ public class BigScreenCacheConfig { ...@@ -17,9 +17,13 @@ public class BigScreenCacheConfig {
@Autowired @Autowired
private BigScreenService bigScreenService; private BigScreenService bigScreenService;
// @Bean
// public BigScreenCache initBigScreenCache(){
// return new BigScreenCache(bigScreenService.getAllDeviceNum(),bigScreenService.getBusinessNum(2),bigScreenService.getCenterNum(),bigScreenService.getRepairNum(),bigScreenService.getRepairDevices(),bigScreenService.getSelfCheckNum(),bigScreenService.selectUserDataScreen());
// }
@Bean @Bean
public BigScreenCache initBigScreenCache(){ public BigScreenCache initBigScreenCache(){
return new BigScreenCache(bigScreenService.getAllDeviceNum(),bigScreenService.getBusinessNum(2),bigScreenService.getCenterNum(),bigScreenService.getRepairNum(),bigScreenService.getRepairDevices(),bigScreenService.getSelfCheckNum(),bigScreenService.selectUserDataScreen()); return new BigScreenCache();
} }
} }
...@@ -2,9 +2,14 @@ package com.tykj.dev.statistical.cache; ...@@ -2,9 +2,14 @@ package com.tykj.dev.statistical.cache;
import com.tykj.dev.statistical.service.BigScreenService; import com.tykj.dev.statistical.service.BigScreenService;
import com.tykj.dev.statistical.service.StatisticalService; import com.tykj.dev.statistical.service.StatisticalService;
import jdk.nashorn.tools.Shell;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import java.text.ParseException; import java.text.ParseException;
...@@ -12,21 +17,28 @@ import java.text.ParseException; ...@@ -12,21 +17,28 @@ import java.text.ParseException;
* @author dengdiyi * @author dengdiyi
* 统计分析缓存配置类 * 统计分析缓存配置类
*/ */
@Configuration //@Configuration
@Component
@Order(value = 10)
public class CacheConfig { public class CacheConfig {
@Autowired @Autowired
private StatisticalService statisticalService; private StatisticalService statisticalService;
// @Bean
// public StatisticalCache initStatisticalCache() throws ParseException, InterruptedException {
//
// return new StatisticalCache(statisticalService.getDeviceNum(), statisticalService.getLifeStatus(1),
// statisticalService.getLifeStatus(2), statisticalService.getSelfCheck(), statisticalService.getYearSelfCheck(),
// statisticalService.getRfidWarning(), statisticalService.getRfidWarningDetail(1),
// statisticalService.getRfidWarningDetail(2), statisticalService.getCheckNum(),
// statisticalService.getConfirmCheck(1), statisticalService.getConfirmCheck(2),
// statisticalService.getUserGeneralSituation(), statisticalService.getSelfCheckStat());
// }
@Bean @Bean
public StatisticalCache initStatisticalCache() throws ParseException { public StatisticalCache initStatisticalCache() throws ParseException, InterruptedException {
return new StatisticalCache(statisticalService.getDeviceNum(),statisticalService.getLifeStatus(1),
statisticalService.getLifeStatus(2),statisticalService.getSelfCheck(),statisticalService.getYearSelfCheck(), return new StatisticalCache();
statisticalService.getRfidWarning(),statisticalService.getRfidWarningDetail(1),
statisticalService.getRfidWarningDetail(2),statisticalService.getCheckNum(),
statisticalService.getConfirmCheck(1),statisticalService.getConfirmCheck(2),
statisticalService.getUserGeneralSituation(),statisticalService.getSelfCheckStat());
} }
} }
...@@ -16,6 +16,7 @@ import com.tykj.dev.statistical.service.StatisticalService; ...@@ -16,6 +16,7 @@ import com.tykj.dev.statistical.service.StatisticalService;
import lombok.Data; import lombok.Data;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.support.CronTrigger; import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
...@@ -21,6 +21,8 @@ import com.tykj.dev.device.usereport.subject.domin.DeviceUseReport; ...@@ -21,6 +21,8 @@ import com.tykj.dev.device.usereport.subject.domin.DeviceUseReport;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collections; import java.util.Collections;
...@@ -28,6 +30,7 @@ import java.util.List; ...@@ -28,6 +30,7 @@ import java.util.List;
@Slf4j @Slf4j
@Component @Component
@Order(value = 1)
public class DataInit implements CommandLineRunner { public class DataInit implements CommandLineRunner {
@Resource @Resource
...@@ -194,6 +197,7 @@ public class DataInit implements CommandLineRunner { ...@@ -194,6 +197,7 @@ public class DataInit implements CommandLineRunner {
} }
@Override @Override
@Order(100)
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
log.info("单位名称初始化-----"); log.info("单位名称初始化-----");
initCheckDetailUnitName(); initCheckDetailUnitName();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论