--清库脚本说明:
-- prtno: 01030100000005
-- '01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010111000002','01010111000003','01010111000004','01010111000005','01010111000006'
-- '01010111000007','01010111000008','01010111000009','01010111000010'
-- grocontno : 654201700002558
--前3个 contno 是个人 后面是团体
-- contno: '154201600002048','154201600000808','154201600001698',
-- '154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
-- '154201700009808','154201700009918','154201700010048','154201700010158'
--删除银行账户 第一个是团体,后3个是个人的
delete from LYBankLog;
delete from lcbankacc a where a.businessno not in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01030100000005','01010120160802','01010120160810','01010122170101');
--影像删除脚本(第一个是团体prtno,后3个是个单埋单的prtno)
delete from es_doc_pages where docid not in (select docid from es_doc_main where doccode in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010111000003','01010111000004','01010111000005','01010111000006','01030100000005','01010120160802','01010122170101','01010120160810'));
delete from es_doc_property where docid not in (select docid from es_doc_main where doccode in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01030100000005','01010120160802','01010122170101','01010120160810'));
delete from es_doc_relation where docid not in (select docid from es_doc_main where doccode in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01030100000005','01010120160802','01010122170101','01010120160810'));
delete from es_doc_main where doccode not in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01030100000005','01010120160802','01010122170101','01010120160810');
--暂存费
delete from LJTempFee where otherno not in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010120160802','01010122170101','01010120160810');
delete from LJTempFeeClass where tempfeeno not in (select LJTempFee.Tempfeeno from LJTempFee where otherno in ('01010111000007','01010111000008','01010111000009','01010111000010','01010111000001',
'01010111000002','01010111000003','01010111000004','01010111000005','01010111000006','01010120160802','01010122170101','01010120160810'));
delete from LACommisionDetail where grpcontno not in ('654201700002558');
--保单删除脚本(3个是个单,后面都是团单的)
delete from lcaddress where customerno not in (
select appntno from lccont where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
) union
(select insuredno from lccont where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
)));
--防止上期做过保全地址修改,而导致地址变化
UPDATE lcaddress SET postaladdress = '西藏拉萨城关区江苏东路茂源小区3号301室'
WHERE customerno = '0001258106' and modifydate >= date '2017-04-05';
UPDATE lcaddress SET homeaddress = '茂源小区3号301室'
WHERE customerno = '0001258106' and modifydate >= date '2017-04-05';
UPDATE lcaddress SET street = '江苏东路'
WHERE customerno = '0001258106' and modifydate >= date '2017-04-05';
delete from LACommisionDetail where grpcontno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
);
delete from lcbnf where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
);
delete from LCPrem where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCGet where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
);
delete from LCAppnt where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'
);
delete from LCInsured where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCContState where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LOloan where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LASPayPerson where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJAPayPerson where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJAPay where incomeno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJSPayPerson where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJSPay where otherno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJSGet where otherno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LJAGet where otherno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from ljagetendorse where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lobonuspol where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureacc where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureaccclass where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureacctrace where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureaccfee where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureaccclassfee where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lcinsureaccfeetrace where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--12.27新增
delete from LCUWError where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCCUWError where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCIndUWError where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--理赔保单恢复脚本
delete from llclaim where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llbnf where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from Llreportrela;
delete from llclaimdetail where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from ljagetclaim ;
--where otherno in (select clmno from llclaimpolicy where contno in (
--'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llbalance where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llcaserela where caseno in (select caseno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llaccident where accno in
(select caserelano from llcaserela where caseno in (select caseno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718')));
delete from llclaimdutykind where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llclaimdutyfee where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llappclaimreason where caseno in (select caseno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llaccidentsub where customerno in (select appntno from lccont where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from lcconthangupstate where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LLToClaimDuty where caseno in (select caseno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llaffix where rgtno in (select rgtno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from LLAccidentSub where AccNo in (select caserelano from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from llfeemain where clmno in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from LLToClaimDutyFee a where 1 = 1 and a.ClmNo in (select clmno from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
delete from lccontstate c where c.contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718') and c.statetype = 'Terminate' and c.state = '1';
delete from llclaimpolicy where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
update ldperson set deathdate = '' where customerno in (select appntno from lccont where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
update ldperson set deathdate = '' where customerno in (select cc.insuredno from lccont cc where cc.contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718'));
update lccont set appflag = '1' where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
update lcpol set appflag = '1' where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--保全
update lccont set autopayflag ='1' where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
update lcpol set autopayflag ='1' where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
update lcget set Summoney = '0' where contno in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--理赔
delete from Ljfiget;
delete from LLAppClaimReason;
delete from llcase;
delete from LLCLAIMUWMAIN;
delete from LLREPORTREASON;
delete from LLREPORTAFFIX ;
delete from LLSUBREPORT;
delete from llreport;
delete from llregister;
delete from LCDuty where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCPol where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--工作流删除脚本
delete from lpedoritem;
delete from lpedorapp;
delete from lpedormain;
delete from lpedorprint;
delete from ljsgetendorse;
delete from ljagetendorse;
delete from lwmission;
delete from lbmission;
delete from lcconthangupstate;
delete from LCGRPCONTHANGUPSTATE;
delete from FIOperationLog ;
delete from FIOperationParameter;
delete from FIDataFeeBackApp;
delete from Fiinterfacelog;
DELETE from ljotofinfo;
Delete from fidatatransresult;
Delete from FiInterfaceInfo;
delete from CUX_LP_GL_INTERFACE;
delete from LCINSURED where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCCUSTOMERIMPART where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from LCCont where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
delete from lccontplanfee where contno not in (
'154201700009808','154201700009918','154201700010048','154201700010158','154201600002268','154201600002378','154201600002488','154201600002598','154201600002608',
'154201600002048','154201600000808','154201600001698','130540000000725','130540000000726','130540000000727','130540000000728','130540000000729','130540000000730','130540000000731','130540000000732','130540000000733','130540000000734','154201600002718');
--团险清库脚本
delete from ldgrp where customerno not in (select appntno from lccont where grpcontno = '654201700002558');
delete from lcgrpcont where grpcontno not in ('654201700002558');
delete from LCGCUWSUB where grpcontno not in ('654201700002558');
delete from LCGCUWMASTER where grpcontno not in ('654201700002558');
delete from LCGRPAPPNT where grpcontno not in ('654201700002558');
delete from LCGUWERROR where grpcontno not in ('654201700002558');
delete from LCGUWSUB where grpcontno not in ('654201700002558');
delete from LCGUWMASTER where grpcontno not in ('654201700002558');
delete from LCGRPPOL where grpcontno not in ('654201700002558');
delete from LCGRPISSUEPOL where grpcontno not in ('654201700002558');
delete from LPGRPPOL ;
delete from LPGRPCONT ;
delete from LPGRPEDORITEM ;
delete from LPGRPEDORMAIN ;
delete from lccontplan where grpcontno not in ('654201700002558');
delete from lccontplandutyparam where grpcontno not in ('654201700002558');
delete from lccontplanfactory where grpcontno not in ('654201700002558');
delete from lccontplangetdutyparam where grpcontno not in ('654201700002558');
delete from lccontplanparam where grpcontno not in ('654201700002558');
delete from lccontplanrisk where grpcontno not in ('654201700002558');
delete from LJAPayGrp;