|
|
@@ -17,6 +17,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -41,6 +42,9 @@ public class GcTenderbidfilepublicitySchedul implements Job {
|
|
|
@Autowired
|
|
|
private GcNoticeandfileService gcNoticeandfileService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private GcAttachmentService gcAttachmentService;
|
|
|
+
|
|
|
private Logger logger = LoggerFactory.getLogger(ZfcgGongao.class);
|
|
|
|
|
|
public void queryPageListUpdateEs() throws JsonProcessingException {
|
|
|
@@ -197,7 +201,40 @@ public class GcTenderbidfilepublicitySchedul implements Job {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
- String finalNoticeContent = "";
|
|
|
+ List<GcAttachment> attachmentList = new ArrayList<GcAttachment>();
|
|
|
+ //通过标包编号查询对应的附件信息
|
|
|
+ QueryWrapper<GcAttachment> gcAttachmentQueryWrapper = new QueryWrapper<GcAttachment>();
|
|
|
+ gcAttachmentQueryWrapper.eq("ATTACHMENT_SET_CODE","GC_TENDERBIDFILEPUBLICITY");//add
|
|
|
+ gcAttachmentQueryWrapper.eq("ASSOCIATION_CODE", record.getSourceDataKey());
|
|
|
+ List<GcAttachment> list = gcAttachmentService.list(gcAttachmentQueryWrapper);
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
+ attachmentList.addAll(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ String noticeContent = record.getNoticeContent();
|
|
|
+ String file = "";
|
|
|
+ if(!CollectionUtils.isEmpty(attachmentList)){
|
|
|
+ if(attachmentList.size() > 0){
|
|
|
+ file = "<br>附件:<br>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (GcAttachment gcAttachment : attachmentList) {
|
|
|
+ try{
|
|
|
+ String attachmentName = gcAttachment.getAttachmentName();
|
|
|
+ String url = gcAttachment.getUrl();
|
|
|
+ file += "<a target='_blank' style='color: blue' href='"+ url +"'>"+ attachmentName +"</a><br/>";
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //招标文件拼接地址
|
|
|
+ if(!ObjectUtils.isEmpty(noticeContent) && noticeContent != ""){
|
|
|
+ file = noticeContent + file;
|
|
|
+ }
|
|
|
+ record.setNoticeContent(file);
|
|
|
+
|
|
|
+
|
|
|
+ /*String finalNoticeContent = "";
|
|
|
String noticeContent = record.getNoticeContent();
|
|
|
if(!ObjectUtils.isEmpty(noticeContent)){
|
|
|
finalNoticeContent = noticeContent;
|
|
|
@@ -211,7 +248,7 @@ public class GcTenderbidfilepublicitySchedul implements Job {
|
|
|
}
|
|
|
finalNoticeContent = finalNoticeContent + file;
|
|
|
}
|
|
|
- record.setNoticeContent(finalNoticeContent);
|
|
|
+ record.setNoticeContent(finalNoticeContent);*/
|
|
|
|
|
|
TenderDetailsVo aNull = TenderDetailsVoUtils.isNull(record);
|
|
|
tenderDetailsVos.add(aNull);
|