晏永年 4 lat temu
rodzic
commit
b186d36957

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

@@ -255,6 +255,7 @@ object ChangeExtract {
     , Args(tableName = "company_punishment_info", primaryFields = "punish_number")
     , Args(tableName = "company_punishment_info_creditchina", primaryFields = "punish_number")
     , Args(tableName = "bankruptcy_open_case", primaryFields = "case_no")//破产重整
+    , Args(tableName = "company_public_announcement2_list", primaryFields = "applicant_cid,owner_cid,drawer_cid,gather_name_cid,bill_num")//公示催告
 
     , Args(tableName = "company_certificate", primaryFields = "type")
     , Args(tableName = "company_abnormal_info", primaryFields = "remove_reason")

+ 24 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_public_announcement2_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/6
+ * @Description:
+ */
+
+
+//公示催告
+
+case class company_public_announcement2_list(equCols: Seq[String]) extends CompanyChangeHandle {
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("bill_type") + newMap("bill_num"), s"${newMap("bill_type") + newMap("bill_num")}公示催告发生变更")
+
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("bill_type") + newMap("bill_num"), s"新增${newMap("bill_type") + newMap("bill_num")}公示催告")
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "公示催告", Array("applicant_cid", "owner_cid", "drawer_cid", "gather_name_cid", "bill_type", "bill_num", "bill_amt"))
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("publish_date")
+}

+ 79 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_public_announcement2_list.scala

@@ -0,0 +1,79 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/6
+ * @Description TODO
+ */
+//公示催告
+case class company_public_announcement2_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("bill_type") + new_map("bill_num")
+
+  /**
+   * 变更内容
+   *
+   * @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("bill_num")\n
+       |申请人:$new_map("cname")\n
+       |票面金额:$new_map("start_date")\n
+       |公告日期:$new_map("end_date")\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 = "提示信息"
+  /**
+   *
+   * @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)] = {
+    val cid = new_map("cid")
+    val applicant_cid = new_map("applicant_cid")
+    if (cid != null && !cid.isEmpty && applicant_cid !=null && cid.equals(applicant_cid)) {//目前参照企查查做法:公示催告维度显示全部角色,而动态仅显示申请人
+      null
+    }
+    else {
+      super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业发布公示催告信息")
+    }
+  }
+}