+15
-15
@@ -343,21 +343,21 @@ class CityInfoAnaBatch extends BaseBatch {
|
|||||||
def totalDbhouseloudongCount = HOUSE_LOUDONG_CONN.count(findObj)
|
def totalDbhouseloudongCount = HOUSE_LOUDONG_CONN.count(findObj)
|
||||||
datas << ['', totalDistrictCount, totalLoudongCount, df.format(totalLoudongCount * 1.0/ totalDistrictCount), totalFanghaoCount, df.format(totalFanghaoCount * 1.0/ totalDistrictCount), totalDbLoudongCount, totalDbhouseloudongCount]
|
datas << ['', totalDistrictCount, totalLoudongCount, df.format(totalLoudongCount * 1.0/ totalDistrictCount), totalFanghaoCount, df.format(totalFanghaoCount * 1.0/ totalDistrictCount), totalDbLoudongCount, totalDbhouseloudongCount]
|
||||||
|
|
||||||
ExcelUtils.write(fileName, datas, resultTitle)
|
// ExcelUtils.write(fileName, datas, resultTitle)
|
||||||
String id = ObjectId.get().toString()
|
// String id = ObjectId.get().toString()
|
||||||
BasicDBObject file = new BasicDBObject()
|
// BasicDBObject file = new BasicDBObject()
|
||||||
file.put("t", "upload")
|
// file.put("t", "upload")
|
||||||
file.put("content_type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
// file.put("content_type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
file.put("c_date", new Date())
|
// file.put("c_date", new Date())
|
||||||
file.put("_id", idGenerator(id, "o"))
|
// file.put("_id", idGenerator(id, "o"))
|
||||||
file.put("data", new File(fileName).getBytes())
|
// file.put("data", new File(fileName).getBytes())
|
||||||
fsDB.save(file)
|
// fsDB.save(file)
|
||||||
def href = DataUtil.encodePicUrl(id, "o", "upload")
|
// def href = DataUtil.encodePicUrl(id, "o", "upload")
|
||||||
href = "<a href='http://static.fangjia.com/stc/fs/${href}'>点击下载附件</a>"
|
// href = "<a href='http://static.fangjia.com/stc/fs/${href}'>点击下载附件</a>"
|
||||||
receivers.each {receiver->
|
// receivers.each {receiver->
|
||||||
jms.sendMail(receiver, resultTitle, href)
|
// jms.sendMail(receiver, resultTitle, href)
|
||||||
}
|
// }
|
||||||
new File(fileName).deleteOnExit()
|
// new File(fileName).deleteOnExit()
|
||||||
}
|
}
|
||||||
|
|
||||||
private String idGenerator(String url, String size) {
|
private String idGenerator(String url, String size) {
|
||||||
|
|||||||
Reference in New Issue
Block a user