Преглед изворни кода

Merge remote-tracking branch 'origin/master'

xufei пре 3 година
родитељ
комит
88f53fe497

+ 56 - 0
src/main/scala/com/winhc/bigdata/spark/ng/jobs/args_company_job.scala

@@ -430,6 +430,62 @@ object args_company_job {
       , is_super_filter = false
     )
 
+    , args_company_job("company_wechat", Seq("company_id", "public_num")
+      , rowkey_udf = "md5(cleanup(concat_ws('', company_id, public_num)))"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_bid", Seq("title", "link", "publish_time")
+      , rowkey_udf = "md5(cleanup(concat_ws('', title, link, split_date(cast(publish_time as String)))))"
+      , is_super_filter = false
+      , where = " is_json_str(purchaser_info) and is_json_str(supplier_info)"
+      , explode_args = Seq(
+        explode_args("purchaser_info", "$.keyno", "purchaser_info_id_explode")
+        , explode_args("supplier_info", "$.keyno", "supplier_info_id_explode")
+      )
+    )
+
+    , args_company_job("company_annual_report", Seq("company_id", "report_year")
+      , rowkey_udf = "md5(cleanup(concat_ws('', company_id, report_year)))"
+      , id_user_defined_rowkey = true
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_out_investment", Seq("main_id", "out_investment_name")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, out_investment_name))) )"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_out_guarantee", Seq("main_id", "creditor", "obligor")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, creditor, obligor))) )"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_change", Seq("main_id", "change_item", "change_time")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, change_item, split_date(cast(change_time as String))))) )"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_equity_change", Seq("main_id", "change_time")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, split_date(cast(change_time as String))))) )"
+      , is_super_filter = false
+    )
+    , args_company_job("company_annual_report_holder", Seq("main_id", "investor_name")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, investor_name))) )"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_webinfo", Seq("main_id", "website")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id, website))) )"
+      , is_super_filter = false
+    )
+
+    , args_company_job("company_annual_report_social_security", Seq("main_id")
+      , rowkey_udf = "concat_ws('_', main_id, md5(cleanup(concat_ws('',main_id))) )"
+      , is_super_filter = false
+    )
+
+
   )
 
   def get_args_company_job(tn: String): args_company_job = {

+ 23 - 0
src/main/scala/com/winhc/bigdata/spark/ng/utils/CompanySummaryNg_new.scala

@@ -349,6 +349,8 @@ object CompanySummaryNg_new {
     , get_default_summary_args("company_mortgage_info", "company_id")
     , get_default_summary_args("company_brief_cancel_announcement", "company_id")
     , get_default_summary_args("company_double_random_check_info", "company_id")
+    , get_default_summary_args("company_wechat", "company_id")
+    , get_default_summary_args("company_annual_report", "company_id")
 
     , SummaryArgs(table_name = "auction_tracking_explode"
       , companyIdField = "company_info_id_explode"
@@ -466,6 +468,27 @@ object CompanySummaryNg_new {
       ))
     )
 
+
+
+    , SummaryArgs(table_name = "company_bid_explode"
+      , companyIdField = "purchaser_info_id_explode"
+      , distinctField = "rowkey,purchaser_info_id_explode"
+      , where = "purchaser_info_id_explode is not null and length(purchaser_info_id_explode) = 32 "
+      , groupByInfo = GroupByInfoNg(field = "deleted", value_alias = Seq(
+        ("0", s"company_bid_del_0_purchaser")
+        , ("1", s"company_bid_del_1_purchaser")
+      ))
+    )
+
+    , SummaryArgs(table_name = "company_bid_explode"
+      , companyIdField = "supplier_info_id_explode"
+      , distinctField = "rowkey,supplier_info_id_explode"
+      , where = "supplier_info_id_explode is not null and length(supplier_info_id_explode) = 32 "
+      , groupByInfo = GroupByInfoNg(field = "deleted", value_alias = Seq(
+        ("0", s"company_bid_del_0_supplier")
+        , ("1", s"company_bid_del_1_supplier")
+      ))
+    )
   )
 
 

+ 23 - 0
src/main/scala/com/winhc/bigdata/spark/ng/utils/PersonSummaryNg_new.scala

@@ -169,6 +169,29 @@ object PersonSummaryNg_new {
       ))
     )
 
+    , SummaryArgs(table_name = "wenshu_detail_v2_explode"
+      , companyIdField = "plaintiff_info_id_explode"
+      , distinctField = "rowkey,plaintiff_info_id_explode"
+      , where = "plaintiff_info_id_explode is not null and length(plaintiff_info_id_explode) = 33 "
+      , groupByInfo = GroupByInfoNg(field = "deleted", value_alias = Seq(
+        ("0", s"wenshu_detail_v2_del_0_plaintiff")
+        , ("1", s"wenshu_detail_v2_del_1_plaintiff")
+      ))
+    )
+
+    , SummaryArgs(table_name = "wenshu_detail_v2_explode"
+      , companyIdField = "defendant_info_id_explode"
+      , distinctField = "rowkey,defendant_info_id_explode"
+      , where = "defendant_info_id_explode is not null and length(defendant_info_id_explode) = 33 "
+      , groupByInfo = GroupByInfoNg(field = "deleted", value_alias = Seq(
+        ("0", s"wenshu_detail_v2_del_0_defendant")
+        , ("1", s"wenshu_detail_v2_del_1_defendant")
+      ))
+    )
+
+
+
+
   )
 
 

+ 7 - 1
src/main/scala/com/winhc/bigdata/spark/ng/utils/export_company_index_2_es.scala

@@ -312,7 +312,13 @@ object export_company_index_2_es {
 
     , export_2_es_args("company_employment"
       , "rowkey,company_id,title,city,district,company_name,ori_salary,ori_salary_small,ori_salary_big,start_date,end_date,source,education,experience,location,create_time,update_time,deleted".split(","))
-//    , export_2_es_args("wenshu_detail_v2"
+    , export_2_es_args("company_wechat"
+      , "rowkey,company_id,title,img_url,public_num,auth,q_r_img_url,q_r_oss_path,recommend,create_time,update_time,deleted".split(","))
+    , export_2_es_args("company_bid"
+      , "rowkey,title,publish_time,purchaser_info,supplier_info,province,type,items,create_time,update_time,deleted".split(","))
+    , export_2_es_args("company_annual_report"
+      , "rowkey,company_id,report_year,create_time,update_time,deleted".split(","))
+    //    , export_2_es_args("wenshu_detail_v2"
 //      , ("rowkey,case_id,doc_id,case_type,case_no,doc_type,case_reason_level1,case_reason_level2,case_reason_level3,case_reason_level4,case_reason,case_reason_levelnum," +
 //        "case_stage,new_case_stage,case_amt,judge_amt,accept_amt,province_court_name,city_court_name,court_name,court_province_code,court_city_code,court_level,party_info," +
 //        "people_info,yg_info,yg_type,plaintiff_info,yg_wtdlr,yg_faren,yg_lawyer,bg_info,bg_type,defendant_info,bg_wtdlr,bg_faren,bg_lawyer,third_party,danbao,fact,court_view," +