ソースを参照

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/scala/com/winhc/bigdata/spark/jobs/chance/ChangeExtract.scala
许家凯 4 年 前
コミット
675f6c0cde
16 ファイル変更500 行追加25 行削除
  1. 5 5
      src/main/scala/com/winhc/bigdata/spark/jobs/CompanyCourtAnnouncement.scala
  2. 2 2
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_bid_list.scala
  3. 3 3
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_announcement.scala
  4. 24 0
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_mortgage.scala
  5. 4 4
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_publicity.scala
  6. 3 3
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_transfer.scala
  7. 28 0
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_punishment_info.scala
  8. 28 0
      src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_punishment_info_creditchina.scala
  9. 12 7
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/CompanyDynamicHandle.scala
  10. 1 1
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_bid_list.scala
  11. 46 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_announcement.scala
  12. 100 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_mortgage.scala
  13. 46 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_publicity.scala
  14. 98 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_transfer.scala
  15. 50 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_punishment_info.scala
  16. 50 0
      src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_punishment_info_creditchina.scala

+ 5 - 5
src/main/scala/com/winhc/bigdata/spark/jobs/CompanyCourtAnnouncement.scala

@@ -54,7 +54,7 @@ case class CompanyCourtAnnouncement(s: SparkSession, project: String, //表所
   def calc(runOld: Boolean = false) = {
     import spark.implicits._
 
-    val inc_ads_company_tb_list = s"${project}.inc_ads_${tableName}_list" //增量ads_list表
+    val inc_ads_company_tb_list = s"${project}.inc_ads_${tableName}_list_v1" //增量ads_list表
 
     var adsListDs = getPartion(inc_ads_company_tb_list, spark)
     //跑存量取第一个分区
@@ -326,11 +326,11 @@ case class CompanyCourtAnnouncement(s: SparkSession, project: String, //表所
 
   def preCalc(): Boolean = {
 
-    val inc_ods_company_tb = s"${project}.inc_ods_$tableName" //增量ods表
-    val inc_ads_company_tb = s"${project}.inc_ads_$tableName" //增量ads表
-    val inc_ads_company_tb_list = s"${project}.inc_ads_${tableName}_list" //增量ads_list表
+    val inc_ods_company_tb = s"${project}.inc_ods_${tableName}" //增量ods表
+    val inc_ads_company_tb = s"${project}.inc_ads_${tableName}_v1" //增量ads表
+    val inc_ads_company_tb_list = s"${project}.inc_ads_${tableName}_list_v1" //增量ads_list表
 
-    val ads_company_tb = s"${project}.ads_$tableName" //存量ads表
+    val ads_company_tb = s"${project}.ads_${tableName}_v1" //存量ads表
 
     //table字段
     val columns: Seq[String] = spark.table(inc_ads_company_tb).schema.map(_.name).filter(s => {

+ 2 - 2
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_bid_list.scala

@@ -5,8 +5,8 @@ import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
 import com.winhc.bigdata.spark.utils.ChangeExtractUtils
 
 /**
- * @Author: XuJiakai
- * @Date: 2020/7/9 16:44
+ * @Author: Yan Yongnian
+ * @Date: 2020/7/31
  * @Description:
  */
 

+ 3 - 3
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_announcement.scala

@@ -5,8 +5,8 @@ import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
 import com.winhc.bigdata.spark.utils.ChangeExtractUtils
 
 /**
- * @Author: XuJiakai
- * @Date: 2020/7/9 16:44
+ * @Author: Yan Yongnian
+ * @Date: 2020/8/4
  * @Description:
  */
 
@@ -20,5 +20,5 @@ case class company_land_announcement(equCols: Seq[String]) extends CompanyChange
 
   override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "购地信息", Array("project_name", "project_loc", "area", "tran_price", "e_number"))
 
-  override def getBizTime(newMap: Map[String, String]): String = newMap("contract_date")
+  override def getBizTime(newMap: Map[String, String]): String = newMap("actual_start_time")
 }

+ 24 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_mortgage.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/4
+ * @Description:
+ */
+
+
+//土地抵押
+
+case class company_land_mortgage(equCols: Seq[String]) extends CompanyChangeHandle {
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("land_num"), s"${newMap("land_num")}土地抵押发生变更")
+
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("land_num"), s"新增${newMap("land_num")}土地抵押")
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "土地抵押", Array("land_mark", "land_num", "land_aministrative_area", "land_loc", "land_area", "use_right_num", "use_for", "area", "evaluate_amount", "mortgage_amount", "start_date", "end_date"))
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("start_date")
+}

+ 4 - 4
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_publicity.scala

@@ -5,8 +5,8 @@ import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
 import com.winhc.bigdata.spark.utils.ChangeExtractUtils
 
 /**
- * @Author: XuJiakai
- * @Date: 2020/7/9 16:44
+ * @Author: Yan Yongnian
+ * @Date: 2020/8/3
  * @Description:
  */
 
@@ -22,7 +22,7 @@ case class company_land_publicity(equCols: Seq[String]) extends CompanyChangeHan
 
   override def getBizTime(newMap: Map[String, String]): String = newMap("publication_start_date")
 
-  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("project_name"), s"${newMap("project_name")}地块公示发生变更")
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"${newMap("title")}地块公示发生变更")
 
