Sfoglia il codice sorgente

广电报备和电渠报备合并

mac 2 anni fa
parent
commit
cf686fdf35

+ 7 - 2
kxs-product/kxs-product-api/src/main/java/com/kxs/product/api/dto/kxsapp/gd/GdReportPutDTO.java

@@ -36,7 +36,6 @@ public class GdReportPutDTO {
      * 报备省份
      */
     @Schema(description = "报备省份")
-    @NotBlank(message = "报备省份不能为空")
     private String province;
 
 
@@ -44,7 +43,6 @@ public class GdReportPutDTO {
      * 报备城市
      */
     @Schema(description = "报备城市")
-    @NotBlank(message = "报备城市不能为空")
     private String city;
 
 
@@ -56,6 +54,13 @@ public class GdReportPutDTO {
     private String putName;
 
 
+    /**
+     * 入网类型 1电渠 0工号报备
+     */
+    @Schema(description = "入网类型 1电渠 0工号报备")
+    private String putType;
+
+
     /**
      * 入网手机号
      */

+ 4 - 2
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/controller/kxsapp/GdController.java

@@ -55,9 +55,11 @@ public class GdController {
      * @return 广电报备-列表
      */
     @GetMapping("/page")
-    public R page(Page<GdReportListVO> page, @RequestParam("status") Integer status, @RequestParam(value = "keyword", required = false) String keyword) {
+    public R page(Page<GdReportListVO> page, @RequestParam("status") Integer status,
+                  @RequestParam( value = "putType", required = false) Integer putType,
+                  @RequestParam(value = "keyword", required = false) String keyword) {
 
-        return R.ok(kxsGdReportService.getByPage(page, status, keyword));
+        return R.ok(kxsGdReportService.getByPage(page, status, putType, keyword));
     }
 
 

+ 3 - 2
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/mapper/KxsGdReportMapper.java

@@ -22,11 +22,12 @@ public interface KxsGdReportMapper extends BaseMapper<KxsGdReport> {
      * app分页
      *
      * @param page    页
-     * @param userId 用户ID
+     * @param userId  用户ID
+     * @param putType
      * @param keyword 关键词
      * @return {@link IPage}<{@link GdReportListVO}>
      */
-    IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, @Param("userId") Long userId, @Param("status") Integer status, @Param("keyword") String keyword);
+    IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, @Param("userId") Long userId, @Param("status") Integer status, @Param("putType") Integer putType, @Param("keyword") String keyword);
 
     /**
      * 未绑定未报备广电sn列表

+ 2 - 1
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/KxsGdReportService.java

@@ -32,10 +32,11 @@ public interface KxsGdReportService extends IService<KxsGdReport> {
      * app分页
      *
      * @param page    页
+     * @param putType
      * @param keyword 关键词
      * @return {@link IPage}<{@link GdReportListVO}>
      */
-    IPage<GdReportListVO> getByPage(Page<GdReportListVO> page,  Integer status, String keyword);
+    IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, Integer status, Integer putType, String keyword);
 
     /**
      * 电渠分页

+ 2 - 6
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/impl/KxsGdReportServiceImpl.java

@@ -1,7 +1,6 @@
 package com.kxs.product.biz.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -17,7 +16,6 @@ import com.kxs.product.api.dto.kxsapp.gd.GdDqReportDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
 import com.kxs.product.api.model.KxsGdReport;
-import com.kxs.product.api.res.gd.GdQueryOrderRes;
 import com.kxs.product.api.vo.kxsapp.gd.GdDotNumVO;
 import com.kxs.product.api.vo.kxsapp.gd.GdDqDotNumVO;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
@@ -29,10 +27,8 @@ import com.kxs.product.biz.service.KxsGdService;
 import com.kxs.user.api.feign.RemoteKxsUserService;
 import com.kxs.user.api.model.KxsUser;
 import lombok.RequiredArgsConstructor;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
 
@@ -71,10 +67,10 @@ public class KxsGdReportServiceImpl extends ServiceImpl<KxsGdReportMapper, KxsGd
     }
 
     @Override
-    public IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, Integer status, String keyword) {
+    public IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, Integer status, Integer putType, String keyword) {
 
         Long userId = SecurityUtils.getUser().getId();
-        return baseMapper.getByPage(page, userId, status, keyword);
+        return baseMapper.getByPage(page, userId, status, putType, keyword);
     }
 
     @Override

+ 1 - 1
kxs-product/kxs-product-biz/src/main/resources/mapper/KxsGdReportMapper.xml

@@ -28,9 +28,9 @@
         from kxs_gd_report
         <where>
             and del_flag = 0
-            and put_type = 0
             and user_id = #{userId}
             and status = #{status}
+            and put_type = #{putType}
             <if test="keyword != null and keyword != ''">
                 and (put_name = #{keyword} or put_mobile = #{keyword} or gd_mobile = #{keyword})
             </if>