----更新套件相关行的fpid字段到fkitpid字段
--订单
UPDATE T_SM_SALORDERENTRY_R SET FKITPID = FPID WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FKITPID = 0 AND FPID != 0;
--变更单
UPDATE T_SM_XSALORDERENTRY_R SET FKITPID = FPID WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FKITPID = 0 AND FPID != 0;
--发货通知单
UPDATE T_SM_DELIVERNOTICEENTRY_R SET FKITPID = FPID WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FKITPID = 0 AND FPID != 0;
--退货申请单
UPDATE T_SM_RETURNAPPLYENTRY_R SET FKITPID = FPID WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FKITPID = 0 AND FPID != 0;
--报价单
UPDATE T_SM_QUOTATIONENTRY SET FKITPID = FPID WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FKITPID = 0 AND FPID != 0;

----清空套件相关行原有的fpid字段
--订单
UPDATE T_SM_SALORDERENTRY_R SET FPID = 0 WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FPID = FKITPID;
--变更单
UPDATE T_SM_XSALORDERENTRY_R SET FPID = 0 WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FPID = FKITPID;
--发货通知单
UPDATE T_SM_DELIVERNOTICEENTRY_R SET FPID = 0 WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FPID = FKITPID;
--退货申请单
UPDATE T_SM_RETURNAPPLYENTRY_R SET FPID = 0 WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FPID = FKITPID;
--报价单
UPDATE T_SM_QUOTATIONENTRY SET FPID = 0 WHERE FPRODUCTTYPE IN('kitparent','kitchild') AND FPID = FKITPID;
