|
|
@@ -11,10 +11,7 @@ import com.trs.ggzyexchange.controller.BaseController;
|
|
|
import com.trs.ggzyexchange.entity.*;
|
|
|
import com.trs.ggzyexchange.enums.ClassIfy;
|
|
|
import com.trs.ggzyexchange.enums.JobLock;
|
|
|
-import com.trs.ggzyexchange.service.GcBidExceptioNoticeService;
|
|
|
-import com.trs.ggzyexchange.service.GcNoticeandfileService;
|
|
|
-import com.trs.ggzyexchange.service.ScheduledTashService;
|
|
|
-import com.trs.ggzyexchange.service.TenderDetailsVoService;
|
|
|
+import com.trs.ggzyexchange.service.*;
|
|
|
import com.trs.ggzyexchange.utils.TenderDetailsVoUtils;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.quartz.Job;
|
|
|
@@ -63,6 +60,9 @@ public class GcBidExceptioNoticeSchedul implements Job {
|
|
|
@Autowired
|
|
|
private ScheduledTashService scheduledTashService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private GcAttachmentService gcAttachmentService;
|
|
|
+
|
|
|
public void queryPageListUpdateEs() throws JsonProcessingException {
|
|
|
|
|
|
/**
|
|
|
@@ -144,6 +144,98 @@ public class GcBidExceptioNoticeSchedul implements Job {
|
|
|
record.setTransactionTypeCode(ClassIfy.ENGINEERING_CONSTRUCTION.getCode());
|
|
|
record.setTransactionTypeName(ClassIfy.ENGINEERING_CONSTRUCTION.getName());
|
|
|
record = tenderDetailsVoService.getTenderDetailsVoAllOrther(record);
|
|
|
+
|
|
|
+ try {
|
|
|
+ String bidSectionCodes = record.getBidSectionCodes();
|
|
|
+ int i1 = bidSectionCodes.indexOf(",");
|
|
|
+ int i2 = bidSectionCodes.indexOf(";");
|
|
|
+ int i3 = bidSectionCodes.indexOf("<br>");
|
|
|
+ int i4 = bidSectionCodes.indexOf("ltbrgt");
|
|
|
+ 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(i4 > 0){
|
|
|
+ split = bidSectionCodes.split("ltbrgt");
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ if(!flag){
|
|
|
+ split = new String[]{bidSectionCodes};
|
|
|
+ }
|
|
|
+ List<GcAttachment> attachmentList = new ArrayList<GcAttachment>();
|
|
|
+
|
|
|
+ if(record.getDataTimestamp()>20250324000000L){
|
|
|
+ //通过标包编号查询对应的附件信息
|
|
|
+ QueryWrapper<GcAttachment> gcAttachmentQueryWrapper = new QueryWrapper<GcAttachment>();
|
|
|
+ gcAttachmentQueryWrapper.eq("ATTACHMENT_SET_CODE","EXCEPTION_NOTICE_FILE");//add
|
|
|
+ gcAttachmentQueryWrapper.eq("ASSOCIATION_CODE", record.getSourceDataKey());
|
|
|
+ List<GcAttachment> list = gcAttachmentService.list(gcAttachmentQueryWrapper);
|
|
|
+
|
|
|
+
|
|
|
+ if(!ObjectUtils.isEmpty(list)){
|
|
|
+ attachmentList.addAll(list);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(!ObjectUtils.isEmpty(split)){
|
|
|
+ if(split.length >=1){
|
|
|
+ for (String bidSectionCode : split) {
|
|
|
+ try {
|
|
|
+ //通过标包编号查询对应的附件信息
|
|
|
+ QueryWrapper<GcAttachment> gcAttachmentQueryWrapper = new QueryWrapper<GcAttachment>();
|
|
|
+ gcAttachmentQueryWrapper.eq("ATTACHMENT_SET_CODE","EXCEPTION_NOTICE_FILE");//add
|
|
|
+ gcAttachmentQueryWrapper.like("BID_SECTION_CODE",bidSectionCode);
|
|
|
+ List<GcAttachment> list = gcAttachmentService.list(gcAttachmentQueryWrapper);
|
|
|
+
|
|
|
+
|
|
|
+ if(!ObjectUtils.isEmpty(list)){
|
|
|
+ attachmentList.addAll(list);
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ String noticeContent = record.getNoticeContent();
|
|
|
+ String file = "";
|
|
|
+ if(!ObjectUtils.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);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
TenderDetailsVoUtils.isNull(record);
|
|
|
}
|
|
|
return tenderDetailsVoIPage.getRecords();
|