You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
2.2 KiB
Transact-SQL
46 lines
2.2 KiB
Transact-SQL
select vtj.编号,vtj.主提单号,vtj.EDI代码, sum(数量) as 数量 from
|
|
( select v0.*,cctn.EDI代码 from
|
|
( SELECT ctn.[编号],s.主提单号,[数量],[表现形式]
|
|
FROM (select te.编号,te.主提单号 from t_op_seae te where 业务类型='普通货' AND 主提单号 in('574055195'
|
|
)) s
|
|
join [dbo].[t_op_ctn] ctn on ctn.编号=s.编号) v0 join t_code_ctn cctn on v0.表现形式=cctn.表现形式
|
|
) vtj group by vtj.编号,vtj.主提单号,vtj.EDI代码
|
|
|
|
select top 20 * , t.操作员,t.编号 as SEA编号 from t_op_seae t
|
|
|
|
|
|
select * from t_op_seae_ftpfile_bc
|
|
select b.F_TSR_TSR, * from t_op_seae_edi_rp_iftmbc b
|
|
select distinct -- s.运费协议号,s.运输方式,
|
|
s.运输条款 from t_op_seae s
|
|
|
|
|
|
|
|
----
|
|
select * from t_op_
|
|
|
|
INSERT INTO [t_op_task]
|
|
([任务编号] ,[上级任务号],[任务类型],[任务来源],[任务状态],[任务说明]
|
|
,[发起人] ,[录入日期] ,[任务开始时间] ,[完成方式] ,[完成时间] ,[KPI值]
|
|
,[提单号],[文件编号],[邮件编号],[电子档案路径],[是否公共],[任务相关人员],[SEA编号])
|
|
VALUES({0},NULL,'IFTMBC','FTP','未开始',{1},
|
|
'DEMO-SA',getdate(),{2},'手动',NULL,NULL,
|
|
{3},{4},NULL,{5},{6},{7},{8};
|
|
|
|
|
|
----
|
|
select v1.*,case when sea.操作员 IS null then 1 else 0 end as 是否公共, sea.操作员,sea.编号 from
|
|
(
|
|
SELECT newid() as [任务编号],null as [上级任务号], [fileType] as [任务类型],
|
|
'FTP' as [任务来源],
|
|
case [fileType] when 'ADVANCE' then '未开始' when 'APPROVED' then '挂单待确认'
|
|
when 'ORIGINAL' then '等待挂单' when 'SEAWAY' then '挂单待确认' else '未开始' end as [任务状态],
|
|
case [fileType] when 'ADVANCE' then 'Verify Copy' when 'APPROVED' then '已获得贵司确认的copy'
|
|
when 'ORIGINAL' then '正本提单' when 'SEAWAY' then 'Seaway Bill' else [fileType] end [任务说明],
|
|
'DEMO-SA' as [发起人],GETDATE() as [录入日期],lastmodi_date as[任务开始时间], '手动' as [完成方式],null as [完成时间] ,null as [KPI值] ,
|
|
'' as [业务编号],
|
|
ReportID as [文件编号], null as [邮件编号],
|
|
[local_path] +'\'+ [ftp_filename] as [电子档案路径] from t_op_seae_ftpfile_bc
|
|
where ReportID='ea1dfd4067d54c31a57a8924dc1e3952'
|
|
) v1 left join (select s.主提单号,s.业务编号,s.操作员,s.编号 from t_op_seae s where s.业务类型='普通货' )
|
|
sea on v1.[业务编号]=sea.主提单号 |