亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

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

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

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

浑源县| 健康| 万全县| 镇原县| 张家口市| 高密市| 达州市| 盐源县| 平罗县| 新巴尔虎左旗| 谢通门县| 五家渠市| 富顺县| 长岛县| 武功县| 梧州市| 丰宁| 青田县| 巴南区| 旬阳县| 鹿邑县| 凌源市| 武平县| 汝南县| 顺昌县| 常宁市| 南平市| 蛟河市| 军事| 丹凤县| 天气| 平南县| 永修县| 南开区| 黎川县| 文水县| 扎赉特旗| 洛川县| 五河县| 阜康市| 丰城市|