|
@@ -25,9 +25,9 @@ trait CompanyChangeHandle extends Serializable with Logging {
|
|
|
* @param newMap
|
|
|
* @return rowkey,cid,类型【insert or update】,新数据,更新字段,更新标题,变更标签【1.一般变更,2.风险变更 ...】,业务时间
|
|
|
*/
|
|
|
- def handle(rowkey: String, oldMap: Map[String, String], newMap: Map[String, String]): (String, String, String, Map[String, String], String, String, String, String) = {
|
|
|
+ def handle(rowkey: String, oldMap: Map[String, String], newMap: Map[String, String]): (String, String, String, Map[String, String], String, String, String, String, Map[String, String]) = {
|
|
|
if (oldMap == null) {
|
|
|
- (rowkey, getCid(rowkey, newMap), "insert", newMap, null, getInsertTitle(newMap), getLabel(oldMap, newMap), getBizTime(newMap))
|
|
|
+ (rowkey, getCid(rowkey, newMap), "insert", newMap, null, getInsertTitle(newMap), getLabel(oldMap, newMap), getBizTime(newMap), null)
|
|
|
} else {
|
|
|
val t = getEquAndFields(oldMap, newMap)
|
|
|
if (t._1) {
|
|
@@ -35,12 +35,11 @@ trait CompanyChangeHandle extends Serializable with Logging {
|
|
|
} else {
|
|
|
(rowkey, getCid(rowkey, newMap), "update", newMap,
|
|
|
t._2
|
|
|
- , getUpdateTitle(newMap), getLabel(oldMap, newMap), getBizTime(newMap))
|
|
|
+ , getUpdateTitle(newMap), getLabel(oldMap, newMap), getBizTime(newMap), oldMap)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
def getCid(rowkey: String, newMap: Map[String, String]): String = rowkey.split("_")(0)
|
|
|
|
|
|
def getUpdateTitle(newMap: Map[String, String]): String
|
|
@@ -178,18 +177,20 @@ case class company_employment(equCols: Seq[String]) extends CompanyChangeHandle
|
|
|
|
|
|
override def getBizTime(newMap: Map[String, String]): String = newMap("start_date")
|
|
|
}
|
|
|
+
|
|
|
//招投标
|
|
|
-case class company_bid_list(equCols:Seq[String])extends CompanyChangeHandle{
|
|
|
+case class company_bid_list(equCols: Seq[String]) extends CompanyChangeHandle {
|
|
|
override def getUpdateTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"${newMap("title")}招投标信息发生变更")
|
|
|
|
|
|
- override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"新增${newMap("title")}招投标信息")
|
|
|
+ override def getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("title"), s"新增${newMap("title")}招投标信息")
|
|
|
|
|
|
- override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap,"招投标", Array("publish_time","title", "purchaser", "province", "abs"))
|
|
|
+ override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "招投标", Array("publish_time", "title", "purchaser", "province", "abs"))
|
|
|
|
|
|
override def getBizTime(newMap: Map[String, String]): String = newMap("publish_time")
|
|
|
}
|
|
|
+
|
|
|
//土地转让
|
|
|
-case class company_land_transfer(equCols:Seq[String])extends CompanyChangeHandle {
|
|
|
+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 getInsertTitle(newMap: Map[String, String]): String = getValueOrNull(newMap("location"), s"新增${newMap("location")}土地转让信息")
|