Browse Source

广电电渠报备匹配广电订单

mac 2 years ago
parent
commit
ccb445935c

+ 3 - 0
kxs-product/kxs-product-api/src/main/java/com/kxs/product/api/model/KxsGdOrder.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 
 
@@ -162,6 +163,7 @@ public class KxsGdOrder extends Model<KxsGdOrder> implements Serializable {
      * 收货人
      * 收货人
      */
      */
     @Schema(description = "收货人")
     @Schema(description = "收货人")
+    @NotBlank(message = "收货人不能为空")
     private String receiveName;
     private String receiveName;
 
 
 
 
@@ -169,6 +171,7 @@ public class KxsGdOrder extends Model<KxsGdOrder> implements Serializable {
      * 收货手机号
      * 收货手机号
      */
      */
     @Schema(description = "收货手机号")
     @Schema(description = "收货手机号")
+    @NotBlank(message = "收货手机号不能为空")
     private String receiveMobile;
     private String receiveMobile;
 
 
 
 

+ 1 - 25
kxs-product/kxs-product-api/src/main/java/com/kxs/product/api/vo/kxsapp/gd/GdReportListVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import java.io.Serial;
 import java.io.Serial;
 import java.io.Serializable;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.util.List;
 
 
 /**
 /**
  * 广电报备-列表vo
  * 广电报备-列表vo
@@ -58,10 +59,8 @@ public class GdReportListVO implements Serializable {
     /**
     /**
      * 广电sn
      * 广电sn
      */
      */
-    @Schema(description = "广电sn")
     private String gdSn;
     private String gdSn;
 
 
-
     /**
     /**
      * 状态 未处理=0 已作废=-1 报备成功=1
      * 状态 未处理=0 已作废=-1 报备成功=1
      */
      */
@@ -73,29 +72,6 @@ public class GdReportListVO implements Serializable {
      */
      */
     private Integer isCheck;
     private Integer isCheck;
 
 
-    /**
-     * 状态 1 订单生成2 订单正在运行3 待发货4 配送中5 订单成功结束6 已激活成功11 办理失败12 拒签13 订单取消中14 订单取消
-     */
-    @Schema(description = "状态")
-    private String gdStatus;
-
-    /**
-     * 快递公司
-     */
-    @Schema(description = "快递公司")
-    private String erpName;
-
-
-    /**
-     * 快递单号
-     */
-    @Schema(description = "快递单号")
-    private String erpNo;
-
-
-
-
-
 	
 	
 
 
 }
 }

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

@@ -1,15 +1,13 @@
 package com.kxs.product.biz.controller.kxsapp;
 package com.kxs.product.biz.controller.kxsapp;
 
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.kxs.common.core.util.R;
 import com.kxs.common.core.util.R;
 import com.kxs.common.security.annotation.Inner;
 import com.kxs.common.security.annotation.Inner;
-import com.kxs.common.security.util.SecurityUtils;
-import com.kxs.product.api.dto.kxsapp.gd.GdDqActDataRes;
-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.GdReportDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
+import com.kxs.product.api.model.KxsGdOrder;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
 import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
@@ -17,6 +15,7 @@ import com.kxs.product.biz.service.KxsGdOrderService;
 import com.kxs.product.biz.service.KxsGdReportService;
 import com.kxs.product.biz.service.KxsGdReportService;
 import jakarta.validation.Valid;
 import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import java.util.Map;
 import java.util.Map;
@@ -70,6 +69,19 @@ public class GdController {
         return R.ok(kxsGdReportService.getByPage(page, status, putType, keyword));
         return R.ok(kxsGdReportService.getByPage(page, status, putType, keyword));
     }
     }
 
 
+    /**
+     * 广电报备-客户订单列表
+     *
+     * @param page 分页对象
+     * @param param 收货人-收货人电话
+     * @return 广电报备-客户订单列表
+     */
+    @GetMapping("/gdOrderPage")
+    public R gdOrderPage(Page<KxsGdOrder> page, @ParameterObject @Valid KxsGdOrder param) {
+
+        return R.ok(kxsGdOrderService.getByPage(page, param));
+    }
+
 
 
     /**
     /**
      * 广电报备-未绑定sn列表
      * 广电报备-未绑定sn列表

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

@@ -9,6 +9,8 @@ import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.List;
+
 /**
 /**
  * 广电报备入网表(KxsGdReport)表数据库访问层
  * 广电报备入网表(KxsGdReport)表数据库访问层
  *
  *
@@ -21,9 +23,8 @@ public interface KxsGdReportMapper extends BaseMapper<KxsGdReport> {
     /**
     /**
      * app分页
      * app分页
      *
      *
-     * @param page    页
      * @param userId  用户ID
      * @param userId  用户ID
-     * @param putType
+     * @param putType 1电渠
      * @param keyword 关键词
      * @param keyword 关键词
      * @return {@link IPage}<{@link GdReportListVO}>
      * @return {@link IPage}<{@link GdReportListVO}>
      */
      */
@@ -39,6 +40,5 @@ public interface KxsGdReportMapper extends BaseMapper<KxsGdReport> {
      */
      */
     IPage<MachineUnBindListVO> getByUnBindPage(Page<MachineUnBindListVO> page, @Param("userId") Long userId, @Param("posSn") String posSn);
     IPage<MachineUnBindListVO> getByUnBindPage(Page<MachineUnBindListVO> page, @Param("userId") Long userId, @Param("posSn") String posSn);
 
 
-    IPage<GdReportListVO> getDqByPage(Page<GdReportListVO> page, @Param("userId") Long userId, @Param("status") Integer status, @Param("keyword") String keyword);
 }
 }
 
 

