Merge branch 'script_gj' into 'master'
Script gj See merge request !822
This commit is contained in:
+21
-10
@@ -44,12 +44,17 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
public void process(Object args) {
|
||||
|
||||
// DBObject q = new BasicDBObject();
|
||||
// q.put("_id", new ObjectId("6501174f6f5638447b264189"));
|
||||
// def obj = CommonDatautils.getHouseDataStoreConnection().findOne(q)
|
||||
// obj.put("c_date", new Date())
|
||||
// CommonDatautils.getHouseDataStoreConnection().save(obj)
|
||||
// q.put("cat", "sell");
|
||||
// q.put("city","常州")
|
||||
// q.put("district_name","清河苑一区")
|
||||
// def dbcursor = CommonDatautils.getHouseDataStoreConnection().find(q)
|
||||
// for(def obj : dbcursor){
|
||||
// obj.put("c_date", new Date())
|
||||
// CommonDatautils.getHouseDataStoreConnection().save(obj)
|
||||
// }
|
||||
|
||||
// CommonDatautils.getHouseDataStoreConnection().find(new BasicDBObject("districtname_key","新城帝景南区_武进_常州")).each{
|
||||
|
||||
// CommonDatautils.getHouseDataStoreConnection().find(new BasicDBObject("districtname_key","清河苑一区_溧阳_常州")).each{
|
||||
// println(it)
|
||||
// }
|
||||
|
||||
@@ -62,14 +67,15 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
c++
|
||||
try {
|
||||
long sn = Long.parseLong("${new Date().format('yyyyMMddHHmmssSSS')}")
|
||||
List<DBObject> districts = findDistrictByCity(city)
|
||||
// List<DBObject> districts = findDistrictByCity(city)
|
||||
def districts = CommonDatautils.findAllDistrictByCity(city, "district", ["city","region","name","alias"])
|
||||
Map<String, Long> sellCountMap = facetDistrictInHouse("sell", city);
|
||||
Map<String, Long> rentCountMap = facetDistrictInHouse("rent", city);
|
||||
println c + "\t" + city + "\t" + "\tsn:" + sn + "\t" + districts.size() + "\t" + DateUtil.formatToTightYYYYMMDDhhmmss(new Date())
|
||||
for(DBObject district : districts) {
|
||||
def names = []
|
||||
names << district.name
|
||||
if(district.alias && district.alias.size()>0){
|
||||
if(district.alias && districts.alias.size()>0){
|
||||
for(def name : district.alias){
|
||||
if(!names.contains(name)){
|
||||
names << name
|
||||
@@ -81,13 +87,18 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
long rentCount = 0
|
||||
for(def name : names){
|
||||
String key = name.toString().trim() + "_" + district.get("region") + "_" + district.get("city")
|
||||
sellCount = sellCount + (sellCountMap.get(key) ? sellCountMap.get(key) : 0)
|
||||
rentCount = rentCount + (rentCountMap.get(key) ? rentCountMap.get(key) : 0)
|
||||
if(!sellCount){
|
||||
sellCount = sellCountMap.get(key) ? sellCountMap.get(key) : 0
|
||||
}
|
||||
if(!rentCount){
|
||||
rentCount = rentCountMap.get(key) ? rentCountMap.get(key) : 0
|
||||
}
|
||||
}
|
||||
saveToDistrictHouse(district.get('city'), district.get("region"), district.get("name"), sellCount, rentCount, sn)
|
||||
}
|
||||
|
||||
HOUSE_COLL.remove(new BasicDBObject("city", city).append('sn', new BasicDBObject('$ne', sn)))
|
||||
println c + " " + city
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -146,7 +157,7 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
q.put('city', city)
|
||||
q.put('cat', 'district')
|
||||
q.put('visible', 0)
|
||||
// q.put("name","新城帝景")
|
||||
q.put("name","清河苑")
|
||||
DSCursor cur = SEAWEED.find(q, fields).batchSize(2000)
|
||||
Iterator<DBObject> iter = cur.iterator()
|
||||
|
||||
|
||||
+44
-6
@@ -1,5 +1,7 @@
|
||||
package com.fangjia.script.gj
|
||||
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.temp.shenjian.poi.entity.Community
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
@@ -12,7 +14,41 @@ class CitySellStatTest {
|
||||
|
||||
static main(args) {
|
||||
def task = new CitySellStatTest();
|
||||
task.run()
|
||||
// task.run()
|
||||
task.cityPriceRun()
|
||||
}
|
||||
|
||||
def cityPriceRun(){
|
||||
def cityObjs = CommonDatautils.findCitys();
|
||||
def rets = []
|
||||
rets << ["序号","城市","城市级别","城市均价起始月","起始均价","城市均价最新月","最新均价"]
|
||||
def index = 1
|
||||
for(def o : cityObjs){
|
||||
def ret = []
|
||||
ret << index
|
||||
ret << o.display
|
||||
ret << o.new_city_grade
|
||||
def row1 = findCityMonthPrice(o.display, 1)
|
||||
if(row1){
|
||||
ret << row1.date
|
||||
ret << row1.avg_price
|
||||
}else{
|
||||
ret << ""
|
||||
ret << ""
|
||||
}
|
||||
def row2 = findCityMonthPrice(o.display, -1)
|
||||
if(row2){
|
||||
ret << row2.date
|
||||
ret << row2.avg_price
|
||||
}else{
|
||||
ret << ""
|
||||
ret << ""
|
||||
}
|
||||
rets << ret
|
||||
index++
|
||||
}
|
||||
|
||||
ExcelUtils.write("D:\\数据\\其它\\全国城市均价.xlsx", rets, "城市均价")
|
||||
}
|
||||
|
||||
def run(){
|
||||
@@ -25,18 +61,20 @@ class CitySellStatTest {
|
||||
},0)
|
||||
}
|
||||
|
||||
def findFirstMonth(def city){
|
||||
def findCityMonthPrice(def city, def asc){
|
||||
def q = new BasicDBObject();
|
||||
q.put("city", city)
|
||||
def dbcursor = CITY_STAT_COLL.find(q).sort(new BasicDBObject("_id",1)).limit(1)
|
||||
def month;
|
||||
def dbcursor = CITY_STAT_COLL.find(q).sort(new BasicDBObject("date", asc)).limit(1)
|
||||
def obj = null
|
||||
for(def o : dbcursor){
|
||||
month = o.date
|
||||
obj = o
|
||||
}
|
||||
return month
|
||||
return obj
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def findTotalMonth(def city, def month){
|
||||
def q = new BasicDBObject();
|
||||
q.put("city", city)
|
||||
|
||||
+5
@@ -200,4 +200,9 @@ public class SignatureUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
def a = getAliAddressStrc("上海市长宁区新泾三村")
|
||||
println a
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
class SuggestionDataSynch extends BaseBatch{
|
||||
|
||||
static def targetUrl = "http://192.168.0.12:9200/seaweed/"
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(50)
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100)
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.fangjia.script.majintao.test
|
||||
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.gj.village.ailiyun.SignatureUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
//def address = "江苏省徐州市贾汪区经济开发区大黄山镇孤山小区B3.801"
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\1.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
count = count + 1
|
||||
if (count % 10 == 0) {
|
||||
println("已处理:" + count)
|
||||
}
|
||||
sleep(80)
|
||||
|
||||
def address = items['A']
|
||||
def map = SignatureUtils.getAliAddressStrc(address)
|
||||
//prov=河南省 city=信阳市 district=息县 town=孙庙乡 community=前赵楼村 road=前赵楼村 poi=爱婆店 roomno=012
|
||||
if ("prov" in map) {
|
||||
def province = map.get("prov")
|
||||
items['E'] = province
|
||||
}
|
||||
if ("city" in map) {
|
||||
def city = map.get("city")
|
||||
items['G'] = city
|
||||
}
|
||||
if ("district" in map) {
|
||||
def district = map.get("district")
|
||||
items['I'] = district
|
||||
}
|
||||
if ("town" in map) {
|
||||
def town = map.get("town")
|
||||
items['K'] = town
|
||||
}
|
||||
// if ("community" in map) {
|
||||
// def community = map.get("community")
|
||||
// items['S'] = community
|
||||
// }
|
||||
if ("devzone" in map) {
|
||||
def devzone = map.get("devzone")
|
||||
items['Q'] = devzone
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.fangjia.script.majintao.JSBankTest;
|
||||
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.util.ExcelUtils;
|
||||
import net.sf.json.JSONObject;
|
||||
import java.util.Base64;
|
||||
import net.sf.json.JSONArray;
|
||||
|
||||
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\测试.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
count += 1
|
||||
if (count % 10 == 0) {
|
||||
println("已处理:" + count)
|
||||
}
|
||||
def zx = ["北京", "天津", "上海", "重庆"]
|
||||
// String province = "天津";
|
||||
String province = items['E'];
|
||||
if (zx.contains(province)) {
|
||||
province = province + "市";
|
||||
}
|
||||
// String name = "天津经济技术开发区";
|
||||
String name = items['Q'];
|
||||
String elasticUsername = "elastic";
|
||||
String elasticPassword = "elasticsearch";
|
||||
|
||||
String seawaterUrl = "http://192.168.0.89:9200/development_zone/_search";
|
||||
String basicAuth = "Basic " + Base64.getEncoder().encodeToString((elasticUsername + ":" + elasticPassword).getBytes("UTF-8"));
|
||||
|
||||
String body = """
|
||||
{
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"match": {
|
||||
"name": {
|
||||
"query": "${name}",
|
||||
"operator": "and"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"term": {"province": {"value": "${province}"}}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
""";
|
||||
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject jsonBody = JSONObject.fromObject(body);
|
||||
JSONObject header = new JSONObject();
|
||||
header.put("Authorization", basicAuth);
|
||||
String res = request.postWithBody(seawaterUrl, jsonBody, header, "UTF-8");
|
||||
|
||||
JSONObject response = JSONObject.fromObject(res);
|
||||
JSONObject obj = null;
|
||||
if (response != null && response.containsKey("hits")) {
|
||||
JSONObject hits = response.getJSONObject("hits");
|
||||
if (hits != null && hits.size() > 0) {
|
||||
JSONArray hitsArray = hits.getJSONArray("hits");
|
||||
// 省略了之前的部分...
|
||||
|
||||
if (hitsArray != null && hitsArray.size() > 0) {
|
||||
for (int i = 0; i < hitsArray.size(); i++) {
|
||||
JSONObject hit = hitsArray.getJSONObject(i);
|
||||
JSONObject source = hit.getJSONObject("_source");
|
||||
String devName = source.optString("name"); // Assuming "name" is a String
|
||||
String level = source.optString("level"); // Assuming "level" is a String
|
||||
if (devName.equals(name)) {
|
||||
items['O'] = "是";
|
||||
items['P'] = level;
|
||||
println("省份:" + province + " 名称:" + name + " 开发区名:" + devName + " 开发区级别:" + level);
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.fangjia.script.majintao.JSBankTest
|
||||
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import org.apache.tools.ant.types.resources.selectors.None
|
||||
|
||||
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\测试.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
count += 1
|
||||
if (count % 10 == 0) {
|
||||
println("已处理:" + count)
|
||||
}
|
||||
|
||||
|
||||
String address = items['B']
|
||||
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
|
||||
def map = [:]
|
||||
map.put("address", address)
|
||||
map.put("showFullValue", "2")
|
||||
map.put("showTestValue", "2")
|
||||
map.put("type", "2")
|
||||
|
||||
def content = httpRequest.getJsonContent(url, map, "UTF-8")
|
||||
def result = content.get("result")
|
||||
if (result != null) {
|
||||
if ("addrVerify") {
|
||||
items['C'] = result.get("addrVerify")
|
||||
}
|
||||
|
||||
if ("province" in result) {
|
||||
items['D'] = result.get("province")
|
||||
}
|
||||
if ("city" in result) {
|
||||
items['F'] = result.get("city")
|
||||
}
|
||||
if ("district" in result) {
|
||||
|
||||
items['H'] = result.get("district")
|
||||
}
|
||||
if ("town" in result) {
|
||||
items['J'] = result.get("town")
|
||||
}
|
||||
if ("committee" in result) {
|
||||
|
||||
items['L'] = result.get("committee")
|
||||
}
|
||||
if ("typeCode" in result) {
|
||||
items['M'] = result.get("typeCode")
|
||||
}
|
||||
if ("countyGov") {
|
||||
items['N'] = result.get("countyGov")
|
||||
}
|
||||
def devDistrict = ""
|
||||
if ("devDistrict" in result) {
|
||||
devDistrict = result.get("devDistrict")
|
||||
}
|
||||
def dev = ""
|
||||
if ("dev" in result) {
|
||||
dev = result.get("dev")
|
||||
}
|
||||
// 开发区级别暂时没有
|
||||
|
||||
// 暂时使用
|
||||
def defGrade = ""
|
||||
if (!dev.equals("") && devDistrict.equals("否")) {
|
||||
defGrade = "非国际级或省级"
|
||||
devDistrict = "是"
|
||||
}
|
||||
if (!devDistrict.equals("")) {
|
||||
items['O'] = devDistrict
|
||||
}
|
||||
items["P"] = defGrade
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
+35
@@ -5,7 +5,11 @@ import com.fangjia.script.gj.village.ailiyun.SignatureUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
//def address = "江苏省徐州市贾汪区经济开发区大黄山镇孤山小区B3.801"
|
||||
<<<<<<< HEAD
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\注册地址-太仓农商行POC测试.xlsx";
|
||||
=======
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\涉农对私测试数据.xlsx";
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
@@ -14,13 +18,43 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
if (count % 10 == 0) {
|
||||
println("已处理:" + count)
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
sleep(80)
|
||||
=======
|
||||
sleep(50)
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
|
||||
def address = items['A']
|
||||
def map = SignatureUtils.getAliAddressStrc(address)
|
||||
//prov=河南省 city=信阳市 district=息县 town=孙庙乡 community=前赵楼村 road=前赵楼村 poi=爱婆店 roomno=012
|
||||
if ("prov" in map) {
|
||||
def province = map.get("prov")
|
||||
<<<<<<< HEAD
|
||||
items['C'] = province
|
||||
}
|
||||
if ("city" in map) {
|
||||
def city = map.get("city")
|
||||
items['G'] = city
|
||||
}
|
||||
if ("district" in map) {
|
||||
def district = map.get("district")
|
||||
items['K'] = district
|
||||
}
|
||||
if ("town" in map) {
|
||||
def town = map.get("town")
|
||||
items['O'] = town
|
||||
}
|
||||
if ("community" in map) {
|
||||
def community = map.get("community")
|
||||
items['S'] = community
|
||||
|
||||
}
|
||||
if ("devzone" in map) {
|
||||
def devzone = map.get("devzone")
|
||||
items['AE'] = devzone
|
||||
|
||||
}
|
||||
=======
|
||||
items['D'] = province
|
||||
}
|
||||
if ("city" in map) {
|
||||
@@ -66,6 +100,7 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
// items['K'] = roadno
|
||||
// }
|
||||
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
|
||||
})
|
||||
|
||||
|
||||
+114
@@ -4,10 +4,17 @@ import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\注册地址-太仓农商行POC测试.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
=======
|
||||
String excelFilePath = "C:\\Users\\Goojia\\Desktop\\涉农对私测试数据.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
def count = 0
|
||||
ExcelUtils.multiThreadingModify(excelFilePath, { List items ->
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
count += 1
|
||||
if (count % 10 == 0) {
|
||||
println("已处理:" + count)
|
||||
@@ -15,6 +22,112 @@ ExcelUtils.multiThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
|
||||
String address = items['A']
|
||||
<<<<<<< HEAD
|
||||
// if (province == null) {
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
|
||||
def map = [:]
|
||||
map.put("address", address)
|
||||
map.put("showFullValue", "2")
|
||||
map.put("showTestValue", "2")
|
||||
map.put("type", "2")
|
||||
|
||||
def content = httpRequest.getJsonContent(url, map, "UTF-8")
|
||||
def result = content.get("result")
|
||||
if (result != null) {
|
||||
if ("province" in result) {
|
||||
items['B'] = result.get("province")
|
||||
}
|
||||
if ("provinceCode" in result) {
|
||||
items['E'] = result.get("provinceCode")
|
||||
}
|
||||
if ("city" in result) {
|
||||
items['F'] = result.get("city")
|
||||
}
|
||||
if ("cityCode" in result) {
|
||||
items['I'] = result.get("cityCode")
|
||||
}
|
||||
if ("district" in result) {
|
||||
|
||||
items['J'] = result.get("district")
|
||||
}
|
||||
if ("districtCode" in result) {
|
||||
|
||||
items['M'] = result.get("districtCode")
|
||||
}
|
||||
if ("town" in result) {
|
||||
|
||||
items['N'] = result.get("town")
|
||||
}
|
||||
if ("townCode" in result) {
|
||||
|
||||
items['Q'] = result.get("townCode")
|
||||
}
|
||||
|
||||
if ("committee" in result) {
|
||||
|
||||
items['R'] = result.get("committee")
|
||||
}
|
||||
if ("committeeCode" in result) {
|
||||
|
||||
items['U'] = result.get("committeeCode")
|
||||
}
|
||||
if ("typeCode" in result) {
|
||||
|
||||
items['V'] = result.get("typeCode")
|
||||
}
|
||||
if ("typeName") {
|
||||
items['W'] = result.get("typeName")
|
||||
}
|
||||
if ("verifyFlag") {
|
||||
items['X'] = result.get("verifyFlag")
|
||||
}
|
||||
if ("addrVerify") {
|
||||
items['Y'] = result.get("addrVerify")
|
||||
}
|
||||
if ("countyLevelCity") {
|
||||
items['Z'] = result.get("countyLevelCity")
|
||||
}
|
||||
if ("countyGov") {
|
||||
items['AA'] = result.get("countyGov")
|
||||
}
|
||||
if ("communitySource") {
|
||||
items['AB'] = result.get("communitySource")
|
||||
}
|
||||
|
||||
if ("administrativeTowns" in result) {
|
||||
items['AD'] = result.get("administrativeTowns")
|
||||
}
|
||||
if ("devDistrict" in result) {
|
||||
items['AF'] = result.get("devDistrict")
|
||||
}
|
||||
if ("devDistrictName" in result) {
|
||||
items['AG'] = result.get("devDistrictName")
|
||||
}
|
||||
if ("splitCommittee" in result) {
|
||||
items['AH'] = result.get("splitCommittee")
|
||||
}
|
||||
if ("splitStreet" in result) {
|
||||
items['AI'] = result.get("splitStreet")
|
||||
}
|
||||
if ("poiName" in result) {
|
||||
items['AJ'] = result.get("poiName")
|
||||
}
|
||||
if ("splitStreetNum" in result) {
|
||||
items['AK'] = result.get("splitStreetNum")
|
||||
}
|
||||
if ("dev" in result) {
|
||||
items['AL'] = result.get("dev")
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
=======
|
||||
String province = items['B']
|
||||
if (province == null) {
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
@@ -120,5 +233,6 @@ ExcelUtils.multiThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
}
|
||||
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
})
|
||||
|
||||
|
||||
+5
@@ -24,8 +24,13 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
def map = [:]
|
||||
map.put("address", address)
|
||||
<<<<<<< HEAD
|
||||
map.put("complete", "2")
|
||||
map.put("addressAssessment", "2")
|
||||
=======
|
||||
map.put("complete", "true")
|
||||
map.put("addressAssessment", "true")
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
map.put("type", "2")
|
||||
|
||||
def content = httpRequest.getJsonContent(url, map, "UTF-8")
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.fangjia.script.majintao.test
|
||||
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
|
||||
String url = "http://192.168.0.19:31080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
|
||||
def map = [:]
|
||||
map.put("address", address)
|
||||
map.put("showFullValue", "2")
|
||||
map.put("showTestValue", "2")
|
||||
map.put("type", "2")
|
||||
@@ -454,7 +454,11 @@ public class ExcelUtils{
|
||||
|
||||
def data = ExcelUtils.read(fileName, srcSheetIndex, 0)
|
||||
def body = data.subList(1, data.size())
|
||||
<<<<<<< HEAD
|
||||
def nThread = 1
|
||||
=======
|
||||
def nThread = 10
|
||||
>>>>>>> f0061ade19d549f26467ab6be7e9eaaa66cd3011
|
||||
println nThread
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(3)
|
||||
final AtomicInteger counter = new AtomicInteger(0)
|
||||
|
||||
Reference in New Issue
Block a user