-  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("project_name"), s"新增${newMap("project_name")}地块公示")
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"新增${newMap("title")}地块公示")
 }

+ 3 - 3
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_land_transfer.scala

@@ -5,8 +5,8 @@ import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
 import com.winhc.bigdata.spark.utils.ChangeExtractUtils
 
 /**
- * @Author: XuJiakai
- * @Date: 2020/7/9 16:44
+ * @Author: Yan Yongnian
+ * @Date: 2020/8/4
  * @Description:
  */
 
@@ -14,7 +14,7 @@ import com.winhc.bigdata.spark.utils.ChangeExtractUtils
 //土地转让
 
 case class company_land_transfer(equCols: Seq[String]) extends CompanyChangeHandle {
-  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("location"), s"${newMap("title")}土地转让信息发生变更")
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("location"), s"${newMap("location")}土地转让信息发生变更")
 
   override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("location"), s"新增${newMap("location")}土地转让信息")
 

+ 28 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_punishment_info.scala

@@ -0,0 +1,28 @@
+
+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/4
+ * @Description:
+ */
+
+
+//行政处罚
+
+case class company_punishment_info(equCols: Seq[String]) extends CompanyChangeHandle with Serializable {
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = {
+    val str = ChangeExtractUtils.getTags(newMap, "行政处罚", Array("punish_number", "base", "name", "reg_number", "decision_date", "publish_date"))
+    str
+  }
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("decision_date")
+
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("punish_number"), s"${newMap("punish_number")}行政处罚发生变更")
+
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("punish_number"), s"新增${newMap("punish_number")}行政处罚")
+}

+ 28 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_punishment_info_creditchina.scala

@@ -0,0 +1,28 @@
+
+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/4
+ * @Description:
+ */
+
+
+//行政处罚-信用中国
+
+case class company_punishment_info_creditchina(equCols: Seq[String]) extends CompanyChangeHandle with Serializable {
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = {
+    val str = ChangeExtractUtils.getTags(newMap, "行政处罚-信息中国", Array("punish_number", "punish_name", "reason", "area", "decision_date", "term"))
+    str
+  }
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("decision_date")
+
+  override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("punish_number"), s"${newMap("punish_number")}行政处罚-信用中国发生变更")
+
+  override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("punish_number"), s"新增${newMap("punish_number")}行政处罚-信用中国")
+}

+ 12 - 7
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/CompanyDynamicHandle.scala

