流程就好像url地址同样

2019-09-21 22:43栏目:网络数据
TAG:

 

const QString url_getOnlineChannel = "http://fm.baidu.com/dev/api/?tn=channellist";             //url->频道ID
const QString url_getOnlineSheet = "http://fm.baidu.com/dev/api/?tn=playlist&format=json&id=";  //频道ID->歌曲ID
const QString url_getOnlineMusic = "http://music.baidu.com/data/music/fmlink?type=mp3&rate=320&songIds=";  //歌曲ID->歌曲信息

   IF ln_source_type_id = 13 THEN
      --库存
      IF ln_type_id = 2 THEN
         --子仓库储存转移
         SELECT nvl(mmt1.transaction_reference, 'no reference')
           INTO ls_result
           FROM mtl_material_transactions mmt1
          WHERE mmt1.transaction_id = p_trans_id;
      END IF;
      IF ln_type_id = 3 THEN
         --社团间平素转移
         SELECT nvl(mmt.waybill_airbill, '无陆运单号')
           INTO ls_result
           FROM mtl_material_transactions mmt
          WHERE mmt.transaction_id = p_trans_id;
      END IF;
      IF ln_type_id = 12 THEN
         --Intransit Receipt
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 21 THEN
         --Intransit Shipment
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 42 THEN
         --杂项接收
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 32 THEN
         --Miscellaneous issue
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 51 THEN
         --Backflush Transfer
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 66 THEN
         --Project Borrow
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 67 THEN
         --Project Transfer
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 68 THEN
         --Project Payback
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 70 THEN
         --Shipment Rcpt Adjust
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 73 THEN
         --Planning Transfer
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 75 THEN
         --Transfer to Consigned
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 80 THEN
         --平均开支更新
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 82 THEN
         --Inventory Lot Split
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 83 THEN
         --Inventory Lot Merge
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 84 THEN
         --Inventory Lot Translate
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 86 THEN
         --Cost Group Transfer
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 87 THEN
         --Container Pack
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 88 THEN
         --Container Unpack
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 89 THEN
         --Container Split
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 93 THEN
         --Field Service Usage
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 94 THEN
         --Field Service Recovery
         ls_result := ls_type_name;
      END IF;
   END IF;

 select max(id),type_id from msg_detail group by type_id; 

