|
@@ -230,6 +230,7 @@
|
|
|
websit_parts_new_refund_manage a
|
|
|
LEFT JOIN websit_parts_new_refund_manage_item b ON a.apply_no = b.apply_no
|
|
|
<where>
|
|
|
+ a.company_wechat_id = #{companyWechatId}
|
|
|
<if test="applyNo != null and applyNo != ''">
|
|
|
AND a.apply_no = #{applyNo}
|
|
|
</if>
|
|
@@ -298,51 +299,52 @@
|
|
|
|
|
|
<select id="appSalesList" resultType="com.gree.mall.miniapp.bean.material.parts.PartsSalesOrderBean">
|
|
|
SELECT
|
|
|
- a.*,
|
|
|
- CASE a.order_source WHEN 'SELF' THEN '自建订单'
|
|
|
- WHEN 'ONLINE' THEN '在线订单'
|
|
|
- ELSE '' END AS buyTypeName,
|
|
|
- CASE a.status WHEN 'SAVE' THEN '保存未提交'
|
|
|
- WHEN 'SUBMIT' THEN '已提交'
|
|
|
- <!-- WHEN '2' THEN '已支付' -->
|
|
|
- WHEN 'PAYED' THEN
|
|
|
- <!-- WHEN '3' THEN '已提货' -->
|
|
|
- (case when a.worker_confirm_date is not null and a.websit_confirm_date is not null then '已提货'
|
|
|
- when a.worker_confirm_date is not null then '师傅已提货'
|
|
|
- when a.websit_confirm_date is not null then '网点已提货' else '已支付' end)
|
|
|
- WHEN 'END' THEN '已完成'
|
|
|
- WHEN 'CANCEL' THEN '已取消'
|
|
|
- ELSE '' END AS stateName,
|
|
|
- CASE a.pushFlag WHEN 'SALES' THEN '销售'
|
|
|
- WHEN 'TRANS' THEN '转销售'
|
|
|
- WHEN 'END' THEN '完结'
|
|
|
- ELSE '' END AS pushFlagName
|
|
|
+ a.*,
|
|
|
+ CASE a.order_source WHEN 'SELF' THEN '自建订单'
|
|
|
+ WHEN 'ONLINE' THEN '在线订单'
|
|
|
+ ELSE '' END AS buyTypeName,
|
|
|
+ CASE a.status WHEN 'SAVE' THEN '保存未提交'
|
|
|
+ WHEN 'SUBMIT' THEN '已提交'
|
|
|
+ <!-- WHEN '2' THEN '已支付' -->
|
|
|
+ WHEN 'PAYED' THEN
|
|
|
+ <!-- WHEN '3' THEN '已提货' -->
|
|
|
+ (case when a.worker_confirm_date is not null and a.websit_confirm_date is not null then '已提货'
|
|
|
+ when a.worker_confirm_date is not null then '师傅已提货'
|
|
|
+ when a.websit_confirm_date is not null then '网点已提货' else '已支付' end)
|
|
|
+ WHEN 'END' THEN '已完成'
|
|
|
+ WHEN 'CANCEL' THEN '已取消'
|
|
|
+ ELSE '' END AS stateName,
|
|
|
+ CASE a.pushFlag WHEN 'SALES' THEN '销售'
|
|
|
+ WHEN 'TRANS' THEN '转销售'
|
|
|
+ WHEN 'END' THEN '完结'
|
|
|
+ ELSE '' END AS pushFlagName
|
|
|
FROM
|
|
|
websit_parts_sales a, websit_parts_sales_item b
|
|
|
WHERE
|
|
|
- a.id = b.sales_id
|
|
|
- AND a.del = 0
|
|
|
- AND a.identity = #{identity}
|
|
|
- <if test="salesId != null and salesId != ''">
|
|
|
- AND a.id = #{salesId}
|
|
|
- </if>
|
|
|
- <if test="status != null and status != ''">
|
|
|
- <!-- and 1 = 0 -->
|
|
|
- <if test="status == 'SAVE'.toString() or status == 'SUBMIT'.toString() or status == 'END'.toString() or status == 'CANCEL'.toString()">
|
|
|
- AND a.status = #{state}
|
|
|
+ a.company_wechat_id = #{companyWechatId}
|
|
|
+ AND a.id = b.sales_id
|
|
|
+ AND a.del = 0
|
|
|
+ AND a.identity = #{identity}
|
|
|
+ <if test="salesId != null and salesId != ''">
|
|
|
+ AND a.id = #{salesId}
|
|
|
</if>
|
|
|
- <if test="state == 'PAYED'.toString()">
|
|
|
- AND a.status = 'PAYED' AND (a.worker_confirm_date is null and a.websit_confirm_date is null)
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ <!-- and 1 = 0 -->
|
|
|
+ <if test="status == 'SAVE'.toString() or status == 'SUBMIT'.toString() or status == 'END'.toString() or status == 'CANCEL'.toString()">
|
|
|
+ AND a.status = #{state}
|
|
|
+ </if>
|
|
|
+ <if test="state == 'PAYED'.toString()">
|
|
|
+ AND a.status = 'PAYED' AND (a.worker_confirm_date is null and a.websit_confirm_date is null)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
- </if>
|
|
|
|
|
|
- <if test="pushFlag != null and pushFlag != ''">
|
|
|
- AND a.pushFlag = #{pushFlag}
|
|
|
- AND b.qty > 0
|
|
|
- </if>
|
|
|
- <if test="partsNumber != null and partsNumber != ''">
|
|
|
- AND b.parts_number = #{partsNumber}
|
|
|
- </if>
|
|
|
+ <if test="pushFlag != null and pushFlag != ''">
|
|
|
+ AND a.pushFlag = #{pushFlag}
|
|
|
+ AND b.qty > 0
|
|
|
+ </if>
|
|
|
+ <if test="partsNumber != null and partsNumber != ''">
|
|
|
+ AND b.parts_number = #{partsNumber}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
a.identity, a.id, a.create_time
|
|
|
ORDER BY
|
|
@@ -590,5 +592,9 @@
|
|
|
a.identity
|
|
|
</select>
|
|
|
|
|
|
+ <select id="appOldRefundList" resultType="com.gree.mall.miniapp.bean.material.parts.OldRefundManageBean">
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
</mapper>
|