Commit cfd1da4d by 罗胜

2023-02-08 罗胜

1.航班执行期监控更新
2.油量分析获取签派放行数据缺少xml文件,解析失败
parent 56067a6c
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<transformers> <transformers>
<transformer <transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.foc.StatisticalTask</mainClass> <mainClass>com.foc.DspReleaseInfoTask</mainClass>
</transformer> </transformer>
</transformers> </transformers>
</configuration> </configuration>
......
...@@ -42,7 +42,7 @@ public class DspReleaseInfoTask { ...@@ -42,7 +42,7 @@ public class DspReleaseInfoTask {
dates.add(LocalDate.now()); dates.add(LocalDate.now());
} }
DspReleaseInfoService.addInfo(dates); DspReleaseInfoService.addInfo(dates);
DspReleaseInfoService.addPltPlan(dates.get(0).plusDays(-1)); DspReleaseInfoService.addPltPlan(LocalDate.now().plusDays(-1));
// DspReleaseInfoService.addHistoryPltPlan(); // DspReleaseInfoService.addPltPlan(LocalDate.parse("2023-02-05", DateTimeFormatter.ofPattern("yyyy-MM-dd")));
} }
} }
...@@ -65,6 +65,14 @@ public interface StatisticalDao { ...@@ -65,6 +65,14 @@ public interface StatisticalDao {
*/ */
String getSailingCommand(@Param(value = "entity") StatisticalEntity entity, @Param(value = "verifyAcType") String verifyAcType); String getSailingCommand(@Param(value = "entity") StatisticalEntity entity, @Param(value = "verifyAcType") String verifyAcType);
/***
*
* @param entity
* @param verifyAcType
* @return
*/
String getUnMainSailingCommand(@Param(value = "entity") StatisticalEntity entity, @Param(value = "verifyAcType") String verifyAcType);
/** /**
* 批量新增或修改 * 批量新增或修改
* *
...@@ -165,4 +173,7 @@ public interface StatisticalDao { ...@@ -165,4 +173,7 @@ public interface StatisticalDao {
List<DspReleaseInfo> selectReleaseInfoByDate(@Param("startTime") String startTime,@Param("endTime") String endTime); List<DspReleaseInfo> selectReleaseInfoByDate(@Param("startTime") String startTime,@Param("endTime") String endTime);
int findFltPlanCountByDynamicsId(@Param("dynamicsId") Integer dynamicsId);
} }
...@@ -140,7 +140,13 @@ public class DynamicFlightService { ...@@ -140,7 +140,13 @@ public class DynamicFlightService {
//判断是否有论证,判断范围在verify_type为(01,02,03,04),flight_type为(01正班,02加班,03包机,对应前边航班动态中航班类型为J,G,A) //判断是否有论证,判断范围在verify_type为(01,02,03,04),flight_type为(01正班,02加班,03包机,对应前边航班动态中航班类型为J,G,A)
String verifyDate = dao.getSailingCommand(e, str); String verifyDate = dao.getSailingCommand(e, str);
if (StringUtils.isEmpty(verifyDate)) { if (StringUtils.isEmpty(verifyDate)) {
acType.setStatus("3"); //判断非主航线的论证
String unMainVerifyDate=dao.getUnMainSailingCommand(e, str);
if(StringUtils.isEmpty(unMainVerifyDate)){
acType.setStatus("3");
}else{
acType.setStatus("2");
}
} else { } else {
acType.setStatus("2"); acType.setStatus("2");
} }
......
...@@ -26,7 +26,7 @@ toEmail=zangtao@bbdtek.com ...@@ -26,7 +26,7 @@ toEmail=zangtao@bbdtek.com
#,lisu@bbdtek.com #,lisu@bbdtek.com
#lisu@bbdtek.com #lisu@bbdtek.com
fromName=sdhkxxaq fromName=sdhkxxaq
verifyAcType=A319/A320,A320neo,A321,321neo,A330 verifyAcType=A319/A320,A320neo,A321,A321neo,A330
#uat #uat
#esb.security.account=JD_FOCIMC_UAT #esb.security.account=JD_FOCIMC_UAT
#esb.security.key=SkRfRk9DSU1DX1VBVA0ODw== #esb.security.key=SkRfRk9DSU1DX1VBVA0ODw==
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
DATE_FORMAT(std_chn,'%Y/%m/%d') as lastAirlineTime DATE_FORMAT(std_chn,'%Y/%m/%d') as lastAirlineTime
from foc_flight_dynamics from foc_flight_dynamics
where dep_stn=#{entity.depIata} and arr_stn=#{entity.arrIata} where dep_stn=#{entity.depIata} and arr_stn=#{entity.arrIata}
AND stc IN ('J', 'A', 'G', 'H') AND stc IN ('J', 'A', 'G', 'H') AND est_status is not null and est_status !=''
AND `status`!='CNL' AND `status`!='CNL'
AND `atd_chn` &lt;= #{date} AND `atd_chn` &lt;= #{date}
and ac_type in and ac_type in
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
<when test="verifyAcType=='A319/A320'"> <when test="verifyAcType=='A319/A320'">
and upper(b.type_name) like concat(upper(#{verifyAcType}),'%') and upper(b.type_name) like concat(upper(#{verifyAcType}),'%')
</when> </when>
<when test="verifyAcType=='321neo'">
and upper(b.type_name) like concat('A',upper(#{verifyAcType}))
</when>
<otherwise> <otherwise>
and upper(b.type_name) = upper(#{verifyAcType}) and upper(b.type_name) = upper(#{verifyAcType})
</otherwise> </otherwise>
...@@ -89,6 +92,39 @@ ...@@ -89,6 +92,39 @@
order by sc.create_date desc limit 1 order by sc.create_date desc limit 1
</select> </select>
<select id="getUnMainSailingCommand" resultType="java.lang.String">
SELECT
sc.create_date
FROM
foc_sailing_command sc
LEFT JOIN foc_airline_verify a ON a.id = sc.verif_id
LEFT JOIN foc_aircraft_type b ON a.aircraft_type = b.id
LEFT JOIN foc_airline_connect fac ON fac.verif_id = sc.verif_id
WHERE
a.verif_type IN ( '01', '02', '03', '04' )
AND a.del_flag = 0
AND ( a.flight_type = '01' OR a.flight_type = '02' OR a.flight_type = '03' )
AND b.del_flag = 0
AND 180-TIMESTAMPDIFF ( DAY, a.start_time, CURRENT_TIMESTAMP )> 0
AND fac.del_flag = '0'
AND fac.Is_main != '0'
AND (( fac.depIata = #{entity.depIata} AND fac.arrIata = #{entity.arrIata} )
OR ( fac.depIata = #{entity.arrIata} AND fac.arrIata = #{entity.depIata} ))
<choose>
<when test="verifyAcType=='A319/A320'">
and upper(b.type_name) like concat(upper(#{verifyAcType}),'%')
</when>
<when test="verifyAcType=='321neo'">
and upper(b.type_name) like concat('A',upper(#{verifyAcType}))
</when>
<otherwise>
and upper(b.type_name) = upper(#{verifyAcType})
</otherwise>
</choose>
ORDER BY
sc.create_date DESC
LIMIT 1
</select>
<insert id="insertOrUpdateBatch" parameterType="java.util.List"> <insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO foc_airline_sta INSERT INTO foc_airline_sta
...@@ -119,7 +155,7 @@ ...@@ -119,7 +155,7 @@
FROM FROM
foc_flight_dynamics ffd foc_flight_dynamics ffd
WHERE WHERE
ffd.datop_chn = date_sub( #{date}, INTERVAL 1 DAY ) (ffd.datop_chn = date_sub( #{date}, INTERVAL 1 DAY ) or ffd.datop_chn=#{date})
AND ffd.`status` != 'CNL' AND ffd.`status` != 'CNL'
AND ffd.ata_chn IS NOT NULL AND ffd.ata_chn IS NOT NULL
GROUP BY GROUP BY
...@@ -326,6 +362,12 @@ ...@@ -326,6 +362,12 @@
select airport_icao from foc_airports where airport_iata=#{iataId} select airport_icao from foc_airports where airport_iata=#{iataId}
</select> </select>
<select id="selectReleaseInfoByDate" resultType="com.foc.entity.DspReleaseInfo"> <select id="selectReleaseInfoByDate" resultType="com.foc.entity.DspReleaseInfo">
select * from foc_flight_dynamics_sta where std BETWEEN #{startTime} and #{endTime} select * from foc_flight_dynamics_sta where update_time BETWEEN #{startTime} and #{endTime}
</select> </select>
<select id="findFltPlanCountByDynamicsId" resultType="java.lang.Integer">
select count(1) from foc_flight_plan where dynamics_sta_id=#{dynamicsId}
</select>
</mapper> </mapper>
\ 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