abai 5 dní pred
rodič
commit
0eae1cb382

+ 1 - 1
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjReportController.java

@@ -34,7 +34,7 @@ public class BjReportController extends BaseController {
      */
     @Operation(summary = "获取通报情况统计信息-表格")
 //    @SaCheckPermission("business:report:query")
-    @GetMapping("/total")
+    @GetMapping("/total/list")
     public AjaxResult getInfo() {
         List<ReportTotal> list = Lists.newArrayList();
         list.add(ReportTotal.builder().unit("总数").beenPublishCount(5863).beenReceiveCount(5863).beenFeedbackCount(5863)

+ 3 - 2
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjTrackShipCompanyController.java

@@ -15,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.text.ParseException;
 import java.util.List;
 
 /**
@@ -63,7 +64,7 @@ public class BjTrackShipCompanyController extends BaseController {
 //    @RequiresPermissions("business:trackShipCompany:add")
     @Log(title = "重点跟踪航运公司", businessType = BusinessType.INSERT)
     @PostMapping()
-    public AjaxResult add(@RequestBody BjTrackShipCompanyBo bo) {
+    public AjaxResult add(@RequestBody BjTrackShipCompanyBo bo) throws ParseException {
         return toAjax(bjTrackShipCompanyService.insertByBo(bo));
     }
 
@@ -74,7 +75,7 @@ public class BjTrackShipCompanyController extends BaseController {
 //    @RequiresPermissions("business:trackShipCompany:edit")
     @Log(title = "重点跟踪航运公司", businessType = BusinessType.UPDATE)
     @PutMapping()
-    public AjaxResult edit(@RequestBody BjTrackShipCompanyBo bo) {
+    public AjaxResult edit(@RequestBody BjTrackShipCompanyBo bo) throws ParseException {
         return toAjax(bjTrackShipCompanyService.updateByBo(bo));
     }
 

+ 15 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/BjTrackShipCompany.java

@@ -65,11 +65,26 @@ public class BjTrackShipCompany extends BaseEntity {
     private Date addDate;
 
     /**
+     * 列入开始日期
+     */
+    private Date addStartDate;
+
+    /**
+     * 列入结束日期
+     */
+    private Date addEndDate;
+
+    /**
      * 发布日期
      */
     private Date releaseDate;
 
     /**
+     * 附件
+     */
+    private String file;
+
+    /**
      * 是否已发布  0:未发布 1:已发布
      */
     private String releaseFlag;

+ 6 - 1
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjTrackShipCompanyBo.java

@@ -60,7 +60,7 @@ public class BjTrackShipCompanyBo extends BaseEntity {
     /**
      * 列入日期
      */
-    private Date addDate;
+    private String[] addDate;
 
     /**
      * 发布日期
@@ -68,6 +68,11 @@ public class BjTrackShipCompanyBo extends BaseEntity {
     private Date releaseDate;
 
     /**
+     * 附件
+     */
+    private String file;
+
+    /**
      * 是否已发布  0:未发布 1:已发布
      */
     private String releaseFlag;

+ 5 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjTrackShipCompanyVo.java

@@ -69,6 +69,11 @@ public class BjTrackShipCompanyVo implements Serializable {
     private Date releaseDate;
 
     /**
+     * 附件
+     */
+    private String file;
+
+    /**
      * 是否已发布  0:未发布 1:已发布
      */
     private String releaseFlag;

+ 6 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/ReportTotal.java

@@ -4,6 +4,7 @@ import lombok.Builder;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.List;
 
 @Builder
 @Data
@@ -88,4 +89,9 @@ public class ReportTotal implements Serializable {
      * 总计(件)
      */
     private Integer overdueTotal;
+
+    /**
+     * 子类
+     */
+    private List<ReportTotal> children;
 }

+ 3 - 2
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/IBjTrackShipCompanyService.java

@@ -3,6 +3,7 @@ package com.ruoyi.business.service;
 import com.ruoyi.business.domain.bo.BjTrackShipCompanyBo;
 import com.ruoyi.business.domain.vo.BjTrackShipCompanyVo;
 
+import java.text.ParseException;
 import java.util.Collection;
 import java.util.List;
 
@@ -36,7 +37,7 @@ public interface IBjTrackShipCompanyService {
      * @param bo 重点跟踪航运公司
      * @return 是否新增成功
      */
-    Boolean insertByBo(BjTrackShipCompanyBo bo);
+    Boolean insertByBo(BjTrackShipCompanyBo bo) throws ParseException;
 
     /**
      * 修改重点跟踪航运公司
@@ -44,7 +45,7 @@ public interface IBjTrackShipCompanyService {
      * @param bo 重点跟踪航运公司
      * @return 是否修改成功
      */
-    Boolean updateByBo(BjTrackShipCompanyBo bo);
+    Boolean updateByBo(BjTrackShipCompanyBo bo) throws ParseException;
 
     /**
      * 校验并批量删除重点跟踪航运公司信息

+ 12 - 2
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjTrackShipCompanyServiceImpl.java

@@ -9,10 +9,12 @@ import com.ruoyi.business.mapper.BjTrackShipCompanyMapper;
 import com.ruoyi.business.service.IBjTrackShipCompanyService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.text.ParseException;
 import java.util.Collection;
 import java.util.List;
 
@@ -61,12 +63,16 @@ public class BjTrackShipCompanyServiceImpl implements IBjTrackShipCompanyService
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public Boolean insertByBo(BjTrackShipCompanyBo bo) {
+    public Boolean insertByBo(BjTrackShipCompanyBo bo) throws ParseException {
         BjTrackShipCompany add = BeanUtil.copyProperties(bo, BjTrackShipCompany.class);
         String trackShipCompanyId = IdUtil.simpleUUID();
         if (add != null) {
             add.setTrackShipCompanyId(trackShipCompanyId);
         }
+        if (bo.getAddDate() != null) {
+            add.setAddStartDate(DateUtils.parseDate(bo.getAddDate()[0], "yyyy-MM-dd HH:mm:ss"));
+            add.setAddEndDate(DateUtils.parseDate(bo.getAddDate()[1], "yyyy-MM-dd HH:mm:ss"));
+        }
         validEntityBeforeSave(add);
         return baseMapper.insert(add) > 0;
     }
@@ -79,8 +85,12 @@ public class BjTrackShipCompanyServiceImpl implements IBjTrackShipCompanyService
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public Boolean updateByBo(BjTrackShipCompanyBo bo) {
+    public Boolean updateByBo(BjTrackShipCompanyBo bo) throws ParseException {
         BjTrackShipCompany update = BeanUtil.copyProperties(bo, BjTrackShipCompany.class);
+        if (bo.getAddDate() != null) {
+            update.setAddStartDate(DateUtils.parseDate(bo.getAddDate()[0], "yyyy-MM-dd HH:mm:ss"));
+            update.setAddEndDate(DateUtils.parseDate(bo.getAddDate()[1], "yyyy-MM-dd HH:mm:ss"));
+        }
         validEntityBeforeSave(update);
         return baseMapper.updateById(update) > 0;
     }

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

@@ -47,12 +47,6 @@
         <if test="bo.punishObjName != null and bo.punishObjName != ''">
             and punish_obj_name like concat('%',#{bo.punishObjName},'%')
         </if>
-        <if test="bo.shipFirstregNo != null and bo.shipFirstregNo != ''">
-            and ship_firstreg_no like concat('%',#{bo.shipFirstregNo},'%')
-        </if>
-        <if test="bo.shipOwner != null and bo.shipOwner != ''">
-            and ship_owner like concat('%',#{bo.shipOwner},'%')
-        </if>
         <if test="bo.startDecisionDate != null and bo.endDecisionDate != null">
             and declare_date between #{bo.startDecisionDate} and #{bo.endDecisionDate}
         </if>

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

@@ -13,6 +13,7 @@
         <result property="dateSource" column="date_source"/>
         <result property="addDate" column="add_date"/>
         <result property="releaseDate" column="release_date"/>
+        <result property="file" column="file"/>
         <result property="releaseFlag" column="release_flag"/>
     </resultMap>
     <select id="queryTrackShipCompanyList" resultMap="trackShipCompanyVoList">
@@ -25,6 +26,7 @@
                date_source,
                add_date,
                release_date,
+               file,
                release_flag
         from bj_track_ship_company
         where del_flag = '0'