|
|
@@ -12,12 +12,8 @@ import com.tuoheng.admin.enums.MarkEnum; |
|
|
|
import com.tuoheng.admin.mapper.FlightDataHlMapper; |
|
|
|
import com.tuoheng.admin.tzhl.constant.TZHLConstant; |
|
|
|
import com.tuoheng.admin.tzhl.response.TZHLAirportFlightDataResponse; |
|
|
|
import com.tuoheng.admin.tzhl.response.TZHLTokenResponse; |
|
|
|
import com.tuoheng.admin.tzhl.service.CallTianYiPlatformService; |
|
|
|
import com.tuoheng.admin.tzhl.service.airport.TZHLGetAirportListService; |
|
|
|
import com.tuoheng.admin.tzhl.service.token.TZHLGetTokenService; |
|
|
|
import com.tuoheng.admin.utils.CurrentUserUtil; |
|
|
|
import com.tuoheng.common.core.utils.DateUtils; |
|
|
|
import com.tuoheng.common.core.utils.JsonResult; |
|
|
|
import com.tuoheng.common.core.utils.RedisUtils; |
|
|
|
import com.tuoheng.common.core.utils.StringUtils; |
|
|
@@ -26,6 +22,7 @@ import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Comparator; |
|
|
@@ -70,6 +67,7 @@ public class FlyDataService { |
|
|
|
*/ |
|
|
|
private void addFlightDataHl(Inspection inspection, List<TZHLAirportFlightDataResponse> flightDataHlList) { |
|
|
|
log.info("开始飞行数据保存入库"); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
if(CollectionUtil.isNotEmpty(flightDataHlList) && flightDataHlList.size() != 0){ |
|
|
|
List<FlightDataHl> flightDataHls = new ArrayList<>(flightDataHlList.size()); |
|
|
|
for (TZHLAirportFlightDataResponse responseData : flightDataHlList) { |
|
|
@@ -77,7 +75,11 @@ public class FlyDataService { |
|
|
|
BeanUtils.copyProperties(responseData,flightDataHl); |
|
|
|
flightDataHl.setTenantId(inspection.getTenantId()); |
|
|
|
flightDataHl.setInspectionId(inspection.getId()); |
|
|
|
flightDataHl.setCreateTime(DateUtils.now()); |
|
|
|
try { |
|
|
|
flightDataHl.setCreateTime(sdf.parse(responseData.getCreateTime())); |
|
|
|
} catch (ParseException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
flightDataHl.setCreateUser(inspection.getCreateUser()); |
|
|
|
|
|
|
|
int count = flightDataHlMapper.insert(flightDataHl); |