mac 2 лет назад
Родитель
Сommit
1d04617e95

+ 19 - 0
kxs-product/kxs-product-api/src/main/java/com/kxs/product/api/vo/kxsapp/gd/GdReportListVO.java

@@ -73,6 +73,25 @@ public class GdReportListVO implements Serializable {
      */
     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;
+
 
 
 

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

@@ -24,15 +24,27 @@
 
     </resultMap>
     <select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
-        select id, create_time, put_name, put_mobile, gd_sn, gd_mobile, status
-        from kxs_gd_report
+        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
+        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>
-            and del_flag = 0
-            and user_id = #{userId}
-            and status = #{status}
-            and put_type = #{putType}
+            and a.del_flag = 0
+            and a.user_id = #{userId}
+            <choose>
+                <when test="status == 2">
+                    and a.status = 1 and a.is_check = 1
+                </when>
+                <otherwise>
+                    and a.status = #{status}
+                </otherwise>
+            </choose>
             <if test="keyword != null and keyword != ''">
-                and (put_name = #{keyword} or put_mobile = #{keyword} or gd_mobile = #{keyword})
+            </if>
+
+            and a.put_type = #{putType}
+            <if test="keyword != null and keyword != ''">
+                and (a.put_name = #{keyword} or a.put_mobile = #{keyword} or a.gd_mobile = #{keyword})
             </if>
         </where>
         order by id desc