Procházet zdrojové kódy

招标文件名成更换为文档名称

蓝盒子itbluebox před 1 rokem
rodič
revize
e677828bb4

+ 55 - 47
src/main/java/com/trs/ggzyexchange/schedul/GcTenderbidfileSchedul.java

@@ -134,64 +134,72 @@ public class GcTenderbidfileSchedul   implements Job {
         Page<GcTenderbidfile> page = new Page<GcTenderbidfile>(pageNo, pageSize);
         IPage<TenderDetailsVo> tenderDetailsVoIPage = gcTenderbidfileService.queryGcTenderbidfileAllListByTime(page,time);
         for (TenderDetailsVo record : tenderDetailsVoIPage.getRecords()) {
-            String projectName = record.getProjectName();
-            if(!ObjectUtils.isEmpty(projectName)){
-                record.setNoticeName(projectName);
+            String noticeName = record.getNoticeName();
+            if(!ObjectUtils.isEmpty(noticeName)){
+                record.setNoticeName(noticeName);
             }
             record.setNoticeTypeCode(ClassIfy.BIDDING_DOCUMENTS.getCode());
             record.setNoticeTypeName(ClassIfy.BIDDING_DOCUMENTS.getName());
             record.setTransactionTypeCode(ClassIfy.ENGINEERING_CONSTRUCTION.getCode());
             record.setTransactionTypeName(ClassIfy.ENGINEERING_CONSTRUCTION.getName());
             record = tenderDetailsVoService.getTenderDetailsVoAllOrther(record);
-            String bidSectionCodes = record.getBidSectionCodes();
-            int i1 = bidSectionCodes.indexOf(",");
-            int i2 = bidSectionCodes.indexOf(";");
-            int i3 = bidSectionCodes.indexOf("<br>");
-            String splitBidSectionCode = null;
-            boolean flag = false;
-            String[] split = null;
-            if(i1 > 0){
-                split =  bidSectionCodes.split(",");
-                flag = true;
-            }
-            if(i2 > 0){
-                split =  bidSectionCodes.split(";");
-                flag = true;
-            }
-            if(i3 > 0){
-                split =  bidSectionCodes.split("<br>");
-                flag = true;
-            }
-            if(!flag){
-                split = new String[]{bidSectionCodes};
-            }
-            List<GcAttachment> attachmentList = new ArrayList<GcAttachment>();
-            if(!ObjectUtils.isEmpty(split)){
-                if(split.length >=1){
-                    for (String bidSectionCode : split) {
-                        try {
-                            //通过标包编号查询对应的附件信息
-                            QueryWrapper<GcAttachment> gcAttachmentQueryWrapper = new QueryWrapper<GcAttachment>();
-                            gcAttachmentQueryWrapper.eq("BID_SECTION_CODE",bidSectionCode);
-                            List<GcAttachment> list = gcAttachmentService.list(gcAttachmentQueryWrapper);
-                            if(!ObjectUtils.isEmpty(list)){
-                                attachmentList.addAll(list);
+            try {
+                String bidSectionCodes = record.getBidSectionCodes();
+                int i1 = bidSectionCodes.indexOf(",");
+                int i2 = bidSectionCodes.indexOf(";");
+                int i3 = bidSectionCodes.indexOf("<br>");
+                String splitBidSectionCode = null;
+                boolean flag = false;
+                String[] split = null;
+                if(i1 > 0){
+                    split =  bidSectionCodes.split(",");
+                    flag = true;
+                }
+                if(i2 > 0){
+                    split =  bidSectionCodes.split(";");
+                    flag = true;
+                }
+                if(i3 > 0){
+                    split =  bidSectionCodes.split("<br>");
+                    flag = true;
+                }
+                if(!flag){
+                    split = new String[]{bidSectionCodes};
+                }
+                List<GcAttachment> attachmentList = new ArrayList<GcAttachment>();
+                if(!ObjectUtils.isEmpty(split)){
+                    if(split.length >=1){
+                        for (String bidSectionCode : split) {
+                            try {
+                                //通过标包编号查询对应的附件信息
+                                QueryWrapper<GcAttachment> gcAttachmentQueryWrapper = new QueryWrapper<GcAttachment>();
+                                gcAttachmentQueryWrapper.eq("BID_SECTION_CODE",bidSectionCode);
+                                List<GcAttachment> list = gcAttachmentService.list(gcAttachmentQueryWrapper);
+                                if(!ObjectUtils.isEmpty(list)){
+                                    attachmentList.addAll(list);
+                                }
+                            }catch (Exception e){
+                                e.printStackTrace();
                             }
-                        }catch (Exception e){
-                            e.printStackTrace();
                         }
                     }
                 }
+                String file = "";
+                for (GcAttachment gcAttachment : attachmentList) {
+                    try{
+                        String attachmentName = gcAttachment.getAttachmentName();
+                        String url = gcAttachment.getUrl();
+                        file += "<a href='"+ url +"'>"+ attachmentName +"</a><br/>";
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                }
+                //招标文件拼接地址
+                //record.setNoticeContent(file);
+                record.setNoticeContent(file);
+            }catch (Exception e){
+                e.printStackTrace();
             }
-            String file = "";
-            for (GcAttachment gcAttachment : attachmentList) {
-                String attachmentName = gcAttachment.getAttachmentName();
-                String url = gcAttachment.getUrl();
-                file += "<a href='"+ url +"'>"+ attachmentName +"</a><br/>";
-            }
-            //招标文件拼接地址
-            //record.setNoticeContent(file);
-            record.setNoticeContent(file);
             TenderDetailsVoUtils.isNull(record);
         }
         return tenderDetailsVoIPage.getRecords();