update
This commit is contained in:
+26
-18
@@ -26,29 +26,37 @@ class XiaMenVillageBatch extends BaseBatch{
|
||||
println "输入文件:"+inFileName+" 输出文件:"+outFileName
|
||||
def exists = checkFileExists(outFileName)
|
||||
if(!exists){
|
||||
def rows = []
|
||||
rows << ["序号","地址","判定后涉农组织类型(城市企业[不含县城企业]、农村企业、县城企业)","所属工业园区或经济开发区"]
|
||||
def rets = XmBankVillageFtpUtils.readExcelFile(inFileName)
|
||||
if(rets){
|
||||
for(def row : rets){
|
||||
if(row[1]){
|
||||
def dto = OpenApiUtils.addrVerifyXiameng(null, row[1], 2)
|
||||
if(dto){
|
||||
row[2] = dto.addrArea //所属区域 农村区域 城市区域 县城城区(对公)
|
||||
if(dto.devDistrictName){
|
||||
row[3] = dto.devDistrictName//开发区
|
||||
}else{
|
||||
row[3] = ""
|
||||
}
|
||||
def inExists = checkFileExists(inFileName)
|
||||
if(inExists){
|
||||
def rows = []
|
||||
rows << ["序号","地址","判定后涉农组织类型(城市企业[不含县城企业]、农村企业、县城企业)","所属工业园区或经济开发区"]
|
||||
def rets = XmBankVillageFtpUtils.readExcelFile(inFileName)
|
||||
if(rets){
|
||||
for(def row : rets){
|
||||
if(row[1]){
|
||||
def dto = OpenApiUtils.addrVerifyXiameng(null, row[1], 2)
|
||||
if(dto){
|
||||
row[2] = dto.addrArea //所属区域 农村区域 城市区域 县城城区(对公)
|
||||
if(dto.devDistrictName){
|
||||
row[3] = dto.devDistrictName//开发区
|
||||
}else{
|
||||
row[3] = ""
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
rows << row
|
||||
}
|
||||
rows << row
|
||||
}
|
||||
uploadExcel(rows, outFileName)
|
||||
println "新增文件,上传已完成 "+DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
||||
println "*******************************************************************************************"
|
||||
}else{
|
||||
println "输入${inFileName}文件不存在,待客户上传 "+DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
||||
println "*******************************************************************************************"
|
||||
}
|
||||
uploadExcel(rows, outFileName)
|
||||
println "新增文件,上传已完成"
|
||||
println "*******************************************************************************************"
|
||||
|
||||
|
||||
}else{
|
||||
println "已存在 "+ DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
||||
println "*******************************************************************************************"
|
||||
|
||||
@@ -67,7 +67,7 @@ public class DataTransfer {
|
||||
DBObject q_43 = new BasicDBObject();
|
||||
q_43.put("from_user_id", "1007497");
|
||||
DBCursor cursor_43 = col_43.find(q_43).addOption(Bytes.QUERYOPTION_NOTIMEOUT).batchSize(500);
|
||||
List<DBObject> db43List = new ArrayList<>();
|
||||
List<DBObject> db43List = new ArrayList<DBObject>();
|
||||
while(cursor_43.hasNext()) {
|
||||
DBObject obj_43 = cursor_43.next();
|
||||
if(obj_43 != null) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ApiUtil {
|
||||
String signature = "";
|
||||
try {
|
||||
//参数排序,保证签名一致
|
||||
List<String> fileds = new ArrayList<>();
|
||||
List<String> fileds = new ArrayList<String>();
|
||||
Set<Entry<String, Object>> set = body.entrySet();
|
||||
for (Entry<String, Object> entry : set) {
|
||||
fileds.add(entry.getKey());
|
||||
|
||||
Reference in New Issue
Block a user