浏览代码

fix(ng.dynamic): 动态字段提取类型修复

JimZhang 3 年之前
父节点
当前提交
099456abb0

+ 10 - 6
src/main/scala/com/winhc/bigdata/spark/ng/dynamic/handle/company.scala

@@ -105,9 +105,13 @@ case class company(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , name = afterName
         , label = "任职变化"
         , risk_level = NgCompanyRiskLevelType.Prompt
-        , content = Seq(ChangeContent("109001", before = null
-          , after = Entity(name = company_name, keyno = company_id)
-          , Entity(afterName, afterKeyno)))
+        , content = Seq(ChangeContent(
+          "109001",
+          before = null,
+          after = Entity(name = company_name, keyno = company_id),
+          entity = Entity(afterName, afterKeyno)
+        )
+        )
       )
       Seq(cdr)
     }
@@ -123,7 +127,7 @@ case class company(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("101003", before = Entity(beforeName, beforeKeyno)
           , after = Entity(afterName, afterKeyno)
-          , Entity(name = company_name, keyno = company_id)))
+          , entity = Entity(name = company_name, keyno = company_id)))
       )
 
       val cdr2 = getRecordPro(
@@ -134,7 +138,7 @@ case class company(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109001", before = null
           , after = Entity(name = company_name, keyno = company_id)
-          , Entity(afterName, afterKeyno)))
+          , entity = Entity(afterName, afterKeyno)))
       )
 
       val cdr3 = getRecordPro(
@@ -145,7 +149,7 @@ case class company(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109002", before = Entity(name = company_name, keyno = company_id)
           , after = null
-          , Entity(beforeName, beforeKeyno)))
+          , entity = Entity(beforeName, beforeKeyno)))
       )
       Seq(cdr, cdr2, cdr3)
     }

+ 5 - 5
src/main/scala/com/winhc/bigdata/spark/ng/dynamic/handle/company_holder.scala

@@ -134,7 +134,7 @@ case class company_holder(is_inc: Boolean) extends NgCompanyDynamicHandle {
           , risk_level = NgCompanyRiskLevelType.Prompt
           , content = Seq(ChangeContent("101102", before = null
             , after = Entity(afterName, afterKeyno)
-            , Entity(name = company_name, keyno = company_id)))
+            , entity = Entity(name = company_name, keyno = company_id)))
         )
 
         val cdr2 = getRecordPro(
@@ -145,7 +145,7 @@ case class company_holder(is_inc: Boolean) extends NgCompanyDynamicHandle {
           , risk_level = NgCompanyRiskLevelType.Prompt
           , content = Seq(ChangeContent("109004", before = null
             , after = Entity(name = company_name, keyno = company_id)
-            , Entity(afterName, afterKeyno)))
+            , entity = Entity(afterName, afterKeyno)))
         )
         Seq(cdr, cdr2)
       } else {
@@ -157,7 +157,7 @@ case class company_holder(is_inc: Boolean) extends NgCompanyDynamicHandle {
           , risk_level = NgCompanyRiskLevelType.Prompt
           , content = Seq(ChangeContent("101102", before = Entity(beforeName, beforeKeyno)
             , after = null
-            , Entity(name = company_name, keyno = company_id)))
+            , entity = Entity(name = company_name, keyno = company_id)))
         )
 
         val cdr2 = getRecordPro(
@@ -168,7 +168,7 @@ case class company_holder(is_inc: Boolean) extends NgCompanyDynamicHandle {
           , risk_level = NgCompanyRiskLevelType.Prompt
           , content = Seq(ChangeContent("109004", before = Entity(name = company_name, keyno = company_id)
             , after = null
-            , Entity(beforeName, beforeKeyno)))
+            , entity = Entity(beforeName, beforeKeyno)))
         )
         Seq(cdr, cdr2)
       }
@@ -185,7 +185,7 @@ case class company_holder(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109004", before = null
           , after = Entity(companyName, companyId)
-          , Entity(name = name, keyno = keyno)))
+          , entity = Entity(name = name, keyno = keyno)))
       )
       Seq(cdr)
     }

+ 7 - 7
src/main/scala/com/winhc/bigdata/spark/ng/dynamic/handle/company_staff.scala

@@ -77,7 +77,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109005", before = null
           , after = Entity(name = staffName, keyno = staffId, info = staffType)
-          , Entity(company_name, company_id)))
+          , entity = Entity(company_name, company_id)))
       )
 
       val cdr2 = getRecordPro(
@@ -88,7 +88,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109005", before = null
           , after = Entity(name = company_name, keyno = company_id, info = staffType)
-          , Entity(staffName, staffId)))
+          , entity = Entity(staffName, staffId)))
       )
       Seq(cdr, cdr2)
     }
@@ -103,7 +103,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109005", before = null
           , after = Entity(name = company_name, keyno = company_id, info = staffType)
-          , Entity(staffName, staffId)))
+          , entity = Entity(staffName, staffId)))
       )
       Seq(cdr)
     }
@@ -127,7 +127,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , content = Seq(ChangeContent("101301"
           , before = Entity(staffName, staffId, info = beforeType)
           , after = Entity(staffName, staffId, info = afterType)
-          , Entity(name = company_name, keyno = company_id)
+          , entity = Entity(name = company_name, keyno = company_id)
         ))
       )
 
@@ -140,7 +140,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , content = Seq(ChangeContent("109005"
           , before = Entity(name = company_name, keyno = company_id, info = beforeType)
           , after = Entity(name = company_name, keyno = company_id, info = afterType)
-          , Entity(name = staffName, keyno = staffId)
+          , entity = Entity(name = staffName, keyno = staffId)
         ))
       )
       Seq(cdr, cdr2)
@@ -157,7 +157,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109005", before = Entity(name = staffName, keyno = staffId, info = staffType)
           , after = null
-          , Entity(company_name, company_id)))
+          , entity = Entity(company_name, company_id)))
       )
 
       val cdr2 = getRecordPro(
@@ -168,7 +168,7 @@ case class company_staff(is_inc: Boolean) extends NgCompanyDynamicHandle {
         , risk_level = NgCompanyRiskLevelType.Prompt
         , content = Seq(ChangeContent("109005", before = Entity(name = company_name, keyno = company_id, info = staffType)
           , after = null
-          , Entity(staffName, staffId)))
+          , entity = Entity(staffName, staffId)))
       )
       Seq(cdr, cdr2)
     }

文件差异内容过多而无法显示
+ 36 - 36
src/main/scala/com/winhc/bigdata/spark/ng/dynamic/utils/DynamicFiledUtils.scala