Jelajahi Sumber

重点跟踪船舶、重点跟踪航运公司、现场安全监督检查

abai 20 jam lalu
induk
melakukan
14cdad9330

+ 13 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjTrackShipsController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.business.controller;
 
 import com.ruoyi.business.domain.bo.BjTrackShipsBo;
+import com.ruoyi.business.domain.bo.BreakBo;
 import com.ruoyi.business.domain.bo.ReportFlagBo;
 import com.ruoyi.business.domain.vo.BjReleasedMiddleVo;
 import com.ruoyi.business.domain.vo.BjReleasedVo;
@@ -17,6 +18,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
@@ -89,4 +91,15 @@ public class BjTrackShipsController extends BaseController {
         return toAjax(bjTrackShipsService.updateFlag(bo));
     }
 
+    /**
+     * 脱离
+     */
+    @Operation(summary = "脱离")
+//    @RequiresPermissions("business:trackShips:edit")
+    @Log(title = "脱离", businessType = BusinessType.UPDATE)
+    @PutMapping("/updateBreak")
+    public AjaxResult updateBreak(@Validated @RequestBody BreakBo bo) throws ParseException {
+        return toAjax(bjTrackShipsService.updateBreak(bo));
+    }
+
 }

+ 44 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjLocaleSecurityCheckBo.java

