91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

SQL 獲取數據

發布時間:2020-06-06 23:55:16 來源:網絡 閱讀:323 作者:TIANYUKAI 欄目:MySQL數據庫

SELECT

         COMPLAIN_CODE '投訴單號',

         ORDER_NO '訂單號',

         RESPONSIBILITY '責任單位名稱',

         CREATE_TIME '創建時間',

         COMPLAIN_TYPE '發起工單類型',

  DUTY_COMPLAIN_TYPE '定責投訴類型',

         COMPLAIN_SOUND_TYPE '聲音歸類',

         COMPLAIN_DATE '投訴日期',

         MEMO '情況說明',

  HANDLER1 "發起人工號",

  HANDLER2 "結束人工號",

  HANDLER_DATE1 "投訴開始時間",

  HANDLER_DATE2 "投訴結束時間",

         HANDLER_TYPE '處理類型',

         EOOR_SHIPPER_CONTACT '收貨方聯系人',

         EOOR_SHIPPER_CITY_NAME '發貨地址城市',

         EOOR_CONSIGNEE_CITY_NAME '收貨地址城市',

         EOOR_ORDER_TYPE '訂單類型',

         SEND_DATE '發貨時間',

         EOOR_SERVICE_MODE '服務類型',

         EOOS_SUPPLIER_FULL_NAME1'供應商全名',

         EOTS_LINK_TYPE '落地配'

FROM

 

         (

                   SELECT

                            t.COMPLAIN_CODE,

                            t.ORDER_NO,

                            t.RESPONSIBILITY,

                            t.CREATE_TIME,

                            CASE t.COMPLAIN_TYPE

                   WHEN 'SAFETY' THEN

                            '安全類'

                   WHEN 'CUSTOMER' THEN

                            '客戶類'

                   WHEN 'AGEING' THEN

                            '時效類'

                   WHEN 'ACTION' THEN

                            '客戶體驗類'

                   WHEN 'DELIVERY' THEN

                            '配送類'

                   ELSE

                            '貨代業務線上化'

                   END 'COMPLAIN_TYPE',

                   t.COMPLAIN_SOUND_TYPE,

                   t.COMPLAIN_DATE,

                   t.MEMO,

                   t.DUTY_COMPLAIN_TYPE,

                   b. HANDLER 'HANDLER1',

                   b.HANDLER_TYPE,

                   c.EOOR_SHIPPER_CONTACT,

                   c.EOOR_SHIPPER_CITY_NAME,

                   c.EOOR_CONSIGNEE_CITY_NAME,

                   c.EOOR_ORDER_TYPE,

                   c.SEND_DATE,

                   c.EOOR_SERVICE_MODE,

                   d.EOOS_SUPPLIER_FULL_NAME 'EOOS_SUPPLIER_FULL_NAME1',

    CASE e.EOTS_LINK_TYPE

    when '21' THEN '收貨'

                   when '22' THEN '配單'

                   when '23' THEN '發貨'

                   when '24' THEN '裝機'

                   when '51' THEN '提貨主單'

                   when '61' THEN '提貨訂單'

                   when '62' THEN '貨代簽收'

                   when '71' THEN '落地配交接'

                   when '72' THEN '落地配分配'

    ELSE

         '落地配簽收'

    END 'EOTS_LINK_TYPE',

                   min(b.HANDLER_DATE) 'HANDLER_DATE1'

         FROM

                   cs_complained_info t

         LEFT JOIN cs_complained_handle_record b ON b. CODE = t.COMPLAIN_CODE

         LEFT JOIN eo_order c ON c.EOOR_ORDER_NO = t.ORDER_NO

         LEFT JOIN eo_order_supplier d ON d.EOOS_ORDER_NO = t.ORDER_NO

         LEFT JOIN eo_order_task_status e ON e.EOOR_ORDER_NO = t.ORDER_NO

         WHERE

                   t.HANDLE_STATUS = "DONE"

         AND T.ORDER_NO != " "  

  AND t.CREATE_TIME > "2017-1-1"

         GROUP BY

                   t.COMPLAIN_CODE

         ) AS A

LEFT JOIN (

         SELECT

  t.COMPLAIN_CODE 'COMPLAIN_CODE2',

         b. HANDLER 'HANDLER2',

         max(b.HANDLER_DATE) 'HANDLER_DATE2'

FROM

         cs_complained_info t

LEFT JOIN cs_complained_handle_record b ON b. CODE = t.COMPLAIN_CODE

LEFT JOIN eo_order c ON c.EOOR_ORDER_NO = t.ORDER_NO

LEFT JOIN eo_order_supplier d ON d.EOOS_ORDER_NO = t.ORDER_NO

LEFT JOIN eo_order_task_status e ON e.EOOR_ORDER_NO = t.ORDER_NO

WHERE

         t.HANDLE_STATUS = "DONE"

AND b.HANDLER_RESULT = "FINISH"

AND T.ORDER_NO != " "

AND t.CREATE_TIME > "2017-1-1"

GROUP BY

         t.COMPLAIN_CODE

) AS B ON A.COMPLAIN_CODE = B.COMPLAIN_CODE2

ORDER BY COMPLAIN_CODE DESC


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

溧阳市| 那曲县| 洛南县| 个旧市| 安泽县| 汨罗市| 来凤县| 长丰县| 育儿| 读书| 西畴县| 鄄城县| 崇信县| 崇州市| 新巴尔虎右旗| 大厂| 信阳市| 海口市| 东莞市| 观塘区| 永川市| 东乡县| 托克托县| 万载县| 沈阳市| 嵊泗县| 太保市| 湛江市| 阳谷县| 刚察县| 海丰县| 霍山县| 新津县| 龙门县| 安庆市| 商城县| 新余市| 澳门| 会理县| 承德县| 抚顺县|