拜访每一种url都会回去一个JSON的音讯,通过剖析JSON来获得个中的信息。
流程就像url地址同样,分为3步:

   IF ln_source_type_id = 6 THEN
      --帐户小名 type id :31,41
      SELECT mgd.concatenated_segments
        INTO ls_result
        FROM MTL_GENERIC_DISPOSITIONS_KFV mgd
       WHERE mgd.disposition_id = ln_transaction_source_id;
   END IF;

 

  • 获得歌曲列表。
    经过上述获取到的 channel_id 新闻加在 http://fm.baidu.com/dev/api/?tn=playlist&format=json&id= 后,便得以获取该频道的音乐音信。
    如访问:http://fm.baidu.com/dev/api/?tn=playlist&format=json&id=public_yuzhong_yueyu ,获取如下JSON
    {"hash_code":"ef54151ee31553c05329ac7e66aaedc4","channel_id":"public_yuzhong_yueyu","channel_name":"u7ca4u8bed","list": [{"id":1039198,"type":-1,"method":0,"flow_mark":0},{"id":422954,"type":-1,"method":0,"flow_mark":0},{"id":7343735,"type":-1,"method":0,"flow_mark":0},{"id":2124665,"type":-1,"method":0,"flow_mark":0},{"id":219930,"type":-1,"method":0,"flow_mark":0},{"id":1424805,"type":-1,"method":0,"flow_mark":0},{"id":307171,"type":-1,"method":0,"flow_mark":0},{"id":10270415,"type":-1,"method":0,"flow_mark":0},{"id":273708,"type":-1,"method":0,"flow_mark":0},{"id":7324399,"type":-1,"method":0,"flow_mark":0},{"id":7319721,"type":-1,"method":0,"flow_mark":0},{"id":65545703,"type":-1,"method":0,"flow_mark":0},{"id":759408,"type":-1,"method":0,"flow_mark":0},{"id":1420738,"type":-1,"method":0,"flow_mark":0},{"id":338145,"type":-1,"method":0,"flow_mark":0},{"id":23165179,"type":-1,"method":0,"flow_mark":0},{"id":292002,"type":-1,"method":0,"flow_mark":0},{"id":7325160,"type":-1,"method":0,"flow_mark":0},{"id":206460,"type":-1,"method":0,"flow_mark":0},{"id":302740,"type":-1,"method":0,"flow_mark":0},{"id":350571,"type":-1,"method":0,"flow_mark":0},{"id":7382995,"type":-1,"method":0,"flow_mark":0},{"id":13757337,"type":-1,"method":0,"flow_mark":0},{"id":7325428,"type":-1,"method":0,"flow_mark":0},{"id":7317693,"type":-1,"method":0,"flow_mark":0},{"id":14962362,"type":-1,"method":0,"flow_mark":0},{"id":2047054,"type":-1,"method":0,"flow_mark":0},{"id":229011,"type":-1,"method":0,"flow_mark":0},{"id":483664,"type":-1,"method":0,"flow_mark":0},{"id":7344015,"type":-1,"method":0,"flow_mark":0},{"id":14962298,"type":-1,"method":0,"flow_mark":0},{"id":806049,"type":-1,"method":0,"flow_mark":0},{"id":7314224,"type":-1,"method":0,"flow_mark":0},{"id":319168,"type":-1,"method":0,"flow_mark":0},{"id":7319722,"type":-1,"method":0,"flow_mark":0},{"id":8276656,"type":-1,"method":0,"flow_mark":0},{"id":23165164,"type":-1,"method":0,"flow_mark":0},{"id":14441641,"type":-1,"method":0,"flow_mark":0},{"id":7352950,"type":-1,"method":0,"flow_mark":0},{"id":7315407,"type":-1,"method":0,"flow_mark":0},{"id":1000860,"type":-1,"method":0,"flow_mark":0},{"id":268353,"type":-1,"method":0,"flow_mark":0},{"id":2124659,"type":-1,"method":0,"flow_mark":0},{"id":7343428,"type":-1,"method":0,"flow_mark":0},{"id":5572508,"type":-1,"method":0,"flow_mark":0},{"id":2047062,"type":-1,"method":0,"flow_mark":0},{"id":7324907,"type":-1,"method":0,"flow_mark":0},{"id":220609,"type":-1,"method":0,"flow_mark":0},{"id":14879207,"type":-1,"method":0,"flow_mark":0},{"id":7320720,"type":-1,"method":0,"flow_mark":0},{"id":65545705,"type":-1,"method":0,"flow_mark":0},{"id":7315402,"type":-1,"method":0,"flow_mark":0},{"id":2110947,"type":-1,"method":0,"flow_mark":0},{"id":350388,"type":-1,"method":0,"flow_mark":0},{"id":2937956,"type":-1,"method":0,"flow_mark":0},{"id":7282667,"type":-1,"method":0,"flow_mark":0},{"id":7316029,"type":-1,"method":0,"flow_mark":0},{"id":341640,"type":-1,"method":0,"flow_mark":0},{"id":448036,"type":-1,"method":0,"flow_mark":0},{"id":7326296,"type":-1,"method":0,"flow_mark":0},{"id":350506,"type":-1,"method":0,"flow_mark":0},{"id":16602812,"type":-1,"method":0,"flow_mark":0},{"id":23165287,"type":-1,"method":0,"flow_mark":0},{"id":5548132,"type":-1,"method":0,"flow_mark":0},{"id":339826,"type":-1,"method":0,"flow_mark":0},{"id":7314946,"type":-1,"method":0,"flow_mark":0},{"id":960735,"type":-1,"method":0,"flow_mark":0},{"id":23165261,"type":-1,"method":0,"flow_mark":0},{"id":7316045,"type":-1,"method":0,"flow_mark":0},{"id":7344366,"type":-1,"method":0,"flow_mark":0},{"id":7324948,"type":-1,"method":0,"flow_mark":0},{"id":7321545,"type":-1,"method":0,"flow_mark":0},{"id":12340411,"type":-1,"method":0,"flow_mark":0},{"id":7319724,"type":-1,"method":0,"flow_mark":0},{"id":14949057,"type":-1,"method":0,"flow_mark":0},{"id":7312965,"type":-1,"method":0,"flow_mark":0},{"id":479911,"type":-1,"method":0,"flow_mark":0},{"id":7343489,"type":-1,"method":0,"flow_mark":0},{"id":2088695,"type":-1,"method":0,"flow_mark":0},{"id":2124656,"type":-1,"method":0,"flow_mark":0},{"id":7315406,"type":-1,"method":0,"flow_mark":0},{"id":400175,"type":-1,"method":0,"flow_mark":0},{"id":1080706,"type":-1,"method":0,"flow_mark":0},{"id":399393,"type":-1,"method":0,"flow_mark":0},{"id":300216,"type":-1,"method":0,"flow_mark":0},{"id":7312969,"type":-1,"method":0,"flow_mark":0},{"id":7382982,"type":-1,"method":0,"flow_mark":0},{"id":7320709,"type":-1,"method":0,"flow_mark":0},{"id":7313025,"type":-1,"method":0,"flow_mark":0},{"id":287183,"type":-1,"method":0,"flow_mark":0},{"id":7312860,"type":-1,"method":0,"flow_mark":0},{"id":29013970,"type":-1,"method":0,"flow_mark":0},{"id":7327371,"type":-1,"method":0,"flow_mark":0},{"id":913503,"type":-1,"method":0,"flow_mark":0},{"id":2129477,"type":-1,"method":0,"flow_mark":0},{"id":7325117,"type":-1,"method":0,"flow_mark":0},{"id":7319732,"type":-1,"method":0,"flow_mark":0},{"id":7320719,"type":-1,"method":0,"flow_mark":0},{"id":7316023,"type":-1,"method":0,"flow_mark":0},{"id":7325532,"type":-1,"method":0,"flow_mark":0},{"id":7314949,"type":-1,"method":0,"flow_mark":0},{"id":18281267,"type":-1,"method":0,"flow_mark":0},{"id":7320716,"type":-1,"method":0,"flow_mark":0},{"id":7312383,"type":-1,"method":0,"flow_mark":0},{"id":338033,"type":-1,"method":0,"flow_mark":0},{"id":7349969,"type":-1,"method":0,"flow_mark":0},{"id":7282701,"type":-1,"method":0,"flow_mark":0},{"id":998406,"type":-1,"method":0,"flow_mark":0},{"id":14962356,"type":-1,"method":0,"flow_mark":0},{"id":18298495,"type":-1,"method":0,"flow_mark":0},{"id":7324737,"type":-1,"method":0,"flow_mark":0},{"id":971277,"type":-1,"method":0,"flow_mark":0},{"id":2062242,"type":-1,"method":0,"flow_mark":0},{"id":2047058,"type":-1,"method":0,"flow_mark":0},{"id":350443,"type":-1,"method":0,"flow_mark":0},{"id":7354605,"type":-1,"method":0,"flow_mark":0},{"id":399170,"type":-1,"method":0,"flow_mark":0},{"id":603848,"type":-1,"method":0,"flow_mark":0},{"id":18282163,"type":-1,"method":0,"flow_mark":0},{"id":7324842,"type":-1,"method":0,"flow_mark":0},{"id":18316259,"type":-1,"method":0,"flow_mark":0},{"id":29014216,"type":-1,"method":0,"flow_mark":0},{"id":7323383,"type":-1,"method":0,"flow_mark":0},{"id":7313254,"type":-1,"method":0,"flow_mark":0},{"id":7321541,"type":-1,"method":0,"flow_mark":0},{"id":1073743,"type":-1,"method":0,"flow_mark":0},{"id":7312970,"type":-1,"method":0,"flow_mark":0},{"id":1267427,"type":-1,"method":0,"flow_mark":0},{"id":2047053,"type":-1,"method":0,"flow_mark":0},{"id":252734,"type":-1,"method":0,"flow_mark":0},{"id":934232,"type":-1,"method":0,"flow_mark":0},{"id":7319113,"type":-1,"method":0,"flow_mark":0},{"id":7341932,"type":-1,"method":0,"flow_mark":0},{"id":339644,"type":-1,"method":0,"flow_mark":0},{"id":2063044,"type":-1,"method":0,"flow_mark":0},{"id":1519330,"type":-1,"method":0,"flow_mark":0},{"id":7282665,"type":-1,"method":0,"flow_mark":0},{"id":7341000,"type":-1,"method":0,"flow_mark":0},{"id":7319916,"type":-1,"method":0,"flow_mark":0},{"id":14902466,"type":-1,"method":0,"flow_mark":0},{"id":27936596,"type":-1,"method":0,"flow_mark":0},{"id":795929,"type":-1,"method":0,"flow_mark":0},{"id":400220,"type":-1,"method":0,"flow_mark":0},{"id":7319912,"type":-1,"method":0,"flow_mark":0},{"id":881122,"type":-1,"method":0,"flow_mark":0},{"id":7312968,"type":-1,"method":0,"flow_mark":0},{"id":1248915,"type":-1,"method":0,"flow_mark":0},{"id":14962304,"type":-1,"method":0,"flow_mark":0},{"id":339719,"type":-1,"method":0,"flow_mark":0},{"id":5572481,"type":-1,"method":0,"flow_mark":0},{"id":265449,"type":-1,"method":0,"flow_mark":0},{"id":7316035,"type":-1,"method":0,"flow_mark":0},{"id":7312394,"type":-1,"method":0,"flow_mark":0},{"id":339970,"type":-1,"method":0,"flow_mark":0},{"id":688270,"type":-1,"method":0,"flow_mark":0},{"id":7325643,"type":-1,"method":0,"flow_mark":0},{"id":7327369,"type":-1,"method":0,"flow_mark":0},{"id":2124662,"type":-1,"method":0,"flow_mark":0},{"id":2047056,"type":-1,"method":0,"flow_mark":0},{"id":231265,"type":-1,"method":0,"flow_mark":0},{"id":7328680,"type":-1,"method":0,"flow_mark":0},{"id":7326389,"type":-1,"method":0,"flow_mark":0},{"id":23165149,"type":-1,"method":0,"flow_mark":0},{"id":2046417,"type":-1,"method":0,"flow_mark":0},{"id":1689146,"type":-1,"method":0,"flow_mark":0},{"id":7341801,"type":-1,"method":0,"flow_mark":0},{"id":7321283,"type":-1,"method":0,"flow_mark":0},{"id":595425,"type":-1,"method":0,"flow_mark":0},{"id":7311044,"type":-1,"method":0,"flow_mark":0},{"id":7324881,"type":-1,"method":0,"flow_mark":0},{"id":853841,"type":-1,"method":0,"flow_mark":0},{"id":400127,"type":-1,"method":0,"flow_mark":0},{"id":7382984,"type":-1,"method":0,"flow_mark":0},{"id":7325695,"type":-1,"method":0,"flow_mark":0},{"id":7315410,"type":-1,"method":0,"flow_mark":0},{"id":224032,"type":-1,"method":0,"flow_mark":0},{"id":212689,"type":-1,"method":0,"flow_mark":0},{"id":811032,"type":-1,"method":0,"flow_mark":0},{"id":7323445,"type":-1,"method":0,"flow_mark":0},{"id":2124658,"type":-1,"method":0,"flow_mark":0},{"id":7333064,"type":-1,"method":0,"flow_mark":0},{"id":7327365,"type":-1,"method":0,"flow_mark":0},{"id":763045,"type":-1,"method":0,"flow_mark":0},{"id":292122,"type":-1,"method":0,"flow_mark":0},{"id":7382993,"type":-1,"method":0,"flow_mark":0},{"id":734742,"type":-1,"method":0,"flow_mark":0},{"id":7319730,"type":-1,"method":0,"flow_mark":0},{"id":807360,"type":-1,"method":0,"flow_mark":0},{"id":18300154,"type":-1,"method":0,"flow_mark":0},{"id":1029781,"type":-1,"method":0,"flow_mark":0},{"id":65545697,"type":-1,"method":0,"flow_mark":0},{"id":7382991,"type":-1,"method":0,"flow_mark":0},{"id":7321543,"type":-1,"method":0,"flow_mark":0},{"id":7319588,"type":-1,"method":0,"flow_mark":0},{"id":7314104,"type":-1,"method":0,"flow_mark":0},{"id":11386710,"type":-1,"method":0,"flow_mark":0},{"id":7324540,"type":-1,"method":0,"flow_mark":0},{"id":273235,"type":-1,"method":0,"flow_mark":0},{"id":7346027,"type":-1,"method":0,"flow_mark":0},{"id":1088374,"type":-1,"method":0,"flow_mark":0}],"results":null,"status":0}
  • 收获具体的歌曲新闻。
    平等,依据上述JSON得到 id 音讯足够 http://music.baidu.com/data/music/fmlink?type=mp3&rate=320&songIds= 便能够收获某一首歌的切切实实消息。
    如访问:http://music.baidu.com/data/music/fmlink?type=mp3&rate=320&songIds=913503 ,获得如下的json:
    {"errorCode":22000,"data":{"xcode":"4496e58ee1d77dfb10372a4da22c77ae","songList":[{"queryId":"913503","songId":913503,"songName":"u5915u9633u65e0u9650u597d","artistId":"1077","artistName":"u9648u5955u8fc5","albumId":689097,"albumName":"U-87","songPicSmall":"http://musicdata.baidu.com/data2/pic/88653138/88653138.jpg@s_0,w_90","songPicBig":"http://musicdata.baidu.com/data2/pic/88653138/88653138.jpg@s_0,w_150","songPicRadio":"http://musicdata.baidu.com/data2/pic/88653138/88653138.jpg@s_0,w_300","lrcLink":"http://musicdata.baidu.com/data2/lrc/13982404/13982404.lrc","version":"","copyType":0,"time":244,"linkCode":22000,"songLink":"http://yinyueshiting.baidu.com/data2/music/136477439/913503140400320.mp3?xcode=4496e58ee1d77dfbd1fcd5f6c50b1ab0","showLink":"http://yinyueshiting.baidu.com/data2/music/136477439/913503140400320.mp3?xcode=4496e58ee1d77dfbd1fcd5f6c50b1ab0","format":"mp3","rate":320,"size":9773199,"relateStatus":"0","resourceType":"0","source":"web"}]}}
    中间:songLink正是歌曲真实的在线可播放地址,还会有别的过多的新闻方可一贯通过JSON上的Name消息看懂,就不一一赘述了。

   IF ln_source_type_id = 2 THEN
      --贩卖订单来源 
      IF ln_type_id = 33 THEN
         --发卖订单发运
         SELECT ott.name || '.' || ooh.order_number || '.' ||
                nvl(ooh.cust_po_number, 'no cust po')
           INTO ls_result
           FROM oe_order_lines_all      ool,
                oe_order_headers_all    ooh,
                oe_transaction_types_tl ott
          WHERE ool.header_id = ooh.header_id
            AND ool.line_id = ln_trx_source_line_id
            AND ott.LANGUAGE = userenv('LANG')
            AND ooh.order_type_id = ott.transaction_type_id;
      END IF;
      IF ln_type_id = 52 THEN
         -- 出卖订单挑库
         SELECT ott.name || '.' || ooh.order_number || '.' ||
                nvl(ooh.cust_po_number, 'no cust po')
           INTO ls_result
           FROM oe_order_lines_all      ool,
                oe_order_headers_all    ooh,
                oe_transaction_types_tl ott
          WHERE ool.header_id = ooh.header_id
            AND ool.line_id = ln_trx_source_line_id
            AND ott.LANGUAGE = userenv('LANG')
            AND ooh.order_type_id = ott.transaction_type_id;
      END IF;
   END IF;
   IF ln_source_type_id = 3 THEN
      --Account
      IF ln_type_id = 1 THEN
         --Account issue
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 40 THEN
         --Account receipt
         ls_result := ls_type_name;
      END IF;
   END IF;

