|
|
@@ -463,8 +463,8 @@ public class TauvInspectDriverServiceImpl extends BaseServiceImpl<TauvInspectDri |
|
|
|
inspectDriverInfoVo.setMountEquipmentList(mountEquipmentListVoList); |
|
|
|
} |
|
|
|
return response.success(inspectDriverInfoVo); |
|
|
|
// |
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
// Map<String, Object> detail = new HashMap<>(); |
|
|
|
// if (StringUtils.isEmpty(id)) { |
|
|
|
// detail.put("error", "参数不存在"); |
|
|
@@ -608,103 +608,105 @@ public class TauvInspectDriverServiceImpl extends BaseServiceImpl<TauvInspectDri |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Response getPrintData(Integer id) { |
|
|
|
Map<String, Object> detail = new HashMap<>(); |
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
detail.put("error", "参数不存在"); |
|
|
|
return response.failure("参数不存在"); |
|
|
|
} |
|
|
|
TauvInspectDriver info = getInfoById(id); |
|
|
|
if (StringUtils.isEmpty(info)) { |
|
|
|
detail.put("error", "数据不存在"); |
|
|
|
return response.failure("数据不存在"); |
|
|
|
} |
|
|
|
Integer inspectId = info.getInspectId(); |
|
|
|
if (StringUtils.isEmpty(inspectId)) { |
|
|
|
detail.put("error", "任务编号不存在"); |
|
|
|
return response.failure("任务编号不存在"); |
|
|
|
} |
|
|
|
TauvInspect inspectInfo = inspectMapper.selectById(inspectId); |
|
|
|
|
|
|
|
BigInteger driverArea = info.getDriverArea(); |
|
|
|
detail.put("id", info.getId()); |
|
|
|
detail.put("inspectNo", info.getInspectNo()); |
|
|
|
detail.put("num", info.getNum()); |
|
|
|
detail.put("driverName", info.getDriverName()); |
|
|
|
if (StringUtils.isEmpty(driverArea)) { |
|
|
|
detail.put("driverArea", ""); |
|
|
|
} else { |
|
|
|
// SysCity cityInfo = iSysCityService.getInfoById(driverArea); |
|
|
|
// detail.put("driverArea", StringUtils.isEmpty(cityInfo) ? "" : cityInfo.getName()); |
|
|
|
String cityName = iSysCityService.getCityName(driverArea); |
|
|
|
detail.put("driverArea", cityName); |
|
|
|
} |
|
|
|
return this.detail(id); |
|
|
|
|
|
|
|
// detail.put("executionTime", executionTime); |
|
|
|
detail.put("driverStart", info.getDriverStart()); |
|
|
|
detail.put("driverEnd", info.getDriverEnd()); |
|
|
|
detail.put("driverLength", info.getDriverLength()); |
|
|
|
detail.put("weather", info.getWeather()); |
|
|
|
detail.put("wind", info.getWind()); |
|
|
|
detail.put("temperature", info.getTemperature()); |
|
|
|
detail.put("flightTime", info.getFlightTime()); |
|
|
|
detail.put("flightHeight", info.getFlightHeight()); |
|
|
|
detail.put("flightSpeed", info.getFlightSpeed()); |
|
|
|
detail.put("flightHand", info.getFlightHand()); |
|
|
|
detail.put("inspectHand", info.getInspectHand()); |
|
|
|
// 巡检时间 |
|
|
|
String inspectTime = ""; |
|
|
|
if (!StringUtils.isEmpty(inspectInfo.getInspectTime())) { |
|
|
|
inspectTime = DateUtil.format(inspectInfo.getInspectTime(), "yyyy-MM-dd"); |
|
|
|
} |
|
|
|
detail.put("inspectTime", inspectTime); |
|
|
|
// detail.put("inspectTime", inspectInfo.getInspectTime()); |
|
|
|
// //图片位置信息 |
|
|
|
// if (!"".equals(info.getDriverImage())) { |
|
|
|
// info.setDriverImage(uploadUrl + info.getDriverImage()); |
|
|
|
// Map<String, Object> detail = new HashMap<>(); |
|
|
|
// if (StringUtils.isEmpty(id)) { |
|
|
|
// detail.put("error", "参数不存在"); |
|
|
|
// return response.failure("参数不存在"); |
|
|
|
// } |
|
|
|
// detail.put("driverImage", info.getDriverImage()); |
|
|
|
// //巡检目的 |
|
|
|
// detail.put("inspectPurpose", inspectInfo.getInspectPurpose()); |
|
|
|
// //巡检结果 |
|
|
|
// detail.put("inspectResult", inspectInfo.getInspectResult()); |
|
|
|
// 备注 |
|
|
|
detail.put("note", inspectInfo.getNote()); |
|
|
|
//执行时间 |
|
|
|
String executionTime = ""; |
|
|
|
if (info.getExecutionTime() != null) { |
|
|
|
executionTime = DateUtil.format(info.getExecutionTime(), "yyyy-MM-dd"); |
|
|
|
} |
|
|
|
detail.put("executionTime", executionTime); |
|
|
|
|
|
|
|
// Map<String, Object> info = detail(id); |
|
|
|
// if (!StringUtils.isEmpty(info.get("error"))) { |
|
|
|
// return response.failure(info.get("error")); |
|
|
|
// TauvInspectDriver info = getInfoById(id); |
|
|
|
// if (StringUtils.isEmpty(info)) { |
|
|
|
// detail.put("error", "数据不存在"); |
|
|
|
// return response.failure("数据不存在"); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// Integer groupId = (Integer) info.get("flightGroup"); |
|
|
|
// Long startTime = new Long(info.get("executionTime").toString()); |
|
|
|
// Long inspectTime = new Long(info.get("inspectTime").toString()); |
|
|
|
// if (startTime > 0) { |
|
|
|
// info.put("executionTime", info.get("executionTime").toString()); |
|
|
|
// } else { |
|
|
|
// info.put("executionTime", ""); |
|
|
|
// Integer inspectId = info.getInspectId(); |
|
|
|
// if (StringUtils.isEmpty(inspectId)) { |
|
|
|
// detail.put("error", "任务编号不存在"); |
|
|
|
// return response.failure("任务编号不存在"); |
|
|
|
// } |
|
|
|
// if (inspectTime > 0) { |
|
|
|
// info.put("formatInspectTime", info.get("inspectTime").toString()); |
|
|
|
// TauvInspect inspectInfo = inspectMapper.selectById(inspectId); |
|
|
|
// |
|
|
|
// BigInteger driverArea = info.getDriverArea(); |
|
|
|
// detail.put("id", info.getId()); |
|
|
|
// detail.put("inspectNo", info.getInspectNo()); |
|
|
|
// detail.put("num", info.getNum()); |
|
|
|
// detail.put("driverName", info.getDriverName()); |
|
|
|
// if (StringUtils.isEmpty(driverArea)) { |
|
|
|
// detail.put("driverArea", ""); |
|
|
|
// } else { |
|
|
|
// info.put("formatInspectTime", ""); |
|
|
|
//// SysCity cityInfo = iSysCityService.getInfoById(driverArea); |
|
|
|
//// detail.put("driverArea", StringUtils.isEmpty(cityInfo) ? "" : cityInfo.getName()); |
|
|
|
// String cityName = iSysCityService.getCityName(driverArea); |
|
|
|
// detail.put("driverArea", cityName); |
|
|
|
// } |
|
|
|
detail.put("executionTime", detail.get("executionTime").toString()); |
|
|
|
detail.put("formatInspectTime", detail.get("inspectTime").toString()); |
|
|
|
|
|
|
|
// 巡检飞手 |
|
|
|
String inspectHand = detail.get("inspectHand").toString(); |
|
|
|
|
|
|
|
// 获取飞手名称 |
|
|
|
List<String> stringList = iSysAdminService.getAdminNameByIds(inspectHand); |
|
|
|
detail.put("inspectHandName", org.apache.commons.lang3.StringUtils.join(stringList.toArray(), ",")); |
|
|
|
return response.success(info); |
|
|
|
// |
|
|
|
//// detail.put("executionTime", executionTime); |
|
|
|
// detail.put("driverStart", info.getDriverStart()); |
|
|
|
// detail.put("driverEnd", info.getDriverEnd()); |
|
|
|
// detail.put("driverLength", info.getDriverLength()); |
|
|
|
// detail.put("weather", info.getWeather()); |
|
|
|
// detail.put("wind", info.getWind()); |
|
|
|
// detail.put("temperature", info.getTemperature()); |
|
|
|
// detail.put("flightTime", info.getFlightTime()); |
|
|
|
// detail.put("flightHeight", info.getFlightHeight()); |
|
|
|
// detail.put("flightSpeed", info.getFlightSpeed()); |
|
|
|
// detail.put("flightHand", info.getFlightHand()); |
|
|
|
// detail.put("inspectHand", info.getInspectHand()); |
|
|
|
// // 巡检时间 |
|
|
|
// String inspectTime = ""; |
|
|
|
// if (!StringUtils.isEmpty(inspectInfo.getInspectTime())) { |
|
|
|
// inspectTime = DateUtil.format(inspectInfo.getInspectTime(), "yyyy-MM-dd"); |
|
|
|
// } |
|
|
|
// detail.put("inspectTime", inspectTime); |
|
|
|
//// detail.put("inspectTime", inspectInfo.getInspectTime()); |
|
|
|
//// //图片位置信息 |
|
|
|
//// if (!"".equals(info.getDriverImage())) { |
|
|
|
//// info.setDriverImage(uploadUrl + info.getDriverImage()); |
|
|
|
//// } |
|
|
|
//// detail.put("driverImage", info.getDriverImage()); |
|
|
|
//// //巡检目的 |
|
|
|
//// detail.put("inspectPurpose", inspectInfo.getInspectPurpose()); |
|
|
|
//// //巡检结果 |
|
|
|
//// detail.put("inspectResult", inspectInfo.getInspectResult()); |
|
|
|
// // 备注 |
|
|
|
// detail.put("note", inspectInfo.getNote()); |
|
|
|
// //执行时间 |
|
|
|
// String executionTime = ""; |
|
|
|
// if (info.getExecutionTime() != null) { |
|
|
|
// executionTime = DateUtil.format(info.getExecutionTime(), "yyyy-MM-dd"); |
|
|
|
// } |
|
|
|
// detail.put("executionTime", executionTime); |
|
|
|
// |
|
|
|
//// Map<String, Object> info = detail(id); |
|
|
|
//// if (!StringUtils.isEmpty(info.get("error"))) { |
|
|
|
//// return response.failure(info.get("error")); |
|
|
|
//// } |
|
|
|
// |
|
|
|
// |
|
|
|
//// Integer groupId = (Integer) info.get("flightGroup"); |
|
|
|
//// Long startTime = new Long(info.get("executionTime").toString()); |
|
|
|
//// Long inspectTime = new Long(info.get("inspectTime").toString()); |
|
|
|
//// if (startTime > 0) { |
|
|
|
//// info.put("executionTime", info.get("executionTime").toString()); |
|
|
|
//// } else { |
|
|
|
//// info.put("executionTime", ""); |
|
|
|
//// } |
|
|
|
//// if (inspectTime > 0) { |
|
|
|
//// info.put("formatInspectTime", info.get("inspectTime").toString()); |
|
|
|
//// } else { |
|
|
|
//// info.put("formatInspectTime", ""); |
|
|
|
//// } |
|
|
|
// detail.put("executionTime", detail.get("executionTime").toString()); |
|
|
|
// detail.put("formatInspectTime", detail.get("inspectTime").toString()); |
|
|
|
// |
|
|
|
// // 巡检飞手 |
|
|
|
// String inspectHand = detail.get("inspectHand").toString(); |
|
|
|
// |
|
|
|
// // 获取飞手名称 |
|
|
|
// List<String> stringList = iSysAdminService.getAdminNameByIds(inspectHand); |
|
|
|
// detail.put("inspectHandName", org.apache.commons.lang3.StringUtils.join(stringList.toArray(), ",")); |
|
|
|
// return response.success(info); |
|
|
|
} |
|
|
|
|
|
|
|
/** |