Commit 46be83ea by java-温文海

油量接口插入

parent 42ea7fdd
......@@ -13,6 +13,6 @@ public class DspReleaseInfoTask {
public static void main(String[] args) throws Exception {
DspReleaseInfoService.init();
DspReleaseInfoService.buildGatewayRequestString();
DspReleaseInfoService.addInfo();
}
}
package com.foc.dao;
import com.foc.entity.DspReleaseInfo;
import com.foc.entity.StatisticalEntity;
import org.apache.ibatis.annotations.Param;
......@@ -67,4 +68,17 @@ public interface StatisticalDao {
* @param list
*/
void insertOrUpdateBatch(List<StatisticalEntity> list);
/**
* 获取航班号列表
* @return
*/
List<String> getFlightNoList();
/**
* 批量新增或修改
* @param list
*/
void insertDspReleaseInfo(List<DspReleaseInfo> list);
}
package com.foc.entity;
import lombok.Data;
import java.util.Date;
/**
*
* @Author wenwh
* @Date 14:43 2020/12/10
**/
@Data
public class DspReleaseInfo {
private String sendTime;
private String flightNo;
private String std;
private String acNo;
private String depIataId;
private String arrIataId;
private String totalOil;
private String dispatcherName;
private String extraOilFuelReason;
private String eET;
private String weightUnit;
private String updateTime;
private String createDate;
private String updateDate;
private String delFlag;
}
......@@ -104,4 +104,48 @@
, airline_json = values(airline_json)
, update_date = values(update_date)
</insert>
<select id="getFlightNoList" resultType="String">
SELECT
ffd.flight_no
FROM
foc_flight_dynamics ffd
WHERE
ffd.datop_chn = date_sub( curdate(), INTERVAL 1 DAY )
AND ffd.`status` != 'CNL'
AND ffd.ata_chn IS NOT NULL
GROUP BY
ffd.flight_no
</select>
<insert id="insertDspReleaseInfo" parameterType="java.util.List">
INSERT INTO foc_flight_dynamics_sta ( send_time, flight_no, std, ac_no, dep_iata_id, arr_iata_id, total_oil, dispatcher_name, extra_oil_fuel_reason, e_e_t, weight_unit, update_time,create_date,update_date, del_flag )
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.sendTime}
, #{item.flightNo}
, #{item.std}
, #{item.acNo}
, #{item.depIataId}
, #{item.arrIataId}
, #{item.totalOil}
, #{item.dispatcherName}
, #{item.extraOilFuelReason}
, #{item.eET}
, #{item.weightUnit}
, #{item.updateTime}
, #{item.createDate}
, #{item.updateDate}
, #{item.delFlag}
)
</foreach>
ON DUPLICATE KEY UPDATE
send_time = values(send_time)
, total_oil = values(total_oil)
, extra_oil_fuel_reason = values(extra_oil_fuel_reason)
, e_e_t = values(e_e_t)
, update_date = values(update_date)
</insert>
</mapper>
\ No newline at end of file
......@@ -64,8 +64,6 @@
<property name="password" value="FOC@2016"/>
</dataSource>
</environment>
</environments>
<mappers>
......
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