本人新人 写了个 输入流写的月度报表数据合计文件 现在输入流文件可以写入但是只有一行,不知道为什么 急求大神解答,还在加班急求。
// 生成合计文件
List<String> tzh = tickeService.getStandings();
for (String std : tzh) {
standing = std.trim();
hjString = "Ad_CJHeJi" + toDay;
File filename = new File(SFTPSrcDir + "/" + hjString);
String neirong = "";
OutputStreamWriter out1 = null;
List<Ticke> zonghe = tickeService.gethe(standing);
for (Ticke tk : zonghe) {
// pay_fee的和
String gl = tk.getGentle();
// 每个台账号的列数
String cl = tk.getColumn();
neirong =standing + " " + cl + " " + gl + "\r\n";
}
try {
out1 = new OutputStreamWriter(new FileOutputStream(filename, false), "UTF-8");
out1.write(neirong);
out1.flush();
} catch (IOException e) {
e.printStackTrace();
}
try {
out1.close();
} catch (IOException e) {
e.printStackTrace();
}
}