Kaynağa Gözat

浦东岸电查询接口优化:增加船舶名称shipName查询字段

sbj 1 ay önce
ebeveyn
işleme
cdef149f37

+ 5 - 0
ghjg-item-datashare-server/src/main/java/com/shanghaichengdi/ghjgitem/controller/ShorePowerController.java

@@ -30,6 +30,11 @@ public class ShorePowerController extends CommonController {
   @Resource
   private ShorePowerConnRecordInfoService connRecordInfoService;
 
+  /**
+   * 给浦东用的连电平台数据查询接口 写死了 area = 4
+   * @param vo
+   * @return
+   */
   @PostMapping("/getConnRecordInfoListSync")
   public ReturnMsg getConnRecordInfoListSync(@RequestBody @Validated ObjectBodyVo vo) {
     if (!checkDbKey(vo.getKey())) {

+ 1 - 1
ghjg-item-datashare-server/src/main/java/com/shanghaichengdi/ghjgitem/vo/SyncVo.java

@@ -6,7 +6,7 @@ import lombok.EqualsAndHashCode;
 @EqualsAndHashCode(callSuper = true)
 @Data
 public class SyncVo extends PageVo{
-
+  String shipName;
   String startTime;
   String endTime;
 }

+ 5 - 2
ghjg-item-datashare-server/src/main/resources/mapper/ShorePowerConnRecordInfoMapper.xml

@@ -94,11 +94,14 @@
       and PORT.AREA != 1
       AND PORT.PORTID != '1146')
       AND ((T.ENDTIME >=
-            TO_DATE(#{startTime} || '00:00:00', 'yyyy-MM-dd HH24:mi:ss')
+            TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
       AND T.ENDTIME <
-          to_date(#{endTime} || '23:59:59', 'yyyy-MM-dd HH24:mi:ss'))
+          to_date(#{endTime}, 'yyyy-MM-dd HH24:mi:ss'))
       )
       and port.area = 4
+      <if test="shipName!=null and shipName!=''">
+          and t.SHIPNAME = #{shipName}
+      </if>
   </select>
 
 </mapper>