新增置信度同步至85
This commit is contained in:
+3
-3
@@ -27,14 +27,14 @@ class OracleDistrictBasePrice2Mongo85 {
|
|||||||
static final DBCollection communityBasePriceConn = MongoUtils.getCollectionByName("business", "community_base_price_gj", "192.168.0.85", 28017)
|
static final DBCollection communityBasePriceConn = MongoUtils.getCollectionByName("business", "community_base_price_gj", "192.168.0.85", 28017)
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def sql = "SELECT cityname, distname, commid, commname, confi_rate FROM community_base_price_gj WHERE YEAR_MONTH='202205'"
|
def sql = "SELECT cityname, distname, commid, commname, confidence FROM community_base_price_gj WHERE YEAR_MONTH='202205'"
|
||||||
def count = 0
|
def count = 0
|
||||||
sqlInstance.eachRow(sql, { r ->
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def city = r['cityname']
|
def city = r['cityname']
|
||||||
def region = RegionData.formatRegion(city, r['distname'])
|
def region = RegionData.formatRegion(city, r['distname'])
|
||||||
DBObject dbObject = new BasicDBObject("_id", r['commid'])
|
DBObject dbObject = new BasicDBObject("_id", r['commid'])
|
||||||
if (r['confi_rate'] != null) {
|
if (r['confidence'] != null) {
|
||||||
def credit = new BigDecimal(r['confi_rate']).setScale(2, BigDecimal.ROUND_HALF_UP).toDouble()
|
def credit = new BigDecimal(r['confidence']).setScale(2, BigDecimal.ROUND_HALF_UP).toDouble()
|
||||||
DBObject updateObject = new BasicDBObject("city", city).append("region", region)
|
DBObject updateObject = new BasicDBObject("city", city).append("region", region)
|
||||||
.append("name", r['commname'])
|
.append("name", r['commname'])
|
||||||
.append("credit", credit)
|
.append("credit", credit)
|
||||||
|
|||||||
Reference in New Issue
Block a user