abai 14 時間 前
コミット
57f3350650

+ 58 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjDetailController.java

@@ -0,0 +1,58 @@
+package com.ruoyi.business.controller;
+
+import com.ruoyi.business.domain.bo.BjReleasedBo;
+import com.ruoyi.business.service.IBjDetailService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 详情信息查询
+ * 前端访问路由地址为:/business/detail
+ *
+ * @author LionLi
+ * @date 2025-09-08
+ */
+@Tag(name = "详情信息查询")
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/detail")
+public class BjDetailController extends BaseController {
+
+    @Resource
+    private IBjDetailService bjDetailService;
+
+    /**
+     * 详情信息查询列表
+     */
+    @Operation(summary = "查询详情信息查询列表")
+//    @SaCheckPermission("business:detail:list")
+    @GetMapping("/list")
+    public TableDataInfo list(BjReleasedBo bo) {
+        return getDataTable(bjDetailService.queryPageList(bo));
+    }
+
+    /**
+     * 获取详情信息查询详细信息
+     *
+     * @param releasedId 主键
+     */
+    @Operation(summary = "获取详情信息查询详细信息")
+//    @SaCheckPermission("business:detail:query")
+    @GetMapping("/{releasedId}")
+    public AjaxResult getInfo(@PathVariable("releasedId") String releasedId) {
+        return success(bjDetailService.queryById(releasedId));
+    }
+
+}

+ 35 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/mapper/BjDetailMapper.java

@@ -0,0 +1,35 @@
+package com.ruoyi.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.business.domain.BjReleased;
+import com.ruoyi.business.domain.bo.BjReleasedBo;
+import com.ruoyi.business.domain.vo.BjReleasedVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 详情信息查询Mapper接口
+ *
+ * @author LionLi
+ * @date 2025-09-08
+ */
+public interface BjDetailMapper extends BaseMapper<BjReleased> {
+
+    /**
+     * 根据详情信息查询id获取数据详情
+     *
+     * @param releasedId 详情信息查询id
+     * @return 详情信息查询数据详情
+     */
+    BjReleasedVo queryReleased(@Param("releasedId") String releasedId);
+
+    /**
+     * 详情信息查询列表
+     *
+     * @param bo 请求参数
+     * @return 列表
+     */
+    List<BjReleasedVo> queryReleasedList(@Param("bo") BjReleasedBo bo);
+
+}

+ 31 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/IBjDetailService.java

@@ -0,0 +1,31 @@
+package com.ruoyi.business.service;
+
+import com.ruoyi.business.domain.bo.BjReleasedBo;
+import com.ruoyi.business.domain.vo.BjReleasedVo;
+
+import java.util.List;
+
+/**
+ * 详情信息查询Service接口
+ *
+ * @author LionLi
+ * @date 2025-09-08
+ */
+public interface IBjDetailService {
+
+    /**
+     * 查询详情信息查询
+     *
+     * @param releasedId 主键
+     * @return 详情信息查询
+     */
+    BjReleasedVo queryById(String releasedId);
+
+    /**
+     * 分页查询详情信息查询列表
+     *
+     * @param bo 查询条件
+     * @return 详情信息查询分页列表
+     */
+    List<BjReleasedVo> queryPageList(BjReleasedBo bo);
+}

+ 57 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjDetailServiceImpl.java

@@ -0,0 +1,57 @@
+package com.ruoyi.business.service.impl;
+
+import com.ruoyi.business.domain.bo.BjReleasedBo;
+import com.ruoyi.business.domain.vo.BjReleasedVo;
+import com.ruoyi.business.mapper.BjDetailMapper;
+import com.ruoyi.business.service.IBjDetailService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 详情信息查询Service业务层处理
+ *
+ * @author LionLi
+ * @date 2025-09-08
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class BjDetailServiceImpl implements IBjDetailService {
+
+    @Resource
+    private BjDetailMapper baseMapper;
+
+    /**
+     * 查询详情信息查询
+     *
+     * @param releasedId 主键
+     * @return 详情信息查询
+     */
+    @Override
+    public BjReleasedVo queryById(String releasedId) {
+        return baseMapper.queryReleased(releasedId);
+    }
+
+    /**
+     * 分页查询详情信息查询列表
+     *
+     * @param bo 查询条件
+     * @return 详情信息查询分页列表
+     */
+    @Override
+    public List<BjReleasedVo> queryPageList(BjReleasedBo bo) {
+        if (bo.getReleasedDates() != null && bo.getReleasedDates().length != 0) {
+            bo.setStartReleaseDate(bo.getReleasedDates()[0]);
+            bo.setEndReleaseDate(bo.getReleasedDates()[1]);
+        }
+        if (bo.getAcceptanceDates() != null && bo.getAcceptanceDates().length != 0) {
+            bo.setStartAcceptanceDate(bo.getAcceptanceDates()[0]);
+            bo.setEndAcceptanceDate(bo.getAcceptanceDates()[1]);
+        }
+        return baseMapper.queryReleasedList(bo);
+    }
+}

