Commit 55cc714a authored by duanruiming's avatar duanruiming

[add] 国产化

parent 19db6e88
...@@ -57,6 +57,18 @@ ...@@ -57,6 +57,18 @@
<!-- 依赖声明 --> <!-- 依赖声明 -->
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- 瀚高数据库-->
<dependency>
<groupId>com.highgo</groupId>
<artifactId>HgdbJdbc</artifactId>
<version>6.2.2</version>
</dependency>
<!-- 中创中间件inforsuite-->
<dependency>
<groupId>com.cvicse.embedded</groupId>
<artifactId>spring-boot-starter-inforsuite</artifactId>
<version>10.0.2.5</version>
</dependency>
<!-- 自定义feign远程调用--> <!-- 自定义feign远程调用-->
<dependency> <dependency>
<groupId>net.wanji</groupId> <groupId>net.wanji</groupId>
...@@ -69,6 +81,10 @@ ...@@ -69,6 +81,10 @@
<artifactId>spring-boot-starter-log4j2</artifactId> <artifactId>spring-boot-starter-log4j2</artifactId>
<version>2.2.2.RELEASE</version> <version>2.2.2.RELEASE</version>
<exclusions> <exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion> <exclusion>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <artifactId>log4j-core</artifactId>
......
...@@ -23,6 +23,14 @@ ...@@ -23,6 +23,14 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency>
<groupId>com.highgo</groupId>
<artifactId>HgdbJdbc</artifactId>
</dependency>
<dependency>
<groupId>com.cvicse.embedded</groupId>
<artifactId>spring-boot-starter-inforsuite</artifactId>
</dependency>
<!-- alibaba fastjson 依赖 --> <!-- alibaba fastjson 依赖 -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
...@@ -83,12 +91,6 @@ ...@@ -83,12 +91,6 @@
<artifactId>wj-databus</artifactId> <artifactId>wj-databus</artifactId>
<version>0.0.3</version> <version>0.0.3</version>
</dependency> </dependency>
<!-- 数据库驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
<!--Nacos 配置中心--> <!--Nacos 配置中心-->
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
......
...@@ -37,7 +37,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle ...@@ -37,7 +37,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle
* @param acknowledgment * @param acknowledgment
* @throws Exception * @throws Exception
*/ */
@KafkaListener(topics = {"${kafka-consumer.phaseEmptyTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.phaseEmptyTopic}"}, groupId = "group0510")
public void receivePhaseEmptyData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receivePhaseEmptyData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String message = String.valueOf(record.value()); String message = String.valueOf(record.value());
...@@ -58,7 +58,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle ...@@ -58,7 +58,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle
* @param acknowledgment * @param acknowledgment
* @throws Exception * @throws Exception
*/ */
@KafkaListener(topics = {"${kafka-consumer.imbalanceAlgorithmResultTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.imbalanceAlgorithmResultTopic}"}, groupId = "group0510")
public void receiveImbalanceData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveImbalanceData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
String message = String.valueOf(record.value()); String message = String.valueOf(record.value());
try { try {
...@@ -77,7 +77,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle ...@@ -77,7 +77,7 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle
acknowledgment.acknowledge(); acknowledgment.acknowledge();
} }
@KafkaListener(topics = {"${kafka-consumer.overflowAlgorithmResultTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.overflowAlgorithmResultTopic}"}, groupId = "group0510")
public void receiveOverFlowData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveOverFlowData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String message = String.valueOf(record.value()); String message = String.valueOf(record.value());
......
...@@ -25,7 +25,7 @@ public class EventDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -25,7 +25,7 @@ public class EventDataConsumerHandler implements KafkaListenerErrorHandler {
@Resource @Resource
private EventDataService eventDataService; private EventDataService eventDataService;
@KafkaListener(topics = {"${kafka-consumer.eventDataTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.eventDataTopic}"}, groupId = "group0510")
public void receiveEventData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveEventData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String message = String.valueOf(record.value()); String message = String.valueOf(record.value());
......
...@@ -37,7 +37,7 @@ public class GreenBeltDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -37,7 +37,7 @@ public class GreenBeltDataConsumerHandler implements KafkaListenerErrorHandler {
* @param acknowledgment * @param acknowledgment
* @throws Exception * @throws Exception
*/ */
@KafkaListener(topics = {"${kafka-consumer.greenBeltInfoDataTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.greenBeltInfoDataTopic}"}, groupId = "group0510")
public void receiveGreenBeltInfoData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveGreenBeltInfoData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String message = String.valueOf(record.value()); String message = String.valueOf(record.value());
...@@ -59,7 +59,7 @@ public class GreenBeltDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -59,7 +59,7 @@ public class GreenBeltDataConsumerHandler implements KafkaListenerErrorHandler {
* @param acknowledgment * @param acknowledgment
* @throws Exception * @throws Exception
*/ */
@KafkaListener(topics = {"${kafka-consumer.greenWavePeriodTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.greenWavePeriodTopic}"}, groupId = "group0510")
public void receiveGreenPeriodData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveGreenPeriodData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
String originalData = String.valueOf(record.value()); String originalData = String.valueOf(record.value());
try { try {
......
...@@ -25,7 +25,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -25,7 +25,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler {
@Resource @Resource
private DataProcessService dataProcessService; private DataProcessService dataProcessService;
@KafkaListener(topics = {"${kafka-consumer.lanePeriodicDataTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.lanePeriodicDataTopic}"}, groupId = "group0510")
public void receiveLanePeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveLanePeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
String originalData = String.valueOf(record.value()); String originalData = String.valueOf(record.value());
try { try {
...@@ -37,7 +37,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -37,7 +37,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler {
acknowledgment.acknowledge(); acknowledgment.acknowledge();
} }
@KafkaListener(topics = {"${kafka-consumer.crossPeriodicDataTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.crossPeriodicDataTopic}"}, groupId = "group0510")
public void receiveCrossPeriodicData(ConsumerRecord<Object, String> record, Acknowledgment acknowledgment) throws Exception { public void receiveCrossPeriodicData(ConsumerRecord<Object, String> record, Acknowledgment acknowledgment) throws Exception {
String originalData = String.valueOf(record.value()); String originalData = String.valueOf(record.value());
try { try {
...@@ -49,7 +49,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -49,7 +49,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler {
acknowledgment.acknowledge(); acknowledgment.acknowledge();
} }
@KafkaListener(topics = {"${kafka-consumer.dirPeriodicDataTopic}"}, groupId = "group-dir") @KafkaListener(topics = {"${kafka-consumer.dirPeriodicDataTopic}"}, groupId = "group0510")
public void receiveDirPeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveDirPeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
String originalData = String.valueOf(record.value()); String originalData = String.valueOf(record.value());
try { try {
...@@ -61,7 +61,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler { ...@@ -61,7 +61,7 @@ public class PeriodDataConsumerHandler implements KafkaListenerErrorHandler {
acknowledgment.acknowledge(); acknowledgment.acknowledge();
} }
@KafkaListener(topics = {"${kafka-consumer.turnPeriodicDataTopic}"}, groupId = "group") @KafkaListener(topics = {"${kafka-consumer.turnPeriodicDataTopic}"}, groupId = "group0510")
public void receiveTurnPeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveTurnPeriodicData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
String originalData = String.valueOf(record.value()); String originalData = String.valueOf(record.value());
try { try {
......
...@@ -13,12 +13,12 @@ import net.wanji.datacenter.mapper.EventInfoMapper; ...@@ -13,12 +13,12 @@ import net.wanji.datacenter.mapper.EventInfoMapper;
import net.wanji.datacenter.pojo.dto.EventDataDTO; import net.wanji.datacenter.pojo.dto.EventDataDTO;
import net.wanji.datacenter.pojo.po.EventInfoPO; import net.wanji.datacenter.pojo.po.EventInfoPO;
import org.apache.ignite.transactions.TransactionRollbackException; import org.apache.ignite.transactions.TransactionRollbackException;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.sql.SQLTransactionRollbackException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -95,7 +95,6 @@ public class EventDataServiceImpl implements EventDataService { ...@@ -95,7 +95,6 @@ public class EventDataServiceImpl implements EventDataService {
} }
} }
@NotNull
private static EventInfoPO getEventInfoPO(EventDataDTO eventDataDTO) throws Exception{ private static EventInfoPO getEventInfoPO(EventDataDTO eventDataDTO) throws Exception{
ObjectMapper mapper = JacksonUtils.getInstance(); ObjectMapper mapper = JacksonUtils.getInstance();
Map<String, Integer> crossIdGreenIdMap = CrossGreenWaveInfoCache.crossIdGreenIdMap; Map<String, Integer> crossIdGreenIdMap = CrossGreenWaveInfoCache.crossIdGreenIdMap;
......
...@@ -12,9 +12,9 @@ import net.wanji.datacenter.pojo.dto.ImbalanceAlgorithmDTO; ...@@ -12,9 +12,9 @@ import net.wanji.datacenter.pojo.dto.ImbalanceAlgorithmDTO;
import net.wanji.datacenter.pojo.dto.PhaseEmptyDataDTO; import net.wanji.datacenter.pojo.dto.PhaseEmptyDataDTO;
import net.wanji.datacenter.pojo.entity.CrossStrategyResultEntity; import net.wanji.datacenter.pojo.entity.CrossStrategyResultEntity;
import net.wanji.datacenter.service.CrossStrategyOptService; import net.wanji.datacenter.service.CrossStrategyOptService;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
......
...@@ -14,6 +14,7 @@ import net.wanji.datacenter.pojo.dto.CrossPeriodLaneDTO; ...@@ -14,6 +14,7 @@ import net.wanji.datacenter.pojo.dto.CrossPeriodLaneDTO;
import net.wanji.datacenter.pojo.dto.CrossPeriodTurnDTO; import net.wanji.datacenter.pojo.dto.CrossPeriodTurnDTO;
import net.wanji.datacenter.pojo.po.EventInfoPO; import net.wanji.datacenter.pojo.po.EventInfoPO;
import net.wanji.datacenter.service.DataProcessService; import net.wanji.datacenter.service.DataProcessService;
//import org.apache.ignite.transactions.TransactionRollbackException;
import org.apache.ignite.transactions.TransactionRollbackException; import org.apache.ignite.transactions.TransactionRollbackException;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
* @author duanruiming * @author duanruiming
* @date 2023/10/27 17:11 * @date 2023/10/27 17:11
*/ */
@Component //@Component
@Slf4j @Slf4j
public class LaneSnapShotDataDelTask { public class LaneSnapShotDataDelTask {
......
...@@ -6,9 +6,11 @@ spring: ...@@ -6,9 +6,11 @@ spring:
cloud: cloud:
nacos: nacos:
config: config:
server-addr: 37.12.182.29:8848 server-addr: 37.8.219.227:28848
file-extension: yaml file-extension: yaml
group: wanji group: wanji
namespace: wanji namespace: wanji
username: nacos username: nacos
password: nacos password: Nacos@2025
\ No newline at end of file inforsuite:
license-path: D:\license
\ No newline at end of file
...@@ -149,15 +149,15 @@ ...@@ -149,15 +149,15 @@
, #{unbalanceIndex} , #{unbalanceIndex}
, #{spilloverIndex} , #{spilloverIndex}
) )
ON DUPLICATE KEY UPDATE ON CONFLICT(event_serial_number, start_time, dt)
end_time = values(end_time) do update set end_time = excluded.end_time
</insert> </insert>
<select id="selectLastEventInfo" parameterType="java.lang.String" resultType="net.wanji.datacenter.pojo.po.EventInfoPO"> <select id="selectLastEventInfo" parameterType="java.lang.String" resultType="net.wanji.datacenter.pojo.po.EventInfoPO">
select <include refid="Base_Column_List"/> from t_event_info select <include refid="Base_Column_List"/> from t_event_info
where event_serial_number = where event_serial_number =
(select event_serial_number from t_event_info where cross_id = #{crossId} (select event_serial_number from t_event_info where cross_id = #{crossId}
and dt = CURDATE() order by start_time desc limit 1) and dt = cast(to_char(now(), 'YYYYMMDD') as INTEGER) order by start_time desc limit 1)
</select> </select>
</mapper> </mapper>
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