Commit c799060a authored by dahai's avatar dahai

push

parent e021f88c
...@@ -35,7 +35,7 @@ public class ExportExcelApi { ...@@ -35,7 +35,7 @@ public class ExportExcelApi {
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件 // //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = null; String fout = null;
fout = ExportExcel.exportExcelDate(mapList); fout = ExportExcel.exportExcelDate(mapList);
String outFile = dateTime + "公安网数据"; String outFile = dateTime + "myExcel";
try { try {
FileInputStream fis = new FileInputStream(new File(fout)); FileInputStream fis = new FileInputStream(new File(fout));
byte[] b = new byte[fis.available()]; byte[] b = new byte[fis.available()];
......
...@@ -162,7 +162,7 @@ public class ExportXMLApi { ...@@ -162,7 +162,7 @@ public class ExportXMLApi {
* @throws IOException 可能出现文件写入不成功 * @throws IOException 可能出现文件写入不成功
*/ */
private String createToMakePackageXML(List<PreproPersonEntity> preproPersonEntities , FilesEntity filesEntity, String url) throws IOException { private String createToMakePackageXML(List<PreproPersonEntity> preproPersonEntities , FilesEntity filesEntity, String url) throws IOException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyyMMddhhmmss");
Document document = DocumentHelper.createDocument(); Document document = DocumentHelper.createDocument();
Element PACKAGE = DocumentHelper.createElement("PACKAGE"); Element PACKAGE = DocumentHelper.createElement("PACKAGE");
...@@ -186,7 +186,7 @@ public class ExportXMLApi { ...@@ -186,7 +186,7 @@ public class ExportXMLApi {
newFilesEntity.setVersionCode(filesEntity.getVersionCode()); newFilesEntity.setVersionCode(filesEntity.getVersionCode());
newFilesEntity.setRecordNumber((long)preproPersonEntities.size()); newFilesEntity.setRecordNumber((long)preproPersonEntities.size());
long l = newFilesService.saveNewFiles(newFilesEntity); long l = newFilesService.saveNewFiles(newFilesEntity);
newFilesEntity.setNewFileName(simpleDateFormat.format(new Date())+"-"+newFilesEntity.getId()); newFilesEntity.setNewFileName("ZAGL_ZZJH_"+filesEntity.getDwdm()+simpleDateFormat.format(new Date())+""+newFilesEntity.getId());
newFilesService.updateNewFileName(newFilesEntity); newFilesService.updateNewFileName(newFilesEntity);
int NO=1; int NO=1;
...@@ -246,7 +246,7 @@ public class ExportXMLApi { ...@@ -246,7 +246,7 @@ public class ExportXMLApi {
preproPersonService.updatePreproPerson_NewFileName(preproPersonEntities); preproPersonService.updatePreproPerson_NewFileName(preproPersonEntities);
String files_seq = newFilesEntity.getId()+""; String files_seq = newFilesEntity.getId()+"";
try { try {
FileOutputStream fos = new FileOutputStream("D:\\XML\\" + simpleDateFormat.format(new Date())+"-"+files_seq+ ".xml"); FileOutputStream fos = new FileOutputStream("D:\\XML\\"+"ZAGL_ZZJH_"+filesEntity.getDwdm() + simpleDateFormat.format(new Date())+"-"+files_seq+ ".xml");
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8"); OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
OutputFormat of = new OutputFormat(); OutputFormat of = new OutputFormat();
of.setEncoding("UTF-8"); of.setEncoding("UTF-8");
...@@ -265,7 +265,7 @@ public class ExportXMLApi { ...@@ -265,7 +265,7 @@ public class ExportXMLApi {
// return document; // return document;
return "D:\\XML\\" + simpleDateFormat.format(new Date())+"-"+files_seq+ ".xml"; return "D:\\XML\\" +"ZAGL_ZZJH_"+filesEntity.getDwdm()+ simpleDateFormat.format(new Date())+"-"+files_seq+ ".xml";
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment