Commit 502da93e authored by tangwei's avatar tangwei

修改bug'

parent d16810eb
package com.yeejoin.amos.boot.module.jcs.biz.config;
import feign.Feign;
import okhttp3.ConnectionPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.TimeUnit;
/**
* @description:
* @author: tw
* @createDate: 2022/11/18
*/
@Configuration
@ConditionalOnClass(Feign.class)
@AutoConfigureBefore(FeignAutoConfiguration.class)
public class FeignOkHttpConfig {
@Bean
public okhttp3.OkHttpClient okHttpClient(){
return new okhttp3.OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.connectionPool(new ConnectionPool())
// .addInterceptor();
.build();
}
}
...@@ -259,10 +259,17 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -259,10 +259,17 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if (ObjectUtils.isNotEmpty(alertSubmittedExtDtoList)) { if (ObjectUtils.isNotEmpty(alertSubmittedExtDtoList)) {
// 组装额外信息 // 组装额外信息
String _extraInfo = "报送给%s、%s"; String _extraInfo = "报送给%s、%s";
alertSubmittedExtDtoList.forEach(alertSubmittedExtDto -> { alertSubmittedExtDtoList.forEach(alertSubmittedExtDto -> {
try { try {
alertSubmittedExtDto.setExtraInfo(String.format(_extraInfo, alertSubmittedExtDto.getCompanyName(),
alertSubmittedExtDto.getUserName()));
if(alertSubmittedExtDto.getUserName()!=null){
alertSubmittedExtDto.setExtraInfo(String.format(_extraInfo, alertSubmittedExtDto.getCompanyName(),
alertSubmittedExtDto.getUserName()));
}else{
alertSubmittedExtDto.setExtraInfo("未匹配到报送人");
}
TemplateExtendDto template = null; TemplateExtendDto template = null;
Template templateN = null; Template templateN = null;
...@@ -496,7 +503,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -496,7 +503,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if(alertTypeCode.equals(AlertStageEnums.TFSJ.getCode()) || alertTypeCode.equals(AlertStageEnums.LYXC.getCode()) if(alertTypeCode.equals(AlertStageEnums.TFSJ.getCode()) || alertTypeCode.equals(AlertStageEnums.LYXC.getCode())
|| alertTypeCode.equals(AlertStageEnums.ZJBZ.getCode()) || alertTypeCode.equals(AlertStageEnums.QTJQ.getCode())) { || alertTypeCode.equals(AlertStageEnums.ZJBZ.getCode()) || alertTypeCode.equals(AlertStageEnums.QTJQ.getCode())) {
if(e.containsKey("onDuty")) { if(e.containsKey("onDuty")) {
List<Map<String, Object>> mapList = iDutyPersonService.queryByCompanyNew(e.get("name").toString()); List<Map<String, Object>> mapList = iDutyPersonService.queryByCompanyNew(e.get("onDuty").toString());
orgUsers.addAll(mapList); orgUsers.addAll(mapList);
} }
} }
......
...@@ -148,10 +148,12 @@ public class RuleAlertCalledService { ...@@ -148,10 +148,12 @@ public class RuleAlertCalledService {
} }
//航空器救援 //航空器救援
if (alertFormValue.getFieldCode().equals("flightNumber")) { if (alertFormValue.getFieldCode().equals("flightNumber")) {
alertCalledRo.setFlightNumber(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode()); alertCalledRo.setFlightNumber(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ?
alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode());
} }
if (alertFormValue.getFieldCode().equals("aircraftModel")) { if (alertFormValue.getFieldCode().equals("aircraftModel")) {
alertCalledRo.setAircraftModel(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode()); alertCalledRo.setAircraftModel(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ?
alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode());
} }
if (alertFormValue.getFieldCode().equals("landingTime")) { if (alertFormValue.getFieldCode().equals("landingTime")) {
alertCalledRo.setLandingTime(alertFormValue.getFieldValue()); alertCalledRo.setLandingTime(alertFormValue.getFieldValue());
...@@ -222,14 +224,14 @@ public class RuleAlertCalledService { ...@@ -222,14 +224,14 @@ public class RuleAlertCalledService {
if(alertCalled.getAlertTypeCode().equals(AlertStageEnums.HKJY.getCode())) { if(alertCalled.getAlertTypeCode().equals(AlertStageEnums.HKJY.getCode())) {
replaceContent = "航班号:".concat(ValidationUtil.isEmpty(alertCalledRo.getFlightNumber()) ? "无": alertCalledRo.getFlightNumber()).concat( replaceContent = "航班号:".concat(ValidationUtil.isEmpty(alertCalledRo.getFlightNumber()) ? "无": alertCalledRo.getFlightNumber()).concat(
"飞机型号:").concat(ValidationUtil.isEmpty(alertCalledRo.getAircraftModel() )? "无": alertCalledRo.getAircraftModel()).concat( "飞机型号:").concat(ValidationUtil.isEmpty(alertCalledRo.getAircraftModel() )? "无": alertCalledRo.getAircraftModel()).concat(
"落地时间:").concat(ValidationUtil.isEmpty(alertCalledRo.getLandingTime() ) ? "无" : alertCalledRo.getLandingTime()).concat( "落地时间:").concat(ValidationUtil.isEmpty(alertCalledRo.getLandingTime() ) ? "无" : alertCalledRo.getLandingTime()).concat(
"发生".concat(ValidationUtil.isEmpty(alertCalledRo.getAccidentSituationHkq()) ? "无": alertCalledRo.getAccidentSituationHkq()).concat( "发生".concat(ValidationUtil.isEmpty(alertCalledRo.getAccidentSituationHkq()) ? "无": alertCalledRo.getAccidentSituationHkq()).concat(
"飞机受损位置:").concat(ValidationUtil.isEmpty(alertCalledRo.getDamageLocation() )? "无": alertCalledRo.getDamageLocation()).concat( "飞机受损位置:").concat(ValidationUtil.isEmpty(alertCalledRo.getDamageLocation() )? "无": alertCalledRo.getDamageLocation()).concat(
"燃油量:").concat(ValidationUtil.isEmpty(alertCalledRo.getFuelQuantity() ) ? "无" : alertCalledRo.getFuelQuantity()).concat( "燃油量:").concat(ValidationUtil.isEmpty(alertCalledRo.getFuelQuantity() ) ? "无" : alertCalledRo.getFuelQuantity()).concat(
"载客量:".concat(ValidationUtil.isEmpty(alertCalledRo.getPassengerCapacity()) ? "无": alertCalledRo.getPassengerCapacity()).concat( "载客量:".concat(ValidationUtil.isEmpty(alertCalledRo.getPassengerCapacity()) ? "无": alertCalledRo.getPassengerCapacity()).concat(
"迫降跑道:").concat(ValidationUtil.isEmpty(alertCalledRo.getForcedLandingTrack() )? "无": alertCalledRo.getForcedLandingTrack()).concat( "迫降跑道:").concat(ValidationUtil.isEmpty(alertCalledRo.getForcedLandingTrack() )? "无": alertCalledRo.getForcedLandingTrack()).concat(
"发展态势:").concat(ValidationUtil.isEmpty(alertCalledRo.getDevelopmentTrend() ) ? "无" : alertCalledRo.getDevelopmentTrend()) "发展态势:").concat(ValidationUtil.isEmpty(alertCalledRo.getDevelopmentTrend() ) ? "无" : alertCalledRo.getDevelopmentTrend())
)); ));
} }
......
...@@ -2728,11 +2728,9 @@ ...@@ -2728,11 +2728,9 @@
LEFT JOIN wl_manufacturer_info mi ON mi.id = ed.manufacturer_id LEFT JOIN wl_manufacturer_info mi ON mi.id = ed.manufacturer_id
LEFT JOIN wl_stock_detail wsd ON wsd.equipment_specific_id = wesp.id LEFT JOIN wl_stock_detail wsd ON wsd.equipment_specific_id = wesp.id
LEFT JOIN wl_warehouse_structure wws ON wsd.warehouse_structure_id = wws.id LEFT JOIN wl_warehouse_structure wws ON wsd.warehouse_structure_id = wws.id
left JOIN wl_equipment_category wec on wec.id=eq.category_id
<where> <where>
and wec.industry_code = 2 wec.industry_code = 2
<if test="dto.code!=null and dto.code!=''"> <if test="dto.code!=null and dto.code!=''">
and wesp.code = #{dto.code} and wesp.code = #{dto.code}
</if> </if>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<artifactId>amos-boot-system-jcs</artifactId> <artifactId>amos-boot-system-jcs</artifactId>
<version>1.0.0.16</version> <version>1.0.0.16.1</version>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
<artifactId>liquibase-core</artifactId> <artifactId>liquibase-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -144,4 +144,7 @@ management.endpoint.health.show-details=always ...@@ -144,4 +144,7 @@ management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑 ##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic=true logic=true
\ No newline at end of file
feign.okhttp.enabled=true
\ No newline at end of file
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