Przeglądaj źródła

广电报备新增未绑定广电卡接口

mac 2 lat temu
rodzic
commit
b5d4820516

+ 15 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/controller/kxsapp/GdController.java

@@ -7,6 +7,7 @@ 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.vo.kxsapp.gd.GdReportListVO;
+import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import com.kxs.product.biz.service.KxsGdReportService;
 import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
@@ -59,6 +60,20 @@ public class GdController {
     }
 
 
+    /**
+     * 广电报备-未绑定sn列表
+     *
+     * @param page 分页对象
+     * @param posSn 机具号
+     * @return 广电报备-列表
+     */
+    @GetMapping("/unGdBindList")
+    public R unGdBindList(Page<MachineUnBindListVO> page, @RequestParam(value = "posSn", required = false) String posSn) {
+
+        return R.ok(kxsGdReportService.getByUnBindPage(page, posSn));
+    }
+
+
     /**
      * 广电报备-数量接口
      *

+ 11 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/mapper/KxsGdReportMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
+import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -26,5 +27,15 @@ public interface KxsGdReportMapper extends BaseMapper<KxsGdReport> {
      * @return {@link IPage}<{@link GdReportListVO}>
      */
     IPage<GdReportListVO> getByPage(Page<GdReportListVO> page, @Param("userId") Long userId, @Param("status") Integer status, @Param("keyword") String keyword);
+
+    /**
+     * 未绑定未报备广电sn列表
+     *
+     * @param page   页
+     * @param userId 用户 ID
+     * @param posSn  POS SN
+     * @return {@link IPage}<{@link MachineUnBindListVO}>
+     */
+    IPage<MachineUnBindListVO> getByUnBindPage(Page<MachineUnBindListVO> page, @Param("userId") Long userId, @Param("posSn") String posSn);
 }
 

+ 10 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/KxsGdReportService.java

@@ -9,6 +9,7 @@ import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.vo.kxsapp.gd.GdDotNumVO;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
+import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 
 /**
  * 广电报备入网表(KxsGdReport)表服务接口
@@ -73,5 +74,14 @@ public interface KxsGdReportService extends IService<KxsGdReport> {
      * @return {@link R}
      */
     R checkGdData(String startTime, String endTime);
+
+    /**
+     * 未绑定未报备广电sn列表
+     *
+     * @param page  页
+     * @param posSn POS SN
+     * @return {@link IPage}<{@link MachineUnBindListVO}>
+     */
+    IPage<MachineUnBindListVO> getByUnBindPage(Page<MachineUnBindListVO> page, String posSn);
 }
 

+ 7 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/impl/KxsGdReportServiceImpl.java

@@ -19,6 +19,7 @@ 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.GdReportListVO;
+import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import com.kxs.product.biz.constant.enums.GdReportEnum;
 import com.kxs.product.biz.mapper.KxsGdReportMapper;
 import com.kxs.product.biz.service.KxsGdReportService;
@@ -155,6 +156,12 @@ public class KxsGdReportServiceImpl extends ServiceImpl<KxsGdReportMapper, KxsGd
         return R.ok();
     }
 
+    @Override
+    public IPage<MachineUnBindListVO> getByUnBindPage(Page<MachineUnBindListVO> page, String posSn) {
+
+        Long userId = SecurityUtils.getUser().getId();
+        return baseMapper.getByUnBindPage(page, userId, posSn);
+    }
 
 
 }

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

@@ -35,5 +35,20 @@
         </where>
         order by id desc
     </select>
+    <select id="getByUnBindPage" resultType="com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO">
+        select a.id, a.pos_sn
+        from kxs_machine a
+        left join kxs_gd_report b on a.pos_sn = b.gd_sn
+        <where>
+            and a.del_flag = 0
+            and a.bind_status = 0
+            and a.brand_id = 14
+            and a.user_id = #{userId}
+            and b.gd_sn is null
+            <if test="posSn != null and posSn != ''">
+                and a.pos_sn like concat('%', #{query.keyword}, '%')
+            </if>
+        </where>
+    </select>
 
 </mapper>