Merge branch 'script_gj' into 'master'

update

See merge request !1224
This commit is contained in:
2026-01-09 17:53:29 +08:00
3 changed files with 28 additions and 20 deletions
@@ -26,6 +26,8 @@ class XiaMenVillageBatch extends BaseBatch{
println "输入文件:"+inFileName+" 输出文件:"+outFileName println "输入文件:"+inFileName+" 输出文件:"+outFileName
def exists = checkFileExists(outFileName) def exists = checkFileExists(outFileName)
if(!exists){ if(!exists){
def inExists = checkFileExists(inFileName)
if(inExists){
def rows = [] def rows = []
rows << ["序号","地址","判定后涉农组织类型(城市企业[不含县城企业]、农村企业、县城企业)","所属工业园区或经济开发区"] rows << ["序号","地址","判定后涉农组织类型(城市企业[不含县城企业]、农村企业、县城企业)","所属工业园区或经济开发区"]
def rets = XmBankVillageFtpUtils.readExcelFile(inFileName) def rets = XmBankVillageFtpUtils.readExcelFile(inFileName)
@@ -47,8 +49,14 @@ class XiaMenVillageBatch extends BaseBatch{
} }
} }
uploadExcel(rows, outFileName) uploadExcel(rows, outFileName)
println "新增文件,上传已完成" println "新增文件,上传已完成 "+DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
println "*******************************************************************************************" println "*******************************************************************************************"
}else{
println "输入${inFileName}文件不存在,待客户上传 "+DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
println "*******************************************************************************************"
}
}else{ }else{
println "已存在 "+ DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss") println "已存在 "+ DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
println "*******************************************************************************************" println "*******************************************************************************************"
@@ -67,7 +67,7 @@ public class DataTransfer {
DBObject q_43 = new BasicDBObject(); DBObject q_43 = new BasicDBObject();
q_43.put("from_user_id", "1007497"); q_43.put("from_user_id", "1007497");
DBCursor cursor_43 = col_43.find(q_43).addOption(Bytes.QUERYOPTION_NOTIMEOUT).batchSize(500); 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()) { while(cursor_43.hasNext()) {
DBObject obj_43 = cursor_43.next(); DBObject obj_43 = cursor_43.next();
if(obj_43 != null) { if(obj_43 != null) {
@@ -49,7 +49,7 @@ public class ApiUtil {
String signature = ""; String signature = "";
try { try {
//参数排序,保证签名一致 //参数排序,保证签名一致
List<String> fileds = new ArrayList<>(); List<String> fileds = new ArrayList<String>();
Set<Entry<String, Object>> set = body.entrySet(); Set<Entry<String, Object>> set = body.entrySet();
for (Entry<String, Object> entry : set) { for (Entry<String, Object> entry : set) {
fileds.add(entry.getKey()); fileds.add(entry.getKey());