glj-代码提交

This commit is contained in:
管李杰 2024-07-12 17:59:46 +08:00
parent 6dc9085d53
commit d5a70b532f
6 changed files with 34 additions and 7 deletions

View File

@ -57,6 +57,10 @@ public class Install implements Serializable {
private Integer status; private Integer status;
/**
* 发生时间
*/
private String happenTime;
/** /**
* 名称_查询 * 名称_查询

View File

@ -13,6 +13,7 @@ import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
@RestController @RestController
@ -43,6 +44,7 @@ public class InstallController {
@PostMapping("/save") @PostMapping("/save")
public R save(@ApiParam(value = "Install对象", required = true) @RequestBody Install install) { public R save(@ApiParam(value = "Install对象", required = true) @RequestBody Install install) {
install.setCreateTime(new Date());
return R.status(installService.save(install)); return R.status(installService.save(install));
} }

View File

@ -13,11 +13,12 @@
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/> <result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="INTEGER"/> <result property="status" column="status" jdbcType="INTEGER"/>
<result property="happenTime" column="happen_time" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,title,Images, id,title,Images,
link,sort,is_deleted, link,sort,is_deleted,
create_time,status create_time,status,happen_time
</sql> </sql>
</mapper> </mapper>

View File

@ -118,7 +118,7 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
int columnIndex = cell.getColumnIndex(); int columnIndex = cell.getColumnIndex();
switch (columnIndex) { switch (columnIndex) {
case 0: case 0:
entityDataAll.setLink(cell.getStringCellValue()); entityDataAll.setTitle(cell.getStringCellValue());
break; break;
case 1: case 1:
entityDataAll.setProductLevel(cell.getStringCellValue()); entityDataAll.setProductLevel(cell.getStringCellValue());
@ -170,9 +170,22 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
entityDataAll.setLowerLeftLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setLowerLeftLon(Double.toString(cell.getNumericCellValue()));
break; break;
case 17: case 17:
entityDataAll.setSourceOrganization(cell.getStringCellValue()); entityDataAll.setCoverageArea(Double.toString(cell.getNumericCellValue()));
break; break;
case 18: case 18:
String s1 = Double.toString(cell.getNumericCellValue());
if (s1.equals("Optical")){
entityDataAll.setSensorType("1");
}else if (s1.equals("Radar")){
entityDataAll.setSensorType("2");
}else if (s1.equals("Luminous")){
entityDataAll.setSensorType("3");
}
break;
case 19:
entityDataAll.setSourceOrganization(cell.getStringCellValue());
break;
case 20:
entityDataAll.setPictureName(cell.getStringCellValue()); entityDataAll.setPictureName(cell.getStringCellValue());
if (StrUtil.isNotBlank(cell.getStringCellValue())){ if (StrUtil.isNotBlank(cell.getStringCellValue())){
boolean flag = pictureNames.add(cell.getStringCellValue()); boolean flag = pictureNames.add(cell.getStringCellValue());
@ -190,6 +203,9 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
} }
} }
break; break;
case 21:
entityDataAll.setDownloadLink(cell.getStringCellValue());
break;
} }
} }
}); });

View File

@ -87,7 +87,6 @@ public class PictureInfoServiceImpl extends ServiceImpl<PictureInfoMapper, Pictu
} }
pictureInfo.setSize(multipartFile.getSize()); pictureInfo.setSize(multipartFile.getSize());
pictureInfo.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1)); pictureInfo.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1));
pictureInfo.setIsMain(otherData.getIsMain());
pictureInfoList.add(pictureInfo); pictureInfoList.add(pictureInfo);
} }
return saveBatch(pictureInfoList); return saveBatch(pictureInfoList);

View File

@ -8,8 +8,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kening.vordm.entity.EntityDataAll;
import com.kening.vordm.entity.RemoteSensingSourceData; import com.kening.vordm.entity.RemoteSensingSourceData;
import com.kening.vordm.mapper.EntityDataAllMapper;
import com.kening.vordm.mapper.RemoteSensingSourceDataMapper; import com.kening.vordm.mapper.RemoteSensingSourceDataMapper;
import com.kening.vordm.service.EntityDataAllService;
import com.kening.vordm.service.RemoteSensingSourceDataService; import com.kening.vordm.service.RemoteSensingSourceDataService;
import com.kening.vordm.vo.productResolutionVo; import com.kening.vordm.vo.productResolutionVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -58,6 +61,8 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
private final OssProperties ossProperties; private final OssProperties ossProperties;
private final EntityDataAllMapper entityDataAllMapper;
@Value("${oss.minio.image-url:}") @Value("${oss.minio.image-url:}")
private String imageUrl; private String imageUrl;
@ -299,7 +304,7 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
@Override @Override
public void exportRemoteSensing(Long id, HttpServletRequest request, HttpServletResponse response) { public void exportRemoteSensing(Long id, HttpServletRequest request, HttpServletResponse response) {
RemoteSensingSourceData remoteSensingSourceData = this.baseMapper.selectById(id); EntityDataAll remoteSensingSourceData = this.entityDataAllMapper.selectById(id);
if (remoteSensingSourceData != null){ if (remoteSensingSourceData != null){
XSSFWorkbook workbook = new XSSFWorkbook(); XSSFWorkbook workbook = new XSSFWorkbook();
CellStyle style = workbook.createCellStyle(); CellStyle style = workbook.createCellStyle();
@ -334,8 +339,8 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
} }
XSSFCell xssfCell3 = dataRow.createCell(2); XSSFCell xssfCell3 = dataRow.createCell(2);
xssfCell3.setCellStyle(style); xssfCell3.setCellStyle(style);
if (remoteSensingSourceData.getDownloadUrl()!=null) { if (remoteSensingSourceData.getLink()!=null) {
xssfCell3.setCellValue(remoteSensingSourceData.getDownloadUrl()); xssfCell3.setCellValue(remoteSensingSourceData.getLink());
} }
//下载分析报告excel //下载分析报告excel
downLoadExcel(response, workbook, "download"); downLoadExcel(response, workbook, "download");