@@ -10,10 +10,10 @@ trait CompanyDynamicHandle {
   private val table_2_sub_info_type_map = Map(
     "CompanyDynamicHandleTest" -> "MyTest"
     , "" -> "eci_detail" //工商信息
-    , "" -> "land_notice" //土地公示
-    , "" -> "land_purchase" //土地购买
-    , "" -> "land_transfer" //土地转让
-    , "" -> "land_mortgage" //土地抵押
+    , "company_land_publicity" -> "land_publicity" //土地公示
+    , "company_land_announcement" -> "land_announcement" //土地购买
+    , "company_land_transfer" -> "land_transfer" //土地转让
+    , "company_land_mortgage" -> "land_mortgage" //土地抵押
     , "company_bid_list" -> "tender_es" //中标信息ES
     , "" -> "enterprise_shixin" //失信
     , "" -> "enterprise_zhixing" //被执
@@ -25,7 +25,8 @@ trait CompanyDynamicHandle {
     , "" -> "eci_wenshu" //裁判文书
     , "" -> "court_announcement" //法院公告
     , "" -> "" //对外投资
-    , "" -> "eci_administrativepenalty" //行政处罚
+    , "company_punishment_info" -> "punishment_info" //行政处罚
+    , "company_punishment_info_creditchina" -> "punishment_info_creditchina" //行政处罚-信用中国
     , "" -> "eci_chattel" //动产抵押
     , "company_env_punishment" -> "env_punishment" //环保处罚
     , "" -> "judicial_assistance" //股权冻结
@@ -55,10 +56,14 @@ trait CompanyDynamicHandle {
     , "" -> "8" // 对外投资
     , "" -> "9" // 动产抵押
     , "" -> "10" // 司法拍卖
-    , "" -> "11" // 土地信息
+    , "company_land_publicity" -> "11-1" // 土地信息-地块公示
+    , "company_land_announcement" -> "11-2" // 土地信息-购地信息
+    , "company_land_transfer" -> "11-3" // 土地信息-土地转让
+    , "company_land_mortgage" -> "11-4" // 土地信息-土地抵押
     , "company_bid_list" -> "12" // 中标信息
     , "" -> "13" // 招聘信息
-    , "" -> "14" // 行政处罚
+    , "company_punishment_info" -> "14-1" // 行政处罚
+    , "company_punishment_info_creditchina" -> "14-2" // 行政处罚-信用中国
     , "" -> "15" // 公示催告
     , "company_env_punishment" -> "16" // 环保处罚
     , "company_equity_info" -> "17" // 股权出质

+ 1 - 1
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_bid_list.scala

@@ -64,7 +64,7 @@ case class company_bid_list() extends CompanyDynamicHandle {
   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 proxyName = new_map("proxy")
     val oldCName = new_map("cname")
-    if (proxyName != null && !proxyName.isEmpty && proxyName.equals(oldCName)) {
+    if (proxyName != null && !proxyName.isEmpty && proxyName.equals(oldCName)) {//代理机构参与的数据过滤掉
       null
     }
     else {

+ 46 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_announcement.scala

@@ -0,0 +1,46 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//购地信息
+case class company_land_announcement()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("project_name")
+
+  /**
+   * 变更内容
+   *
+   * @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 = new_map("project_loc") + new_map("supply_method")
+
+  /**
+   * 变更时间
+   *
+   * @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 = "利好信息"
+}

+ 100 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_mortgage.scala

@@ -0,0 +1,100 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//土地抵押
+case class company_land_mortgage() 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("land_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("evaluate_amount")万元\n
+       |抵押金额:$new_map("mortgage_amount")万元\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 = {
+    //获取抵押类型:mortgagee:只有抵押权人;mortgagor:只有抵押人;bothsame:同为抵押人和抵押权人(有这样的数据);bothone:两者数据均有的抵押人;bothtwo:两者数据均有的抵押权人
+    val mortType = new_map("type")
+    if (mortType != null && !mortType.isEmpty) {
+      //抵押权人
+      if(mortType.equals("mortgagee") || mortType.equals("bothtwo")) {
+        "提示信息"
+      }
+      else{//抵押人
+        "警示信息"
+      }
+    }
+    else{
+      null//脏数据
+    }
+  }
+  /**
+   *
+   * @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)] = {
+//获取抵押类型:mortgagee:只有抵押权人;mortgagor:只有抵押人;bothsame:同为抵押人和抵押权人(有这样的数据);bothone:两者数据均有的抵押人;bothtwo:两者数据均有的抵押权人
+    val mortType = new_map("type")
+    if (mortType != null && !mortType.isEmpty) {
+      //抵押权人
+      if(mortType.equals("mortgagee") || mortType.equals("bothtwo")) {
+        super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业有接受其他企业土地抵押行为")
+      }
+      else{//抵押人
+        super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业有土地抵押行为")
+      }
+    }
+    else{
+      null//脏数据
+    }
+  }
+}

+ 46 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_publicity.scala

@@ -0,0 +1,46 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//地块公示
+case class company_land_publicity() 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 = new_map("location") + new_map("user_for")
+
+  /**
+   * 变更时间
+   *
+   * @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 = "提示信息"
+}

+ 98 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_land_transfer.scala

@@ -0,0 +1,98 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//土地转让
+case class company_land_transfer() 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("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("merchandise_price")万元\n
+       |成交时间:$new_map("merchandise_time")\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 = {
+    //获取抵押类型:now:只有现有土地使用权人;pre:只有原土地使用权人;bothsame:原土地使用权人与现土地使用权人为同一人或企业(有这样的数据);bothone:两者数据均有的原土地使用人;bothtwo:两者数据均有的现有土地使用人
+    val mortType = new_map("type")
+    if (mortType != null && !mortType.isEmpty) {
+      //现有土地使用权人
+      if(mortType.equals("now") || mortType.equals("bothtwo")) {
+        "提示信息"
+      }
+      else{//原有土地使用权人
+        "提示信息"
+      }
+    }
+    else{
+      null//脏数据
+    }
+  }
+  /**
+   *
+   * @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)] = {
+//获取抵押类型:mortgagee:只有抵押权人;mortgagor:只有抵押人;bothsame:同为抵押人和抵押权人(有这样的数据);bothone:两者数据均有的抵押人;bothtwo:两者数据均有的抵押权人
+    val mortType = new_map("type")
+    if (mortType != null && !mortType.isEmpty) {
+      //现有土地使用权人
+      if(mortType.equals("now") || mortType.equals("bothtwo")) {
+        super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业有接受其他企业土地转让行为")
+      }
+      else{//原有土地使用权人
+        super.handle(rowkey, bizDate, cid, change_fields, old_map, new_map, cname, "该企业有土地转让行为")
+      }
+    }
+    else{
+      null//脏数据
+    }
+  }
+}

+ 50 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_punishment_info.scala

@@ -0,0 +1,50 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//行政处罚
+case class company_punishment_info() 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("punish_number")
+
+  /**
+   * 变更内容
+   *
+   * @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("decision_date")\n
+       |违法行为类型:$new_map("type")\n
+       |行政处罚内容:$new_map("content")\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 = "警示信息"
+}

+ 50 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/tables/company_punishment_info_creditchina.scala

@@ -0,0 +1,50 @@
+package com.winhc.bigdata.spark.jobs.dynamic.tables
+
+import com.winhc.bigdata.spark.jobs.dynamic.CompanyDynamicHandle
+
+/**
+ * @Author yyn
+ * @Date 2020/8/4
+ * @Description TODO
+ */
+//行政处罚-信用中国
+case class company_punishment_info_creditchina() 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("punish_number")
+
+  /**
+   * 变更内容
+   *
+   * @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("decision_date")\n
+       |违法行为类型:$new_map("type")\n
+       |行政处罚结果:$new_map("result")\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 = "警示信息"
+}