Merge branch 'script_gj' into 'master'

Script gj

See merge request !1220
This commit is contained in:
2026-01-09 17:12:43 +08:00
2 changed files with 29 additions and 31 deletions
+2 -4
View File
@@ -17,10 +17,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<!-- <source>1.8</source>-->
<!-- <target>1.8</target>-->
<source>1.8</source>
<target>1.8</target>
<encoding>GBK</encoding>
</configuration>
</plugin>
@@ -24,33 +24,33 @@ class XiaMenVillageBatch extends BaseBatch{
def outFileName = "xmbank_"+monthStr+"_result.xlsx"
def inFileName = "xmbank_"+monthStr+".xlsx"
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] = ""
}
}
}
rows << row
}
}
uploadExcel(rows, outFileName)
println "新增文件,上传已完成"
}else{
println "已存在 "+ DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
}
// 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] = ""
// }
//
// }
// }
// rows << row
// }
// }
// uploadExcel(rows, outFileName)
// println "新增文件,上传已完成"
// }else{
// println "已存在 "+ DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
// }
}