|
@@ -248,6 +248,16 @@ case class V7DataCompare(s: SparkSession
|
|
|
|
|
|
def calc(tn: String, compare_cols: Seq[String]): DataFrame = {
|
|
|
val tuple = generateAllTabSql(tableName = tn, project = "winhc_ng")
|
|
|
+ val ss = if (tn.equals("company_equity_info")) {
|
|
|
+ s"""
|
|
|
+ |select *,related_company_id as company_id,related_company_name as company_name from (
|
|
|
+ | ${tuple._1}
|
|
|
+ |)
|
|
|
+ |""".stripMargin
|
|
|
+
|
|
|
+ } else {
|
|
|
+ tuple._1
|
|
|
+ }
|
|
|
val array = compare_cols.map(s => {
|
|
|
if (s.endsWith(")")) s else "cast(" + s + " as string)"
|
|
|
}).mkString(",")
|
|
@@ -279,7 +289,7 @@ case class V7DataCompare(s: SparkSession
|
|
|
| select company_id
|
|
|
| ,$cols_md5 as cols_md5
|
|
|
| from (
|
|
|
- | ${tuple._1}
|
|
|
+ | ${ss}
|
|
|
| )
|
|
|
|) as t2
|
|
|
|on t1.company_id = t2.company_id
|
|
@@ -375,6 +385,8 @@ object V7DataCompare {
|
|
|
, "company_holder" -> Seq("holder_name", "amount_format(amount)")
|
|
|
, "company_staff" -> Seq("staff_name", "staff_type")
|
|
|
, "company_change" -> Seq("split(cast(change_time as string),' ')[0]")
|
|
|
+ , "company_equity_info" -> Seq("reg_number", "deleted")
|
|
|
+ , "company_abnormal_info" -> Seq("put_reason", "put_date")
|
|
|
)
|
|
|
|
|
|
|