|
@@ -28,7 +28,21 @@ case class AssociationEntityInfo(keyno: String
|
|
|
, name: String
|
|
|
, risk_level: NgCompanyRiskLevelType //变更风险等级
|
|
|
, rta_info: String //描述
|
|
|
- )
|
|
|
+ ) extends Comparable[AssociationEntityInfo] {
|
|
|
+
|
|
|
+
|
|
|
+ override def hashCode(): Int = s"$name@$risk_level".hashCode()
|
|
|
+
|
|
|
+ override def equals(obj: Any): Boolean =
|
|
|
+ obj match {
|
|
|
+ case d: AssociationEntityInfo =>
|
|
|
+ s"$name@$risk_level".equals(s"${d.name}@${d.risk_level}")
|
|
|
+ case _ =>
|
|
|
+ false
|
|
|
+ }
|
|
|
+
|
|
|
+ override def compareTo(o: AssociationEntityInfo): Int = s"$name@$risk_level".compareTo(s"${o.name}@${o.risk_level}")
|
|
|
+}
|
|
|
|
|
|
case class RowkeyInfo(rowkey: String, tn: String) {
|
|
|
def toStr(): String = {
|
|
@@ -123,7 +137,7 @@ case class CompanyDynamicRecord(id: String,
|
|
|
val risk_level_detail = association_entity_info.filter(r => StringUtils.isNotBlank(r.keyno)).map(r => s"${r.keyno}@@${r.risk_level}").distinct.mkStringOrNull(",")
|
|
|
val agg_detail_rowkey_str: String = if (agg_detail_rowkey == null || agg_detail_rowkey.isEmpty) null else agg_detail_rowkey.map(_.toStr).mkString(",")
|
|
|
val collapse_key = if (bus_tn.contains(tn)) {
|
|
|
- if (dynamic_code.equals("110101"))//存量法人变化转化为增量的code
|
|
|
+ if (dynamic_code.equals("110101")) //存量法人变化转化为增量的code
|
|
|
s"101003_${dynamic_time}"
|
|
|
else
|
|
|
s"${dynamic_code}_${dynamic_time}"
|