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;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -13,12 +14,13 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -38,71 +40,31 @@ import java.net.UnknownHostException;
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableScheduling
@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*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" })
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" })
//@EnableScheduling
@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*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class Amos96333Application {
private static final Logger logger = LoggerFactory.getLogger(Amos96333Application.class);
// @Autowired
// private EmqKeeper emqKeeper;
//
// @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;
private static final Logger logger = LoggerFactory.getLogger(Amos96333Application.class);
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(Amos96333Application.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
@Autowired
private StartPlatformTokenService startPlatformTokenService;
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
/**
* 初始化MQTT
*
* @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);
// }
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(Amos96333Application.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
// @Bean
// public void initToken() {
// startPlatformTokenService.getToken();
// }
@Bean
public void initToken() {
startPlatformTokenService.getToken();
}
}
......@@ -20,7 +20,7 @@ import javax.annotation.PostConstruct;
import javax.annotation.Resource;
@Component
@EnableScheduling
//@EnableScheduling
@Slf4j
public class PlatformUserTopicMessage extends EmqxListener {
@Resource
......@@ -29,10 +29,10 @@ public class PlatformUserTopicMessage extends EmqxListener {
@Value("${amos.operation.log}")
private String amosOperationLog;
@PostConstruct
void init() throws Exception {
emqKeeper.subscript(amosOperationLog, 1, this);
}
// @PostConstruct
// void init() throws Exception {
// emqKeeper.subscript(amosOperationLog, 1, this);
// }
@Value("${amos.agency.code}")
String amosAgencyCode;
......
......@@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -34,6 +35,7 @@ import java.util.Map;
* @date 2021-11-09
*/
@Service
@EnableScheduling
public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,VoiceRecordLog,VoiceRecordLogMapper> implements IVoiceRecordLogService {
private final Logger logger = LogManager.getLogger(VoiceRecordFileServiceImpl.class);
......@@ -160,14 +162,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
this.updateById(l);
};
}
System.out.println("执行通话记录任务");
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
* @author DELL
*/
@Component
@EnableScheduling
//@EnableScheduling
public class CylinderSchedulerJob {
@Autowired
......@@ -19,7 +19,7 @@ public class CylinderSchedulerJob {
/**
* 每天9点-日报生成
*/
@Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}")
// @Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}")
public void dayReport() {
scheduleService.calEarlyWarningLevel();
}
......
package com.yeejoin.amos;
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.flc.api.service.ICylinderInfoService;
import org.eclipse.paho.client.mqttv3.MqttException;
......@@ -21,10 +20,9 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.component.emq.EmqKeeper;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -44,71 +42,40 @@ import java.net.UnknownHostException;
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableScheduling
@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*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" })
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" })
//@EnableScheduling
@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*",
"com.yeejoin.amos.boot.module.**.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class AmosYmtApplication {
private static final Logger logger = LoggerFactory.getLogger(AmosYmtApplication.class);
@Autowired
private EmqKeeper emqKeeper;
@Autowired
private CarcylUnitInspectMqTtlListener carcylUnitInspectMqTtlListener;
@Autowired
private BaseEnterpriseMqTtlListener baseEnterpriseMqTtlListener;
@Autowired
private StartPlatformTokenService startPlatformTokenService;
@Autowired
private PrivilegeCompanyUpdateAddListener privilegeCompanyUpdateAddListener;
@Autowired
private PrivilegeCompanyDeleteListener privilegeCompanyDeleteListener;
@Autowired
private FillingRecordSyncListener fillingRecordSyncListener;
private static final Logger logger = LoggerFactory.getLogger(AmosYmtApplication.class);
@Autowired
private AmosMqttListener amosMqTtlListener;
@Autowired
private StartPlatformTokenService startPlatformTokenService;
@Autowired
ICylinderInfoService cylinderInfoServiceImpl;
@Autowired
ICylinderInfoService cylinderInfoServiceImpl;
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmosYmtApplication.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmosYmtApplication.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
/**
* 初始化MQTT
*
* @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);
}
/**
* 初始化MQTT
*
* @throws MqttException
*/
@Bean
public void initToken() {
startPlatformTokenService.getToken();
}
@Bean
public void initToken() {
startPlatformTokenService.getToken();
}
}
......@@ -20,7 +20,6 @@ import javax.annotation.PostConstruct;
import javax.annotation.Resource;
@Component
@EnableScheduling
@Slf4j
public class PlatformUserTopicMessage extends EmqxListener {
@Resource
......
......@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
* @author DELL
*/
@Component
@EnableScheduling
//@EnableScheduling
public class CylinderSchedulerJob {
@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