+ 332 - 0
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjDetailMapper.xml

@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.business.mapper.BjDetailMapper">
+       <resultMap id="releasedVoGet" type="com.ruoyi.business.domain.vo.BjReleasedVo">
+              <result property="releasedId" column="released_id"/>
+              <result property="violationNumber" column="violation_number"/>
+              <result property="releasedUnit" column="released_unit"/>
+              <result property="releasedDate" column="released_date"/>
+              <result property="chineseVesselName" column="chinese_vessel_name"/>
+              <result property="englishVesselName" column="english_vessel_name"/>
+              <result property="portOfRegistry" column="port_of_registry"/>
+              <result property="vesselName" column="vessel_name"/>
+              <result property="vesselIdenNumber" column="vessel_iden_number"/>
+              <result property="vesselRegiNumber" column="vessel_regi_number"/>
+              <result property="initialRegiNumber" column="initial_regi_number"/>
+              <result property="shipSRNumber" column="ship_s_r_number"/>
+              <result property="imoNumber" column="imo_number"/>
+              <result property="licensePlateNumber" column="license_plate_number"/>
+              <result property="vesselType" column="vessel_type"/>
+              <result property="buildDate" column="build_date"/>
+              <result property="csnu" column="csnu"/>
+              <result property="createDept" column="create_dept"/>
+              <result property="mmsi" column="mmsi"/>
+              <result property="callSign" column="call_sign"/>
+              <result property="nationality" column="nationality"/>
+              <result property="theShipowner" column="the_shipowner"/>
+              <result property="ePhoneNumbers" column="e_phone_numbers"/>
+              <result property="shipOperators" column="ship_operators"/>
+              <result property="oPhoneNumbers" column="o_phone_numbers"/>
+              <result property="oro" column="oro"/>
+              <result property="tnforo" column="tnforo"/>
+              <result property="sid" column="sid"/>
+              <result property="releasedStatus" column="released_status"/>
+              <result property="receivingUnit" column="deptName"/>
+              <collection property="middleList" ofType="com.ruoyi.business.domain.vo.BjReleasedMiddleVo">
+                     <result property="notificationMatters" column="notification_matters"/>
+                     <result property="notificationStandards" column="notification_standards"/>
+                     <result property="conm" column="conm"/>
+                     <result property="notifiedMattersId" column="notified_matters_id"/>
+                     <result property="wtis" column="wtis"/>
+                     <result property="receivingUnitName" column="deptName"/>
+                     <result property="oic" column="oic"/>
+                     <result property="oirun" column="oirun"/>
+                     <result property="apdFilePath" column="apd_file_path"/>
+                     <result property="ertnmFilePath" column="ertnm_file_path"/>
+                     <result property="omfnmFilePath" column="omfnm_file_path"/>
+                     <result property="smr" column="smr"/>
+                     <result property="smraFilePath" column="smra_file_path"/>
+                     <result property="wfir" column="wfir"/>
+              </collection>
+              <collection property="middleLogList" ofType="com.ruoyi.business.domain.vo.BjLonmMiddleLogVo">
+                     <result property="id" column="id"/>
+                     <result property="notifiedMattersId" column="notified_matters_id"/>
+                     <result property="receivingUnit" column="receiving_unit"/>
+                     <result property="operationTime" column="operation_time"/>
+                     <result property="notificationLink" column="notification_link"/>
+                     <result property="par" column="par"/>
+                     <result property="operationRecord" column="operation_record"/>
+                     <result property="notificationStatus" column="notification_status"/>
+                     <result property="todm" column="todm"/>
+                     <result property="takeMeasures" column="take_measures"/>
+                     <result property="doom" column="doom"/>
+                     <result property="rarp" column="rarp"/>
+                     <result property="opinions" column="opinions"/>
+                     <result property="filePath" column="file_path"/>
+              </collection>
+       </resultMap>
+
+       <select id="queryReleased" resultMap="releasedVoGet">
+              SELECT
+                     br.released_id,
+                     br.violation_number,
+                     br.released_unit,
+                     br.released_date,
+                     br.chinese_vessel_name,
+                     br.english_vessel_name,
+                     br.port_of_registry,
+                     br.vessel_name,
+                     br.vessel_iden_number,
+                     br.vessel_regi_number,
+                     br.initial_regi_number,
+                     br.ship_s_r_number,
+                     br.imo_number,
+                     br.license_plate_number,
+                     br.vessel_type,
+                     br.build_date,
+                     br.create_by,
+                     br.create_time,
+                     br.update_by,
+                     br.update_time,
+                     br.del_flag,
+                     br.csnu,
+                     br.create_dept,
+                     br.mmsi,
+                     br.call_sign,
+                     br.nationality,
+                     br.the_shipowner,
+                     br.e_phone_numbers,
+                     br.ship_operators,
+                     br.o_phone_numbers,
+                     br.oro,
+                     br.tnforo,
+                     br.sid,
+                     br.released_status,
+                     bl.notification_matters,
+                     bl.notification_standards,
+                     bl.conm,
+                     bl.notified_matters_id,
+                     brm.wtis,
+                     blm.deptName,
+                     brm.oic,
+                     brm.oirun,
+                     brm.apd_file_path,
+                     brm.ertnm_file_path,
+                     brm.omfnm_file_path,
+                     brm.smr,
+                     brm.smra_file_path,
+                     brm.wfir,
+                     blml.id,
+                     blml.receiving_unit,
+                     blml.operation_time,
+                     blml.notification_link,
+                     blml.par,
+                     blml.operation_record,
+                     blml.notification_status,
+                     blml.todm,
+                     blml.take_measures,
+                     blml.doom,
+                     blml.rarp,
+                     blml.opinions,
+                     blml.file_path
+              FROM
+                     bj_released br
+                            left join bj_released_middle brm on br.released_id = brm.released_id
+                            left join bj_lonm bl on brm.notified_matters_id = bl.notified_matters_id
+                            left join (select blm.notified_matters_id,LISTAGG(sd.dept_name,',') deptName from bj_lonm_middle blm
+                            left join sys_dept sd on blm.receiving_unit = sd.dept_id group by blm.notified_matters_id) blm
+                                      on blm.notified_matters_id  = brm.notified_matters_id
+                            left join bj_lonm_middle_log blml on brm.notified_matters_id = blml.notified_matters_id
+              where
+                     br.del_flag = '0'and br.released_id = #{releasedId}
+       </select>
+
+       <resultMap id="releasedVoList" type="com.ruoyi.business.domain.vo.BjReleasedVo">
+              <result property="releasedId" column="released_id"/>
+              <result property="violationNumber" column="violation_number"/>
+              <result property="releasedUnit" column="released_unit"/>
+              <result property="releasedDate" column="released_date"/>
+              <result property="chineseVesselName" column="chinese_vessel_name"/>
+              <result property="englishVesselName" column="english_vessel_name"/>
+              <result property="portOfRegistry" column="port_of_registry"/>
+              <result property="vesselName" column="vessel_name"/>
+              <result property="vesselIdenNumber" column="vessel_iden_number"/>
+              <result property="vesselRegiNumber" column="vessel_regi_number"/>
+              <result property="initialRegiNumber" column="initial_regi_number"/>
+              <result property="shipSRNumber" column="ship_s_r_number"/>
+              <result property="imoNumber" column="imo_number"/>
+              <result property="licensePlateNumber" column="license_plate_number"/>
+              <result property="vesselType" column="vessel_type"/>
+              <result property="buildDate" column="build_date"/>
+              <result property="csnu" column="csnu"/>
+              <result property="callSign" column="call_sign"/>
+              <result property="userPhone" column="userPhone"/>
+              <result property="releasedUnitStr" column="releasedUnitStr"/>
+              <result property="conmStr" column="conmStr"/>
+              <result property="names" column="names"/>
+              <result property="releaseStatusStr" column="releaseStatusStr"/>
+              <result property="wfirStr" column="wfirStr"/>
+              <result property="notificationStatusStr" column="notificationStatusStr"/>
+              <result property="overdueStatusStr" column="overdueStatusStr"/>
+              <result property="takeMeasuresStr" column="takeMeasuresStr"/>
+              <result property="publishers" column="publishers"/>
+       </resultMap>
+       <select id="queryReleasedList" resultMap="releasedVoList">
+              select
+              DISTINCT ON
+              (br.released_id)
+              br.released_id,
+              br.violation_number,
+              br.released_unit,
+              br.released_date,
+              br.chinese_vessel_name,
+              br.english_vessel_name,
+              br.port_of_registry,
+              br.vessel_name,
+              br.vessel_iden_number,
+              br.vessel_regi_number,
+              br.initial_regi_number,
+              br.ship_s_r_number,
+              br.imo_number,
+              br.license_plate_number,
+              br.vessel_type,
+              br.build_date,
+              br.create_by,
+              br.create_time,
+              br.update_by,
+              br.update_time,
+              br.del_flag,
+              br.csnu,
+              br.create_dept,
+              br.mmsi,
+              br.call_sign,
+              br.nationality,
+              br.the_shipowner,
+              br.e_phone_numbers,
+              br.ship_operators,
+              br.o_phone_numbers,
+              br.oro,
+              br.tnforo,
+              br.sid,
+              br.released_status,
+              brm.*,
+              sd.dept_name as releasedUnitStr,
+              bl.conmStr,
+              blm.names,
+              sdd.dict_label as releaseStatusStr,
+              sdd2.dict_label as wfirStr,
+              sdd3.dict_label as notificationStatusStr,
+              sdd4.dict_label as takeMeasuresStr,
+              sdd5.dict_label as overdueStatusStr,
+              blm2.publishers
+              from
+              bj_released br
+              left join bj_released_middle brm on
+              br.released_id = brm.released_id
+              left join sys_dict_data sdd2 on
+              sdd2.dict_value = brm.wfir
+              and sdd2.dict_type = 'bj_is_feedback'
+              left join (
+              select
+              bl.*,
+              sdd.dict_label as conmStr
+              from
+              bj_lonm bl
+              left join sys_dict_data sdd on
+              bl.conm = sdd.dict_value
+              and sdd.dict_type = 'bj_category_onm') bl on
+              bl.notified_matters_id = brm.notified_matters_id
+              left join (
+              select
+              notified_matters_id as nmid,
+              LISTAGG(sd.dept_name,
+              ',') as names
+              from
+              bj_lonm_middle blm
+              left join sys_dept sd on
+              blm.receiving_unit = sd.dept_id
+              group by
+              notified_matters_id) blm on
+              bl.notified_matters_id = blm.nmid
+              left join bj_lonm_middle blm2 on
+              bl.notified_matters_id = blm2.notified_matters_id
+              left join sys_dept sd on
+              sd.dept_id = br.released_unit
+              left join (
+              select
+              unit_name,
+              LISTAGG(concat(contact_name,' ',contact_number),',') as userPhone
+              from
+              bj_ntlo
+              where
+              msg_recipient = '1'
+              and ab_status = '1'
+              group by
+              unit_name) bn on
+              bn.unit_name = blm2.receiving_unit
+              left join sys_dict_data sdd on
+              br.released_status = sdd.dict_value
+              and sdd.dict_type = 'bj_notify_os'
+              left join sys_dict_data sdd3 on
+              blm2.notification_status = sdd3.dict_value
+              and sdd3.dict_type = 'bj_notification_status'
+              left join sys_dict_data sdd4 on
+              blm2.take_measures = sdd4.dict_value
+              and sdd2.dict_type = 'bj_take_measures'
+              left join sys_dict_data sdd5 on
+              blm2.overdue_status = sdd5.dict_value
+              and sdd5.dict_type = 'bj_overdue_status'
+              where
+              br.del_flag = '0'
+              <if test="bo.violationNumber != null and bo.violationNumber">
+                     and br.violation_number like concat('%',#{bo.violationNumber},'%')
+              </if>
+              <if test="bo.notificationType != null and bo.notificationType != ''">
+                     and bl.notification_type = #{bo.notificationType}
+              </if>
+              <if test="bo.conm !=null and bo.conm != ''">
+                     and bl.conm = #{bo.conm}
+              </if>
+              <if test="bo.notificationMatters != null and bo.notificationMatters != ''">
+                     and bl.notification_matters like concat('%',#{bo.notificationMatters},'%')
+              </if>
+              <if test="bo.releasedUnit != null and bo.releasedUnit != ''">
+                     and br.released_unit = #{bo.releasedUnit}
+              </if>
+              <if test="bo.jsdw != null and bo.jsdw != ''">
+                     and blm.receiving_unit = #{bo.jsdw}
+              </if>
+              <if test="bo.notificationStatus != null and bo.notificationStatus != ''">
+                     and blm.notification_status = #{bo.notificationStatus}
+              </if>
+              <if test="bo.takeMeasures != null and bo.takeMeasures != ''">
+                     and blm.take_measures = #{bo.takeMeasures}
+              </if>
+              <if test="bo.overdueStatus != null and bo.overdueStatus != ''">
+                     and blm.overdue_status = #{bo.overdueStatus}
+              </if>
+              <if test="bo.vesselName != null and bo.vesselName != ''">
+                     and br.vessel_name like concat('%',#{bo.vesselName},'%')
+              </if>
+              <if test="bo.theShipowner != null and bo.theShipowner != ''">
+                     and br.the_shipowner like concat('%',#{bo.theShipowner},'%')
+              </if>
+              <if test="bo.shipOperators != null and bo.shipOperators != ''">
+                     and br.ship_operators like concat('%',#{bo.shipOperators},'%')
+              </if>
+              <if test="bo.wfir != null and bo.wfir != ''">
+                     and brm.wfir = #{bo.wfir}
+              </if>
+              <if test="bo.startReleaseDate != null and bo.endReleaseDate != null">
+                     and br.released_date between #{bo.startReleaseDate} and #{bo.endReleaseDate}
+              </if>
+              <if test="bo.startAcceptanceDate != null and bo.endAcceptanceDate != null">
+                     and blm.acceptance_date between #{bo.startAcceptanceDate} and #{bo.endAcceptanceDate}
+              </if>
+              order by br.released_id,
+              RANDOM()
+       </select>
+
+</mapper>

+ 1 - 1
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjNotificationInformationMapper.xml

@@ -136,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                             left join bj_released_middle brm on br.released_id = brm.released_id
                             left join bj_lonm bl on brm.notified_matters_id = bl.notified_matters_id
                             left join (select blm.notified_matters_id,LISTAGG(sd.dept_name,',') deptName from bj_lonm_middle blm
-                                                                                                                     left join sys_dept sd on blm.receiving_unit = sd.dept_id group by blm.notified_matters_id) blm
+                            left join sys_dept sd on blm.receiving_unit = sd.dept_id group by blm.notified_matters_id) blm
                                       on blm.notified_matters_id  = brm.notified_matters_id
                             left join bj_lonm_middle_log blml on brm.notified_matters_id = blml.notified_matters_id
               where

+ 1 - 1
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjSuperiorLeaderMapper.xml

@@ -136,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                             left join bj_released_middle brm on br.released_id = brm.released_id
                             left join bj_lonm bl on brm.notified_matters_id = bl.notified_matters_id
                             left join (select blm.notified_matters_id,LISTAGG(sd.dept_name,',') deptName from bj_lonm_middle blm
-                                                                                                                     left join sys_dept sd on blm.receiving_unit = sd.dept_id group by blm.notified_matters_id) blm
+                            left join sys_dept sd on blm.receiving_unit = sd.dept_id group by blm.notified_matters_id) blm
                                       on blm.notified_matters_id  = brm.notified_matters_id
                             left join bj_lonm_middle_log blml on brm.notified_matters_id = blml.notified_matters_id
               where