Bläddra i källkod

BUG提交 入库垂线点位 存入当前有效断面id

qinguocai 1 år sedan
förälder
incheckning
e83354c1ab

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AchievementServiceImpl.java

@@ -146,8 +146,8 @@ public class AchievementServiceImpl implements AchievementService {
             map.put("agWspeeds",String.valueOf(averageWspeed));
             map.put("maxWspeeds",String.valueOf(maxWspeed));
 
+            excelWriter.fill(map, writeSheet);
 
-//            excelWriter.fill(map, writeSheet);
 //            //列表
 //            List<Map<String, Object>> dataList = new ArrayList<>();
 //            //列表

+ 5 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BerthingServiceImpl.java

@@ -220,6 +220,10 @@ public class BerthingServiceImpl implements BerthingService {
         if(berthingPointConfigDTO.getPositions().size() != berthingPointConfigDTO.getFactors().size()){
             throw new BaseException("修正系数与停泊点位长度不匹配");
         }
+        BerthingPoint berthingPoint = berthingPointMapper.queryBySiteId(berthingPointConfigDTO.getSiteId());
+        if (berthingPoint == null) {
+            throw new BaseException("有效的断面数据未找到");
+        }
         boolean res = false;
         BerthingPointConfig berthingPointConfig = berthingPointConfigMapper.queryById(berthingPointConfigDTO.getStopId());
         try {
@@ -243,7 +247,7 @@ public class BerthingServiceImpl implements BerthingService {
                 }
                 berthingPointConfig.setStopId(0L);
                 berthingPointConfig.setSiteId(siteInfo.getSiteId());
-                berthingPointConfig.setBerthingId(0L);
+                berthingPointConfig.setBerthingId(berthingPoint.getBerthingId());
                 berthingPointConfig.setPositions(JSONUtil.toJsonStr(positions));
                 berthingPointConfig.setPlanid(berthingPointConfigDTO.getPlanid());
                 berthingPointConfig.setWlevel(berthingPointConfigDTO.getWlevel());