fix: 优化逻辑

This commit is contained in:
tangwei 2026-08-14 15:11:58 +08:00
parent c967b5105f
commit 23e1e80cb4
6 changed files with 57 additions and 14 deletions

View File

@ -105,10 +105,10 @@ public class SdFpssrlRController {
SdFpssrlR tempEntity = objectMapper.convertValue(engInfo, SdFpssrlR.class); SdFpssrlR tempEntity = objectMapper.convertValue(engInfo, SdFpssrlR.class);
applyUploadedFiles(tempEntity, picFiles, vdFiles); applyUploadedFiles(tempEntity, picFiles, vdFiles);
if (picFiles != null && !picFiles.isEmpty()) { if (picFiles != null && !picFiles.isEmpty()) {
engInfo.put("firstImgUrl", tempEntity.getFirstImgUrl()); engInfo.put("firstimgurl", tempEntity.getFirstimgurl());
} }
if (vdFiles != null && !vdFiles.isEmpty()) { if (vdFiles != null && !vdFiles.isEmpty()) {
engInfo.put("videoUrl", tempEntity.getVideoUrl()); engInfo.put("videourl", tempEntity.getVideourl());
} }
boolean result = sdFpssrlRService.update(engInfo, request.getSource()); boolean result = sdFpssrlRService.update(engInfo, request.getSource());
@ -237,13 +237,13 @@ public class SdFpssrlRController {
if (picFiles != null && !picFiles.isEmpty()) { if (picFiles != null && !picFiles.isEmpty()) {
List<String> ids = attachmentUploadService.uploadMultipartFiles(picFiles); List<String> ids = attachmentUploadService.uploadMultipartFiles(picFiles);
if (!ids.isEmpty()) { if (!ids.isEmpty()) {
entity.setFirstImgUrl(mergeIds(entity.getFirstImgUrl(), ids)); entity.setFirstimgurl(mergeIds(entity.getFirstimgurl(), ids));
} }
} }
if (vdFiles != null && !vdFiles.isEmpty()) { if (vdFiles != null && !vdFiles.isEmpty()) {
List<String> ids = attachmentUploadService.uploadMultipartFiles(vdFiles); List<String> ids = attachmentUploadService.uploadMultipartFiles(vdFiles);
if (!ids.isEmpty()) { if (!ids.isEmpty()) {
entity.setVideoUrl(mergeIds(entity.getVideoUrl(), ids)); entity.setVideourl(mergeIds(entity.getVideourl(), ids));
} }
} }
} }
@ -269,14 +269,14 @@ public class SdFpssrlRController {
if (entity == null) { if (entity == null) {
return ids; return ids;
} }
if (StrUtil.isNotBlank(entity.getFirstImgUrl())) { if (StrUtil.isNotBlank(entity.getFirstimgurl())) {
Arrays.stream(entity.getFirstImgUrl().split(",")) Arrays.stream(entity.getFirstimgurl().split(","))
.map(String::trim) .map(String::trim)
.filter(StrUtil::isNotBlank) .filter(StrUtil::isNotBlank)
.forEach(ids::add); .forEach(ids::add);
} }
if (StrUtil.isNotBlank(entity.getVideoUrl())) { if (StrUtil.isNotBlank(entity.getVideourl())) {
Arrays.stream(entity.getVideoUrl().split(",")) Arrays.stream(entity.getVideourl().split(","))
.map(String::trim) .map(String::trim)
.filter(StrUtil::isNotBlank) .filter(StrUtil::isNotBlank)
.forEach(ids::add); .forEach(ids::add);

View File

@ -52,6 +52,10 @@ public class SdFhbtBH implements Serializable {
@FieldChinese("高程") @FieldChinese("高程")
private BigDecimal elev; private BigDecimal elev;
/** 图层编码 */
@FieldChinese("图层编码")
private String layerCode;
/** 站址/位置 */ /** 站址/位置 */
@FieldChinese("站址/位置") @FieldChinese("站址/位置")
private String stlc; private String stlc;

View File

@ -80,17 +80,21 @@ public class SdFpssrlR implements Serializable {
/** /**
* 鱼截图主图片url * 鱼截图主图片url
*/ */
private String firstImgUrl; @TableField("FIRSTIMGURL")
private String firstimgurl;
/** /**
* 鱼截图副图片url * 鱼截图副图片url
*/ */
private String secondImgUrl; @TableField("SECONDIMGURL")
private String secondimgurl;
/** /**
* 视频url * 视频url
*/ */
private String videoUrl; @TableField("VIDEOURL")
private String videourl;
/** /**
* 水温单位 * 水温单位

View File

@ -129,9 +129,9 @@ public class SdFpssrlRServiceImpl extends ServiceImpl<SdFpssrlRMapper, SdFpssrlR
entity.setFishspeed(request.getFishspeed()); entity.setFishspeed(request.getFishspeed());
entity.setDirection(request.getDirection()); entity.setDirection(request.getDirection());
entity.setFishposition(request.getFishposition()); entity.setFishposition(request.getFishposition());
entity.setFirstImgUrl(request.getFirstImgUrl()); entity.setFirstimgurl(request.getFirstImgUrl());
entity.setSecondImgUrl(request.getSecondImgUrl()); entity.setSecondimgurl(request.getSecondImgUrl());
entity.setVideoUrl(request.getVideoUrl()); entity.setVideourl(request.getVideoUrl());
entity.setTemperature(request.getTemperature()); entity.setTemperature(request.getTemperature());
entity.setWaterlevel(request.getWaterlevel()); entity.setWaterlevel(request.getWaterlevel());
entity.setSpeed(request.getSpeed()); entity.setSpeed(request.getSpeed());

View File

@ -78,6 +78,12 @@ public class FpFpssrlQueryVo {
@Schema(description = "水温") @Schema(description = "水温")
private String temperature; private String temperature;
private String waterlevel;
private String fishposition;
private String dox;
private String q;
private String tu;
@Schema(description = "流速") @Schema(description = "流速")
private String speed; private String speed;
@ -110,4 +116,6 @@ public class FpFpssrlQueryVo {
@Schema(description = "站点分类名称") @Schema(description = "站点分类名称")
private String stName; private String stName;
private String remark;
} }

View File

@ -1554,6 +1554,12 @@ public class FpRunServiceImpl implements FpRunService {
"src.FISHSPEED AS fishspeed, " + "src.FISHSPEED AS fishspeed, " +
"src.DIRECTION AS direction, " + "src.DIRECTION AS direction, " +
"src.TEMPERATURE AS temperature, " + "src.TEMPERATURE AS temperature, " +
"src.WATERLEVEL AS waterlevel, " +
"src.FISHPOSITION AS fishposition, " +
"src.REMARK AS remark, " +
"src.DOX AS dox, " +
"src.Q AS q, " +
"src.TU AS tu, " +
"src.SPEED AS speed, " + "src.SPEED AS speed, " +
"src.CHANNELNO AS channelno, " + "src.CHANNELNO AS channelno, " +
"src.FCNT AS fcnt, " + "src.FCNT AS fcnt, " +
@ -1588,6 +1594,12 @@ public class FpRunServiceImpl implements FpRunService {
" TO_CHAR(t.FISHSPEED) AS FISHSPEED, " + " TO_CHAR(t.FISHSPEED) AS FISHSPEED, " +
" TO_CHAR(t.DIRECTION) AS DIRECTION, " + " TO_CHAR(t.DIRECTION) AS DIRECTION, " +
" TO_CHAR(t.TEMPERATURE) AS TEMPERATURE, " + " TO_CHAR(t.TEMPERATURE) AS TEMPERATURE, " +
" TO_CHAR(t.WATERLEVEL) AS WATERLEVEL, " +
" TO_CHAR(t.FISHPOSITION) AS FISHPOSITION, " +
" TO_CHAR(t.REMARK) AS REMARK, " +
" TO_CHAR(t.DOX) AS DOX, " +
" TO_CHAR(t.Q) AS Q, " +
" TO_CHAR(t.TU) AS TU, " +
" TO_CHAR(t.SPEED) AS SPEED, " + " TO_CHAR(t.SPEED) AS SPEED, " +
" t.CHANNELNO AS CHANNELNO, " + " t.CHANNELNO AS CHANNELNO, " +
" TO_CHAR(t.FCNT) AS FCNT, " + " TO_CHAR(t.FCNT) AS FCNT, " +
@ -1647,6 +1659,12 @@ public class FpRunServiceImpl implements FpRunService {
" CAST(NULL AS VARCHAR2(50)) AS FISHSPEED, " + " CAST(NULL AS VARCHAR2(50)) AS FISHSPEED, " +
" TO_CHAR(t.DIRECTION) AS DIRECTION, " + " TO_CHAR(t.DIRECTION) AS DIRECTION, " +
" CAST(NULL AS VARCHAR2(50)) AS TEMPERATURE, " + " CAST(NULL AS VARCHAR2(50)) AS TEMPERATURE, " +
" null AS WATERLEVEL, " +
" null AS FISHPOSITION, " +
" null AS REMARK, " +
" null AS DOX, " +
" null AS Q, " +
" null AS TU, " +
" CAST(NULL AS VARCHAR2(50)) AS SPEED, " + " CAST(NULL AS VARCHAR2(50)) AS SPEED, " +
" CAST(NULL AS VARCHAR2(100)) AS CHANNELNO, " + " CAST(NULL AS VARCHAR2(100)) AS CHANNELNO, " +
" TO_CHAR(t.FCNT) AS FCNT, " + " TO_CHAR(t.FCNT) AS FCNT, " +
@ -1897,6 +1915,7 @@ public class FpRunServiceImpl implements FpRunService {
selectMap.put("baseName", "t.baseName AS baseName"); selectMap.put("baseName", "t.baseName AS baseName");
selectMap.put("rstcd", "t.rstcd AS rstcd"); selectMap.put("rstcd", "t.rstcd AS rstcd");
selectMap.put("ennm", "t.ennm AS ennm"); selectMap.put("ennm", "t.ennm AS ennm");
selectMap.put("isfs", "t.isfs AS isfs");
selectMap.put("hbrvcd", "t.hbrvcd AS hbrvcd"); selectMap.put("hbrvcd", "t.hbrvcd AS hbrvcd");
selectMap.put("baseStepSort", "t.baseStepSort AS baseStepSort"); selectMap.put("baseStepSort", "t.baseStepSort AS baseStepSort");
selectMap.put("rvcdStepSort", "t.rvcdStepSort AS rvcdStepSort"); selectMap.put("rvcdStepSort", "t.rvcdStepSort AS rvcdStepSort");
@ -1909,6 +1928,14 @@ public class FpRunServiceImpl implements FpRunService {
selectMap.put("length", "t.length AS length"); selectMap.put("length", "t.length AS length");
selectMap.put("width", "t.width AS width"); selectMap.put("width", "t.width AS width");
selectMap.put("fishspeed", "t.fishspeed AS fishspeed"); selectMap.put("fishspeed", "t.fishspeed AS fishspeed");
selectMap.put("waterlevel", "t.waterlevel AS waterlevel");
selectMap.put("fishposition", "t.fishposition AS fishposition");
selectMap.put("dox", "t.dox AS dox");
selectMap.put("q", "t.q AS q");
selectMap.put("tu", "t.tu AS tu");
selectMap.put("remark", "t.remark AS remark");
selectMap.put("direction", "t.direction AS direction"); selectMap.put("direction", "t.direction AS direction");
selectMap.put("directionName", "CASE t.direction WHEN '0' THEN '上行' WHEN '1' THEN '下行' WHEN '2' THEN '上行折返' WHEN '3' THEN '下行折返' END AS directionName"); selectMap.put("directionName", "CASE t.direction WHEN '0' THEN '上行' WHEN '1' THEN '下行' WHEN '2' THEN '上行折返' WHEN '3' THEN '下行折返' END AS directionName");
selectMap.put("temperature", "t.temperature AS temperature"); selectMap.put("temperature", "t.temperature AS temperature");