+ 1 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/impl/KxsGdOrderServiceImpl.java

@@ -168,6 +168,7 @@ public class KxsGdOrderServiceImpl extends ServiceImpl<KxsGdOrderMapper, KxsGdOr
                     KxsGdReport kxsGdReport = kxsGdReportMapper.selectOne(Wrappers.<KxsGdReport>lambdaQuery()
                     KxsGdReport kxsGdReport = kxsGdReportMapper.selectOne(Wrappers.<KxsGdReport>lambdaQuery()
                             .eq(KxsGdReport::getStatus, GdReportEnum.REPORT.getType())
                             .eq(KxsGdReport::getStatus, GdReportEnum.REPORT.getType())
                             .eq(KxsGdReport::getIsCheck, GdReportEnum.CHECK_NO.getType())
                             .eq(KxsGdReport::getIsCheck, GdReportEnum.CHECK_NO.getType())
+                            .eq(KxsGdReport::getPutMobile, kxsGdOrder.getReceiveMobile())
                             .eq(KxsGdReport::getGdMobile, kxsGdOrder.getGdMobile()));
                             .eq(KxsGdReport::getGdMobile, kxsGdOrder.getGdMobile()));
                     if (kxsGdReport == null) {
                     if (kxsGdReport == null) {
                         continue;
                         continue;

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

@@ -1,11 +1,6 @@
 package com.kxs.product.biz.service.impl;
 package com.kxs.product.biz.service.impl;
 
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.LocalDateTimeUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -17,34 +12,25 @@ import com.kxs.common.core.exception.GlobalCustomerException;
 import com.kxs.common.core.util.R;
 import com.kxs.common.core.util.R;
 import com.kxs.common.core.util.RetOps;
 import com.kxs.common.core.util.RetOps;
 import com.kxs.common.security.util.SecurityUtils;
 import com.kxs.common.security.util.SecurityUtils;
-import com.kxs.product.api.amqp.rabbit.RabbitGdActQueueMQ;
-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.GdReportDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
 import com.kxs.product.api.dto.kxsapp.gd.GdReportPutDTO;
 import com.kxs.product.api.model.KxsGdOrder;
 import com.kxs.product.api.model.KxsGdOrder;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.model.KxsGdReport;
 import com.kxs.product.api.vo.kxsapp.gd.GdDotNumVO;
 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;
 import com.kxs.product.api.vo.kxsapp.gd.GdReportListVO;
 import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO;
 import com.kxs.product.biz.constant.enums.GdReportEnum;
 import com.kxs.product.biz.constant.enums.GdReportEnum;
-import com.kxs.product.biz.constant.enums.ProductErrorTypeEnum;
 import com.kxs.product.biz.mapper.KxsGdReportMapper;
 import com.kxs.product.biz.mapper.KxsGdReportMapper;
 import com.kxs.product.biz.service.KxsGdOrderService;
 import com.kxs.product.biz.service.KxsGdOrderService;
 import com.kxs.product.biz.service.KxsGdReportService;
 import com.kxs.product.biz.service.KxsGdReportService;
 import com.kxs.product.biz.service.KxsGdService;
 import com.kxs.product.biz.service.KxsGdService;
-import com.kxs.product.biz.util.GdRsaUtils;
 import com.kxs.user.api.feign.RemoteKxsUserService;
 import com.kxs.user.api.feign.RemoteKxsUserService;
 import com.kxs.user.api.model.KxsUser;
 import com.kxs.user.api.model.KxsUser;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 
-import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.util.List;
 import java.util.List;
-import java.util.Map;
 import java.util.Objects;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Optional;
 
 

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

@@ -23,11 +23,10 @@
         <result column="put_type" property="putType"/>
         <result column="put_type" property="putType"/>
 
 
     </resultMap>
     </resultMap>
+
     <select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
     <select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
-        select a.id, a.create_time, a.put_name, a.put_mobile, a.gd_sn, a.gd_mobile, a.status, a.is_check, o.status as gd_status,
-        o.erp_name, o.erp_no
+        select a.id, a.create_time, a.put_name, a.put_mobile, a.gd_sn, a.gd_mobile, a.status, a.is_check
         from kxs_gd_report a
         from kxs_gd_report a
-        left join kxs_gd_order o on a.put_name = o.receive_name and a.put_mobile = o.receive_mobile
         <where>
         <where>
             and a.del_flag = 0
             and a.del_flag = 0
             and a.user_id = #{userId}
             and a.user_id = #{userId}
@@ -49,6 +48,7 @@
         </where>
         </where>
         order by id desc
         order by id desc
     </select>
     </select>
+
     <select id="getByUnBindPage" resultType="com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO">
     <select id="getByUnBindPage" resultType="com.kxs.product.api.vo.kxsapp.machine.MachineUnBindListVO">
         select a.id, a.pos_sn
         select a.id, a.pos_sn
         from kxs_machine a
         from kxs_machine a
@@ -69,25 +69,6 @@
             </choose>
             </choose>
         </where>
         </where>
     </select>
     </select>
-    <select id="getDqByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
-        select id, create_time, put_name, put_mobile, gd_sn, gd_mobile, status, is_check
-        from kxs_gd_report
-        <where>
-            and del_flag = 0
-            and put_type = 1
-            and user_id = #{userId}
-            <if test="status != null and status == 1">
-                and status = 1
-            </if>
-            <if test="status != null and status == 2">
-                and status = 1
-                and is_check = 1
-            </if>
-            <if test="keyword != null and keyword != ''">
-                and (put_name = #{keyword} or put_mobile = #{keyword} or gd_mobile = #{keyword})
-            </if>
-        </where>
-        order by id desc
-    </select>
+
 
 
 </mapper>
 </mapper>