/*扣件数据明细报表*/
select * from (select t.*, rownum rowno
from (select distinct ts.waybill_no,
trunc(ts.keeped_tm)keeped_date,
tb.transit_zone_code
from tt_waybill_state ts, tt_bar_feedback tb
where ts.keeped_tm >= to_date('2016-12-07 00:00:00', 'yyyy-mm-dd HH24:mi:ss')
and ts.keeped_tm <= to_date('2016-12-07 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
and ts.waybill_no = tb.feedback_no
and ts.state_flg = '2'
order by transit_zone_code) t) where rownum <=20 and rowno>0 order by transit_zone_code;
--tt_waybill_state 预警运单状态 tt_bar_feedback反馈信息
/*报表--中转场统计查验汇总报表*/
select count(1)
from (select td.dept_code
from tm_department td
start with td.dept_id in
(select tud.dept_id
from ts_user_dept tud
where tud.inherited_flg = 1
and tud.user_id =
(select user_id
from ts_user t3
where t3.username = '365805'))
connect by prior td.dept_code = td.parent_dept_code
union
select td.dept_code
from tm_department td, ts_user_dept tud
where td.dept_id = tud.dept_id
and tud.inherited_flg = 0
and td.delete_flg = 0
and tud.user_id =
(select user_id from ts_user t3 where t3.username = '365805')) t
where t.dept_code = 'E024SK';
--
select t.dept_code
from (select *
from tm_department td
connect by PRIOR td.dept_code = td.parent_dept_code
start with td.dept_code = 'E024SK') t
where t.delete_flg = 0
and t.type_code in
('ZZC04-YJ', 'ZZC04-ERJ', 'ZZC05-SJ', 'HHZ05', 'ZZC04-SN', 'ZZC04-LS',
'ZZC04-HK', 'ZZC04-ZHHK', 'ZZC04-SL', 'ZZC04-XN', 'ZZC04-JYHK',
'ZZC04-HKHZ', 'ZZC04-TL');
--select rowid,td.dept_code,td.parent_dept_code,td.delete_flg,td.type_code,td.* from tm_department td where td.dept_code = 'E024SK';
--select rowid,td.dept_code,td.parent_dept_code,td.delete_flg,td.type_code,td.* from tm_department td where td.parent_dept_code = 'E024SK';
---
with a as (
select t1.feedback_no,
t1.bar_scan_tm,
t1.why_code,
t1.transit_zone_code,
t1.feedback_id,
t1.feedback_no || '-' || t1.transit_zone_code as feedback_no_not_in
from rms.tt_bar_feedback t1
where t1.bar_scan_tm between
to_date('2016-12-07 00:00:00', 'yyyy-mm-dd HH24:mi:ss') and
to_date('2016-12-07 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
and t1.transit_zone_code in ('E024SK')
)
select *
from (select t.*, rownum rowno
from (select t.*,
t.bar_no - keeped_no - passed_no no_check_no,
tm2.dept_name,
tm.area_code,
tr.transit_level_code
from (select t7.transit_zone_code,
t7.wanted_tm,
count(wanted_no) bar_no,
count(keeped_no) keeped_no,
count(passed_no) passed_no
from (select t6.transit_zone_code,
trunc(t6.bar_scan_tm) as wanted_tm,
t6.feedback_no as wanted_no,
case
when t6.why_code = '2' then
t6.feedback_no
end as keeped_no,
case
when t6.why_code = '3' then
t6.feedback_no
end as passed_no
from (select t4.feedback_no,
t4.bar_scan_tm,
t4.transit_zone_code,
t5.why_code
from (select t3.feedback_no,
t3.bar_scan_tm,
t3.transit_zone_code,
t3.feedback_id
from (select t2.*,
row_number() over(partition by t2.feedback_no, t2.transit_zone_code order by t2.bar_scan_tm desc) as rank
from (select *
from a
where a.why_code in
('2', '3')) t2) t3
where t3.rank = 1
union all
select t3.feedback_no,
t3.bar_scan_tm,
t3.transit_zone_code,
t3.feedback_id
from (select t2.*,
row_number() over(partition by t2.feedback_no, t2.transit_zone_code order by t2.bar_scan_tm asc) as rank
from (select *
from a
where a.why_code = 1
and a.feedback_no_not_in not in
(select feedback_no_not_in
from a
where a.why_code in
('2', '3'))) t2) t3
where t3.rank = 1) t4,
tt_bar_feedback t5
where t4.feedback_id = t5.feedback_id
and exists
(select 1
from tl_sap_issue_log ts
where ts.transit_zone_code =t4.transit_zone_code
and ts.issue_type_code = 1
and ts.issue_no =t4.feedback_no)) t6) t7
group by t7.transit_zone_code, t7.wanted_tm) t,
tm_department tm,
tm_department tm2,
(select distinct transit_zone_code, transit_level_code
from (select transit_zone_code,
transit_level_code,
row_number() over(partition by transit_zone_code order by relation_id desc) rn
from tm_transit_relation
union all
select transit_zone_code,
transit_level_code,
row_number() over(partition by transit_zone_code order by relation_id desc) rn
from tm_transit_relation_dest)
where rn = 1) tr
where t.transit_zone_code = tm.dept_code
and tm.hq_code = tm2.dept_code
and t.transit_zone_code = tr.transit_zone_code
order by tm2.dept_name,
tr.transit_level_code,
t.transit_zone_code) t
where 1 = 1)
where rownum <= 20
and rowno > 0
order by dept_name, transit_level_code, transit_zone_code
--练习row_number()的用法,类同查询每个部门的最高工资
select deptno,ename,sal from
(select deptno,ename,sal,row_number() over (partition by deptno order by sal desc) as sal_order
from scott.emp) where sal_order <2;---在数据库看真实的数据可以用下面的语句看;
select t1.transit_zone_code,t1.relation_id from (select t.transit_zone_code,
t.relation_id,
row_number() over(partition by t.transit_zone_code order by t.relation_id desc) rn
from tm_transit_relation t) t1 where t1.rn <2
--造数据的过程:
select rowid, t1.bar_scan_tm, t1.transit_zone_code, t1.FEEDBACK_NO, t1.why_code,t1.*
from tt_bar_feedback t1
where t1.feedback_no = '880000378696';
FEEDBACK_NO=880000378696
transit_zone_code= 'E024SK'
feedback_no_not_in='feedback_no'-'transit_zone_code'='880000378696-E024SK'
why_code=1
--a表:
--其实a表就是tt_bar_feedback t1表
a.feedback_no=880000378696
a.bar_scan_tm=2016/12/7
a.why_code=1
a.transit_zone_code='E024SK'
a.feedback_id='25954125038'
a.feedback_no || '-' || a.transit_zone_code as feedback_no_not_in='880000378696-E024SK'
/*select *
from a
where a.why_code = 1
and a.feedback_no_not_in not in
(select feedback_no_not_in from a where a.why_code in ('2', '3'))------成立的
*/
--t2表:字段和a表一致
t2.feedback_no=880000378696
t2.bar_scan_tm=2016/12/7
t2.why_code=1
t2.transit_zone_code='E024SK'
t2.feedback_id='25954125038'
t2.feedback_no || '-' || a.transit_zone_code as feedback_no_not_in='880000378696-E024SK'
--t3表:字段和t2表差不多:
t3.feedback_no=880000378696
t3.bar_scan_tm=2016/12/7
t3.transit_zone_code='E024SK'
t3.feedback_id='25954125038'
--t4表:字段和t3表差不多:
t4.feedback_no=880000378696
t4.bar_scan_tm=2016/12/7
t4.transit_zone_code='E024SK'
t4.feedback_id='25954125038'
--t5表:tt_bar_feedback t5---同t1
select rowid,t5.feedback_id,t5.feedback_no,t5.why_code,t5.* from tt_bar_feedback t5 where t5.feedback_no ='880000378696';
t5.feedback_id='25954125038'
t5.why_code=1
--t4.feedback_id = t5.feedback_id
--t6表:
t6.feedback_no=880000378696
t6.bar_scan_tm=2016/12/7
t6.transit_zone_code='E024SK'
t6.why_code=1
--t7表:同t6
t7.transit_zone_code=880000378696
t7.wanted_tm=2016/12/7
count(wanted_no=feedback_no) =1
count(keeped_no) keeped_no=0
count(passed_no) passed_no=0
--t表搞不太懂是什么表?----我猜应该和T7差不多
select rowid,tm.dept_code,tm.hq_code,tm.* from tm_department tm where tm.dept_code = 'E024SK';
--t.transit_zone_code = tm.dept_code
select rowid, ts.transit_zone_code, ts.issue_type_code, ts.issue_no, ts.*
from tl_sap_issue_log ts
where ts.issue_no = '880000378696';
--运单号:issue_no=880000378696
--transit_zone_code= 'E024SK'
--ts.issue_type_code = 1
--ts.transit_zone_code =t4.transit_zone_code='E024SK'
--ts.issue_no =t4.feedback_no='880000378696'
select rowid, tr.transit_zone_code,tr.* from tm_transit_relation tr where tr.transit_zone_code = 'E024SK';
transit_zone_code='E024SK'
/*原寄地预警与查询汇总报表*/
select t.*, rownum rowno
from (select t.*, tm2.dept_name
from (select create_tm,
source_zone_code,
dest_zone_code,
compose,
sum(1) wanted_no,
sum(decode(state_flg, 2, 1, 0)) keeped_no,
sum(decode(state_flg, 3, 1, 0)) passed_no,
sum(decode(state_flg, 1, 1, 0)) other_no,
sum(decode(length(feedback_no), 12, 1, 0)) bar_no
from (select tbar.zone_code source_zone_code,
tbar.phone_zone dest_zone_code,
ts.compose,
trunc(ts.warning_tm) create_tm,
ts.state_flg,
tb.feedback_no
from tl_bar_record_log tbar,
tt_waybill_state ts,
(select distinct feedback_no
from tt_bar_feedback) tb
where ts.warning_tm >=
to_date('2016-12-09 00:00:00', 'yyyy-mm-dd HH24:mi:ss')
and ts.warning_tm <=
to_date('2016-12-09 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
and instr(ts.data_src, 'BAR') = 1
and tbar.ctnr_related_id = ts.waybill_id
and ts.waybill_no = tb.feedback_no(+)
union all
select tw.source_zone_code source_zone_code,
tw.dest_zone_code dest_zone_code,
ts.compose,
trunc(ts.warning_tm) create_tm,
ts.state_flg,
tb.feedback_no
from tt_waybill tw,
tt_waybill_state ts,
(select distinct feedback_no
from tt_bar_feedback) tb
where ts.warning_tm >=
to_date('2016-12-09 00:00:00', 'yyyy-mm-dd HH24:mi:ss')
and ts.warning_tm <=
to_date('2016-12-09 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
and tw.waybill_id = ts.waybill_id
and (instr(ts.data_src, 'WAYBILL') = 1 or
ts.data_src is null)
and ts.waybill_no = tb.feedback_no(+))
group by create_tm,
source_zone_code,
dest_zone_code,
compose) t,
tm_department tm,
tm_department tm2
where t.source_zone_code = tm.dept_code
and tm.hq_code = tm2.dept_code
order by create_tm, source_zone_code) t
/*进出口关务-关务通缉检测配置*/
select * from TT_IE_CUSTOMS_MUST_WANTED;
/*报表--关务统计查验分析统计表*/
SELECT T.PRE_CUSTOMS_DT,
T.WAYBILL_NO,
T.CONS_NAME,
T.WEIGHT_QTY,
T.CONS_VALUE,
T.CONSIGNOR_COMP_NAME,
T.ADDRESSEE_COMP_NAME,
T.CONSIGNOR_CONT_NAME,
T.ADDRESSEE_CONT_NAME,
T.CONSIGNOR_PHONE,
T.ADDRESSEE_PHONE,
T.ADDRESSEE_ADDR_NATIVE,
T.ADDRESSEE_ADDR,
T.HEIGH_VALUE_SORT
FROM TT_WAYBILL_SAP_APPROVE T
WHERE T.PRE_CUSTOMS_DT >= ?
AND T.PRE_CUSTOMS_DT <= ?
/*预警信息下发知会*/
---判断当前用户是否有权限
select count(1)
from (select td.dept_code
from tm_department td
start with td.dept_id in
(select tud.dept_id
from ts_user_dept tud
where tud.inherited_flg = 1
and tud.user_id =
(select user_id
from ts_user t3
where t3.username = '365805'))
connect by prior td.dept_code = td.parent_dept_code
union
select td.dept_code
from tm_department td, ts_user_dept tud
where td.dept_id = tud.dept_id
and tud.inherited_flg = 0
and td.delete_flg = 0
and tud.user_id =
(select user_id from ts_user t3 where t3.username = '365805')) t
where t.dept_code = 'E024SK';
---当页面的页面输入预警网点代码 == 空的时候 查询输入地区代码下所有中转场代码
select t.dept_code
from (select *
from tm_department td
connect by PRIOR td.dept_code = td.parent_dept_code
start with td.dept_code ='E024SK') t
where t.delete_flg = 0
and (t.type_code like 'ZZ%' or t.type_code like 'HH%');
--select rowid,td.dept_code,td.parent_dept_code,td.delete_flg,td.type_code,td.* from tm_department td where td.dept_code = 'E024SK';
select *
from (select t.*, rownum rowno
from TT_WARNING_WAYBILL_NOTICE t
where t.warn_date between
to_date('2016-06-20 00:00:00', 'yyyy-MM-dd hh24:mi:ss') and/*页面输入开始时间*/
to_date('2016-12-07 23:59:59', 'yyyy-MM-dd hh24:mi:ss')/*页面输入结束时间*/
and t.warn_net_code in ('E024SK'))/*页面输入预警网点代码*/
where rownum <= 20
and rowno > 0
--输入网点才能查询出数据
select rowid,t.* from TT_WARNING_WAYBILL_NOTICE t;
/*网点通缉查验情况统计分析*/
select area_code,
zone_code,
TO_CHAR(TRUNC(t.warningTm), 'YYYY-MM-DD') warningTm,
warningNum,
wantedToNum,
checkNum,
buckleNum
from (SELECT ROWNUM ID, TT.*
FROM (WITH K0 AS (SELECT TT.WAYBILL_NO, TT.ZONE_CODE, TT.WARNING_TM
FROM (SELECT T1.WAYBILL_NO,
T2.ZONE_CODE,
T1.WARNING_TM,
ROW_NUMBER() OVER(PARTITION BY T1.WAYBILL_NO ORDER BY T1.WARNING_TM DESC) AS RNO
FROM RMS.TT_WAYBILL_STATE T1,
RMS.TT_CHECK_RESULT_BAR T2
WHERE T1.WAYBILL_NO = T2.WAYBILL_NO
AND T1.WARNING_TM >=
to_date('2016-12-07 00:00:00', 'yyyy-mm-dd HH24:mi:ss')
AND T1.WARNING_TM <=
to_date('2016-12-07 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
AND INSTR(T1.COMPOSE, 'M') > 0
AND T2.ZONE_CODE IN
(SELECT T.DEPT_CODE
FROM RMS.TM_DEPARTMENT T
WHERE T.DELETE_FLG = 0
AND (T.TYPE_CODE LIKE 'DB%' OR
T.TYPE_CODE LIKE 'FB%')
CONNECT BY PRIOR T.DEPT_CODE =
T.PARENT_DEPT_CODE
START WITH DEPT_CODE = '000'/*页面的网点*/)) TT
WHERE TT.RNO = 1)
SELECT AREA_CODE,
ZONE_CODE,
TRUNC(TT2.WARNINGTM) WARNINGTM,
COUNT(DISTINCT WAYBILL_NO) WARNINGNUM,
SUM(CASE
WHEN WHY_CODE = '1' THEN
1
ELSE
0
END) WANTEDTONUM,
SUM(CASE
WHEN WHY_CODE = '3' THEN
1
ELSE
0
END) CHECKNUM,
SUM(CASE
WHEN WHY_CODE = '2' THEN
1
ELSE
0
END) BUCKLENUM
FROM (SELECT DISTINCT D.AREA_CODE,
K0.ZONE_CODE,
TRUNC(K0.WARNING_TM) WARNINGTM,
K0.WAYBILL_NO,
K1.WHY_CODE
FROM K0,
(SELECT DISTINCT T.FEEDBACK_NO,
DECODE(T.WHY_CODE,
'2',
'3',
T.WHY_CODE) WHY_CODE
FROM K0, RMS.TT_BAR_FEEDBACK T
WHERE K0.WAYBILL_NO = T.FEEDBACK_NO
UNION ALL
SELECT DISTINCT T.FEEDBACK_NO, T.WHY_CODE
FROM K0, RMS.TT_BAR_FEEDBACK T
WHERE K0.WAYBILL_NO = T.FEEDBACK_NO
AND T.WHY_CODE = '2') K1,
RMS.TM_DEPARTMENT D
WHERE K0.WAYBILL_NO = K1.FEEDBACK_NO(+)
AND K0.ZONE_CODE = D.DEPT_CODE
AND D.DELETE_FLG = 0) TT2
GROUP BY TT2.AREA_CODE, TT2.ZONE_CODE, TRUNC(TT2.WARNINGTM)
ORDER BY TT2.AREA_CODE, TT2.ZONE_CODE, TRUNC(TT2.WARNINGTM)
) TT
) t
where t.id <=20
and t.id > 0
order by t.area_code, t.zone_code, t.warningtm
--造数据的过程
select rowid, T.DEPT_CODE,T.* from RMS.TM_DEPARTMENT T where t.dept_code = '000';
DEPT_CODE:000
select rowid,T2.ZONE_CODE,T2.WAYBILL_NO,T2.* from RMS.TT_CHECK_RESULT_BAR T2 where t2.zone_code = '001';
ZONE_CODE:000
423548909759
select rowid, T1.COMPOSE,T1.WARNING_TM,T1.WAYBILL_NO,T1.* from RMS.TT_WAYBILL_STATE T1 WHERE T1.COMPOSE like '%M%';
423548909759
--上面造的数据目的是为了KO表
K0(TT)表:TT.WAYBILL_NO, TT.ZONE_CODE, TT.WARNING_TM
TT.WAYBILL_NO:423548909759
TT.ZONE_CODE:000
TT.WARNING_TM:2016/12/7 10:00:00
-------------------------------------
select rowid,T.WHY_CODE,T.FEEDBACK_NO,T.* from RMS.TT_BAR_FEEDBACK T where t.feedback_no = '423548909759';
--K0.WAYBILL_NO = T.FEEDBACK_NO=423548909759
--T.WHY_CODE = '2'
select rowid,D.DEPT_CODE,D.DELETE_FLG,D.AREA_CODE,D.* from RMS.TM_DEPARTMENT D where D.Dept_Code = '000';
--K0.ZONE_CODE = D.DEPT_CODE=000
--D.DELETE_FLG = 0
/*关务编辑*/
SELECT *
FROM (SELECT CUSTOMS_WAYBILL_ID,
CUSTOMS_DT,
CUSTOMS_BATCHS,
FLIGHT_NUMBER,
MAIN_WAYBILL_NO,
WAYBILL_NO,
WEIGHT_QTY,
SHIPMENT_PORT,
DEST_PORT,
HIGH_RISK_TYPE,
CONS_NAME,
CONS_QTY,
CONS_VALUE,
1 AS ORDER_ID
FROM (SELECT NULL AS CUSTOMS_WAYBILL_ID,
K.PRE_CUSTOMS_DT AS CUSTOMS_DT,
K.CUSTOMS_BATCHS,
K.WAYBILL_ID,
NULL AS FLIGHT_NUMBER,
NULL AS MAIN_WAYBILL_NO,
K.WAYBILL_NO,
K.REAL_WEIGHT_QTY AS WEIGHT_QTY,
K2.S_NaME AS SHIPMENT_PORT,
K2.D_NamE AS DEST_PORT,
K1.COMPOSE AS HIGH_RISK_TYPE,
K3.CONS_NAME,
K3.CONS_QTY,
K3.CONS_VALUE,
ROW_NUMBER() OVER(PARTITION BY K1.WAYBILL_NO ORDER BY K1.MODIFY_TM DESC) RNO
FROM TT_WAYBILL K,
TT_WAYBILL_STATE K1,
TM_APPLY_TO_CUSTOM_BATCH K2,
TT_WAYBILL_CONSIGN K3
WHERE K.WAYBILL_NO = K1.WAYBILL_NO
AND K.WAYBILL_ID = K3.WAYBILL_ID
AND K.CUSTOMS_BATCHS = K2.BATCH_CODE
/* AND K.PRE_CUSTOMS_DT = TO_DATE('2017-1-10','yyyy-mm-dd')*/
AND K.CUSTOMS_BATCHS ='SZX0100MOW'
/* AND K.INPUT_TYPE_CODE = '1'*/
AND REGEXP_INSTR(K1.COMPOSE, '(X|M|K|T|S|L)') > 0
AND NOT EXISTS
(SELECT 1
FROM TT_CUSTOMS_WAYBILL K3
WHERE K.WAYBILL_NO = K3.WAYBILL_NO)) C
WHERE C.RNO = 1
UNION
SELECT T.CUSTOMS_WAYBILL_ID,
T.CUSTOMS_DT,
T.CUSTOMS_BATCHS,
T.FLIGHT_NUMBER,
T.MAIN_WAYBILL_NO,
T.WAYBILL_NO,
T.WEIGHT_QTY,
T.SHIPMENT_PORT,
T.DEST_PORT,
T.HIGH_RISK_TYPE,
T.CONS_NAME,
T.CONS_QTY,
T.CONS_VALUE,
2 AS ORDER_ID
FROM TT_CUSTOMS_WAYBILL T
WHERE T.CUSTOMS_DT = TO_DATE('2014-2-20','yyyy-mm-dd')
AND T.CUSTOMS_BATCHS ='HKG0900SZX') M
ORDER BY M.CUSTOMS_BATCHS ASC
--造数据的过程
select rowid,T.CUSTOMS_DT,T.CUSTOMS_BATCHS,t.* from TT_CUSTOMS_WAYBILL t;
/*关务管理--人工通缉*/
SELECT B.*
FROM (SELECT A.*, ROWNUM NUM
FROM (SELECT NULL AS MAIN_WAYBILL_NO,
K.WAYBILL_NO,
K.PRE_CUSTOMS_DT,
K.CUSTOMS_BATCHS
FROM TT_WAYBILL K
WHERE K.WAYBILL_NO = '444824316968'
AND (NOT EXISTS (SELECT 1
FROM TT_WAYBILL_STATE K1
WHERE K.WAYBILL_NO = K1.WAYBILL_NO
AND REGEXP_INSTR(K1.COMPOSE, 'T') > 0) OR NOT EXISTS
(SELECT 1
FROM TM_APPLY_TO_CUSTOM_BATCH B
WHERE K.CUSTOMS_BATCHS = B.BATCH_CODE) OR NOT EXISTS
(SELECT 1
FROM TT_WAYBILL_CONSIGN C
WHERE K.WAYBILL_ID = C.WAYBILL_ID))
AND NOT EXISTS
(SELECT 1
FROM TT_CUSTOMS_WAYBILL K3
WHERE K.WAYBILL_NO = K3.WAYBILL_NO)) A
WHERE ROWNUM <= 30) B
WHERE B.NUM >= 1
--随便看不太懂这个SQL,但是我造数据时,构造一票这张表TT_WAYBILL的Waybill_No等于TT_WAYBILL_STATE的Waybill_No,且这张表TT_WAYBILL_STATE的COMPOSE有等于T的值;
--我只把这个子查询的条件造好了就去查,就有符合的数据了:
SELECT 1
FROM TT_WAYBILL_STATE K1
WHERE K.WAYBILL_NO = K1.WAYBILL_NO
AND REGEXP_INSTR(K1.COMPOSE, 'T') > 0
--造数据的过程
SELECT K3.WAYBILL_NO,K3.* FROM TT_CUSTOMS_WAYBILL K3;
111111111111
852021498053
780864796535
781864796535
804048902140
423548909759
428548909759
select K.WAYBILL_NO,K3.WAYBILL_NO,K.*,K3.* from TT_WAYBILL K,TT_CUSTOMS_WAYBILL K3 WHERE K.WAYBILL_NO = K3.WAYBILL_NO;
--没有数据
select ROWID, K.WAYBILL_NO,K.* from TT_WAYBILL K where K.Waybill_No = '338274735498';
444824316968-----被我修改成高风险的数据,所以界面查询不出来了;
338274735498-----通过导入点击保存后变成高风险数据了,所以界面查询不出来了;
select K.WAYBILL_ID,C.WAYBILL_ID,K.*,C.* from TT_WAYBILL K,TT_WAYBILL_CONSIGN C WHERE K.WAYBILL_ID = C.WAYBILL_ID;
select rowid, K1.COMPOSE,K1.* from TT_WAYBILL_STATE K1 where K1.COMPOSE like '%T%';
444824316968-----被我修改成高风险的数据,所以界面查询不出来了;
338274735498-----通过导入点击保存后变成高风险数据了,所以界面查询不出来了;
/*进出口关务--高风险分值通缉查验分析*/
select t.CUSTOMS_DT, t.* from TT_IE_CUSTOMS_WAYBILL t;