|
@@ -28,7 +28,7 @@ case class CreditPunishmentEntityAgg(s: SparkSession
|
|
|
case class company_other(legal_entity_id: String, legal_entity_name: String, legal_entity_type: String, reg_capital: String, reg_capital_amount: String, reg_capital_currency: String, estiblish_time: String, logo: String)
|
|
|
|
|
|
private def init(): Unit = {
|
|
|
- code2Name()
|
|
|
+ areaCode2Name_pro()
|
|
|
double_2_str()
|
|
|
|
|
|
def array_distinct(arr: Seq[String]): String = if (arr == null || arr.isEmpty) null else arr.filter(StringUtils.isNotEmpty).distinct.mkString(",")
|
|
@@ -293,9 +293,9 @@ case class CreditPunishmentEntityAgg(s: SparkSession
|
|
|
| ,0 as entity_type
|
|
|
| ,t2.org_number AS card_num
|
|
|
| ,t1.label
|
|
|
- | ,get_province_name(t2.area_code) as province
|
|
|
- | ,get_city_name(t2.area_code) as city
|
|
|
- | ,get_county_name(t2.area_code) as county
|
|
|
+ | ,get_area_name_pro(t2.area_code)[0] as province
|
|
|
+ | ,get_area_name_pro(t2.area_code)[1] as city
|
|
|
+ | ,get_area_name_pro(t2.area_code)[2] as county
|
|
|
| ,company_other_info(legal_entity_id,legal_entity_name,legal_entity_type,reg_capital,reg_capital_amount,reg_capital_currency,to_millis_timestamp(t2.estiblish_time),logo) as other_info
|
|
|
| ,record_num
|
|
|
| ,case_create_time_year
|
|
@@ -335,9 +335,9 @@ case class CreditPunishmentEntityAgg(s: SparkSession
|
|
|
| ,1 as entity_type
|
|
|
| ,card_num
|
|
|
| ,label
|
|
|
- | ,get_province_name_pro(SUBSTRING(card_num,0,2)) AS province
|
|
|
- | ,get_city_name(SUBSTRING(card_num,0,6)) AS city
|
|
|
- | ,get_county_name(SUBSTRING(card_num,0,6)) AS county
|
|
|
+ | ,get_area_name_pro(SUBSTRING(card_num,0,6))[0] AS province
|
|
|
+ | ,get_area_name_pro(SUBSTRING(card_num,0,6))[1] AS city
|
|
|
+ | ,get_area_name_pro(SUBSTRING(card_num,0,6))[2] AS county
|
|
|
| ,person_other_info(get_birth_year(card_num),get_gender(card_num)) as other_info
|
|
|
| ,record_num
|
|
|
| ,case_create_time_year
|