@@ -73,6 +73,11 @@ public class BjLocaleSecurityCheckBo extends BaseEntity {
     private String priority;
 
     /**
+     * 建造日期
+     */
+    private Date builddate;
+
+    /**
      * 发布时间
      */
     private Date releaseDate;
@@ -108,6 +113,28 @@ public class BjLocaleSecurityCheckBo extends BaseEntity {
     private String breakReason;
 
     /**
+     * 建造时间数组
+     */
+    @Schema(description = "建造时间数组")
+    private String[] buildDates;
+
+    /**
+     * 开始时间搜索使用
+     */
+    private String startBuildDate;
+
+    /**
+     * 结束时间搜索使用
+     */
+    private String endBuildDate;
+
+    /**
+     * 检查时间数组
+     */
+    @Schema(description = "检查时间数组")
+    private String[] checkDates;
+
+    /**
      * 开始时间搜索使用
      */
     private String startCheckDate;
@@ -116,4 +143,21 @@ public class BjLocaleSecurityCheckBo extends BaseEntity {
      * 结束时间搜索使用
      */
     private String endCheckDate;
+
+    /**
+     * 发布时间数组
+     */
+    @Schema(description = "发布时间数组")
+    private String[] releaseDates;
+
+    /**
+     * 开始时间搜索使用
+     */
+    private String startReleaseDate;
+
+    /**
+     * 结束时间搜索使用
+     */
+    private String endReleaseDate;
+
 }

+ 11 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjTrackShipCompanyBo.java

@@ -38,6 +38,11 @@ public class BjTrackShipCompanyBo extends BaseEntity {
     private String companyName;
 
     /**
+     * 船名
+     */
+    private String shipName;
+
+    /**
      * 跟踪原因
      */
     private String traceReason;
@@ -118,6 +123,12 @@ public class BjTrackShipCompanyBo extends BaseEntity {
     private String endAddDate;
 
     /**
+     * 发布时间数组
+     */
+    @Schema(description = "发布时间数组")
+    private String[] releaseDates;
+
+    /**
      * 开始时间搜索使用
      */
     private String startReleaseDate;

+ 23 - 1
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjTrackShipsBo.java

@@ -69,11 +69,21 @@ public class BjTrackShipsBo extends BaseEntity {
     private String regportName;
 
     /**
-     * 船舶
+     * 船舶类
      */
     private String shipType;
 
     /**
+     * 船舶种类
+     */
+    private String shipSort;
+
+    /**
+     * 发布单位
+     */
+    private String releaseUnit;
+
+    /**
      * 跟踪单位
      */
     private String traceUnit;
@@ -145,6 +155,12 @@ public class BjTrackShipsBo extends BaseEntity {
     private String breakReason;
 
     /**
+     * 检查时间数组
+     */
+    @Schema(description = "检查时间数组")
+    private String[] checkDates;
+
+    /**
      * 开始时间搜索使用
      */
     private String startCheckDate;
@@ -155,6 +171,12 @@ public class BjTrackShipsBo extends BaseEntity {
     private String endCheckDate;
 
     /**
+     * 跟踪时间数组
+     */
+    @Schema(description = "跟踪时间数组")
+    private String[] traceDates;
+
+    /**
      * 开始时间搜索使用
      */
     private String startTraceDate;

+ 2 - 1
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjTrackShipCompanyVo.java

@@ -1,6 +1,7 @@
 package com.ruoyi.business.domain.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.web.domain.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -16,7 +17,7 @@ import java.util.Date;
  */
 @Schema(description = "重点跟踪航运公司视图对象")
 @Data
-public class BjTrackShipCompanyVo implements Serializable {
+public class BjTrackShipCompanyVo extends BaseEntity implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 1L;

+ 8 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjLocaleSecurityCheckServiceImpl.java

@@ -50,6 +50,14 @@ public class BjLocaleSecurityCheckServiceImpl implements IBjLocaleSecurityCheckS
      */
     @Override
     public List<BjLocaleSecurityCheckVo> queryPageList(BjLocaleSecurityCheckBo bo) {
+        if (bo.getCheckDates() != null && bo.getCheckDates().length != 0) {
+            bo.setStartCheckDate(bo.getCheckDates()[0]);
+            bo.setEndCheckDate(bo.getCheckDates()[1]);
+        }
+        if (bo.getReleaseDates() != null && bo.getReleaseDates().length != 0) {
+            bo.setStartReleaseDate(bo.getReleaseDates()[0]);
+            bo.setEndReleaseDate(bo.getReleaseDates()[1]);
+        }
         return baseMapper.queryLocalSecurityCheckList(bo);
     }
 

+ 8 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjTrackShipCompanyServiceImpl.java

@@ -60,6 +60,14 @@ public class BjTrackShipCompanyServiceImpl implements IBjTrackShipCompanyService
      */
     @Override
     public List<BjTrackShipCompanyVo> queryPageList(BjTrackShipCompanyBo bo) {
+        if (bo.getAddDate() != null && bo.getAddDate().length != 0) {
+            bo.setStartAddDate(bo.getAddDate()[0]);
+            bo.setEndAddDate(bo.getAddDate()[1]);
+        }
+        if (bo.getReleaseDates() != null && bo.getReleaseDates().length != 0) {
+            bo.setStartReleaseDate(bo.getReleaseDates()[0]);
+            bo.setEndReleaseDate(bo.getReleaseDates()[1]);
+        }
         return baseMapper.queryTrackShipCompanyList(bo);
     }
 

+ 9 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjTrackShipsServiceImpl.java

@@ -49,6 +49,14 @@ public class BjTrackShipsServiceImpl implements IBjTrackShipsService {
      */
     @Override
     public List<BjTrackShipsVo> queryPageList(BjTrackShipsBo bo) {
+        if (bo.getCheckDates() != null && bo.getCheckDates().length != 0) {
+            bo.setStartCheckDate(bo.getCheckDates()[0]);
+            bo.setEndCheckDate(bo.getCheckDates()[1]);
+        }
+        if (bo.getTraceDates() != null && bo.getTraceDates().length != 0) {
+            bo.setStartTraceDate(bo.getTraceDates()[0]);
+            bo.setEndTraceDate(bo.getTraceDates()[1]);
+        }
         return baseMapper.queryTrackShipsList(bo);
     }
 
@@ -65,6 +73,7 @@ public class BjTrackShipsServiceImpl implements IBjTrackShipsService {
     public Boolean updateBreak(BreakBo bo) {
         BjTrackShips trackShips = baseMapper.selectById(bo.getId());
         String[] breakDate = bo.getBreakDate();
+        trackShips.setAuditStatus("3");
         trackShips.setBreakDate(breakDate[0].split(" ")[0].concat("/").concat(breakDate[1].split(" ")[0]));
         trackShips.setBreakReason(bo.getBreakReason());
         return baseMapper.updateById(trackShips) > 0;

+ 6 - 0
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjLocaleSecurityCheckMapper.xml

@@ -48,9 +48,15 @@
         <if test="bo.shipNameCn != null and bo.shipNameCn != ''">
             and ship_came_cn like concat('%',#{bo.shipNameCn},'%')
         </if>
+        <if test="bo.startBuildDate != null and bo.endBuildDate != null">
+            and build_date between #{bo.startBuildDate} and #{bo.endBuildDate}
+        </if>
         <if test="bo.startCheckDate != null and bo.endCheckDate != null">
             and check_date between #{bo.startCheckDate} and #{bo.endCheckDate}
         </if>
+        <if test="bo.startReleaseDate != null and bo.endReleaseDate != null">
+            and release_date between #{bo.startReleaseDate} and #{bo.endReleaseDate}
+        </if>
         order by report_flag, locale_security_check_id,
                  RANDOM()
     </select>

+ 14 - 2
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjTrackShipCompanyMapper.xml

@@ -49,8 +49,20 @@
         <if test="bo.companyName != null and bo.companyName != ''">
             and company_name like concat('%',#{bo.companyName},'%')
         </if>
-        <if test="bo.startAddDate != null and bo.endAddDate != null">
-            and add_date between #{bo.startAddDate} and #{bo.endAddDate}
+        <if test="bo.shipName != null and bo.shipName != ''">
+            and ship_name = #{bo.shipName}
+        </if>
+        <if test="bo.releaseUnit != null and bo.releaseUnit != ''">
+            and release_unit = #{bo.releaseUnit}
+        </if>
+        <if test="bo.dateSource != null and bo.dateSource != ''">
+            and date_source = #{bo.dateSource}
+        </if>
+        <if test="bo.startAddDate != null and bo.startAddDate != null">
+            and add_start_date &gt;= #{bo.startAddDate}
+        </if>
+        <if test="bo.endAddDate != null and bo.endAddDate != null">
+            and add_end_date &lt;= #{bo.endAddDate}
         </if>
         <if test="bo.startReleaseDate != null and bo.endReleaseDate != null">
             and release_date between #{bo.startReleaseDate} and #{bo.endReleaseDate}

+ 20 - 2
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjTrackShipsMapper.xml

@@ -58,10 +58,10 @@
         from bj_track_ships
         where del_flag = '0'
         <if test="bo.shipNameCn != null and bo.shipNameCn != ''">
-            and ship_came_cn like concat('%',#{bo.shipNameCn},'%')
+            and ship_name_cn like concat('%',#{bo.shipNameCn},'%')
         </if>
         <if test="bo.shipNameEn != null and bo.shipNameEn != ''">
-            and ship_came_en like concat('%',#{bo.shipNameEn},'%')
+            and ship_name_en like concat('%',#{bo.shipNameEn},'%')
         </if>
         <if test="bo.shipId != null and bo.shipId != ''">
             and ship_id like concat('%',#{bo.shipId},'%')
@@ -75,6 +75,24 @@
         <if test="bo.icCardNo != null and bo.icCardNo != ''">
             and ic_card_no like concat('%',#{bo.icCardNo},'%')
         </if>
+        <if test="bo.traceUnit != null and bo.traceUnit != ''">
+            and trace_unit = #{bo.traceUnit}
+        </if>
+        <if test="bo.releaseUnit != null and bo.releaseUnit != ''">
+            and release_unit = #{bo.releaseUnit}
+        </if>
+        <if test="bo.traceStatus != null and bo.traceStatus != ''">
+            and trace_status = #{bo.traceStatus}
+        </if>
+        <if test="bo.auditStatus != null and bo.auditStatus != ''">
+            and audit_status = #{bo.auditStatus}
+        </if>
+        <if test="bo.regportName != null and bo.regportName != ''">
+            and regport_name = #{bo.regportName}
+        </if>
+        <if test="bo.shipType != null and bo.shipType != ''">
+            and ship_type = #{bo.shipType}
+        </if>
         <if test="bo.startCheckDate != null and bo.endCheckDate != null">
             and check_date between #{bo.startCheckDate} and #{bo.endCheckDate}
         </if>