@@ -0,0 +1,56 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import java.io.Serializable; | |||
/** | |||
* 巡检问题表 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-09-02 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_question_type") | |||
public class QuestionType extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 | |||
*/ | |||
private Integer name; | |||
/** | |||
* 项目类型:1日常监测 2重点核查 | |||
*/ | |||
private String type; | |||
/** | |||
* 巡检内容 | |||
*/ | |||
private String content; | |||
/** | |||
* 排序 | |||
*/ | |||
private Integer sort; | |||
/** | |||
* 添加人名称 | |||
*/ | |||
private String createUserName; | |||
/** | |||
* 更新人名称 | |||
*/ | |||
private String updateUserName; | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.tuoheng.admin.service; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionQuery; | |||
import com.tuoheng.common.common.IBaseService; | |||
/** | |||
* 巡检问题表 服务类 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-09-02 | |||
*/ | |||
public interface IQuestionTypeService extends IBaseService<QuestionType> { | |||
} |
@@ -189,9 +189,10 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
ThMission thMission = getRecentlyRecord(missionStatusRequest,TaskStatusEnum.FLIGHT.getCode()); | |||
Assert.notNull(thMission, "飞行任务不能为空!"); | |||
ThMission thMissionUpdate = new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); | |||
thMissionUpdate.setId(thMission.getId()); | |||
thMissionUpdate.setMileage(missionStatusRequest.getMileage()); | |||
boolean result=false; | |||
try { | |||
AirWeatherVO weather = inspectionService.getWeather(thMission.getAirportId()); | |||
String weatherStr = WeatherUtil.getWeather(weather); | |||
@@ -219,8 +220,8 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
}else { | |||
log.error("dsp实时调用失败:{}", responseJson); | |||
thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); | |||
thMissionMapper.updateById(thMissionUpdate); | |||
} | |||
thMissionMapper.updateById(thMissionUpdate); | |||
}catch (Exception e){ | |||
log.error("dsp实时调用失败:{}", responseJson); | |||
thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); |
@@ -223,7 +223,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp | |||
ReportInfoVO reportInfoVO = detail(reportId); | |||
//创建word | |||
String fileName = "汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.docx"; | |||
String fileName = "汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc"; | |||
String filePath = UploadFileConfig.uploadFolder+"/doc/"+fileName; | |||
File fd = new File(UploadFileConfig.uploadFolder+"/doc"); | |||
File f = new File(filePath); | |||
@@ -500,7 +500,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp | |||
//清空缓存 | |||
response.reset(); | |||
// 定义浏览器响应表头,并定义下载名 | |||
String urlFileName = URLEncoder.encode("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.docx", "UTF-8"); | |||
String urlFileName = URLEncoder.encode("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc", "UTF-8"); | |||
response.setHeader("Content-Disposition", "attachment;filename=" + urlFileName); | |||
response.setCharacterEncoding("utf-8"); | |||
//定义下载的类型 | |||
@@ -524,6 +524,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp | |||
out.flush(); | |||
System.out.println("结束。。。。。。"); | |||
}catch (Exception e){ | |||
log.info("异常信息:{}",e.getMessage()); | |||
e.printStackTrace(); | |||
}finally { | |||
wordUtils.closeDocument(); |
@@ -22,7 +22,7 @@ public class TimeUtil { | |||
return String.format("%d 天 %d 时 %d 分 %d 秒", day, hours, minutes, seconds); | |||
}else if( day==0L && hours!=0L && minutes!=0L && seconds!=0L){ | |||
return String.format("%d 时 %d 分 %d 秒", hours, minutes, seconds); | |||
}else if(day==0L && hours==0L && minutes!=0L && seconds!=0L){ | |||
}else if(day==0L && hours==0L && minutes!=0L ){ | |||
return String.format("%d 分 %d 秒", minutes, seconds); | |||
}else{ | |||
return String.format("%d 秒",seconds); |