Explorar o código

合同图片导出开发

anderx hai 1 ano
pai
achega
7e6b16c40e

+ 3 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1786,8 +1786,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			ZipOutputStream zip = new ZipOutputStream(outputStream);
 			downloadFileName="订单合同数据.zip";
 			for (TOrderNewBo t : list) {
-				if (t != null) {
-					String annexUrl = t.getContractPictureUrl();
+				String annexUrl = t.getContractPictureUrl();
+				if (StringUtils.isNotBlank(annexUrl)) {
 					String[] split = annexUrl.split(",");
 					if (split.length>0){
 						int index =0;
@@ -1801,7 +1801,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 								if (file.exists()){
 									try {
 										String suffix = s.substring(s.indexOf("."));
-										String fileName=t.getUserName()+"/"+t.getUserName()+"_"+index+suffix;
+										String fileName=t.getUserName()+"("+t.getContractNo()+")"+"/"+t.getContractNo()+"_"+index+suffix;
 										ZipEntry e = new ZipEntry(fileName);
 										zip.putNextEntry(e);
 										IOUtils.write(FileUtils.getBytes(file),zip);