screen-api/src/main/java/com/moral/api/controller/AllocationController.java
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.moral.api.entity.AllocationLog; import com.moral.api.entity.ResponsibilityUnit; import com.moral.api.pojo.enums.AllocationApproveEnum; import com.moral.api.pojo.enums.ChangeEnum; import com.moral.api.pojo.ext.allocation.AllocationExcelExt; import com.moral.api.pojo.ext.allocation.AllocationExt; import com.moral.api.pojo.ext.allocation.AllocationPageExt; @@ -35,10 +37,7 @@ import java.io.IOException; import java.net.URL; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.*; import java.util.concurrent.atomic.AtomicReference; @@ -232,7 +231,6 @@ } private final String PARHTINAGE = "https://qx.7drlb.com/api/file/preview/"; private void genImageExcel(List<AllocationExcelExt> list, HttpServletResponse response) throws IOException { if (CollectionUtils.isEmpty(list)) { @@ -240,12 +238,22 @@ } List<AllocationListExcelVo> demoDataList = new ArrayList<>(); for(int i = 0;i<list.size();i++){ AllocationListExcelVo item = AllocationListExcelVo.convert(list.get(i)); AllocationExcelExt excelExt = list.get(i); AllocationListExcelVo item = AllocationListExcelVo.convert(excelExt); List<String> urls = new ArrayList<>(); for(FileAddressVo z : list.get(i).getFileBaseList()){ for(FileAddressVo z : excelExt.getFileBaseList()){ urls.add(handleFileRealPath(z.getFileAddress())); } item.setChangeTypeStr(Objects.isNull(excelExt.getChangeType())?" ":ChangeEnum.getByValue(excelExt.getChangeType()).getName()); item.setChangeStr(Objects.isNull(excelExt.getIsChange())?"否":ChangeEnum.getByValue(excelExt.getChangeType()).getName()); item.setWriteCellDataFile(urls); List<String> urlsAfter = new ArrayList<>(); for(FileAddressVo z : excelExt.getFileChangeList()){ urlsAfter.add(handleFileRealPath(z.getFileAddress())); } item.setWriteCellDataFileResult(urlsAfter); item.setEscalationTimeStr(DateUtils.dateToDateString(excelExt.getEscalationTime(),DateUtils.yyyy_MM_dd_EN)); item.setChangeTimeStr(DateUtils.dateToDateString(excelExt.getChangeTime(),DateUtils.yyyy_MM_dd_EN)); demoDataList.add(item); } try { screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationExcelExt.java
@@ -28,10 +28,10 @@ @ApiModelProperty(value = "基础附件") private List<FileAddressVo> fileBaseList; /* @ApiModelProperty(value = "整改附件") private List<FileVo> fileChangeList; @ApiModelProperty(value = "整改附件") private List<FileAddressVo> fileChangeList; @ApiModelProperty(value = "审批附件") /* @ApiModelProperty(value = "审批附件") private List<FileVo> fileApproveList; @ApiModelProperty(value = "流程状态") screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationListExcelVo.java
@@ -44,13 +44,26 @@ @ApiModelProperty(value = "上报时间") @JsonFormat(pattern="yyyy-MM-dd") @ExcelProperty(value = "上报时间") private Date escalationTime; private String escalationTimeStr; @ExcelProperty(value = "责任单位") private String unitName; @ExcelProperty(value = "污染分类") private String polluteTypeName; @ApiModelProperty(value = "污染位置") @ExcelProperty(value = "污染位置") private String pollutePosition; @ApiModelProperty(value = "整改类型id") @ExcelProperty(value = "整改类型") private String changeTypeStr; @ApiModelProperty(value = "上报人") @ExcelProperty(value = "上报人") private String escalationName; /* @ApiModelProperty(value = "基础附件") private List<FileAddressVo> fileBaseList;*/ @@ -59,9 +72,25 @@ @ExcelProperty(value = "整改前图片",converter = MyStringImageConverterUtil.class) private List<String> writeCellDataFile; @ApiModelProperty(value = "上报人") @ExcelProperty(value = "上报人") private String escalationName; @ApiModelProperty(value = "是否整改") @ExcelProperty(value = "是否整改") private String changeStr; @ApiModelProperty(value = "整改反馈") @ExcelProperty(value = "整改反馈") private String changeDescribe; @ApiModelProperty(value = "整改人性名") @ExcelProperty(value = "整改人性名") private String changeName; @ApiModelProperty(value = "整改时间") @ExcelProperty(value = "整改时间") private String changeTimeStr; @ExcelProperty(value = "整改后图片",converter = MyStringImageConverterUtil.class) private List<String> writeCellDataFileResult; /* @ApiModelProperty(value = "责任单位id") private Integer unitId; screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -1003,6 +1003,7 @@ AllocationExt allocationExt = oneAllocation(i); AllocationExcelExt allocationExcelExt = BeanConverts.convert(allocationExt,AllocationExcelExt.class); allocationExcelExt.setFileBaseList(fileTableService.list(i,FileTableEnum.ALLOCATION_FOUNDATION.value,FileType.PICTURE.getValue())); allocationExcelExt.setFileChangeList(fileTableService.list(i,FileTableEnum.ALLOCATION_RECTIFICATION.value,FileType.PICTURE.getValue())); list.add(allocationExcelExt); } return list; screen-api/src/main/resources/application-qa.yml
@@ -141,4 +141,4 @@ foh3wi2ooghiCh5 file: path: E:/upload path: /data/upload/ screen-api/src/main/resources/mapper/AllocationMapper.xml
@@ -43,8 +43,12 @@ <select id="extOne" resultType="com.moral.api.pojo.ext.allocation.AllocationExt"> SELECT <include refid="Allocation_Column_List"/> <include refid="Allocation_Column_List"/>,t1.unit_name as unitName,t5.dataValue as polluteTypeName FROM allocation allocation left join responsibility_unit t1 on t1.unit_id = allocation.unit_id left join (SELECT t3.dataKey,t3.dataValue FROM sys_dict_data t3 LEFT JOIN sys_dict_type t4 on t4.id = t3.dict_type_id where t4.name = 'contaminate') t5 on t5.dataKey = allocation.pollute_type where allocation.allocation_id = #{id} and allocation.is_del = 0 </select>