no message

master
rengp 1 year ago
parent 4e99ee60b2
commit 4d6e91bb87

@ -532,11 +532,17 @@ public class FirstBranchReceivingPushArchivesService implements KeyWord {
StringBuilder context = new StringBuilder(); StringBuilder context = new StringBuilder();
try { try {
String swrq = Util.null2String(requesData.get("swrq")); String swrq = Util.null2String(requesData.get("lwrq"));
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
if (StringUtil.isEmpty(swrq)){
context.append("").append("|");
}else {
LocalDate date = LocalDate.parse(swrq, formatter); LocalDate date = LocalDate.parse(swrq, formatter);
int year = date.getYear(); int year = date.getYear();
context.append(year).append("|"); context.append(year).append("|");
}
String jghwt = Util.null2String(requesData.get("jghwt")); String jghwt = Util.null2String(requesData.get("jghwt"));
context.append(jghwt).append("|"); context.append(jghwt).append("|");
// String swh = Util.null2String(requesData.get("swh")); // String swh = Util.null2String(requesData.get("swh"));
@ -592,7 +598,14 @@ public class FirstBranchReceivingPushArchivesService implements KeyWord {
//TODO //TODO
context.append(ArchivesUtil.getAssociatedPersons(requestid,false)).append("|"); // 28 相关人员 -> 参与人员 context.append(ArchivesUtil.getAssociatedPersons(requestid,false)).append("|"); // 28 相关人员 -> 参与人员
context.append("智慧OA").append("|"); // 29 数据来源 -> 数据来源 context.append("智慧OA").append("|"); // 29 数据来源 -> 数据来源
if (StringUtil.isEmpty(swrq)){
context.append("").append("|"); // 30 形成年度 -> 年份
}else {
LocalDate date = LocalDate.parse(swrq, formatter);
int year = date.getYear();
context.append(year).append("|"); // 30 形成年度 -> 年份 context.append(year).append("|"); // 30 形成年度 -> 年份
}
context.append(String.join("&&", zwFileName)).append("|"); // 31 正文名称 context.append(String.join("&&", zwFileName)).append("|"); // 31 正文名称
context.append(String.join("&&", fjFileName)).append("|"); // 32 附件名称 context.append(String.join("&&", fjFileName)).append("|"); // 32 附件名称
context.append("togd"+requestid).append("|"); // 33 主键 context.append("togd"+requestid).append("|"); // 33 主键

@ -532,11 +532,15 @@ public class SecondBranchReceivingPushArchivesService implements KeyWord {
StringBuilder context = new StringBuilder(); StringBuilder context = new StringBuilder();
try { try {
String swrq = Util.null2String(requesData.get("swrq")); String swrq = Util.null2String(requesData.get("lwrq"));
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
if (StringUtil.isEmpty(swrq)){
context.append("").append("|");
}else {
LocalDate date = LocalDate.parse(swrq, formatter); LocalDate date = LocalDate.parse(swrq, formatter);
int year = date.getYear(); int year = date.getYear();
context.append(year).append("|"); context.append(year).append("|");
}
String jghwt = Util.null2String(requesData.get("jghwt")); String jghwt = Util.null2String(requesData.get("jghwt"));
context.append(jghwt).append("|"); context.append(jghwt).append("|");
// String swh = Util.null2String(requesData.get("swh")); // String swh = Util.null2String(requesData.get("swh"));
@ -594,7 +598,13 @@ public class SecondBranchReceivingPushArchivesService implements KeyWord {
//TODO //TODO
context.append(ArchivesUtil.getAssociatedPersons(requestid,false)).append("|"); // 28 相关人员 -> 参与人员 context.append(ArchivesUtil.getAssociatedPersons(requestid,false)).append("|"); // 28 相关人员 -> 参与人员
context.append("智慧OA").append("|"); // 29 数据来源 -> 数据来源 context.append("智慧OA").append("|"); // 29 数据来源 -> 数据来源
if (StringUtil.isEmpty(swrq)){
context.append("").append("|"); // 30 形成年度 -> 年份
}else {
LocalDate date = LocalDate.parse(swrq, formatter);
int year = date.getYear();
context.append(year).append("|"); // 30 形成年度 -> 年份 context.append(year).append("|"); // 30 形成年度 -> 年份
}
context.append(String.join("&&", zwFileName)).append("|"); // 31 正文名称 context.append(String.join("&&", zwFileName)).append("|"); // 31 正文名称
context.append(String.join("&&", fjFileName)).append("|"); // 32 附件名称 context.append(String.join("&&", fjFileName)).append("|"); // 32 附件名称
context.append("togd"+requestid).append("|"); // 33 主键 context.append("togd"+requestid).append("|"); // 33 主键

@ -195,10 +195,16 @@ public class ArchivesUtil {
System.out.println("父目录已存在,无需创建."); System.out.println("父目录已存在,无需创建.");
} }
FileOutputStream fos = new FileOutputStream(GenerateFilename); // FileOutputStream fos = new FileOutputStream(GenerateFilename);
Writer out = new OutputStreamWriter(fos, StandardCharsets.UTF_8); // Writer out = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
// temp.process(root, out);
// out.flush();//可不手动调用
// 使用 try-with-resources 确保流被正确关闭
try (FileOutputStream fos = new FileOutputStream(GenerateFilename);
Writer out = new OutputStreamWriter(fos, StandardCharsets.UTF_8)) {
temp.process(root, out); temp.process(root, out);
out.flush();//可不手动调用 out.flush();
}
return GenerateFilename; return GenerateFilename;
} }

Loading…
Cancel
Save