rushfee/build/classes/db/search_sql.xml

134 lines
8.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqls SYSTEM "sql_definition.dtd">
<sqls>
<sql group="search">
<i id="getCompany"><![CDATA[
select org_short_name as text from COMPANY_ORGANIZE
]]></i>
<i id="getContact"><![CDATA[
select t.mobile ,t.contact as text from v_CUSTOMER_CONTACT t where t.customer_id={customer_id} order by t.is_default desc
]]></i>
<i id="getCustomer"><![CDATA[
select CUST_NAME as text from RUSH_RECORD $like(name,qn)
]]></i>
<i id="getOperator"><![CDATA[
select CREATOR as text from RUSH_RECORD
]]></i>
<i id="getDate"><![CDATA[
select CREATE_DATE as text from RUSH_RECORD
]]></i>
<i id="getResult"><![CDATA[
select NAME as text from RUSH_FEEDBACK_DIC
]]></i>
<i id="getGrid"><![CDATA[
select t.id,t.customer_id,t.cust_name,r.info as feedback_type,t.revenuename,substr(r.remark,instr(r.remark,'备注信息:')+5) remark,t.org_name,r.operator,r.operate_date as create_date,
t.contacts_info,t.cust_tax_code,t.address ,decode(r.source,'1','代理会计进入','任务中心') source ,decode(custtype,'0','服务费','1','托管') as charge_status
from RUSH_LOG r inner join RUSH_RECORD t on t.id=r.obj_id where r.action='rushfee'
and $equal(r.custtype,chargetype)
and $equal(r.injf,injf)
and $equal(r.ifmz,ifmz)
and $like(info,searchresult)
and $like(org_name,searchcompany)
and $between(operate_date,searchbegindate,searchenddate)
and $like(r.operator,operator)
and $like(cust_name,searchcustomer) order by r.operate_date desc,r.info desc
]]></i>
<i id="getpersonGrid"><![CDATA[
select t.id,t.customer_id,t.cust_name,r.info as feedback_type,t.revenuename,substr(r.remark,instr(r.remark,'备注信息:')+5) remark,t.org_name,r.operator,r.operate_date as create_date,
t.contacts_info,t.cust_tax_code,t.address
from RUSH_LOG r inner join RUSH_RECORD t on t.id=r.obj_id where r.action='rushfee'
and $equal(r.custtype,chargetype)
and $equal(r.injf,injf)
and $equal(r.ifmz,ifmz)
and $like(info,searchresult)
and $like(org_name,searchcompany)
and $between(operate_date,searchbegindate,searchenddate)
and r.operator_code={usercode}
and $like(r.operator,operator)
and $like(cust_name,searchcustomer) order by r.operate_date desc,r.info desc
]]></i>
<i id="getpositionGrid"><![CDATA[
select t.id,t.customer_id,t.cust_name,r.info as feedback_type,t.revenuename,t.org_name,substr(r.remark,instr(r.remark,'备注信息:')+5) remark,r.operator,r.operate_date as create_date,
t.contacts_info,t.cust_tax_code,t.address
from RUSH_LOG r inner join RUSH_RECORD t on t.id=r.obj_id where r.action='rushfee'
and $equal(r.custtype,chargetype)
and $equal(r.injf,injf)
and $equal(r.ifmz,ifmz)
and $like(info,searchresult)
and $like(org_name,searchcompany)
and $between(operate_date,searchbegindate,searchenddate)
and $like(r.operator,operator)
and t.org_name=(SELECT s.cname FROM AOS_ORGN s where s.CGUID=(SELECT c.corgnid from AOS_RMS_USER_ORGN_REL c WHERE c.cuserid={userid}))
and $like(cust_name,searchcustomer) order by r.operate_date desc,r.info desc
]]></i>
<i id="getLog"><![CDATA[
select t.operator,t.operate_date,t.ip,t.remark,t.obj_id from RUSH_LOG t where $equal(obj_id,obj_id) and action='rushfee' order by operate_date desc
]]></i>
<i id="getRecording"><![CDATA[
select * from ( select a.id,a.path,'播放' AS play,a.operator, a.operate_date, '联系电话:' || substrmobile, 1, 4) || '****' || substr(mobile, 9) mobile, a.remark, a.info, decode(a.info,'0','暂未接通','接通') jtstate,case when a.zltime='0' then 0 else to_number( a.zltime-1) end as zltime,a.vital, (select substr(remark,instr(remark,'备注信息:')+5) remark
from rush_log t
where action='rushfee' and
t.id =
a.obj_id
) rema,
(select decode(custtype,'1','托管','0','服务费') from rush_log w where action='rushfee' and
w.id =
a.obj_id
) custtype,
( select z.contacts_info from rush_record z where id=c.obj_id) contacts_info
from rush_log a
right join (select id,
substr(substr(remark, 1, instr(remark, ')') - 1),
instr(substr(remark, 1, instr(remark, ')') - 1),
'(') + 1) mobile
from rush_log
where action = 'phone') b
on a.id = b.id
left join (select obj_id,id from rush_log )c on a.obj_id =c.id
where $like(a.operator, searchoperator)
and $like(a.remark, custname)
and a.action = 'phone'
and $like(a.vital, searchresult)
and $between(a.operate_date, searchbegindate, searchenddate)
order by a.operate_date desc) where $equal(custtype,chargetype)
]]></i>
<i id="getrushday"><![CDATA[
select id,text from RUSH_DICTIONARY
where codetype='lately_day'
]]></i>
<i id="getmobilemark"><![CDATA[
select memo,text from RUSH_DICTIONARY
where codetype='mobile_mark'
]]></i>
<i id="gettaskpeople"><![CDATA[
select t.cname,t.CGUID from AOS_RMS_USER t, AOS_RMS_USERTYPE_CFG f where t.cusertype = f.cguid and f.cname in(select f.name from RUSH_AUTH f where f.type = 'rush_sharer_type')
]]></i>
<i id="getcompanycall"><![CDATA[
select a.path,'播放' AS play,a.operator,a.id, a.operate_date, '联系电话:' || substrmobile, 1, 4) || '****' || substr(mobile, 9) mobile, a.remark, a.info, a.vital, (select substr(remark,instr(remark,'备注信息:')+5) remark
from rush_log t
where action='rushfee' and
t.id =
a.obj_id
) rema,
( select z.contacts_info from rush_record z where id=c.obj_id) contacts_info
from rush_log a
right join (select id,
substr(substr(remark, 1, instr(remark, ')') - 1),
instr(substr(remark, 1, instr(remark, ')') - 1),
'(') + 1) mobile
from rush_log
where action = 'phone') b
on a.id = b.id
left join (select obj_id,id from rush_log )c on a.obj_id =c.id
where
a.action = 'phone' and a.obj_id={id} and a.operator={operator}
order by a.operate_date desc
]]></i>
</sql>
</sqls>