crm_project_infobean.java
来自「java开发的办公系统 1.系统管理 (地区管理,部门管理,菜单管理,用户管理」· Java 代码 · 共 1,331 行 · 第 1/5 页
JAVA
1,331 行
{ if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".city_id ="+fvalue+" "); b=true; } fvalue=aItem.getProject_introduction(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".project_introduction like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getRelated_doc(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".related_doc like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getProject_status(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".project_status ="+fvalue+" "); b=true; } fvalue=aItem.getRegister_date(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" DATEDIFF(day,"+T.CRM_PROJECT_INFO+".register_date,'"+fvalue+"')=0 "); b=true; } fvalue=aItem.getRegister_date_start(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" DATEDIFF(day,"+T.CRM_PROJECT_INFO+".register_date,'"+fvalue+"')<=0 "); b=true; } fvalue=aItem.getRegister_date_end(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" DATEDIFF(day,"+T.CRM_PROJECT_INFO+".register_date,'"+fvalue+"')>=0 "); b=true; } fvalue=aItem.getCrm_project_contractItem().getSign_date(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" DATEDIFF(day,"+T.CRM_PROJECT_CONTRACT+".sign_date,'"+fvalue+"')<=0 "); b=true; } fvalue=aItem.getCrm_project_contractItem().getEnd_date(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" DATEDIFF(day,"+T.CRM_PROJECT_CONTRACT+".end_date,'"+fvalue+"')>=0 "); b=true; } fvalue=aItem.getRegister_username(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_username like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getRegister_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_name like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getRegister_department_id(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_department_id ="+fvalue+" "); b=true; } fvalue=aItem.getRegister_department_nodepath(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" ','+"+T.CRM_PROJECT_INFO+".register_department_nodepath+',' like ',%"+fvalue+"%,' "); b=true; } fvalue=aItem.getRegister_department(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_department like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getRegister_area_id(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_area_id ="+fvalue+" "); b=true; } fvalue=aItem.getRegister_area_nodepath(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" ','+"+T.CRM_PROJECT_INFO+".register_area_nodepath+',' like ',%"+fvalue+"%,' "); b=true; } fvalue=aItem.getRegister_area(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".register_area like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getAppraisal_result(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".appraisal_result ="+fvalue+" "); b=true; } fvalue=aItem.getWorkflow_id(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".workflow_id ="+fvalue+" "); b=true; } fvalue=aItem.getWorkflow_state_id(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".workflow_state_id ="+fvalue+" "); b=true; } fvalue=aItem.getWorkflow_state_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".workflow_state_name like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getApproval_type(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".approval_type ="+fvalue+" "); b=true; } fvalue=aItem.getAppraisal_method(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".appraisal_method ="+fvalue+" "); b=true; } fvalue=aItem.getApproval_user(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".approval_user like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getApproval_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".approval_name like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getApproval_departmentid(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".approval_departmentid like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getApproval_department(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".approval_department like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getReceive_user(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" (','+"+T.CRM_PROJECT_INFO+".receive_user+',' like ',%"+fvalue+",%' or "+T.CRM_PROJECT_INFO+".receive_user='all_users') "); b=true; } fvalue=aItem.getReceive_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".receive_name like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getFunc_id(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".func_id like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getState_type(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".state_type ="+fvalue+" "); b=true; } fvalue=aItem.getCrm_customer_infoItem().getCustomer_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_CUSTOMER_INFO+".customer_name like '%"+fvalue+"%' "); b=true; } fvalue=aItem.getCrm_customer_contactItem().getContact_name(); if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_CUSTOMER_CONTACT+".contact_name like '%"+fvalue+"%' "); b=true; } fvalue="has_link_table"; if(fvalue!=null && fvalue.length()>0) { if(b) filter.append(" and"); filter.append(" "+T.CRM_PROJECT_INFO+".customer_id = "+T.CRM_CUSTOMER_INFO+".id and "); filter.append(" "+T.CRM_PROJECT_INFO+".customer_contact_id = "+T.CRM_CUSTOMER_CONTACT+".id and "); filter.append(" "+T.CRM_PROJECT_INFO+".id = "+T.CRM_PROJECT_CONTRACT+".crm_project_info_id and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_rake = project_rake_dictionary.code and "); filter.append(" project_rake_dictionary.num = 19 and "); filter.append(" "+T.CRM_PROJECT_INFO+".develop_language = develop_language_dictionary.code and "); filter.append(" develop_language_dictionary.num = 20 and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_language = project_language_dictionary.code and "); filter.append(" project_language_dictionary.num = 21 and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_type = project_type_dictionary.code and "); filter.append(" project_type_dictionary.num = 22 and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_origin = project_origin_dictionary.code and "); filter.append(" project_origin_dictionary.num = 15 and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_business = project_business_dictionary.code and "); filter.append(" project_business_dictionary.num = 16 and "); filter.append(" "+T.CRM_PROJECT_INFO+".country_id = "+T.DICTIONARY_COUNTRY+".id and "); filter.append(" "+T.CRM_PROJECT_INFO+".province_id = "+T.DICTIONARY_PROVINCE+".id and "); filter.append(" "+T.CRM_PROJECT_INFO+".city_id = "+T.DICTIONARY_CITY+".id and "); filter.append(" "+T.CRM_PROJECT_INFO+".project_status = project_status_dictionary.code and "); filter.append(" project_status_dictionary.num = 23 and "); filter.append(" "+T.CRM_PROJECT_INFO+".appraisal_result = appraisal_result_dictionary.code and "); filter.append(" appraisal_result_dictionary.num = 24 and "); filter.append(" "+T.CRM_PROJECT_INFO+".develop_database = develop_database_dictionary.code and "); filter.append(" develop_database_dictionary.num = 27 "); b=true; } StringBuffer sql=new StringBuffer(); sql.append(" select top "+pageSize+" "+T.CRM_PROJECT_CONTRACT+".sign_date,"+T.CRM_PROJECT_CONTRACT+".end_date, "+T.CRM_PROJECT_INFO+".* ,"+T.CRM_CUSTOMER_INFO+".customer_name as "+T.CRM_CUSTOMER_INFO+"_customer_name ,"+T.CRM_CUSTOMER_CONTACT+".contact_name as "+T.CRM_CUSTOMER_CONTACT+"_contact_name ,project_rake_dictionary.code_name as project_rake_dictionaryname ,develop_language_dictionary.code_name as develop_language_dictionaryname ,project_language_dictionary.code_name as project_language_dictionaryname ,project_type_dictionary.code_name as project_type_dictionaryname ,project_origin_dictionary.code_name as project_origin_dictionaryname ,project_business_dictionary.code_name as project_business_dictionaryname ,"+T.DICTIONARY_COUNTRY+".country_cn_name as "+T.DICTIONARY_COUNTRY+"_country_cn_name ,"+T.DICTIONARY_PROVINCE+".province_cn_name as "+T.DICTIONARY_PROVINCE+"_province_cn_name ,"+T.DICTIONARY_CITY+".city_cn_name as "+T.DICTIONARY_CITY+"_city_cn_name ,project_status_dictionary.code_name as project_status_dictionaryname ,appraisal_result_dictionary.code_name as appraisal_result_dictionaryname,develop_database_dictionary.code_name as develop_database_dictionaryname from "+T.CRM_PROJECT_INFO+" ,"+T.CRM_CUSTOMER_INFO+" ,"+T.CRM_CUSTOMER_CONTACT+" ,"+T.OA_DICTIONARY+" as project_rake_dictionary ,"+T.OA_DICTIONARY+" as develop_language_dictionary ,"+T.OA_DICTIONARY+" as project_language_dictionary ,"+T.OA_DICTIONARY+" as project_type_dictionary ,"+T.OA_DICTIONARY+" as project_origin_dictionary ,"+T.OA_DICTIONARY+" as project_business_dictionary ,"+T.DICTIONARY_COUNTRY+" ,"+T.DICTIONARY_PROVINCE+" ,"+T.DICTIONARY_CITY+" ,"+T.OA_DICTIONARY+" as project_status_dictionary,"+T.OA_DICTIONARY+" as appraisal_result_dictionary,"+T.CRM_PROJECT_CONTRACT+","+T.OA_DICTIONARY+" as develop_database_dictionary where "); if(b) { sql.append(" "+filter.toString()+" and "); } sql.append(" ("+T.CRM_PROJECT_INFO+".id not in (SELECT TOP "+Integer.toString(nextPageSize)+" "+T.CRM_PROJECT_INFO+".id from "+T.CRM_PROJECT_INFO+" ,"+T.CRM_CUSTOMER_INFO+" ,"+T.CRM_CUSTOMER_CONTACT+" ,"+T.OA_DICTIONARY+" as project_rake_dictionary ,"+T.OA_DICTIONARY+" as develop_language_dictionary ,"+T.OA_DICTIONARY+" as project_language_dictionary ,"+T.OA_DICTIONARY+" as project_type_dictionary ,"+T.OA_DICTIONARY+" as project_origin_dictionary ,"+T.OA_DICTIONARY+" as project_business_dictionary ,"+T.DICTIONARY_COUNTRY+" ,"+T.DICTIONARY_PROVINCE+" ,"+T.DICTIONARY_CITY+" ,"+T.OA_DICTIONARY+" as project_status_dictionary,"+T.OA_DICTIONARY+" as appraisal_result_dictionary ,"+T.CRM_PROJECT_CONTRACT+" ,"+T.OA_DICTIONARY+" as develop_database_dictionary ");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?