Commit cfdb9428 authored by suhuiguang's avatar suhuiguang

1.包整理

parent 7d5cc87b
package com.yeejoin.amos.boot.biz.common.enums;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public enum DictTypeEnum {
坐席技能组("ZXJNZ","坐席技能组");
private String type;//字典类型
private String desc;//描述
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
package com.yeejoin.amos; package com.yeejoin.amos;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils; import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
import org.eclipse.paho.client.mqttv3.MqttException; import com.yeejoin.amos.boot.module.elevator.biz.service.impl.StartPlatformTokenService;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
...@@ -13,12 +14,13 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; ...@@ -13,12 +14,13 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
...@@ -38,39 +40,17 @@ import java.net.UnknownHostException; ...@@ -38,39 +40,17 @@ import java.net.UnknownHostException;
@EnableAsync @EnableAsync
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
@EnableEurekaClient @EnableEurekaClient
@EnableScheduling //@EnableScheduling
@MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*", @MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*", "org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" }) "com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper"})
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" }) @ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class Amos96333Application { public class Amos96333Application {
private static final Logger logger = LoggerFactory.getLogger(Amos96333Application.class); private static final Logger logger = LoggerFactory.getLogger(Amos96333Application.class);
// @Autowired
// private EmqKeeper emqKeeper; @Autowired
// private StartPlatformTokenService startPlatformTokenService;
// @Autowired
// private CarcylUnitInspectMqTtlListener carcylUnitInspectMqTtlListener;
//
// @Autowired
// private BaseEnterpriseMqTtlListener baseEnterpriseMqTtlListener;
//
// @Autowired
// private StartPlatformTokenService startPlatformTokenService;
//
// @Autowired
// private PrivilegeCompanyUpdateAddListener privilegeCompanyUpdateAddListener;
//
// @Autowired
// private PrivilegeCompanyDeleteListener privilegeCompanyDeleteListener;
//
// @Autowired
// private FillingRecordSyncListener fillingRecordSyncListener;
//
// @Autowired
// private AmosMqttListener amosMqTtlListener;
//
// @Autowired
// ICylinderInfoService cylinderInfoServiceImpl;
public static void main(String[] args) throws UnknownHostException { public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(Amos96333Application.class, args); ConfigurableApplicationContext context = SpringApplication.run(Amos96333Application.class, args);
...@@ -78,31 +58,13 @@ public class Amos96333Application { ...@@ -78,31 +58,13 @@ public class Amos96333Application {
String ip = InetAddress.getLocalHost().getHostAddress(); String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port"); String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path")); String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
logger.info("\n----------------------------------------------------------\n\t" logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port + "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------"); + path + "/doc.html\n" + "----------------------------------------------------------");
} }
/** @Bean
* 初始化MQTT public void initToken() {
* startPlatformTokenService.getToken();
* @throws MqttException }
*/
// @Bean
// public void initMqtt() throws Exception {
// emqKeeper.subscript("/idx/idx_biz_carcyl_unit_inspect", 2, carcylUnitInspectMqTtlListener);
// emqKeeper.subscript("/tm/tz_base_enterprise_info", 2, baseEnterpriseMqTtlListener);
// emqKeeper.subscript("/tz/privilege_company_add_update", 2, privilegeCompanyUpdateAddListener);
// emqKeeper.subscript("/tz/privilege_company_delete", 2, privilegeCompanyDeleteListener);
// emqKeeper.subscript("/tzs/sync/fillingRecord", 2, fillingRecordSyncListener);
// emqKeeper.subscript("tzs/oneCodePass/deviceSave", 2, amosMqTtlListener);
//// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam", 1, examMqTtlListener);
//// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam_record", 1, examMqTtRecordListener);
// }
// @Bean
// public void initToken() {
// startPlatformTokenService.getToken();
// }
} }
...@@ -20,7 +20,7 @@ import javax.annotation.PostConstruct; ...@@ -20,7 +20,7 @@ import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
@Component @Component
@EnableScheduling //@EnableScheduling
@Slf4j @Slf4j
public class PlatformUserTopicMessage extends EmqxListener { public class PlatformUserTopicMessage extends EmqxListener {
@Resource @Resource
...@@ -29,10 +29,10 @@ public class PlatformUserTopicMessage extends EmqxListener { ...@@ -29,10 +29,10 @@ public class PlatformUserTopicMessage extends EmqxListener {
@Value("${amos.operation.log}") @Value("${amos.operation.log}")
private String amosOperationLog; private String amosOperationLog;
@PostConstruct // @PostConstruct
void init() throws Exception { // void init() throws Exception {
emqKeeper.subscript(amosOperationLog, 1, this); // emqKeeper.subscript(amosOperationLog, 1, this);
} // }
@Value("${amos.agency.code}") @Value("${amos.agency.code}")
String amosAgencyCode; String amosAgencyCode;
......
...@@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger; ...@@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
...@@ -34,6 +35,7 @@ import java.util.Map; ...@@ -34,6 +35,7 @@ import java.util.Map;
* @date 2021-11-09 * @date 2021-11-09
*/ */
@Service @Service
@EnableScheduling
public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,VoiceRecordLog,VoiceRecordLogMapper> implements IVoiceRecordLogService { public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,VoiceRecordLog,VoiceRecordLogMapper> implements IVoiceRecordLogService {
private final Logger logger = LogManager.getLogger(VoiceRecordFileServiceImpl.class); private final Logger logger = LogManager.getLogger(VoiceRecordFileServiceImpl.class);
...@@ -160,14 +162,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi ...@@ -160,14 +162,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
this.updateById(l); this.updateById(l);
}; };
} }
System.out.println("执行通话记录任务"); System.out.println("执行通话记录任务");
} }
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; ...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
* @author DELL * @author DELL
*/ */
@Component @Component
@EnableScheduling //@EnableScheduling
public class CylinderSchedulerJob { public class CylinderSchedulerJob {
@Autowired @Autowired
...@@ -19,7 +19,7 @@ public class CylinderSchedulerJob { ...@@ -19,7 +19,7 @@ public class CylinderSchedulerJob {
/** /**
* 每天9点-日报生成 * 每天9点-日报生成
*/ */
@Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}") // @Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}")
public void dayReport() { public void dayReport() {
scheduleService.calEarlyWarningLevel(); scheduleService.calEarlyWarningLevel();
} }
......
package com.yeejoin.amos; package com.yeejoin.amos;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils; import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
import com.yeejoin.amos.boot.module.ymt.biz.listener.*;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.StartPlatformTokenService; import com.yeejoin.amos.boot.module.ymt.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.ymt.flc.api.service.ICylinderInfoService; import com.yeejoin.amos.boot.module.ymt.flc.api.service.ICylinderInfoService;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
...@@ -21,10 +20,9 @@ import org.springframework.context.annotation.Bean; ...@@ -21,10 +20,9 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.component.emq.EmqKeeper;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
...@@ -44,38 +42,18 @@ import java.net.UnknownHostException; ...@@ -44,38 +42,18 @@ import java.net.UnknownHostException;
@EnableAsync @EnableAsync
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
@EnableEurekaClient @EnableEurekaClient
@EnableScheduling //@EnableScheduling
@MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*", @MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*", "org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" }) "com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper"})
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" }) @ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class AmosYmtApplication { public class AmosYmtApplication {
private static final Logger logger = LoggerFactory.getLogger(AmosYmtApplication.class); private static final Logger logger = LoggerFactory.getLogger(AmosYmtApplication.class);
@Autowired
private EmqKeeper emqKeeper;
@Autowired
private CarcylUnitInspectMqTtlListener carcylUnitInspectMqTtlListener;
@Autowired
private BaseEnterpriseMqTtlListener baseEnterpriseMqTtlListener;
@Autowired @Autowired
private StartPlatformTokenService startPlatformTokenService; private StartPlatformTokenService startPlatformTokenService;
@Autowired @Autowired
private PrivilegeCompanyUpdateAddListener privilegeCompanyUpdateAddListener;
@Autowired
private PrivilegeCompanyDeleteListener privilegeCompanyDeleteListener;
@Autowired
private FillingRecordSyncListener fillingRecordSyncListener;
@Autowired
private AmosMqttListener amosMqTtlListener;
@Autowired
ICylinderInfoService cylinderInfoServiceImpl; ICylinderInfoService cylinderInfoServiceImpl;
public static void main(String[] args) throws UnknownHostException { public static void main(String[] args) throws UnknownHostException {
...@@ -95,17 +73,6 @@ public class AmosYmtApplication { ...@@ -95,17 +73,6 @@ public class AmosYmtApplication {
* *
* @throws MqttException * @throws MqttException
*/ */
@Bean
public void initMqtt() throws Exception {
emqKeeper.subscript("/idx/idx_biz_carcyl_unit_inspect", 2, carcylUnitInspectMqTtlListener);
emqKeeper.subscript("/tm/tz_base_enterprise_info", 2, baseEnterpriseMqTtlListener);
emqKeeper.subscript("/tz/privilege_company_add_update", 2, privilegeCompanyUpdateAddListener);
emqKeeper.subscript("/tz/privilege_company_delete", 2, privilegeCompanyDeleteListener);
emqKeeper.subscript("/tzs/sync/fillingRecord", 2, fillingRecordSyncListener);
emqKeeper.subscript("tzs/oneCodePass/deviceSave", 2, amosMqTtlListener);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam", 1, examMqTtlListener);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam_record", 1, examMqTtRecordListener);
}
@Bean @Bean
public void initToken() { public void initToken() {
......
...@@ -20,7 +20,6 @@ import javax.annotation.PostConstruct; ...@@ -20,7 +20,6 @@ import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
@Component @Component
@EnableScheduling
@Slf4j @Slf4j
public class PlatformUserTopicMessage extends EmqxListener { public class PlatformUserTopicMessage extends EmqxListener {
@Resource @Resource
......
...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; ...@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
* @author DELL * @author DELL
*/ */
@Component @Component
@EnableScheduling //@EnableScheduling
public class CylinderSchedulerJob { public class CylinderSchedulerJob {
@Autowired @Autowired
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment