{"text_format":"2","workbook":"xlsx","n_sheets":3,"sheets":["Sheet1","Sheet2","Sheet3"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Sheet1","index":0,"n_rows":21,"n_cols":5,"rows_kept":21,"cut":false,"hidden":false,"merged":[]}
["基础信息","安全","资源  ","安全SQL","资源SQL"]
["港口","无","T_GKZY_GK",null,"update GK_BASIC_JSJY_GK_Gk t1 set t1.zyid =(select t2.id from T_GKZY_GK@Zyxt_Link t2 where t1.gkdm=t2.gkdm) "]
["港区","T_YJPT_GQ","T_GKZY_GQ","update GK_BASIC_JSJY_GK_GQ t1 set t1.aqid=(select t2.id from aq.T_YJPT_GQ t2 where t1.gqmc = t2.gqmc and t1.szd = substr(t2.szd,0,5))\n\ninsert into GK_BASIC_JSJY_GK_GQ(id,aqid,Szd,Gqmc,Gqdm,GQSZSYLX, record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t1.id,substr(t1.szd,0,5),t1.gqmc,t1.szd,c.id,1,'aq1', systimestamp,'aq1', systimestamp from  aq.T_YJPT_GQ t1,GK_OPERATION_JSJY_CODE c where t1.gqmc not in (select t2.gqmc from GK_BASIC_JSJY_GK_GQ t2 ) and t1.record_status !=9 and t1.gqszsylx is not null and c.yjptid=t1.gqszsylx) \n\n需要手动调整","insert into GK_BASIC_JSJY_GK_GQ(id,zyid,szd,szgk,gqszsylx,gqmc,gqdm,gqms,gqmj,lymj,symj,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),gq.id,gk.szd,gk.id,1201,gq.gqmc,gq.gqdm,gq.gqms,gq.gqmj,gq.lymj,gq.symj ,1,'admin', systimestamp,'admin', systimestamp from GK_BASIC_JSJY_GK_GK gk ,T_GKZY_GQ@ZYXT_LINK gq where gk.gkdm = gq.szgk and gq.gqdm in (select gq.gqdm from T_GKZY_GQ@ZYXT_LINK gq where not exists (select 1 from GK_BASIC_JSJY_GK_GQ t where t.gqdm = gq.gqdm)))\n\nupdate GK_BASIC_JSJY_GK_GQ t1 set t1.zyid=(select t2.id from T_GKZY_GQ@ZYXT_LINK t2 where t1.gqdm=t2.gqdm)\n\nupdate GK_BASIC_JSJY_GK_GQ t1 set(t1.gqszsylx,t1.gqms,t1.gqmj,t1.lymj,t1.symj)= (select 1201,t2.gqms,t2.gqmj,t2.lymj,t2.symj from T_GKZY_GQ@ZYXT_LINK t2  where t1.zyid=t2.id)\n\nupdate GK_BASIC_JSJY_GK_GQ set gqszsylx=1201 where gqszsylx is null"]
["作业区","无","T_GKZY_ZYQ",null,"insert into gk_basic_jsjy_gk_zyq(id,zyid, zyqmc, zyqyt, szgk, szgq, szd, bz, record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id ,t.ZYQMC,t.yt,gk.id,gq.id,gq.szd,t.bz,1,'admin', systimestamp,'admin', systimestamp\nfrom T_GKZY_ZYQ@zyxt_link t\nleft join gk_basic_jsjy_gk_gk gk on t.SZGK=gk.GKDM\nleft join gk_basic_jsjy_gk_gq gq on t.SZGQ=gq.GQDM)\n\n"]
["锚地","无",null,null,"insert into GK_BASIC_JSJY_GK_MD(id,SZD,SZGK,MDMC,ZYYT,MDWZ,MDSS,MDMJ,XBNL,BZ,MDCD,MDKD,ZYID,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),gk.szd,gk.id,md.mdmc,md.zyyt,md.MDWZ,md.MDSS,md.MDMJ,md.MDXBNL,md.BZ,md.MDCD,md.MDKD,md.id,1,'admin', systimestamp,'admin', systimestamp from GK_BASIC_JSJY_GK_GK gk ,T_GKZY_MD_XZ@zyxt_link md where gk.gkdm = md.szgk )"]
["岸线","无",null,null,"insert into GK_BASIC_JSJY_GK_AX(id,zyid,szd,szgk,szgq,axmc,axlx,axcd,lyzt,nba,qdzb,zdzb,axgn,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),zy.id,gk.szd,gk.id,gq.id,zy.axmc,zy.axlx,zy.axcd,zy.zt,zy.nba,zy.zb1,zy.zb2,zy.axgnlx,1,'admin', systimestamp,'admin', systimestamp from GK_BASIC_JSJY_GK_GK gk,GK_BASIC_JSJY_GK_GQ gq,T_GKZY_AX_XZ@Zyxt_Link zy where zy.SZGK = gk.gkdm and zy.SZGQ=gq.gqdm )\n\nupdate GK_BASIC_JSJY_GK_AX t1 set t1.SSJYR=(select t2.id from GK_BASIC_JSJY_JYR t2,T_GKZY_AX_XZ@Zyxt_Link t3 where t2.zyid=t3.gkjyr and t1.zyid=t3.id);\n\nupdate GK_BASIC_JSJY_GK_AX t1 set t1.axlx=(select t2.bmmc from GK_BASIC_GKZY_SJZD t2 where t2.bm=t1.axlx and t2.lbbm='AXGN')\n\nupdate GK_BASIC_JSJY_GK_AX t1 set t1.axgn=(select t2.bmmc from GK_BASIC_GKZY_SJZD t2 where t2.bm=t1.axgn and t2.lbbm='AXGHZYGNYT')\n\nupdate GK_BASIC_JSJY_GK_AX t set t.LYZT=(select c.text from GK_OPERATION_JSJY_CODE c where c.val=t.LYZT and c.pid='2' );\n"]
["防波堤","无","无"]
["进港航道","无","无"]
[]
["经营人基本信息","T_YJPT_JYRJCXX","T_GKZY_GKJYR","--更新相同名称并所在地相同的经营人信息\nupdate GK_BASIC_JSJY_JYR t set t.aqid = (select t1.id from aq.T_YJPT_JYRJCXX t1 where exists (select 1 from GK_BASIC_JSJY_JYR t2 where t1.gkjyr = t2.gkjyr and substr(t1.szd,0,5)=t2.szd) and t1.record_status !=9 and t1.gkjyr = t.gkjyr)\n\n--插入数据\ninsert into GK_BASIC_JSJY_JYR(id,aqid,SZD,Szgk,Szgq，gkjyr,qyxz,yzbm,bgdz,gkjyxkzh,fzrq,fzjg,jyfw,jyqy,zyhz,fddbr,lxdh,cz,aqbmfzr,aqfzrlxdh,aqfzrsj,gsyyzzbh,tzze,zczb,gkwxhwzyfzbh,gkssbafhzsbh,bafzjg,bafzrq,bayxq,zywxhwpm,sfwhqy,fzyxq,qyzzjgdm,sshydl,sshyz,qyaqdj,rs,aqzgbm,aqgljg,zzagrysl,zcze,xsje,aqfzrzbdh,gjjgdm,sfzdsp,parent_jyr_id,xzqh,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id,substr(t.szd,0,5),gq.szgk,gq.id,t.gkjyr,t.qyxz,t.yzbm,t.bgdz,t.gkjyxkzh,t.fzrq,t.fzjg,t.jyfw,t.jyqy,t.zyhz,t.fddbr,t.lxdh,t.cz,t.aqbmfzr,t.aqfzrlxdh,t.aqfzrsj,t.gsyyzzbh,t.tzze,t.zczb,t.gkwxhwzyfzbh,t.gkssbafhzsbh,t.bafzjg,t.bafzrq,t.bayxq,t.zywxhwpm,case when t.sfwhqy='Y' then '201' else '202' end,t.fzyxq,t.qyzzjgdm,t.sshydl,t.sshyz,t.qyaqdj,t.rs,t.aqzgbm,t.aqgljg,t.zzagrysl,t.zcze,t.xsje,t.aqfzrzbdh,t.gjjgdm,case when t.sfzdsp='Y' then '201' else '202' end,t.parent_jyr_id,t.xzqh,1,'aq', systimestamp,'aq', systimestamp\nfrom aq.T_YJPT_JYRJCXX t,GK_BASIC_JSJY_GK_GQ gq\nwhere t.record_status!=9 and t.szgq=gq.aqid)\n\n--企业类型 27\nupdate GK_BASIC_JSJY_JYR t set t.qylx=(select c.id from aq.T_YJPT_JYRJCXX t1,GK_OPERATION_JSJY_CODE c where t1.qylx=c.yjptid and t1.id=t.aqid);\n\n--所属行业大类 28\nupdate GK_BASIC_JSJY_JYR t set t.sshydl=(select c.id from aq.T_YJPT_JYRJCXX t1,GK_OPERATION_JSJY_CODE c where t1.sshydl=c.yjptid and t1.id=t.aqid);\n\n--所属行业中类 29\nupdate GK_BASIC_JSJY_JYR t set t.sshyz=(select c.id from aq.T_YJPT_JYRJCXX t1,GK_OPERATION_JSJY_CODE c where t1.sshyz=c.yjptid and t1.id=t.aqid);","insert into GK_BASIC_JSJY_JYR (id,szd,szgk,szgq,gkjyr,zyid,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),gk.szd,gk.id,gq.id,jyr.GKJYRMC,jyr.id,1,'admin', systimestamp,'admin', systimestamp   from GK_BASIC_JSJY_GK_GK gk,GK_BASIC_JSJY_GK_GQ gq,T_GKZY_GKJYR@zyxt_link jyr where jyr.SZGK = gk.gkdm and jyr.SZGQ=gq.gqdm )\n\nupdate GK_BASIC_JSJY_JYR t set t.zyq=(select t1.id from GK_BASIC_JSJY_GK_ZYQ t1,T_GKZY_GKJYR@zyxt_link t2 where t1.zyid =t2.zyq and t.zyid=t2.id )"]
["许可证","无","无"]
["许可证附证","T_YJPT_GKWXHWZYFZBLHHZ\nT_YJPT_GKWXHWZYFZBL_FZ",null,"--插入数据\ninsert into GK_SHARE_JSJY_WHZYFZ(id,aqid,szd,ssjyr,szgk,szgq,dz,fddbr,aqgljg,aqfz,gqgljgfzrxm,gqgljgfzrzc,gqgljgfzrlxdh,gqgljgfzrdzyx,zyfs,wxhwpm,fzsj,fzjg,yxqkssj,yxqjssj,gkjyxkz,zycs,cq,whdj,qynbmc,fzsqh,sqtbrq,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id,substr(t.szd,0,5),jyr.id,gq.szgk,gq.id,t.dz,t.fddbr,t.aqgljg,t.aqfz,t.gqgljgfzrxm,t.gqgljgfzrzc,t.gqgljgfzrlxdh,t.gqgljgfzrdzyx,t.zyfs,t.zywxhwpm,t.fzsj,t.fzjg,t.yxqkssj,t.yxqjssj,t.gkjyxkz,t.zycs,t.cq,t.whdj,t1.qynbmc,t1.fzcsbh,t.sqtbrq ,1,'aq', systimestamp,'aq', systimestamp \nfrom aq.T_YJPT_GKWXHWZYFZBLHHZ t,aq.t_yjpt_gkwxhwzyfzbl_fz t1,GK_BASIC_JSJY_JYR jyr,GK_BASIC_JSJY_GK_GQ gq where jyr.aqid=t.jyr and gq.aqid=t.ssgq and jyr.szgq=gq.id and t.record_status!=9 and t1.fzsq is not null and t1.record_status !=9 and t1.fzsq=t.id);\n\n--作业场所 42\nupdate GK_SHARE_JSJY_WHZYFZ t set t.zycs=(select c.id from GK_OPERATION_JSJY_CODE c where t.zycs=c.yjptid);\n\n--产权 43\nupdate GK_SHARE_JSJY_WHZYFZ t set t.cq=(select c.id from GK_OPERATION_JSJY_CODE c where t.cq=c.yjptid);\n\n--危货等级 44\nupdate GK_SHARE_JSJY_WHZYFZ t set t.whdj=(select c.id from GK_OPERATION_JSJY_CODE c where t.whdj=c.yjptid);"]
["码头","T_YJPT_GQ_MT",null,"--更新相同名称并所在地相同的码头的安全主键\nupdate GK_BASIC_JSJY_JYR_MT t set t.aqid = (select t1.id from aq.T_YJPT_GQ_MT t1 where t.mtmc = t1.mtmc and t1.record_status !=9 and substr(t1.szd,0,5)=t.szd)\n--插入数据\ninsert into GK_BASIC_JSJY_JYR_MT(id,aqid,SZD,Szgk,Szgq,mtmc,nhwtgnl,sjhwttl,sjlkttl,nlktgnl,njzxtgnl,mtsjqyss,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id,substr(t.szd,0,5),gq.szgk,gq.id,t.mtmc,t.nhwtgnl,t.sjhwttl,t.sjlkttl,t.nlktgnl,t.njzxtgnl,t.mtsjqyss,1,'aq', systimestamp,'aq', systimestamp from aq.T_YJPT_GQ_MT t,GK_BASIC_JSJY_GK_GQ gq where t.record_status!=9 and t.gq=gq.aqid and )\n\n--手动合并资源和安全共有的码头信息\nselect * from GK_BASIC_JSJY_JYR_MT where aqid in (select t1.aqid from GK_BASIC_JSJY_JYR_MT t1  group by t1.aqid having count(t1.aqid)>1) for update\n\n--更新经营人\nupdate GK_BASIC_JSJY_JYR_MT t set t.ssjyr=(select c.id from aq.T_YJPT_GQ_MT t1,GK_BASIC_JSJY_JYR_MT c where t1.id=c.aqid and t1.id=t.aqid) where t.ssjyr is null;","insert into GK_BASIC_JSJY_JYR_MT(id,zyid,szd,szgk,szgq,mtmc,mtcd,sfdwkf,sfwhp,fwlx,mtxsdm，record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),zy.id,gk.szd,gk.id,gq.id,zy.mtmc,zy.gzmtcd,zy.dwkf,zy.wxp,zy.mtfwlx,zy.jglx,1,'admin', systimestamp,'admin', systimestamp from GK_BASIC_JSJY_GK_GK gk,GK_BASIC_JSJY_GK_GQ gq,T_GKZY_MT@Zyxt_Link zy where zy.SZGK = gk.gkdm and zy.SZGQ=gq.gqdm);\n\nupdate GK_BASIC_JSJY_JYR_MT t1 set t1.SZZYQ=(select t2.id from GK_BASIC_JSJY_GK_ZYQ t2,T_GKZY_MT@Zyxt_Link t3 where t2.zyid=t3.szzyq and t1.zyid=t3.id);\n\nupdate GK_BASIC_JSJY_JYR_MT t1 set t1.SZAX=(select t2.id from GK_BASIC_JSJY_GK_AX t2,T_GKZY_MT@Zyxt_Link t3 where t2.zyid=t3.syax and t1.zyid=t3.id);\n\nupdate GK_BASIC_JSJY_JYR_MT t1 set t1.SSJYR=(select t2.id from GK_BASIC_JSJY_JYR t2,T_GKZY_MT@Zyxt_Link t3 where t2.zyid=t3.gkjyr and t1.zyid=t3.id);\n\nupdate GK_BASIC_JSJY_JYR_MT t set t.fwlx=(select c.id from GK_OPERATION_JSJY_CODE c where c.val=t.fwlx and c.pid='17' );\n\nupdate GK_BASIC_JSJY_JYR_MT t set t.SFDWKF=(select c.id from GK_OPERATION_JSJY_CODE c where c.val=t.SFDWKF and c.pid='2' );\n\nupdate GK_BASIC_JSJY_JYR_MT t set t.SFWHP=(select c.id from GK_OPERATION_JSJY_CODE c where c.val=t.SFWHP and c.pid='2' );"]
["泊位","T_YJPT_JYRXX_BW","无","--插入数据\ninsert into GK_BASIC_JSJY_JYR_BW(id,aqid,szd,szgk,szgq,Ssjyr,bwmc,tcnf,jgysnf,qysjsh,qysjss,bwcd,wxpbw,sjtgnl,sjkpnl,nhwtgnl,nwxhwttl,jd,wd,sffz,zyrkfw,hckpnl,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id,substr(t.szd,0,5),gq.szgk,gq.id,jyr.id,t.bwmc,t.tcnf,t.jgysnf,to_number(trim(t.qysjsh)),to_number(trim(t.qysjss)),to_number(trim(t.bwcd)),case when t.wxpbw='Y' then '201' else '202' end,t.sjtgnl,t.sjkpnl,t.nhwtgml,t.nwxhwttl,t.jd,t.wd,case when t.sffz='Y' then '201' else '202' end,t.zyrkfw,t.hckpnl,1,'aq', systimestamp,'aq', systimestamp \nfrom aq.T_YJPT_JYRXX_BW t,GK_BASIC_JSJY_GK_GQ gq,GK_BASIC_JSJY_JYR jyr\nwhere t.record_status!=9 and t.szgq=gq.aqid and t.qymc=jyr.aqid);\n--泊位属性 32\nupdate GK_BASIC_JSJY_JYR_BW t set t.bwsx=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.bwsx)=t2.yjptid);\n\n--泊位所在水系 12\nupdate GK_BASIC_JSJY_JYR_BW t set t.bwszsx=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.bwszsx)=t2.yjptid);\n\n--服务类型 17\nupdate GK_BASIC_JSJY_JYR_BW t set t.fwlx=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.fwlx)=t2.yjptid);\n\n--结构型式 31\nupdate GK_BASIC_JSJY_JYR_BW t set t.jgxs=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.jgxs)=t2.yjptid);\n\n--生产类型 33\nupdate GK_BASIC_JSJY_JYR_BW t set t.sclx=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.sclx)=t2.yjptid);\n\n--专业化泊位分类 16\nupdate GK_BASIC_JSJY_JYR_BW t set t.zyhbwfl=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_OPERATION_JSJY_CODE t2 where t1.id=t.aqid and to_char(t1.zyhbwfl)=t2.yjptid);\n\n--码头名称\nupdate GK_BASIC_JSJY_JYR_BW t set t.ssmt=(select t2.id from aq.T_YJPT_JYRXX_BW t1,GK_BASIC_JSJY_JYR_MT t2 where t1.id=t.aqid and t1.mtmc=t2.aqid);\n\n--所在地\nupdate GK_BASIC_JSJY_JYR_BW t set t.szd=(select gk.szd from GK_BASIC_JSJY_GK_GK gk where t.szgk=gk.id);\n\n--经营人\nupdate GK_BASIC_JSJY_JYR_BW t set t.ssjyr=(select jyr.id from aq.t_yjpt_jyrxx_bw b,aq.t_yjpt_jyrjcxx j,GK_BASIC_JSJY_JYR jyr where b.qymc=j.id and b.id = t.aqid and j.id=jyr.aqid) where t.ssjyr is null and t.aqid is not null\n\n--将万吨转化为吨\nupdate gk_basic_jsjy_jyr_bw set sjkpnl= sjkpnl*10000 where zyid is null and aqid is not null and sjkpnl<=100;\nupdate gk_basic_jsjy_jyr_bw set sjtgnl= sjtgnl*10000 where zyid is null and aqid is not null and sjtgnl<=100;\nupdate gk_basic_jsjy_jyr_bw set hckpnl= hckpnl*10000 where zyid is null and aqid is not null and hckpnl<=100;","insert into GK_BASIC_JSJY_JYR_BW(id,zyid,szd,Szgk,Szgq,Ssjyr,Ssmt,Bwmc,Bwdm,Qysjss,Qysjsh,Sjkpnl,Bwcd,Sjtgnl,Tcnf,Jgysnf,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),zy.id,gk.szd,gk.id,gq.id,jyr.id,mt.id,zy.bwmc,zy.bwdm,to_number(zy.mtqysjss),to_number(zy.mtqywhss),zy.sjkbnl,zy.bwcd,to_number(trim(zy.bwnhwtgnl)),zy.tcnf,zy.jgysnf,1,'admin', systimestamp,'admin', systimestamp from GK_BASIC_JSJY_GK_GK gk,GK_BASIC_JSJY_GK_GQ gq,GK_BASIC_JSJY_JYR jyr,GK_BASIC_JSJY_JYR_MT mt,T_GKZY_BW@Zyxt_Link zy where zy.SZGK = gk.gkdm and zy.SZGQ=gq.gqdm and jyr.zyid=zy.gkjyr and mt.zyid=zy.szmt);\n\n\n--泊位服务类型 17\nupdate GK_BASIC_JSJY_JYR_BW t set t.fwlx=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='17'and bw.bwfwlx=c.val );\n--泊位属性 15\nupdate GK_BASIC_JSJY_JYR_BW t set t.bwsx=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='15'and bw.bwsx=c.val );\n--泊位主要用途 18\nupdate GK_BASIC_JSJY_JYR_BW t set t.bwyt=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='18'and bw.bwyt=c.val );\n--所在作业区\nupdate GK_BASIC_JSJY_JYR_BW t set t.sszyq=(select zyq.id from GK_BASIC_JSJY_GK_ZYQ zyq,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and bw.szzyq= zyq.zyid );\n--所在码头\nupdate GK_BASIC_JSJY_JYR_BW t set t.ssmt=(select mt.id from GK_BASIC_JSJY_JYR_MT mt,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and bw.szmt= mt.zyid );\n--是否对外开发泊位 2\nupdate GK_BASIC_JSJY_JYR_BW t set t.sfdwkf=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='2'and bw.sfdwkf=c.val );\n--是否危化品泊位 2\nupdate GK_BASIC_JSJY_JYR_BW t set t.WXPBW=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='2'and bw.sfwhp=c.val );\n--泊位所在水系 12\nupdate GK_BASIC_JSJY_JYR_BW t set t.BWSZSX=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='12'and bw.szsx=c.val );\n--生产类型 26\nupdate GK_BASIC_JSJY_JYR_BW t set t.sclx=(select c.id from GK_OPERATION_JSJY_CODE c,T_GKZY_BW@Zyxt_Link bw where bw.id=t.zyid and c.pid='26'and bw.sclx=c.val );"]
["储罐","T_YJPT_CG","无","--同步语句\ninsert into GK_BASIC_JSJY_JYR_CG(id,ssjyr,whzyfzbh,qyccbh,scjyhdlx,cchxppzsl,zxgyjzysb,cccscq,gkzdwxybh,gkzdwxybabh,cgqmc,jtwz,cgzb,cgqmj,cggs,cgmc,cgxh,ywfhd,gjzxjl,cgcz,cgrj,cgxs,cgazxs,wzzt,cgwx,sjyl,sjgzyl,sjwd,sjgzwd,tcsj,\nsjsynx,jlfs,clfs,fjdsssfnjjzs,zsbh,tbr,lxdh,tbsj,hysl,hysm,bdzzsl,bdzzsm,qtsl,qtsm,mapid,hxpmc,hxppz,hxpsl,update_user,record_status,szd,szgq,zdwxycggs,zdwxycgrl,aqgd,zj,wxydj,create_date_time,update_date_time,create_user,szgk,\nssgkglbm,aqid)(select sys_guid(),a.id,c.WHZYFZBH,c.QYCCBH,case when c.SCJYHDLX='cc' then '3401' else null end,c.CCHXPPZSL,c.ZXGYJZYSB,case when c.CCCSCQ='zy' then '3501' when c.CCCSCQ='zl' then  '3502' else null  end,c.GKZDWXYBH,\nc.GKZDWXYBABH,c.CGQMC,c.JTWZ,c.CGZB,c.CGQMJ,c.CGGS,c.CGMC,c.CGXH,case when c.YWFHD='有' then '501' when c.YWFHD='无' then '502'  else null end,c.GJZXJL,case when c.CGCZ='1' then '3001' when c.CGCZ='2' then '3002' when c.CGCZ='3' then '3003' else null  end,\nc.CGRJ,case when c.CGXS='cc' then '3601' when c.CGXS='sc' then  '3602' else null  end,case when c.CGAZXS='ds' then '3701' when c.CGAZXS='dx' then '3702' when c.CGAZXS='bds' then '3703' else null  end,\ncase when c.WZZT='yt' then '3801' when c.WZZT='qt' then '3802' when c.WZZT='yqt' then '3803' else null  end,\ncase when c.CGWX='ls' then '3901' when c.CGWX='qx' then '3902' when c.CGWX='ws' then '3903' when c.CGWX='qxg' then '3904'  else null  end,c.SJYL,c.SJGZYL,c.SJWD,c.SJGZWD,c.TCSJ,c.SJSYNX,\ncase when c.JLFS='gd' then '4001' when c.JLFS='cc' then  '4002' else null  end,case when c.CLFS='gd' then '4101' when c.CLFS='cc' then  '4102' else null  end,case when c.FJDSSSFNJJZS='s' then '201' else '202' end,\nc.ZSBH,c.TBR,c.LXDH,c.TBSJ,c.HYSL,c.HYSM,c.BDZZSL,c.BDZZSM,c.QTSL,c.QTSM,c.MAPID,c.HXPMC,c.HXPPZ,c.HXPSL,'aq',1,b.szd,b.id,c.ZDWXYCGGS,c.ZDWXYCGRL,c.AQGD,c.ZJ,c.WXYDJ,systimestamp,systimestamp,'aq',b.szgk,'',\nc.ID from GK_BASIC_JSJY_JYR a,GK_BASIC_JSJY_GK_GQ b,aq.T_YJPT_CG c where c.record_status!=9 and c.GQ=b.aqid and a.aqid=c.DWMC)\n\n--危险源等级 10\nupdate GK_BASIC_JSJY_JYR_CG t set t.WXYDJ=(select c.id from aq.t_yjpt_cg t1,GK_OPERATION_JSJY_CODE c where to_char(t1.WXYDJ)=c.yjptid and t1.id=t.aqid);"]
["仓库","T_YJPT_JYRXX_CK","无","--插入数据\ninsert into GK_BASIC_JSJY_JYR_CK(id,Aqid,Ssjyr,Szd,szgq,ckmc,Wxpck,ckgs,ythgcgrj,scyckmj,wxpckmj,scyckrj,ykrj,cpyrj,jd,wd,record_status, create_user, create_date_time, update_user, update_date_time)\n(select sys_guid(),t.id,jyr.id,substr(t.szd,0,5),gq.id,t.ckmc,case when t.wxpck='Y' then '201' else '202' end,t.ckgs,t.ythgcgrj,t.scyckmj,t.wxpckmj,t.scyckrj,t.ykrj,t.cpyrj,t.jd,t.wd,1,'aq', systimestamp,'aq', systimestamp \nfrom aq.T_YJPT_JYRXX_CK t,GK_BASIC_JSJY_JYR jyr,GK_BASIC_JSJY_GK_GQ gq where jyr.aqid=t.ssjyr and gq.aqid=t.gq and jyr.szgq=gq.id and t.record_status!=9 )\n"]
["堆场","T_YJPT_JYRXX_DC","无","--插入数据\ninsert into GK_BASIC_JSJY_JYR_DC(id,szd,szgq,ssjyr,ssmt,dcmc,scydcyt,dczmj,dczrl,jzxmj,jzxdcdcnl,wxpxdcmj,wxpxdcdcnl,jd,wd,jtjgisdyidh,wxpdc,zwdcyt,create_date_time,update_date_time,record_status,create_user,update_user,szgk,ssgkglbm,aqid)\n(select sys_guid(),b.szd,b.id,a.id,'',c.dcmc,'',c.dczmj,c.dczrl,c.jzxmj,c.jzxdcdcnl,c.wxpxdcmj,c.wxpxdcdcnl,c.jd,c.wd,c.jtjgisdyidh,case when c. wxpdc='Y' then '201' else '202' end,c.zwdcyt,systimestamp,systimestamp,1,'aq','aq',b.szgk,'',c.id  \nfrom GK_BASIC_JSJY_JYR a,GK_BASIC_JSJY_GK_GQ b,aq.T_YJPT_JYRXX_DC c where c.record_status!=9 and c.SZGQ=b.aqid and a.aqid=c.QYMC);\n--码头同步操作\nupdate GK_BASIC_JSJY_JYR_DC t set t.ssmt=(select b.id from aq.t_yjpt_jyrxx_dc a,gk_basic_jsjy_jyr_mt b where a.mtmc=b.aqid and a.id=t.aqid);"]
["人员及持证","T_YJPT_JYRDRYXX\nT_YJPT_RYQKHZ_ZS\n","无","--人员\ninsert into gk_basic_jsjy_jyr_ry(id,xm,xb,zwhzc,lxdh,sjhm,ssjyr,csrq,sfzh,szd,szgq,rylx,bz,szgk,ssgkglbm,\naqid, record_status, create_user, create_date_time, update_user, update_date_time)\n(select\nsys_guid(),aqry.xm,aqry.xb, aqry.zwhzc, aqry.lxdh, aqry.sjhm, jyr.id,aqry.csrq,aqry.sfzh,substr(aqry.szd,0,5),gq.id, rylx.id,aqry.bz,gq.szgk, gq.ssgkglbm,\naqry.id,1,'aq', systimestamp,'aq', systimestamp\nfrom aq.t_yjpt_jyrdryxx aqry\njoin gk_basic_jsjy_jyr jyr on aqry.ssjyr = jyr.aqid\njoin gk_basic_jsjy_gk_gq gq on jyr.szgq=gq.id\njoin gk_operation_jsjy_code rylx on rylx.yjptid = to_char(aqry.rylx)\nwhere aqry.record_status<>9);\n\n--证书\ninsert into gk_basic_jsjy_jyr_ry_zs(id,zsmc,zsbh,fzbm,yxq,szd,sfzh,\naqid, record_status, create_user, create_date_time, update_user, update_date_time)\n(select\nsys_guid(),aqzs.zsmc,aqzs.zsbh,'',aqzs.yxq,substr(aqzs.szd,0,5),aqzs.ryid,\naqzs.id,1,'aq', systimestamp,'aq', systimestamp\nfrom aq.t_yjpt_ryqkhz_zs aqzs\nwhere aqzs.record_status<>9);\n"]
["企业投资","无","无"]
["设施设备","T_YJPT_GKSSSB","无","insert into GK_BASIC_JSJY_JYR_SSSB(id,ssmc,ssjyr,tbr,lxdh,szd,szgq,yjfl,ejfl,ggxh,sldw,sl,yxq,cfcs,bz,create_user,update_user,create_date_time,update_date_time,record_status,ssgkglbm,szgk,aqid)\n(select sys_guid(),c.ssmc,a.id,c.tbr,c.lxdh,b.szd,b.id,'','',c.ggxh,c.sldw,c.sl,c.yxq,c.cfcs,c.bz,'aq','aq',systimestamp,systimestamp,1,'',b.szgk,c.id from GK_BASIC_JSJY_JYR a,GK_BASIC_JSJY_GK_GQ b,aq.T_YJPT_GKSSSB c \nwhere c.record_status!=9 and c.SZGQ=b.aqid and a.aqid=c.QYMC);\n--一级分类同步操作\nupdate GK_BASIC_JSJY_JYR_SSSB t set t.yjfl=(select b.id from aq.T_YJPT_GKSSSB a,GK_OPERATION_JSJY_CODE b where to_char(a.yjfl)=b.yjptid and t.aqid=a.id);\n--二级分类同步操作\nupdate GK_BASIC_JSJY_JYR_SSSB t set t.ejfl=(select b.id from aq.T_YJPT_GKSSSB a,GK_OPERATION_JSJY_CODE b where to_char(a.ejfl)=b.yjptid and t.aqid=a.id);"]
["AIS船舶基本信息与海事船舶信息关联表","GK_BASIC_SHIP_RELATION",null,"\ncreate table tmp as (select zwcm,cbbh,ywcm from GK_SHARE_DTYW_CBJBXX where ywcm not in(select t1.ywcm from GK_SHARE_DTYW_CBJBXX t1,GK_SHARE_DTYW_CBJBXX t2 where t1.ywcm=t2.ywcm and t1.ywcm is not null group by t1.ywcm having count(1)>1));\n\nupdate GK_BASIC_SHIP_RELATION t set (t.hs_name,t.hs_cbbh)=(select c.zwcm,c.cbbh from tmp c where c.ywcm=t.ais_name);\n\ndrop table tmp;"]

{"sheet":"Sheet2","index":1,"n_rows":0,"n_cols":0,"rows_kept":0,"cut":false,"hidden":false,"merged":[]}

{"sheet":"Sheet3","index":2,"n_rows":0,"n_cols":0,"rows_kept":0,"cut":false,"hidden":false,"merged":[]}