晏永年 4 vuotta sitten
vanhempi
commit
407747e763

+ 2 - 1
src/main/scala/com/winhc/bigdata/spark/jobs/chance/ChangeExtract.scala

@@ -308,6 +308,7 @@ object ChangeExtract {
     , Args(tableName = "company_double_random_check_info", primaryFields = "check_plan_name")//双随机抽查
     , Args(tableName = "company_judicial_sale_combine_list", primaryFields = "title")//司法拍卖
     , Args(tableName = "company_tax_contravention", primaryFields = "case_type")//税收违法
+    , Args(tableName = "company_send_announcement_list", primaryFields = "title")//送达公告
 
     , Args(tableName = "company_certificate", primaryFields = "type")
     , Args(tableName = "company_abnormal_info", primaryFields = "remove_reason")
@@ -345,7 +346,7 @@ object ChangeExtract {
       val project = "winhc_eci_dev"
       val config = EsConfig.getEsConfigMap ++ mutable.Map(
         "spark.hadoop.odps.project.name" -> project,
-        "spark.hadoop.odps.spark.local.partition.amt" -> "10"
+        "spark.hadoop.odps.spark.local.partition.amt" -> "1000"
       )
       val spark = SparkUtils.InitEnv("ChangeExtract", config)
 

+ 24 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_send_announcement_list.scala

@@ -0,0 +1,24 @@
+
+package com.winhc.bigdata.spark.jobs.chance.table
+
+import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
+import com.winhc.bigdata.spark.utils.ChangeExtractUtils
+
+/**
+ * @Author: Yan Yongnian
+ * @Date: 2020/8/12
+ * @Description:
+ */
+
+
+//送达公告
+
+case class company_send_announcement_list(equCols: Seq[String]) extends CompanyChangeHandle {
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"${newMap("title")}送达公告发生变更")
+
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"新增${newMap("title")}送达公告")
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "送达公告", Array("court", "case_no", "area", "case_reason", "plaintiff", "defendant"))
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("start_date")
+}

+ 1 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/CompanyDynamic.scala

@@ -194,6 +194,7 @@ object CompanyDynamic {
     , Args(tableName = "company_public_announcement2_list", bName = 1)
     , Args(tableName = "company_mortgage_info", bName = 1)
     , Args(tableName = "company_stock_announcement", bName = 1)
+    , Args(tableName = "company_send_announcement_list", bName = 1)
   )
 
   private case class Args(project: String = "winhc_eci_dev"

+ 2 - 1
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/CompanyDynamicHandle.scala

@@ -44,6 +44,7 @@ trait CompanyDynamicHandle {
     , "company_court_open_announcement_list" -> "court_notice" //开庭公告
     , "bankruptcy_open_case" -> "bankruptcy_open_case" //破产重整
     , "company_stock_announcement" -> "company_stock_announcement" //企业公告
+    , "company_send_announcement_list" -> "company_send_announcement_list" //送达公告
 
     , "company_staff" -> "company_staff" //主要成员
     , "company_check_info" -> "spot_check" //抽查检查
@@ -94,7 +95,7 @@ trait CompanyDynamicHandle {
     , "company_double_random_check_info" -> "35" // 双随机抽查
     , "" -> "36" // 限制高消费
     , "" -> "37" // 被执行人
-    , "" -> "38" // 送达报告
+    , "company_send_announcement_list" -> "38" // 送达报告
     , "bankruptcy_open_case" -> "39" // 破产重整
     , "company_court_register" -> "40" // 立案信息
   )

+ 78 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_send_announcement_list.scala

@@ -0,0 +1,78 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/12
+ * @Description TODO
+ */
+//送达公告
+case class company_send_announcement_list()extends CompanyDynamicHandle {
+  /**
+   * 信息描述
+   *
+   * @param old_map
+   * @param new_map
+   * @return
+   */
+  override def get_rta_desc(old_map: Map[String, String], new_map: Map[String, String]): String = new_map("title")
+
+  /**
+   * 变更内容
+   *
+   * @param old_map
+   * @param new_map
+   * @return
+   */
+  override def get_change_content(old_map: Map[String, String], new_map: Map[String, String], cname: String = null): String = {
+    s"""发布日期:$new_map("start_date")\n
+       |法院名称:$new_map("court")\n""".stripMargin
+  }
+
+  /**
+   * 变更时间
+   *
+   * @param new_map
+   * @return
+   */
+//  override def get_change_time(new_map: Map[String, String]): String = new_map("biz_date")
+
+  /**
+   * 风险等级
+   *
+   * @param old_map
+   * @param new_map
+   * @return
+   */
+  override def get_info_risk_level(old_map: Map[String, String], new_map: Map[String, String]): String = {
+    if(new_map("defendant_cids").contains("cid"))//原告
+      {
+        "警示信息"
+      }
+    else {
+        "提示信息"
+      }
+  }
+  /**
+   *
+   * @param rowkey
+   * @param cid
+   * @param change_fields
+   * @param old_map
+   * @param new_map
+   * @return cid
+   *         cname
+   *         info_type
+   *         rta_desc
+   *         change_content
+   *         change_time
+   *         biz_id
+   *         sub_info_type
+   *         info_risk_level
+   *         winhc_suggest
+   */
+  override def handle(rowkey: String, bizDate: String, cid: String, change_fields: Seq[String], old_map: Map[String, String], new_map: Map[String, String], cname: String, suggestion: String): Seq[(String, String, String, String, String, String, String, String, String, String)] = {
+     super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业发布送达公告信息")
+  }
+}