csw 2 months ago
parent
commit
e773ee18e7

+ 1 - 0
src/main/java/com/ecnu/platform/cwp/CwpDataService.groovy

@@ -55,6 +55,7 @@ class CwpDataService {
             AlgVesselVisit algVesselVisit = new AlgVesselVisit()
             algVesselVisit.setVesselVisitId(smartScheduleIdInfo.get("berthId") as String)
             algVesselVisit.setVesselCode(smartScheduleIdInfo.get("vesselCode") as String)
+            algVesselVisit.setVesselName(smartScheduleIdInfo.get("vesselCode") as String)
             algVesselVisit.setVesselType(smartScheduleIdInfo.get("vesselType") as String)
             algVesselVisit.setPlanStartWorkTime(sdf.parse(smartScheduleIdInfo.get("planBeginWorkTime") as String))
             algVesselVisit.setPlanEndWorkTime(sdf.parse(smartScheduleIdInfo.get("planEndWorkTime") as String))

+ 25 - 0
src/main/java/com/ecnu/platform/port/BollardService.groovy

@@ -1,6 +1,9 @@
 package com.ecnu.platform.port
 
 import com.ecnu.alg.pojo.port.inputs.AlgBollard
+import com.three.common.exception.ParamException
+import com.three.common.utils.IdWorker
+import com.three.common.utils.StringUtil
 import com.three.common.vo.PageResult
 import com.three.data_api.dm.annos.BizApiMethod
 import com.three.data_api.dm.annos.Doc4MethodRes
@@ -9,6 +12,7 @@ import com.three.data_api.dm.entity.AuqResult
 import com.three.redis.utils.RedisUtil
 import org.springframework.beans.factory.annotation.Autowired
 
+
 class BollardService {
 
     public static final String AlgBollardKey = "port:AlgBollard:"
@@ -26,4 +30,25 @@ class BollardService {
         auqResult.setResult(pageResult)
         return auqResult
     }
+
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "新增缆桩信息")
+    void create(Map<String, Object> map) throws Exception {
+        // 先删除缆桩
+        redisUtil.del(redisUtil.getKeyByPrefix(AlgBollardKey + "*"))
+        for (int i = 1; i <= 40; i++) {
+            AlgBollard algBollard = new AlgBollard()
+            algBollard.setGkey(IdWorker.generateIdStr())
+            algBollard.setId(String.format("%02d", i) + "#")
+            algBollard.setLocation(50 + (i - 1) * 50)
+            redisUtil.set(AlgBollardKey + algBollard.getGkey(), algBollard)
+        }
+    }
+
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "删除缆桩信息")
+    void delete(Map<String, Object> map) throws Exception {
+        if (StringUtil.isBlankStr(map.get("gkey"))) {
+            throw new ParamException("主键(gkey)不可以为空")
+        }
+        redisUtil.del(AlgBollardKey + map.get("gkey"))
+    }
 }

+ 13 - 0
src/main/java/com/ecnu/platform/port/ShorelineService.groovy

@@ -1,6 +1,7 @@
 package com.ecnu.platform.port
 
 import com.ecnu.alg.pojo.port.inputs.AlgShoreline
+import com.three.common.utils.IdWorker
 import com.three.common.vo.PageResult
 import com.three.data_api.dm.annos.BizApiMethod
 import com.three.data_api.dm.annos.Doc4MethodRes
@@ -26,4 +27,16 @@ class ShorelineService {
         auqResult.setResult(pageResult)
         return auqResult
     }
+
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "新增岸线信息")
+    void create(Map<String, Object> map) throws Exception {
+        // 先删除岸线
+        redisUtil.del(redisUtil.getKeyByPrefix(AlgShorelineKey + "*"))
+        AlgShoreline algShoreline = new AlgShoreline()
+        algShoreline.setGkey(IdWorker.generateIdStr())
+        algShoreline.setId("test")
+        algShoreline.setTmlId("test")
+        algShoreline.setLength(2000)
+        redisUtil.set(AlgShorelineKey + algShoreline.getGkey(), algShoreline)
+    }
 }

File diff suppressed because it is too large
+ 47 - 0
src/main/java/com/ecnu/platform/port/TmlVesselVisitVoService.groovy


Some files were not shown because too many files changed in this diff