CREATE TABLE `msg_detail` (
    `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `title` VARCHAR(200) NOT NULL DEFAULT '' COMMENT '标题',
    `content` TEXT NOT NULL COMMENT '内容',
    `audio_url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '音频地址',
    `type_id` TINYINT(4) NOT NULL DEFAULT '0',
     PRIMARY KEY (`id`),
    INDEX `cid` (`cid`) USING BTREE,
    INDEX `column_id` (`column_id`) USING BTREE
)
COMMENT='内参表'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1;

百度公然有二个音乐接口,里面分好了频道体系。上边是3个接口的二个url地址。

   IF ln_source_type_id = 16 THEN
      --Project Contract
      IF ln_type_id = 77 THEN
         --ProjectContract Issue
         ls_result := ls_type_name;
      END IF;
   END IF;

  查询全体项目内部参照他事他说加以考察音讯最大id,可用如下sql: 

  1. 收获频道列表。
    白白访问 http://fm.baidu.com/dev/api/?tn=channellist 。
    这里能够博获得具备的频段新闻,如下:
    {"hash_code":"ef54151ee31553c05329ac7e66aaedc4","channel_list": [{"channel_id":"public_tuijian_spring","channel_name":"u6f2bu6b65u6625u5929","channel_order":0,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":11},{"channel_id":"public_tuijian_autumn","channel_name":"u79cbu65e5u79c1u8bed","channel_order":0,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":12},{"channel_id":"public_tuijian_winter","channel_name":"u6e29u6696u51acu65e5","channel_order":10101,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":10},{"channel_id":"public_tuijian_rege","channel_name":"u70edu6b4c","channel_order":10105,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":4,"source_id":0,"pv_order":1},{"channel_id":"public_tuijian_ktv","channel_name":"KTVu91d1u66f2","channel_order":10106,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":2},{"channel_id":"public_tuijian_billboard","channel_name":"Billboard","channel_order":10107,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":6},{"channel_id":"public_tuijian_chengmingqu","channel_name":"u6210u540du66f2","channel_order":10108,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":3},{"channel_id":"public_tuijian_wangluo","channel_name":"u7f51u7edcu6b4cu66f2","channel_order":10109,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":2,"source_id":0,"pv_order":4},{"channel_id":"public_tuijian_kaiche","channel_name":"u5f00u8f66","channel_order":10110,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":7},{"channel_id":"public_tuijian_yingshi","channel_name":"u5f71u89c6","channel_order":10113,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":8},{"channel_id":"public_tuijian_suibiantingting","channel_name":"u968fu4fbfu542cu542c","channel_order":10114,"cate_id":"tuijian","cate":"u63a8u8350u9891u9053","cate_order":1,"source_type":1,"source_id":0,"pv_order":5},{"channel_id":"public_shiguang_jingdianlaoge","channel_name":"u7ecfu5178u8001u6b4c","channel_order":10201,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":2,"source_id":0,"pv_order":1},{"channel_id":"public_shiguang_70hou","channel_name":"70u540e","channel_order":10202,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":1,"source_id":0,"pv_order":6},{"channel_id":"public_shiguang_80hou","channel_name":"80u540e","channel_order":10203,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":2,"source_id":0,"pv_order":2},{"channel_id":"public_shiguang_90hou","channel_name":"90u540e","channel_order":10204,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":2,"source_id":0,"pv_order":3},{"channel_id":"public_shiguang_xinge","channel_name":"u706bu7206u65b0u6b4c","channel_order":10205,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":3,"source_id":33,"pv_order":4},{"channel_id":"public_shiguang_erge","channel_name":"u513fu6b4c","channel_order":10206,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":1,"source_id":0,"pv_order":7},{"channel_id":"public_shiguang_lvxing","channel_name":"u65c5u884c","channel_order":10208,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":2,"source_id":0,"pv_order":8},{"channel_id":"public_shiguang_yedian","channel_name":"u591cu5e97","channel_order":10209,"cate_id":"shiguang","cate":"u65f6u5149u9891u9053","cate_order":2,"source_type":2,"source_id":0,"pv_order":5},{"channel_id":"public_fengge_liuxing","channel_name":"u6d41u884c","channel_order":10301,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":1,"source_id":0,"pv_order":1},{"channel_id":"public_fengge_yaogun","channel_name":"u6447u6eda","channel_order":10302,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":5},{"channel_id":"public_fengge_minyao","channel_name":"u6c11u8c23","channel_order":10303,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":3,"source_id":50,"pv_order":8},{"channel_id":"public_fengge_qingyinyue","channel_name":"u8f7bu97f3u4e50","channel_order":10304,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":3},{"channel_id":"public_fengge_xiaoqingxin","channel_name":"u5c0fu6e05u65b0","channel_order":10305,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":4},{"channel_id":"public_fengge_zhongguofeng","channel_name":"u4e2du56fdu98ce","channel_order":10306,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":7},{"channel_id":"public_fengge_dj","channel_name":"DJu821eu66f2","channel_order":10308,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":2},{"channel_id":"public_fengge_dianyingyuansheng","channel_name":"u7535u5f71","channel_order":10309,"cate_id":"fengge","cate":"u98ceu683cu9891u9053","cate_order":3,"source_type":2,"source_id":0,"pv_order":6},{"channel_id":"public_xinqing_qingsongjiari","channel_name":"u8f7bu677eu5047u65e5","channel_order":10401,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":1,"source_id":0,"pv_order":4},{"channel_id":"public_xinqing_huankuai","channel_name":"u6b22u5febu65cbu5f8b","channel_order":10402,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":1,"source_id":0,"pv_order":1},{"channel_id":"public_xinqing_tianmi","channel_name":"u751cu871cu611fu53d7","channel_order":10403,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":1,"source_id":0,"pv_order":6},{"channel_id":"public_xinqing_jimo","channel_name":"u5bc2u5bde","channel_order":10404,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":2,"source_id":0,"pv_order":7},{"channel_id":"public_xinqing_qingge","channel_name":"u5355u8eabu60c5u6b4c","channel_order":10405,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":1,"source_id":0,"pv_order":8},{"channel_id":"public_xinqing_shuhuan","channel_name":"u8212u7f13u8282u594f","channel_order":10406,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":1,"source_id":0,"pv_order":2},{"channel_id":"public_xinqing_yonglanwuhou","channel_name":"u6175u61d2u5348u540e","channel_order":10407,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":3,"source_id":15,"pv_order":5},{"channel_id":"public_xinqing_shanggan","channel_name":"u4f24u611f","channel_order":10408,"cate_id":"xinqing","cate":"u5fc3u60c5u9891u9053","cate_order":4,"source_type":2,"source_id":0,"pv_order":3},{"channel_id":"public_yuzhong_huayu","channel_name":"u534eu8bed","channel_order":10501,"cate_id":"yuzhong","cate":"u8bedu79cdu9891u9053","cate_order":5,"source_type":1,"source_id":0,"pv_order":1},{"channel_id":"public_yuzhong_oumei","channel_name":"u6b27u7f8e","channel_order":10502,"cate_id":"yuzhong","cate":"u8bedu79cdu9891u9053","cate_order":5,"source_type":1,"source_id":0,"pv_order":2},{"channel_id":"public_yuzhong_riyu","channel_name":"u65e5u8bed","channel_order":10503,"cate_id":"yuzhong","cate":"u8bedu79cdu9891u9053","cate_order":5,"source_type":2,"source_id":0,"pv_order":3},{"channel_id":"public_yuzhong_hanyu","channel_name":"u97e9u8bed","channel_order":10504,"cate_id":"yuzhong","cate":"u8bedu79cdu9891u9053","cate_order":5,"source_type":1,"source_id":0,"pv_order":4},{"channel_id":"public_yuzhong_yueyu","channel_name":"u7ca4u8bed","channel_order":10505,"cate_id":"yuzhong","cate":"u8bedu79cdu9891u9053","cate_order":5,"source_type":1,"source_id":0,"pv_order":5}],"status":0}

   IF ln_source_type_id = 10 THEN
      -- 实地盘点
      IF ln_type_id = 8 THEN
         --实地盘点调治
         ls_result := ls_type_name;
      END IF;
   
      IF ln_type_id = 9 THEN
         --实地盘点酒馆转移
         ls_result := ls_type_name;
      END IF;
   END IF;

假若今后有表结构:

   IF ln_source_type_id = 1 THEN
      IF ln_type_id = 18 THEN
         --接收入库
         SELECT '购买发卖订单号码' || '.' || ph.segment1 ||
                nvl(ph.comments, ' no comments')
           INTO ls_result
           FROM rcv_transactions rt,
                po_headers_all   ph
          WHERE rt.transaction_id = ln_source_line_id
            AND rt.po_header_id = ph.po_header_id;
      END IF;
      IF ln_type_id = 71 THEN
         --交货调度
         SELECT '购买发售订单' || '.' || ph.segment1 ||
                nvl(ph.comments, ' no comments')
           INTO ls_result
           FROM rcv_transactions rt,
                po_headers_all   ph
          WHERE rt.transaction_id = ln_source_line_id
            AND rt.po_header_id = ph.po_header_id;
      END IF;
      IF ln_type_id = 36 THEN
         --退货
         SELECT '买卖订单' || '.' || ph.segment1 ||
                nvl(ph.comments, ' no comments')
           INTO ls_result
           FROM rcv_transactions rt,
                po_headers_all   ph
          WHERE rt.transaction_id = ln_source_line_id
            AND rt.po_header_id = ph.po_header_id;
      END IF;
      IF ln_type_id = 74 THEN
         --转移至正规目标地
         ls_result := ls_type_name;
      END IF;
   END IF;

   IF ln_source_type_id = 8 THEN
      --内部订单
      IF ln_type_id = 34 THEN
         --Internal order issue
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 50 THEN
         --Internal Order Xfer
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 53 THEN
         --Internal Order Pick
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 54 THEN
         --Int Order Direct Ship
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 62 THEN
         --Int Order Intr Ship
         ls_result := ls_type_name;
      END IF;
   END IF;

 

CREATE OR REPLACE FUNCTION cux_trans_source(p_trans_id NUMBER) RETURN VARCHAR2 IS
   ln_type_id               NUMBER;
   ln_source_line_id        NUMBER;
   ln_trx_source_line_id    NUMBER;
   ln_source_type_id        NUMBER;
   ln_transaction_source_id NUMBER;
   ls_type_name             VARCHAR2(80);
   ls_result                VARCHAR2(80);
BEGIN
   SELECT mmt.transaction_type_id,
          mmt.source_line_id,
          mtt.transaction_type_name,
          mmt.trx_source_line_id,
          mmt.transaction_source_type_id,
          mmt.transaction_source_id
     INTO ln_type_id,
          ln_source_line_id,
          ls_type_name,
          ln_trx_source_line_id,
          ln_source_type_id,
          ln_transaction_source_id
     FROM mtl_material_transactions mmt,
          mtl_transaction_types     mtt
    WHERE mmt.transaction_type_id = mtt.transaction_type_id
      AND mmt.transaction_id = p_trans_id;

 

   IF ln_source_type_id = 5 THEN
      --任务或安顿 type id :17,25,35,38,43,44,48,55,56,57,58,90,91,92
      SELECT ls_type_name || '.' || wdj.WIP_ENTITY_NAME || '.' ||
             NVL(wdj.ATTRIBUTE12, 'NO 机型') || '.' ||
             NVL(wdj.ATTRIBUTE1, 'NO 批次')
        INTO ls_result
        FROM WIP_DISCRETE_JOBS_V wdj
       WHERE wdj.WIP_ENTITY_ID = ln_transaction_source_id;
   END IF;

查究事物管理来自

   IF ln_source_type_id = 9 THEN
      -- 周期盘点
      IF ln_type_id = 4 THEN
         --Cycle Count Adjust
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 5 THEN
         --Cycle Count Transfer
         ls_result := ls_type_name;
      END IF;
   
   END IF;

   RETURN ls_result;
EXCEPTION
   WHEN OTHERS THEN
      ls_result := '无来源';
      RETURN ls_result;
   
END;

   IF ln_source_type_id = 12 THEN
      -- RMA 退货 ln_type_id is 15,37
      IF ln_type_id = 15 THEN
         --RMA 接收
         SELECT ott.name || '.' || ooh.order_number || '.' ||
                nvl(ooh.cust_po_number, 'no cust po')
           INTO ls_result
           FROM oe_order_lines_all      ool,
                oe_order_headers_all    ooh,
                oe_transaction_types_tl ott
          WHERE ool.header_id = ooh.header_id
            AND ool.line_id = ln_trx_source_line_id
            AND ott.LANGUAGE = userenv('LANG')
            AND ooh.order_type_id = ott.transaction_type_id;
      END IF;
      IF ln_type_id = 37 THEN
         --RMA 退货
         SELECT ott.name || '.' || ooh.order_number || '.' ||
                nvl(ooh.cust_po_number, 'no cust po')
           INTO ls_result
           FROM oe_order_lines_all      ool,
                oe_order_headers_all    ooh,
                oe_transaction_types_tl ott
          WHERE ool.header_id = ooh.header_id
            AND ool.line_id = ln_trx_source_line_id
            AND ott.LANGUAGE = userenv('LANG')
            AND ooh.order_type_id = ott.transaction_type_id;
      END IF;
   END IF;

   IF ln_source_type_id = 15 THEN
      --Layer Cost Update
      IF ln_type_id = 28 THEN
         ls_result := ls_type_name;
      END IF;
   END IF;

   IF ln_source_type_id = 14 THEN
      --Periodic Cost Update
      IF ln_type_id = 26 THEN
         --Periodic Cost Update
         ls_result := ls_type_name;
      END IF;
   
   END IF;

   IF ln_source_type_id = 7 THEN
      --内部申请
      IF ln_type_id = 61 THEN
         ls_result := ls_type_name;
      END IF;
      IF ln_type_id = 72 THEN
         ls_result := ls_type_name;
      END IF;
   END IF;

   IF ln_source_type_id = 11 THEN
      --标准资金更新
      IF ln_type_id = 24 THEN
         ls_result := ls_type_name;
      END IF;
   END IF;

   IF ln_source_type_id = 4 THEN
      -- 物料搬运单 ln_type_id=63,64
      SELECT ls_type_name || '.' || H.REQUEST_NUMBER || '.' ||
             NVL(H.DEscriptION, 'NO DESC')
        INTO ls_result
        FROM MTL_TXN_REQUEST_HEADERS_V H,
             MTL_TXN_REQUEST_LINES_V   L
       WHERE H.HEADER_ID = l.HEADER_ID
         AND l.LINE_ID = ln_source_line_id;
   END IF;

版权声明:本文由大奖888-www.88pt88.com-大奖888官网登录发布于网络数据,转载请注明出处:流程就好像url地址同样