@@ -28,11 +28,36 @@ public class InspectionFileDistribution extends BaseEntity { | |||
*/ | |||
private String tenantId; | |||
/** | |||
* 附件类型:1图片 2视频 | |||
*/ | |||
private Integer fileType; | |||
/** | |||
* 文件名称 | |||
*/ | |||
private String fileName; | |||
/** | |||
* 缩略图 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 原图 | |||
*/ | |||
private String fileOriginal; | |||
/** | |||
* 标记图 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 文件大小 | |||
*/ | |||
private BigDecimal fileSize; | |||
/** | |||
* 纬度(原始图片纬度) | |||
*/ |
@@ -11,6 +11,7 @@ import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.admin.vo.inspection.InspectionFileDistributionListVo; | |||
import com.tuoheng.common.core.config.common.CommonConfig; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -127,8 +128,12 @@ public class QueryInspectionFileDistributionListService { | |||
if (null != questionType) { | |||
inspectionFileDistributionListVo.setQuestionName(questionType.getContent()); | |||
} | |||
inspectionFileDistributionListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileThumbnail()); | |||
inspectionFileDistributionListVo.setFileOriginal(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileOriginal()); | |||
if (StringUtils.isNotEmpty(inspectionFileDistributionListVo.getFileThumbnail())) { | |||
inspectionFileDistributionListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileThumbnail()); | |||
} | |||
if (StringUtils.isNotEmpty(inspectionFileDistributionListVo.getFileOriginal())) { | |||
inspectionFileDistributionListVo.setFileOriginal(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileOriginal()); | |||
} | |||
} | |||
return inspectionFileDistributionListVoList; | |||
} |
@@ -107,22 +107,31 @@ public class GenerateReportWordService { | |||
Font font = new Font(); | |||
font.setSize(10.5f); | |||
font.setStyle(Font.NORMAL); | |||
for (int i = 0; i < 14; i++) { | |||
for (int i = 0; i < 18; i++) { | |||
Cell cell = new Cell(); | |||
String str = null; | |||
cell.setVerticalAlignment(Element.ALIGN_LEFT); | |||
cell.setHorizontalAlignment(Element.ALIGN_CENTER); | |||
if (i == 0) { | |||
str = "气象信息"; | |||
str = "任务编号"; | |||
} else if (i == 1) { | |||
str = report.getInspectionCode(); | |||
} else if (i == 2) { | |||
str = "任务名称"; | |||
} else if (i == 3) { | |||
str = report.getInspectionName(); | |||
} else if (i == 4) { | |||
str = "气象信息"; | |||
} else if (i == 5) { | |||
str = report.getWeather(); | |||
} else if (i == 2) { | |||
} else if (i == 6) { | |||
str = "巡检部门"; | |||
} else if (i == 3) { | |||
} else if (i == 7) { | |||
str = this.getDeptName(report.getDeptId()); | |||
} else if (i == 4) { | |||
} else if (i == 8) { | |||
str = "巡检方式"; | |||
} else if (i == 5) { | |||
} else if (i == 9) { | |||
if (report.getInspectionType() == 1) { | |||
str = "无人机"; | |||
} else if (report.getInspectionType() == 2) { | |||
@@ -130,21 +139,21 @@ public class GenerateReportWordService { | |||
} else if (report.getInspectionType() == 3) { | |||
str = "飞手值飞"; | |||
} | |||
} else if (i == 6) { | |||
} else if (i == 10) { | |||
str = "巡查设备"; | |||
} else if (i == 7) { | |||
} else if (i == 11) { | |||
str = report.getEquipmentName(); | |||
} else if (i == 8) { | |||
} else if (i == 12) { | |||
str = "巡查开始时间"; | |||
} else if (i == 9) { | |||
} else if (i == 13) { | |||
str = report.getExecutionStartTime() == null ? "" : DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, report.getExecutionStartTime()); | |||
} else if (i == 10) { | |||
} else if (i == 14) { | |||
str = "巡查结束时间"; | |||
} else if (i == 11) { | |||
} else if (i == 15) { | |||
str = report.getExecutionEndTime() == null ? "" : DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, report.getExecutionEndTime()); | |||
} else if (i == 12) { | |||
} else if (i == 16) { | |||
str = "巡检高速"; | |||
} else if (i == 13) { | |||
} else if (i == 17) { | |||
str = this.getRoadName(report.getRoadId()); | |||
} | |||
Paragraph p = new Paragraph(str, font); |
@@ -73,7 +73,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<resultMap type="com.tuoheng.admin.entity.InspectionFileDistribution" id="InspectionFileDistributionResult"> | |||
<result property="id" column="id" /> | |||
<result property="tenantId" column="tenant_id" /> | |||
<result property="fileType" column="file_type" /> | |||
<result property="fileName" column="file_name" /> | |||
<result property="fileThumbnail" column="file_thumbnail" /> | |||
<result property="fileOriginal" column="file_original" /> | |||
<result property="fileImage" column="file_image" /> | |||
<result property="fileSize" column="file_size" /> | |||
<result property="latitude" column="latitude" /> | |||
<result property="longitude" column="longitude" /> | |||
<result property="location" column="location" /> | |||
@@ -103,8 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
</sql> | |||
<sql id="Base_Distribution_Column_List"> | |||
tif.id, tif.tenant_id, tif.file_thumbnail, tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.question_code, tif.question_name, tif.status, | |||
ti.code as inspection_code, ti.name as inspection_name | |||
tif.id, tif.tenant_id, tif.file_type, tif.file_name, tif.file_thumbnail, tif.file_original, tif.file_image, tif.file_size, | |||
tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.question_code, tif.question_name, | |||
tif.status, ti.code as inspection_code, ti.name as inspection_name | |||
</sql> | |||
<!-- 批量新增问题图片 --> |