(1)合作伙伴SP/CP查询。
select * from partner p where p.partner_status_cd = 0 and p.partner_code ='35100181'
select * from PARTNER_SYSTEM_INFO ps where ps.partner_id = 3019
select * from system_info s where s.system_code = 803
select * from product_spec ps1 where ps1.partner_id = 20(合作伙伴的产品关系)
(2)销售品查询
select * from PROD_OFFER po where po.offer_nbr = '135000000000000007648'
(3)产品查询
select * from product_spec ps1 where ps1.product_spec_nbr = '123000000000000001511'
(4)用户信息查询,包括归属地,产品状态,接入号码,接入类型。
select * from PROD_INST p,ACC_NBR_TYPE a,SERV_ACC_NBR s,AREA ar,PROD_STATUS_TYPE ps
where ar.area_id = p.area_id and p.prod_inst_id = s.prod_inst_id and a.acc_nbr_type_cd = s.acc_nbr_type_cd
and ps.prod_status_cd = p.prod_status_cd and a.acc_nbr_type_cd = 0 and ar.area_name ='济南市电信分公司'
and ps.prod_status_cd = 1
select * from ACC_NBR_TYPE
select * from PROD_STATUS_TYPE
select * from prod_offer po where po.offer_nbr='135000000000000000962'(查销售品)
select * from PROD_INST p,SERV_ACC_NBR s,ORDER_RELATION o
where p.prod_inst_id = s.prod_inst_id
and p.prod_inst_id = o.prod_inst_id and s.acc_nbr = '189********'(查订购关系)
select * from ORDER_RELATION_HIS orh where orh.prod_inst_id = 36774618(查增值业务订购记
录)
select * from PROD_OFFER_INST_HIS poi where poi.prod_offer_id = 1354(查销售品订购记录)
(页面订购信息查询---在用订购信息查询)
Select Poi.Prod_Offer_Inst_Id
,Poi.Prod_Offer_Id
,(Select Iss.Name
From Inst_Status Iss
Where Iss.Status_Cd = Poi.Status_Cd) Status_Cd
,Poi.State_Date
,Poi.Create_Date
,Null Eff_Date
,
Null Exp_Date
,Null Is_Experience
,Null Bill_Date
,Null Prod_Inst_Id
,Null Offer_Agrmt_Inst_Id
,Null Order_Channelselect语句查询日期
,Null Handle_Staff_Id
,Null Channel_Id
,Null Develop_Staff_Id
,Null Cust_Id
,Po.Prod_Offer_Name
,
(Select Ot.Name
From Offer_Type Ot
Where Ot.Offer_Type_Cd = Po.Offer_Type_Cd) Offer_Type_Cd
,Null Offer_Desc
,Null Manage_Grade
,Po.Pricing_Desc Pricing_Desc
,Sc.Name Scname
,Po.Offer_Nbr Offer_Nbr
,(Select Sio.Name
From Staff_Info Sio
Where Sio.Staff_Id = Poi.Handle_Staff_Id) Handle_Staff_Name
,
(Select Co.Other_Sys_Order_Id
From Order_Item Oim
,Customer_Order Co
Where Oim.Order_Item_Id =
(Select Max(Order_Item_Id)
From Order_Item
Where Order_Item_Obj_Id = Poi.Prod_Offer_Inst_Id
And Order_Item_Type_Cd = 15
And Status_Cd In ('C'))
And Co.Cust_Order_Id = Oim.Cust_Order_Id) Other_
Sys_Order_Id
From Prod_Offer_Inst Poi
Left Join Prod_Offer_Info Poio
On Poi.Prod_Offer_Id = Poio.Prod_Offer_Id
Left Join Settlement_Cycle Sc
On Poio.Settlement_Cycle = Sc.Settlement_Cycle
Left Join Prod_Offer Po
On Poi.Prod_Offer_Id = Po.Prod_Offer_Id
Where Poi.Prod_Inst_Id = 36774618
And Poi.Status_Cd In (2)
注意:页面外部系统表示有误,页面的字段数据展示是外部系统订单标识,而页面所需要的信息是外部系统编码,外部系统订单标识字段为:Other_Sys_Order_Id,此字段属于订单表。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论