Browse Source

feat: 加入变更

许家凯 3 years ago
parent
commit
f2edb50c55
21 changed files with 271 additions and 5 deletions
  1. 1 1
      src/main/scala/com/winhc/bigdata/spark/ng/change/NgChangeExtract.scala
  2. 23 4
      src/main/scala/com/winhc/bigdata/spark/ng/change/NgChangeExtractArgs.scala
  3. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/auction_tracking.scala
  4. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_abnormal_info.scala
  5. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_check_info.scala
  6. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_announcement.scala
  7. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_open_announcement.scala
  8. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_register.scala
  9. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_double_random_check_info.scala
  10. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_env_punishment.scala
  11. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_finance.scala
  12. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_illegal_info.scala
  13. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license.scala
  14. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license_creditchina.scala
  15. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license_entpub.scala
  16. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_own_tax.scala
  17. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_punishment_info.scala
  18. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_punishment_info_creditchina.scala
  19. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_send_announcement.scala
  20. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_tax_contravention.scala
  21. 13 0
      src/main/scala/com/winhc/bigdata/spark/ng/change/table/zxr_evaluate_results.scala

+ 1 - 1
src/main/scala/com/winhc/bigdata/spark/ng/change/NgChangeExtract.scala

@@ -27,7 +27,7 @@ case class NgChangeExtract(s: SparkSession,
                           ) extends LoggingUtils with Logging {
   @(transient@getter) val spark: SparkSession = s
 
-  val target_tab = "bds_change_extract_test"
+  val target_tab = "bds_change_extract"
   init()
 
   def init() {

+ 23 - 4
src/main/scala/com/winhc/bigdata/spark/ng/change/NgChangeExtractArgs.scala

@@ -13,15 +13,34 @@ case class NgChangeExtractArgs(project: String = "winhc_ng"
 
 
 object NgChangeExtractArgs {
-  val startArgs: Seq[NgChangeExtractArgs] = Seq(
+  val startArgs: Seq[NgChangeExtractArgs] =
+    Seq(
     NgChangeExtractArgs(tableName = "company_holder", primaryFields = "holder_id,percent,amount,deleted", newlyRegister = true)
     , NgChangeExtractArgs(tableName = "company_staff", primaryFields = "staff_type,deleted", newlyRegister = true)
     , NgChangeExtractArgs(tableName = "company", primaryKey = "company_id", primaryFields = "name,cate_third_code,county_code,reg_capital_amount,legal_entity_name,legal_entity_id,reg_capital,reg_location,business_scope,reg_status_std")
     , NgChangeExtractArgs(tableName = "company_tm", primaryFields = "status")
     , NgChangeExtractArgs(tableName = "company_icp", primaryFields = "domain")
   ) ++ Seq(
-    "company_abnormal_info"
-    ,"company_app_info"
-    ,"auction_tracking"
+    "auction_tracking"
+    , "company_abnormal_info"
+    , "company_court_announcement"
+    , "company_court_open_announcement"
+    , "company_court_register"
+    , "company_env_punishment"
+    , "company_illegal_info"
+    , "company_own_tax"
+    , "company_punishment_info"
+    , "company_punishment_info_creditchina"
+    , "company_send_announcement"
+    , "company_tax_contravention"
+    , "zxr_evaluate_results"
+
+    , "company_check_info"
+    , "company_double_random_check_info"
+    , "company_finance"
+    , "company_license"
+    , "company_license_creditchina"
+    , "company_license_entpub"
+
   ).map(r => NgChangeExtractArgs(tableName = r))
 }

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/auction_tracking.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class auction_tracking(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_abnormal_info.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_abnormal_info(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_check_info.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_check_info(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("check_date"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_announcement.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_court_announcement(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_open_announcement.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_court_open_announcement(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_court_register.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_court_register(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_double_random_check_info.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_double_random_check_info(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("check_date"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_env_punishment.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_env_punishment(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_finance.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_finance(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("finance_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_illegal_info.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_illegal_info(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_license(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("issue_date"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license_creditchina.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_license_creditchina(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("decision_date"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_license_entpub.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_license_entpub(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("start_date"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_own_tax.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_own_tax(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_punishment_info.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_punishment_info(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_punishment_info_creditchina.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_punishment_info_creditchina(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_send_announcement.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_send_announcement(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/company_tax_contravention.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class company_tax_contravention(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}

+ 13 - 0
src/main/scala/com/winhc/bigdata/spark/ng/change/table/zxr_evaluate_results.scala

@@ -0,0 +1,13 @@
+
+
+package com.winhc.bigdata.spark.ng.change.table
+
+import com.winhc.bigdata.spark.ng.change.NgCompanyChangeHandle
+import com.winhc.bigdata.spark.utils.DateUtils
+
+
+case class zxr_evaluate_results(equCols: Seq[String]) extends NgCompanyChangeHandle {
+
+
+  override protected def getBizDate(newMap: Map[String, String]): String = DateUtils.getBizDate(newMap("update_time"))
+}