`
haofeng0305
  • 浏览: 31345 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

test_help_sp

阅读更多

CREATE OR REPLACE PACKAGE BODY NETS_TEST_TCIMS_PC_EXCH IS

   /***********************************************************
  --功能说明:  根据寿险测试的数据项名或者测试数据SYS_ID信息批处理产生测试结果
  --参数说明:
             data_type   : 测试数据项名
                             (具体名称根据测试名称如下:)
                                   /** A 联系电话*/
                                   /** B 证件号码*/
                                   /** C 联系人地址*/
                                   /** D 客户姓名*/               
                                   /** E 客户生日*/
                                   /** F 线上成交时间*/
                                   /** G 转账成功日*/
                                   /** H 线上提交时间*/
                                   /** I 机构名称*/
                                   /** J 批次内名单优先级*/
                                   /** K 来源类型*/
                                   /** L 入库批次号*/
                                   /**  证件类型*
                 id    : 测试数据的sys_id
  --调用函数:
  --修改记录:  create by ex-haofeng001
  --*********************************************************/
  PROCEDURE TEST_SEL_FIND_ALL_CLEANDATA (data_type varchar2, id varchar2 ) is
 
      temp_phone varchar2(100);                    /** A 联系电话*/
      temp_id_number varchar2(100);                /** B 证件号码*/
      temp_adress varchar2(100);                   /** C 联系人地址*/
      temp_name varchar2(100);                     /** D 客户姓名*/               
      temp_cust_birthday varchar2(100);            /** E 客户生日*/
      temp_success_date varchar2(100);             /** F 线上成交时间*/
      temp_transfer_day varchar2(100);             /** G 转账成功日*/
      temp_submit_date varchar2(100);              /** H 线上提交时间*/
      temp_department_name varchar2(100);          /** I 机构名称*/
      temp_list_priority varchar2(100);            /** J 批次内名单优先级*/
      temp_src_type varchar2(100);                 /** K 来源类型*/
      temp_batch_id varchar2(100);                 /** L 入库批次号*/
      temp_id_type varchar2(100);                  /**  证件类型*/
     
       temp_call_result varchar2(10);
       temp_is_insure_flag varchar2(10);
       temp_is_submit_flag varchar2(10);
       temp_is_free_flag varchar2(10);
     
         
      temp_sys_id VARCHAR2(50);       /**数据ID*/
      testDateType varchar2(200);       /**测试数据类型*/
     
      per_value varchar2(1000);       /**测试数据类型*/
     
      temp_value varchar2(1000);       /**暂存数据*/
      temp_value4 varchar2(1000);       /**暂存数据*/
      temp_flag varchar2(10);
      temp_xxx varchar2(10);
     
      CURSOR request_info_cur is
        select * from test_idl_sel_src_data pds where (data_type is null or pds.test_data_type like '%'||data_type||'%') AND (id IS NULL or SYS_ID = id)   order by sys_id ;

  begin
 
    for v_pos in request_info_cur loop
      temp_flag := 'false';
      temp_sys_id := v_pos.sys_id;
     
      temp_phone  := v_pos.TELEPHONE_NUMBER;                  /** A 联系电话(存在拼装规则问题)*/
      temp_id_number  := v_pos.ID_NUMBER;                     /** B 证件号码*/
      temp_adress  := v_pos.ADDRESS;                          /** C 联系人地址*/
      temp_name    := v_pos.CUST_NAME;                        /** D 客户名*/
      temp_cust_birthday  := v_pos.CUST_DOB;                  /** E 客户生日*/
      temp_success_date  := v_pos.SUCCESS_DATE;               /** F 线上成交时间*/
      temp_transfer_day  := v_pos.TRANSFER_SUCCESS_DAY;       /** G 转账成功日*/
      temp_submit_date  := v_pos.SUBMIT_DATE;                 /** H 线上提交时间*/
      temp_department_name := v_pos.DEPARTMENT_CHINESE_NAME;  /** I 机构名称*/
      temp_list_priority := v_pos.LIST_PRIORITY;              /** J 批次内名单优先级*/
      temp_src_type := v_pos.SRC_TYPE;                        /** K 来源类型*/
      temp_batch_id := v_pos.TCIMS_BATCH_ID;                  /** L 入库批次号*/
   
     
     
     
      testDateType := v_pos.test_data_type;
      per_value := v_pos.PRE_CONFIRM_DATE;
     
      temp_id_type := v_pos.ID_TYPE;                               /** 证件类型*/
      temp_call_result := v_pos.call_result;    
      temp_is_insure_flag := v_pos.is_insure_flag;    
      temp_is_submit_flag := v_pos.is_submit_flag;    
      temp_is_free_flag := v_pos.is_free_flag;    
     
        -- 将测试数据搬到正式表

      if testDateType = '联系电话' or
         testDateType = '证件号码' or
         testDateType = '联系人地址' or
         testDateType = '客户名' or
         testDateType = '客户生日' or
         testDateType = '线上成交时间' or
         testDateType = '转账成功日' or
         testDateType = '线上提交时间' or
         testDateType = '机构名称' or
         testDateType = '批次内名单优先级' or
         testDateType = '来源类型' or
         testDateType = '名单状态' or
         substr(testDateType,0,2) = '集成' or
         testDateType = '机构校验'
         then temp_xxx := INSERT_SEL_TEST_DATA(temp_sys_id,temp_phone,temp_id_number,temp_adress,temp_name,temp_cust_birthday,temp_success_date,temp_transfer_day,
                                             temp_submit_date,temp_department_name,temp_list_priority,temp_src_type,temp_batch_id,temp_id_type
                                              ,temp_call_result,temp_is_insure_flag,temp_is_submit_flag,temp_is_free_flag);
      end if;
      if testDateType = '联系电话' then
            begin
               delete from LA_CLEAN_TEL_NO_STG_TMP;  
               select count(la.sys_id) into temp_value from test_idl_result_data la;
               select count(la.sys_id) into temp_value from  idl_sel_src_data la;
           /*   dbms_output.put_line('&&&&&&&&&&&'||temp_value); 
               select count(la.sys_id) into temp_value from LA_CLEAN_TEL_NO_STG_TMP  la where la.sys_id = temp_sys_id;
              dbms_output.put_line('*********'||temp_value);   */
             -- 执行相应的sp
              NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_TELEPHONE_NO;
              /*  select count(la.tel_no) into temp_value from LA_CLEAN_TEL_NO_STG_TMP  la where la.sys_id = temp_sys_id;
               dbms_output.put_line('+++++++++++'||temp_value);  */
              select max(la.tel_no),max(la.clean_status) into temp_value,temp_value4 from LA_CLEAN_TEL_NO_STG_TMP  la where la.sys_id = temp_sys_id group by la.sys_id;
            
              -- 验证并插入测试结果
              temp_xxx := insert_result_data(temp_sys_id,testDateType,temp_phone,temp_value,per_value,temp_flag,temp_value4,'sl');
            exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
                when too_many_rows then  
                  raise_application_error(-20000,'对v_postype赋值时,找到多条数据'||'ID:' || temp_sys_id);  

            end;
       elsif testDateType = '证件号码' then
      begin
              delete from LA_CLEAN_ID_NUMBER_STG_TMP;
             
              NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_ID_NUMBER; 
            
              select la.ID_NUMBER_UPGRADE,la.clean_status into temp_value,temp_value4 from LA_CLEAN_ID_NUMBER_STG_TMP  la where la.sys_id = temp_sys_id;
              temp_flag := insert_result_data(temp_sys_id,testDateType,temp_id_number,temp_value,per_value,temp_flag,temp_value4,'sl');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据'); 
                  when too_many_rows then  
                  raise_application_error(-20000,'对v_postype赋值时,找到多条数据'||'ID:' || temp_sys_id );       
       end;
       elsif testDateType = '联系人地址' then
             begin
                delete from LA_CLEAN_ADDRESS_STG_TMP;   
                NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_ADDRESS;
                select la.ADDRESS into temp_value from LA_CLEAN_ADDRESS_STG_TMP  la where la.sys_id = temp_sys_id;
                temp_flag := insert_result_data(temp_sys_id,testDateType,temp_adress,temp_value,per_value,temp_flag,temp_value4,'sl');
             exception   
              when no_data_found then  
                dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;    
       elsif testDateType = '客户名' then
             begin
                delete from LA_CLEAN_CUST_NAME_STG_TMP;   
                NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_CUST_NAME;
                select la.CUST_NAME into temp_value from LA_CLEAN_CUST_NAME_STG_TMP  la where la.sys_id = temp_sys_id;
                temp_flag := insert_result_data(temp_sys_id,testDateType,temp_name,temp_value,per_value,temp_flag,temp_value4,'sl');
              exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;
       elsif testDateType = '机构名称' then
             temp_value := temp_department_name;    /*到时替换相应的测试sp*/
             begin
              /*temp_xxx := INSERT_TEST_DATA(temp_sys_id,temp_phone,temp_id_number,temp_adress,temp_name,temp_cust_birthday,temp_success_date,temp_transfer_day,
                                             temp_submit_date,temp_department_name,temp_list_priority,temp_src_type,temp_batch_id,temp_id_type);*/
              temp_flag := insert_result_data(temp_sys_id,testDateType,temp_department_name,temp_value,per_value,temp_flag,temp_value4,'sl');
             end;
      /* elsif testDateType = '批次内名单优先级' then
            temp_value := temp_list_priority;    \*到时替换相应的测试sp*\
             begin
              temp_flag := insert_result_data(temp_sys_id,testDateType,temp_list_priority,temp_value,per_value,temp_flag,temp_value4,'sl');
             end;
       elsif testDateType = '来源类型' then
             temp_value := temp_src_type;    \*到时替换相应的测试sp*\
             begin
             temp_flag := insert_result_data(temp_sys_id,testDateType,temp_src_type,temp_value,per_value,temp_flag,temp_value4,'sl');
             end;*/
       elsif testDateType = '名单状态' then
             begin
              delete from LA_CLEAN_LIST_STATUS_STG_TMP;
              NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_LIST_STATUS;
               select la.list_status_code,la.clean_status into temp_value,temp_value4 from LA_CLEAN_LIST_STATUS_STG_TMP  la where la.sys_id = temp_sys_id;
              temp_flag := insert_result_data(temp_sys_id,testDateType,temp_batch_id,temp_value,per_value,temp_flag,temp_value4,'sl');
      end;
      elsif substr(testDateType,0,2) = '集成' then
           begin
            dbms_output.put_line('');
           /* dbms_output.put_line('集成数据插入------- '||temp_sys_id);*/
           /* delete from LA_CLEAN_LIST_STATUS_STG_TMP;
            NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_LIST_STATUS;
             select la.list_status_code,la.clean_status into temp_value,temp_value4 from LA_CLEAN_LIST_STATUS_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,temp_batch_id,temp_value,per_value,temp_flag,temp_value4,'sl');*/
       end;
      elsif testDateType = '机构校验' then
           begin
              delete from LA_CLEAN_CITY_STG_TMP;   
              NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_CITY;
              select la.sys_id into temp_value from LA_CLEAN_CITY_STG_TMP  la where la.sys_id = temp_sys_id;
              temp_flag := insert_result_data(temp_sys_id,testDateType,temp_cust_birthday,temp_value,per_value,temp_flag,temp_value4,'sl');
           exception   
              when no_data_found then  
                dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
      end;
       elsif testDateType = '客户生日' then
             begin
                delete from LA_CLEAN_CUST_DOB_STG_TMP;   
                NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_CUST_DOB;
                select la.CUST_DOB,la.clean_status into temp_value,temp_value4 from LA_CLEAN_CUST_DOB_STG_TMP  la where la.sys_id = temp_sys_id;
                temp_flag := insert_result_data(temp_sys_id,testDateType,temp_cust_birthday,temp_value,per_value,temp_flag,temp_value4,'sl');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;
       elsif testDateType = '线上成交时间' then
             begin
                delete from LA_CLEAN_SUCCESS_DATE_STG_TMP;   
                NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_SUCCESS_DATE; 
                select la.SUCCESS_DATE,la.clean_status into temp_value,temp_value4 from LA_CLEAN_SUCCESS_DATE_STG_TMP  la where la.sys_id = temp_sys_id;
                temp_flag := insert_result_data(temp_sys_id,testDateType,temp_success_date,temp_value,per_value,temp_flag,temp_value4,'sl');
              exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;
       elsif testDateType = '转账成功日' then
            temp_value := temp_transfer_day;    /*到时替换相应的测试sp*/
             begin
               delete from LA_CLEAN_TRANS_SUC_DAY_STG_TMP;   
               NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_TRANSFER_SUCCESS_DAY;
               select la.transf_suc_day,la.clean_status into temp_value,temp_value4 from LA_CLEAN_TRANS_SUC_DAY_STG_TMP  la where la.sys_id = temp_sys_id;
               temp_flag := insert_result_data(temp_sys_id,testDateType,temp_transfer_day,temp_value,per_value,temp_flag,temp_value4,'sl');
              exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;
       elsif testDateType = '线上提交时间' then
             temp_value := temp_submit_date;    /*到时替换相应的测试sp*/
             begin
                delete from LA_CLEAN_SUBMIT_DATE_STG_TMP;   
                NETS_TCIMS_LA_CLEANOUT.SP_CLEAN_SUBMIT_DATE;
                select la.SUBMIT_DATE,la.clean_status into temp_value,temp_value4 from LA_CLEAN_SUBMIT_DATE_STG_TMP  la where la.sys_id = temp_sys_id;
                temp_flag := insert_result_data(temp_sys_id,testDateType,temp_submit_date,temp_value,per_value,temp_flag,temp_value4,'sl');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
            end;     
       end if;
         /*delete from TCIMSDATA.idl_sel_src_data  t where t.sys_id < 10000;*/
      end loop;
    commit;

     EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Rollback: ' || SQLERRM || temp_sys_id);
        ROLLBACK;

  end TEST_SEL_FIND_ALL_CLEANDATA;
 
 
 
  /***********************************************************
  --功能说明:  根据产险测试的数据项名或者测试数据SYS_ID信息批处理产生测试结果
  --参数说明:
             data_type   : 测试数据项名
                             (具体名称根据测试名称如下:)
                               /** 车牌号码 */
                               /** 电话号码 */
                               /** 客户姓名 */
                               /** 号牌种类代码 */
                               /** 使用性质  */               
                               /** 车辆种类 */
                               /** 发动机号 */
                               /** 车架号*/
                               /** 联系人地址*/
                               /** 车辆价格  */
                               /** 车型名称*/
                               /** 初次登记年月*/
                               /** 保险起始日*/
                               /** 客户出生日期*/
                               /** 主驾人生日*/
                               /** 初领驾驶证时间*/
                               /** 保险到期日*/
                               /** 吨位*/
                               /** 核定座位数*/
                               /** 排气量*/
                               /** 客户性别*/
                               /** 主驾人性别*/
                               /** 车身颜色*/
                               /** 称谓*/
                               /** 客户身份证件号码*/
                               /** 地区标识*/
                               /** 一级电销结果*/
                               /** 二级电销结果*/
                               /** 三级电销结果*/
                               /** 四级电销结果
                 id    : 测试数据的sys_id
  --调用函数:
  --修改记录:  create by ex-haofeng001
  --*********************************************************/
   
    PROCEDURE TEST_SEP_FIND_ALL_CLEANDATA (data_type varchar2,id varchar2) is
 
      VEHICLE_NO VARCHAR2(60);                                        /** 车牌号码 */
      TELEPHONE_NUMBER VARCHAR2(200);                                /** 电话号码 */
      CUST_NAME VARCHAR2(200);                                        /** 客户姓名 */
      BRAND_TYPE VARCHAR2(50);                                        /** 号牌种类代码 */
      BRAND_TYPE_CODE VARCHAR2(50);                                    /** 号牌种类代码 */
      USAGE_ATTRIBUTE VARCHAR2(50);                                    /** 使用性质  */
      USAGE_CODE VARCHAR2(50);                                        /** 使用性质代码*/
      VEHICLE_TYPE VARCHAR2(1000);                                    /** 车辆种类 */
      VEHICLE_TYPE_CODE VARCHAR2(4);                                  /** 车辆种类代码  */
      ENGINE_NUMBER VARCHAR2(40);                                      /** 发动机号 */
      VEHICLE_FRAME VARCHAR2(40);                                      /** 车架号*/
      ADDRESS VARCHAR2(300);                                           /** 联系人地址*/
      PURCHASE_PRICE NUMBER(16,2);                                   /** 车辆价格  */
      AUTOMODEL_NAME VARCHAR2(60);                                   /** 车型名称*/
      FIRST_REGISTER_DATE VARCHAR2(20);                                /** 初次登记年月*/
      POLICY_EFFECTIVE_DATE VARCHAR2(20);                              /** 保险起始日*/
      CUST_DOB VARCHAR2(20);                                          /** 客户出生日期*/
      MAIN_DRIVER_DOB VARCHAR2(20);                                    /** 主驾人生日*/
      DRIVER_LICENSE_FST_ISSUE_DATE VARCHAR2(20);                      /** 初领驾驶证时间*/
      POLICY_END_DATE VARCHAR2(20);                                    /** 保险到期日*/
      TON_NUMBER NUMBER(13,2);                                        /** 吨位*/
      SEAT_NUMBER NUMBER(3);                                          /** 核定座位数*/
      EXHAUST NUMBER(15,2);                                            /** 排气量*/
      SEX VARCHAR2(50);                                                /** 客户性别*/
      MAIN_DRIVER_SEX VARCHAR2(50);                                    /** 主驾人性别*/
      VEHICLE_BODY_COLOR VARCHAR2(20);                                /** 车身颜色*/
      SALUTATION VARCHAR2(50);                                        /** 称谓*/
      ID_NUMBER VARCHAR2(20);                                          /** 客户身份证件号码*/
      AREA_INFO VARCHAR2(40);                                          /** 地区标识*/
      C51_PHONE_RESULT VARCHAR2(50);                                  /** 一级电销结果*/
      C51_SALE_STAGE VARCHAR2(50);                                    /** 二级电销结果*/
      C51_SALE_DECISION VARCHAR2(50);                                  /** 三级电销结果*/
      C51_ADDED_EXPLAIN VARCHAR2(50);                                  /** 四级电销结果*/
      C01_PHONE_RESULT VARCHAR2(50);                                        
      C01_SALE_STAGE VARCHAR2(50);                                        
      C01_SALE_DECISION VARCHAR2(50);                                       
      C01_ADDED_EXPLAIN VARCHAR2(50);                                                                    
    
      SALE_RESULT_CLASS VARCHAR2(50);                                   /** 电销结果分类*/
      LIST_TYPE VARCHAR2(20);                                           /**  名单类型*/
      TCIMS_BATCH_ID VARCHAR2(100);                          
    
     /** temp_phonett varchar2(100);                  可信度*/   
      temp_sys_id VARCHAR2(50);       /**数据ID*/
      testDateType varchar2(200);       /**测试数据类型*/
     
      per_value varchar2(1000);       /**预计值*/

      temp_value varchar2(1000);       /**暂存数据*/
      temp_value1 varchar2(1000);       /**暂存数据1*/
      temp_value2 varchar2(1000);       /**暂存数据1*/
      temp_value3 varchar2(1000);       /**暂存数据1*/
      temp_value4 varchar2(1000);       /**暂存数据1*/
      temp_flag varchar2(10);
      temp_xxx varchar2(10);
     
     
      CITY VARCHAR2(50);
      SECONDARY_ORG varchar2(50);
      THIRD_ORG VARCHAR2(50);
      IS_CONTACTED VARCHAR2(50);
          
    CURSOR request_info_cur is
      select * from test_idl_sep_src_data pds where (data_type is null or  pds.test_data_type  like '%'||data_type||'%') and  (id IS NULL or SYS_ID = id) order by sys_id;
   
  begin
  
    for v_pos in request_info_cur loop
       dbms_output.enable(999999999999999999999);
      temp_sys_id := v_pos.sys_id;
      testDateType := v_pos.test_data_type;
      per_value := v_pos.Pre_Confirm_Date;
      temp_flag := 'false';
     
      VEHICLE_NO := v_pos.VEHICLE_NO;                                        /** 车牌号码 */
      TELEPHONE_NUMBER := v_pos.TELEPHONE_NUMBER;                           /** 电话号码 */
      CUST_NAME := v_pos.CUST_NAME;                                           /** 客户姓名 */
      BRAND_TYPE := v_pos.BRAND_TYPE;
      BRAND_TYPE_CODE := v_pos.BRAND_TYPE_CODE;                               /** 号牌种类代码 */
      USAGE_ATTRIBUTE := v_pos.USAGE_ATTRIBUTE;                               /** 使用性质  */
      USAGE_CODE := v_pos.USAGE_CODE;                                       /** 使用性质代码*/
      VEHICLE_TYPE := v_pos.VEHICLE_TYPE;                                   /** 车辆种类 */
      VEHICLE_TYPE_CODE := v_pos.VEHICLE_TYPE_CODE;                           /** 车辆种类代码  */
      ENGINE_NUMBER := v_pos.ENGINE_NUMBER;                                   /** 发动机号 */
      VEHICLE_FRAME := v_pos.VEHICLE_FRAME;                                   /** 车架号*/
      ADDRESS := v_pos.ADDRESS;                                                /** 联系人地址*/
      AUTOMODEL_NAME := v_pos.AUTOMODEL_NAME;                              /** 车型名称*/
      FIRST_REGISTER_DATE := v_pos.FIRST_REGISTER_DATE;                       /** 初次登记年月*/
      POLICY_EFFECTIVE_DATE := v_pos.POLICY_EFFECTIVE_DATE;                    /** 保险起始日*/
      CUST_DOB := v_pos.CUST_DOB;                                           /** 客户出生日期*/
      MAIN_DRIVER_DOB := v_pos.MAIN_DRIVER_DOB;                               /** 主驾人生日*/
      DRIVER_LICENSE_FST_ISSUE_DATE := v_pos.DRIVER_LICENSE_FST_ISSUE_DATE;    /** 初领驾驶证时间*/
      POLICY_END_DATE := v_pos.POLICY_END_DATE;                               /** 保险到期日*/
      TON_NUMBER := v_pos.TON_NUMBER;                                       /** 吨位*/
      SEAT_NUMBER := v_pos.SEAT_NUMBER;                                       /** 核定座位数*/
      PURCHASE_PRICE := v_pos.PURCHASE_PRICE;                               /** 车辆价格*/
      EXHAUST := v_pos.EXHAUST;                                               /** 排气量*/
      SEX := v_pos.SEX;                                                       /** 客户性别*/
      MAIN_DRIVER_SEX := v_pos.MAIN_DRIVER_SEX;                               /** 主驾人性别*/
      VEHICLE_BODY_COLOR := v_pos.VEHICLE_BODY_COLOR;                       /** 车身颜色*/
      SALUTATION := v_pos.SALUTATION;                                       /** 称谓*/
      ID_NUMBER := v_pos.ID_NUMBER;                                           /** 客户身份证件号码*/
      AREA_INFO := v_pos.AREA_INFO;                                           /** 地区标识*/
      C51_PHONE_RESULT := v_pos.C51_PHONE_RESULT;                          /** 交强子任务一级电销结果*/
      C51_SALE_STAGE := v_pos.C51_SALE_STAGE;                               /** 交强子任务二级电销结果*/
      C51_SALE_DECISION := v_pos.C51_SALE_DECISION;                           /** 交强子任务三级电销结果*/
      C51_ADDED_EXPLAIN := v_pos.C51_ADDED_EXPLAIN;                           /** 交强子任务四级电销结果*/
      C01_PHONE_RESULT := v_pos.C01_PHONE_RESULT;                                         
      C01_SALE_STAGE := v_pos.C01_SALE_STAGE;                                         
      C01_SALE_DECISION := v_pos.C01_SALE_DECISION;                                        
      C01_ADDED_EXPLAIN := v_pos.C01_ADDED_EXPLAIN;                                                                     
    
      SALE_RESULT_CLASS := v_pos.SALE_RESULT_CLASS;                           /** 电销结果分类*/
      LIST_TYPE := v_pos.LIST_TYPE;                                           /**  名单类型*/
                                                                                 /** 上海YDC清洗与转换*/
      TCIMS_BATCH_ID := v_pos.TCIMS_BATCH_ID;
      IS_CONTACTED := v_pos.is_contacted;
     
      CITY := v_pos.city;
      SECONDARY_ORG := v_pos.secondary_org;
      THIRD_ORG := v_pos.third_org;
       temp_xxx := INSERT_SEP_TEST_DATA(temp_sys_id,VEHICLE_NO,TELEPHONE_NUMBER,CUST_NAME,BRAND_TYPE, BRAND_TYPE_CODE,
                                          USAGE_ATTRIBUTE,USAGE_CODE,VEHICLE_TYPE,VEHICLE_TYPE_CODE,ENGINE_NUMBER,                                   
                                          VEHICLE_FRAME,ADDRESS,PURCHASE_PRICE,AUTOMODEL_NAME,FIRST_REGISTER_DATE,                               
                                          POLICY_EFFECTIVE_DATE,CUST_DOB,MAIN_DRIVER_DOB,DRIVER_LICENSE_FST_ISSUE_DATE,                    
                                          POLICY_END_DATE,TON_NUMBER,SEAT_NUMBER,EXHAUST,SEX,MAIN_DRIVER_SEX,                              
                                          VEHICLE_BODY_COLOR,SALUTATION,ID_NUMBER,AREA_INFO,C51_PHONE_RESULT,                            
                                          C51_SALE_STAGE,C51_SALE_DECISION,C51_ADDED_EXPLAIN,C01_PHONE_RESULT,                                        
                                          C01_SALE_STAGE,C01_SALE_DECISION,C01_ADDED_EXPLAIN,SALE_RESULT_CLASS,LIST_TYPE,TCIMS_BATCH_ID,CITY,SECONDARY_ORG,THIRD_ORG,IS_CONTACTED);
     
     
      if testDateType = '车牌号码' then
           temp_value := VEHICLE_NO;    /*到时替换相应的测试sp*/
           begin
              delete from PC_CLEAN_VEHICLE_NO_STG_TMP;
              NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_NO; 
              select la.VEHICLE_NO,la.clean_status into temp_value,temp_value4 from PC_CLEAN_VEHICLE_NO_STG_TMP  la where la.sys_id = temp_sys_id;
              temp_flag := insert_result_data(temp_sys_id,testDateType,VEHICLE_NO,temp_value,per_value,temp_flag,temp_value4,'sp');
               exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');          
           end;
     
      elsif testDateType = '电话号码' then
           temp_value := TELEPHONE_NUMBER;    /*到时替换相应的测试sp*/
           begin
            delete from PC_STG_TEL_NO_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_TELEPHONE_NO; 
            select la.TEL_NO into temp_value from PC_STG_TEL_NO_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,TELEPHONE_NUMBER,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '客户姓名' then
            temp_value := VEHICLE_NO;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_CUST_NAME_STG_TMP; 
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_CUST_NAME_1;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_CUST_NAME_2;
           /* CUST_NAME,ORG_FLAG*/
            select la.CUST_NAME,la.ORG_FLAG,la.clean_status into temp_value,temp_value1,temp_value4 from PC_CLEAN_CUST_NAME_STG_TMP  la where la.sys_id = temp_sys_id;
            if(temp_value1 =  'NULL') then
               temp_value1 := '';
               end if;
            temp_value := concat(temp_value||'|',temp_value1) ;
            temp_flag := insert_result_data(temp_sys_id,testDateType,CUST_NAME,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      elsif testDateType = '号牌种类代码' then
            temp_value := VEHICLE_NO;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_BRAND_TYPE_CD_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_BRAND_TYPE;
           /* BRAND_TYPE_CODE */
            select max(la.BRAND_TYPE_CODE),max(la.clean_status) into temp_value,temp_value4 from PC_CLEAN_BRAND_TYPE_CD_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,BRAND_TYPE_CODE,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '使用性质' then
           begin
            delete from PC_CLEAN_USAGE_CODE_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_USAGE_ATTRIBUTE; 
            /*USAGE_CODE*/
           /* select count(la.usage_code),la.clean_status into temp_value,temp_value4 from PC_CLEAN_USAGE_CODE_STG_TMP  la where la.sys_id = temp_sys_id;
            dbms_output.put_line(temp_value);*/
            select max(la.usage_code) into temp_value  from PC_CLEAN_USAGE_CODE_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,USAGE_ATTRIBUTE,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       /*if testDateType = '使用性质代码' then
            temp_value := USAGE_CODE;    \*到时替换相应的测试sp*\
           begin
            delete from PC_STG_TEL_NO_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_NO; 
            select la.TEL_NO into temp_value from PC_STG_TEL_NO_TMP  la where la.sys_id = temp_sys_id;
            temp_value = temp_value + '|' + temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,USAGE_CODE,temp_value,per_value,temp_flag,temp_value4,'sp');
           end;
       end if;*/
         elsif testDateType = '车辆种类' then
            temp_value := VEHICLE_TYPE;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_VEHIC_TYPE_CD_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_TYPE; 
            select la.VEHICLE_TYPE_CODE,la.clean_status into temp_value,temp_value4 from PC_CLEAN_VEHIC_TYPE_CD_STG_TMP  la where la.sys_id = temp_sys_id;
             /*temp_value := concat(temp_value||'|',temp_value1) ;*/
            temp_flag := insert_result_data(temp_sys_id,testDateType,VEHICLE_TYPE,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      /*if testDateType = '车辆种类代码' then
            temp_value := VEHICLE_TYPE_CODE;    \*到时替换相应的测试sp*\
           begin
            delete from PC_STG_TEL_NO_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_NO; 
            select la.TEL_NO into temp_value from PC_STG_TEL_NO_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,VEHICLE_TYPE_CODE,temp_value,per_value,temp_flag,temp_value4,'sp');
           end;
       end if;*/
       elsif testDateType = '发动机号/车架号' then
            temp_value := ENGINE_NUMBER;    /*到时替换相应的测试sp*/
           begin
            delete from PC_STG_TEL_NO_TMP;
            delete from PC_CLEAN_VEHICLE_FRAME_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_ENGINE_NO; 
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_FRAME_NO; 
            select la.ENGINE_NUMBER into temp_value from PC_CLEAN_ENGINE_NO_STG_TMP  la where la.sys_id = temp_sys_id;
            select la.VEHICLE_FRAME into temp_value1 from PC_CLEAN_VEHICLE_FRAME_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_value := concat(temp_value||'|',temp_value1) ;
            temp_flag := insert_result_data(temp_sys_id,testDateType,ENGINE_NUMBER,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
          
        elsif testDateType = '联系人地址' then
            temp_value := ADDRESS;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_ADDRESS_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_ADDRESS; 
            select la.ADDRESS,is_address_valid into temp_value,temp_value4 from PC_CLEAN_ADDRESS_STG_TMP  la where la.sys_id = temp_sys_id;
            select case when temp_value4 = '1' then '地址有效'  when temp_value4 = '0' then '地址无效' else '不知道' end into temp_value4 from dual;
            temp_flag := insert_result_data(temp_sys_id,testDateType,ADDRESS,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');    
         end;

       /**预留价格预处理  因为现在数据类型为数值型*/
       elsif testDateType = '车型名称/价格' then
            temp_value := AUTOMODEL_NAME;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_CAR_NAME_PRIC_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_AUTOMODEL_NAME_PRICE; 
            /*PC_CLEAN_CAR_NAME_PRIC_STG_TMP PURCHASE_PRICE
            PC_CLEAN_CAR_NAME_PRIC_STG_TMP AUTOMODEL_NAME
             PC_CLEAN_SOME_NUMBER_STG_TMP VEHICLE_VALUE*/

            select la.factory_logo,la.vehicle_series, la.PURCHASE_PRICE,la.vehicle_class_code,la.clean_status into temp_value,temp_value1,temp_value2,temp_value3,temp_value4 from PC_CLEAN_CAR_NAME_PRIC_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := temp_value||'|'||temp_value1||'|'||temp_value2||'|'||temp_value3;
            temp_flag := insert_result_data(temp_sys_id,testDateType,AUTOMODEL_NAME,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif  testDateType = '吨位' then
            temp_value := TON_NUMBER;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SOME_NUMBER_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_TON_SEAT_VALU_EXHAUST; 
            select la.TON_NUMBER into temp_value from PC_CLEAN_SOME_NUMBER_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,TON_NUMBER,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '核定座位' then
            temp_value := SEAT_NUMBER;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SOME_NUMBER_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_TON_SEAT_VALU_EXHAUST; 
            select la.SEAT_NUMBER into temp_value from PC_CLEAN_SOME_NUMBER_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,SEAT_NUMBER,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      elsif testDateType = '排气量' then
            temp_value := EXHAUST;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SOME_NUMBER_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_TON_SEAT_VALU_EXHAUST; 
            select la.EXHAUST into temp_value from PC_CLEAN_SOME_NUMBER_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,EXHAUST,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      elsif testDateType = '性别/主驾性别' then
            temp_value := SEX;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SEX_STG_TMP;
            delete from PC_CLEAN_DRIVER_SEX_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_SEX; 
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_MAIN_DRIVER_SEX;
         /*   PC_CLEAN_SEX_STG_TMP SEX
            PC_CLEAN_DRIVER_SEX_STG_TMP MAIN_DRIVER_SEX*/

            select distinct(la.SEX) into temp_value from PC_CLEAN_SEX_STG_TMP  la where la.sys_id = temp_sys_id;
            select distinct(la.MAIN_DRIVER_SEX) into temp_value1 from PC_CLEAN_DRIVER_SEX_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := concat(temp_value||'|',temp_value1) ;
            temp_flag := insert_result_data(temp_sys_id,testDateType,SEX,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');   
          end;
       elsif testDateType = '车身颜色' then
            temp_value := VEHICLE_BODY_COLOR;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_CAR_COLOR_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_VEHICLE_BODY_COLOR; 
            select la.VEHICLE_BODY_COLOR into temp_value from PC_CLEAN_CAR_COLOR_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,VEHICLE_BODY_COLOR,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      elsif testDateType = '称谓' then
            temp_value := SALUTATION;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALUTATION_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_SALUTATION; 
            select la.SALUTATION into temp_value from PC_CLEAN_SALUTATION_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,SALUTATION,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '客户身份证件号码' then
            temp_value := ID_NUMBER;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_ID_NUMBER_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_ID_NUMBER; 
           
/*            PC_CLEAN_ID_NUMBER_STG_TMP "ID_NUMBER SEX CUST_DOB"*/
            select la.ID_NUMBER,la.sex,to_char(la.cust_dob,'yyyy-mm-dd'),la.clean_status into temp_value,temp_value2,temp_value3,temp_value4 from PC_CLEAN_ID_NUMBER_STG_TMP  la where la.sys_id = temp_sys_id;
            if temp_sys_id >= '214' then
            temp_value := temp_value2||'|'||temp_value3||'|'||temp_value ;
            end if;
            temp_flag := insert_result_data(temp_sys_id,testDateType,ID_NUMBER,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '地区标识' then
            temp_value := AREA_INFO;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_CRM_AREA_FLAG_STG_TMP;   --PC_UNITE_MANY_FIELD_1_STG_TMP
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_AREA_INFO; 
            select la.CRM_AREA_FLAG into temp_value from PC_CLEAN_CRM_AREA_FLAG_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,AREA_INFO,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '一级电销结果' then
            temp_value := C51_PHONE_RESULT;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALE_RESULT_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_SALE_RESULT; 
            select la.C51_PHONE_RESULT,la.C01_PHONE_RESULT into temp_value,temp_value1 from PC_CLEAN_SALE_RESULT_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_value := temp_value || '|' || temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,C51_PHONE_RESULT,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '二级电销结果' then
            temp_value := C51_SALE_STAGE;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALE_RESULT_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_SALE_RESULT; 
            select la.C51_SALE_STAGE, la.C01_SALE_STAGE into temp_value,temp_value1 from PC_CLEAN_SALE_RESULT_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := temp_value || '|' || temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,C51_SALE_STAGE,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      /* PC_CLEAN_SALE_RESULT_STG_TMP    " C51_PHONE_RESULT, C01_PHONE_RESULT,"
       PC_CLEAN_SALE_RESULT_STG_TMP    " C51_SALE_STAGE, C01_SALE_STAGE,"
       PC_CLEAN_SALE_RESULT_STG_TMP    " C51_SALE_DECISION, C01_SALE_DECISION,"
       PC_CLEAN_SALE_RESULT_STG_TMP      C51_ADDED_EXPLAIN,C01_ADDED_EXPLAIN,*/

      elsif testDateType = '三级电销结果' then
            temp_value := C51_SALE_DECISION;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALE_RESULT_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_SALE_RESULT; 
            select la.C51_SALE_DECISION, la.C01_SALE_DECISION into temp_value,temp_value1 from PC_CLEAN_SALE_RESULT_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := temp_value || '|' || temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,C51_SALE_DECISION,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '四级电销结果' then
            temp_value := C51_ADDED_EXPLAIN;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALE_RESULT_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_SALE_RESULT; 
            select la.C51_ADDED_EXPLAIN,la.C01_ADDED_EXPLAIN into temp_value,temp_value1 from PC_CLEAN_SALE_RESULT_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := temp_value || '|' || temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,C51_ADDED_EXPLAIN,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
      elsif testDateType = '电销结果分类' then
            temp_value := SALE_RESULT_CLASS;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_SALE_RESULT_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_SALE_RESULT; 
            select la.SALE_RESULT_CLASS,la.c51_sale_result_class,la.c01_sale_result_class into temp_value,temp_value2,temp_value3 from PC_CLEAN_SALE_RESULT_STG_TMP  la where la.sys_id = temp_sys_id;
             temp_value := temp_value || '|' || temp_value2 || '|' || temp_value3 || '|' ||temp_value1;
            temp_flag := insert_result_data(temp_sys_id,testDateType,SALE_RESULT_CLASS,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
       elsif testDateType = '客户分类' then
            temp_value := LIST_TYPE;    /*到时替换相应的测试sp*/
           begin
            delete from PC_CLEAN_CUST_CLASS_STG_TMP;
            NETS_TCIMS_PC_TRANSFORM.SP_CLEAN_TRANSFORM_CUST_CLASS; 
            select la.CUST_CLASS into temp_value from PC_CLEAN_CUST_CLASS_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,LIST_TYPE,temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
        /**未完成*/
       elsif testDateType = '上海YDC' then
           begin
          /* PC_CLEAN_SH_YDC_FLAG_STG_TMP "LIST_TYPE,CITY, SECONDARY_ORG, THIRD_ORG"*/
            delete from PC_CLEAN_SH_YDC_FLAG_STG_TMP;
            NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_TELEPHONE_NO;
            NETS_TCIMS_PC_TRANSFORM.SP_TRANSFORM_SH_YDC_FLAG; 
            select la.list_type,la.CITY,la.SECONDARY_ORG,la.THIRD_ORG INTO temp_value,temp_value1,temp_value2,temp_value3 from PC_CLEAN_SH_YDC_FLAG_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,'没有值',temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end;
        elsif testDateType = 'city校验' then
           begin
          /* PC_CLEAN_SH_YDC_FLAG_STG_TMP "LIST_TYPE,CITY, SECONDARY_ORG, THIRD_ORG"*/
            delete from PC_CLEAN_CITY_STG_TMP;
             NETS_TCIMS_PC_CLEANOUT.SP_CLEAN_CITY; 
            select la.sys_id INTO temp_value from PC_CLEAN_CITY_STG_TMP  la where la.sys_id = temp_sys_id;
            temp_flag := insert_result_data(temp_sys_id,testDateType,'没有值',temp_value,per_value,temp_flag,temp_value4,'sp');
             exception   
                when no_data_found then  
                  dbms_output.put_line('ID:' || temp_sys_id ||'   '|| testDateType || '---没找到数据');  
           end

分享到:
评论

相关推荐

    VFP9_SP2-汉化补丁(4.1)

    ①在命令窗口输入:DO (HOME()+"tools\test\aatest") 命令,出现“VFP Active Accessibility Test Harness”窗口后,点击菜单的“Help”或“?”按钮会出错。 ②在“生成器”或“向导”中要选择表时,若该表所在的...

    sql2008系统存储过程

    - 语法示例:`EXEC sp_helptext @objname = N'SomeProcedure'` 19. **sp_dboption** - 设置数据库选项 - 用于设置数据库级别的选项。 - 语法示例:`EXEC sp_dboption @dbname = N'TestDB', @optionname = N'...

    sql server系统存储过程

    EXEC sp_updateextendedproperty 'MS_Description', 'this is a test', 'user', dbo, 'table', T2, 'column', id; ``` 2. **修改数据库名称**: 要更改数据库的名称,可以使用`sp_renamedb`存储过程。例如,将`...

    SQL_SERVER复习提纲

    可以通过系统存储过程获取数据库信息,如`sp_helpdb`、`sp_databases`、`sp_helpfile`和`sp_helpfilegroup`。 **二、表操作** 1. **创建表** `CREATE TABLE`语句用于创建表,定义每个字段的数据类型。例如: ``...

    BURNINTEST--硬件检测工具

    - When BurnInTest crashes, it should now generate a "minidump" file to help debug which system component caused the failure (32-bit Pro version only). - Other minor changes. Release 5.3 build 1019 ...

    sybase12.5 自学笔记

    - **查看用户信息**:可使用`sp_displaylogin`和`sp_helpuser`过程来查询用户详情,如`sp_displaylogin joli`和`sp_helpuser`。 - **修改密码**:通过`sp_password`过程修改密码,如`sp_password 'null', new_...

    sybase isql命令

    exec sp_changedbowner 'systest' go ``` ##### 3. 显示当前数据库 - **命令格式**: ``` select db_name() ``` - **示例**: ``` select db_name() go ``` - **说明**:返回当前连接的数据库名称。 #####...

    sybase教程

    - 命令示例:`sp_displaylogin[login_name]` 和 `sp_helpuser` - 示例:`1&gt; sp_helpuser` - `2&gt; go` - `1&gt; sp_displaylog joli` - `2&gt; go` - `1&gt; sp_who` - `2&gt; go` - **修改用户口令** - 修改sa口令示例: ...

    sybase常用命令

    **命令**: `sp_help &lt;表名&gt;` **描述**: 通过此命令可以查看指定表的完整结构,包括列定义、约束等信息。这对于理解表结构和进行后续的数据操作非常重要。 **示例**: 查看名为`employee`的表的结构。 ``` sp_help ...

    SQl邮件配置

    EXEC msdb.dbo.sp_help_job_server 'MSSQLSERVER'; ``` 如果状态显示为“未启用”,则需要使用以下命令来启用: ```sql EXEC msdb.dbo.sp_send_dbmail N'Setup',N'', N'-- Set the mail profile name DECLARE @...

    SQL SERVER修改函数名容易引发的问题分析

    今天遇到一个奇怪的问题:使用sp_helptext XXX查询出来的函数定义名竟然跟函数名不同,而sp_helptext实际是查询sys.all_sql_modules这个系统视图的。直接查询这个视图的definition字段,发现跟sp_helptext是一样的。...

    VFP9 SP2 7423 汉化补丁

    命令 出现“VFP Active Accessibility Test Harness”窗口后 点击菜单的“Help”或“ ”按钮会出错 ②在“生成器”或“向导”中要选择表时 若该表所在的文件夹是用中文命名的 在选取表时 表名会出现乱码或提示...

    SQLServer跨数据库实例取数方式

    - 也可以使用`sp_helpserver`来获取更详细的链接服务器信息: ```sql EXEC sp_helpserver; ``` 4. **删除链接服务器**: - 删除登录映射: ```sql EXEC sp_droplinkedsrvlogin, Null; ``` - 删除链接...

    Linux sybase用法

    1&gt; sp_helpuser ``` ##### 7. 修改密码 更改sa账户密码,或其他用户密码: ``` 1&gt; sp_password | null, new_password 2&gt; go ``` 对于非sa用户,修改密码时需指定用户: ``` 1&gt; sp_password, user_name 2&gt; go ``...

    SYBASE常用语句

    - **`sp_help &lt;表名&gt;;`**:此命令提供了一个表的详细信息,包括列名、数据类型、约束等,对于理解和修改表结构非常有用。 #### 5. 控制查询结果行数 - **`set rowcount 1;`** 和 **`set rowcount 0;`**:前一个...

    数据库系统实验

    sp_helpuser GO ``` ##### 授权与回收示例 - **实验步骤** - **创建用户**:通过 `sp_addlogin` 和 `sp_adduser` 命令创建用户 `U1` 至 `U7`。 ```sql sp_addlogin 'U1', 'U1U1U1', 'TEST' GO -- 重复以上...

    专题三实验报告1

    4. 使用系统存储过程`sp_help`、`sp_helptext`和`sp_helptrigger`来查看触发器的相关信息。 5. 禁用`tri_Update_SC`触发器,并展示在禁用后更新操作(`Update`)的情况。 6. 在`SC`表上创建`INSTEAD OF`类型的`tri__...

    NIST SP800-84.pdf

    Although it is important to have plans in place to help an organization respond to and manage various situations involving information technology (IT), it is equally important to maintain these plans ...

    SQLServer 常用存储过程

    ### SQL Server 常用存储过程详解 #### 一、分页存储过程 GetRecordSet ...exec sp_helptext '存储过程名'; ``` 以上是 SQL Server 中一些常用的存储过程及其使用方法,它们可以帮助开发者更高效地管理和操作数据库。

Global site tag (gtag.js) - Google Analytics