Browse Source

采购公告发布增加开关

tags/24080901
WendyYang 5 months ago
parent
commit
03a0a3e6c5
2 changed files with 14 additions and 2 deletions
  1. +12
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  2. +2
    -0
      hz-pm-api/src/main/resources/application-prod.yml

+ 12
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -74,6 +74,7 @@ import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.file.entity.File; import com.ningdatech.file.entity.File;
import com.ningdatech.file.entity.vo.result.FileResultVO; import com.ningdatech.file.entity.vo.result.FileResultVO;
import com.ningdatech.file.service.FileService; import com.ningdatech.file.service.FileService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import com.wflow.bean.entity.WflowModels; import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException; import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.OrgInfoDTO; import com.wflow.workflow.bean.dto.OrgInfoDTO;
@@ -82,6 +83,8 @@ import com.wflow.workflow.service.ProcessInstanceService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;


@@ -337,6 +340,9 @@ public class PurchaseManage {
return "保存失败"; return "保存失败";
} }


@Value("${mh.purchase-notice.open:true}")
private Boolean mhPurchaseNoticeOpen;

@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public synchronized void submitPurchaseNotice(SubmitPurchaseNoticeReq req) { public synchronized void submitPurchaseNotice(SubmitPurchaseNoticeReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail(); UserInfoDetails user = LoginUserUtil.loginUserDetail();
@@ -375,14 +381,18 @@ public class PurchaseManage {
purchase.setTestValidStatus(TenderTestValidStatusEnum.WITHOUT_TEST_VALID_INFO.getCode()); purchase.setTestValidStatus(TenderTestValidStatusEnum.WITHOUT_TEST_VALID_INFO.getCode());
purchase.setAdaptStatus(TenderAdaptStatusEnum.WITHOUT_ADAPT_INFO.getCode()); purchase.setAdaptStatus(TenderAdaptStatusEnum.WITHOUT_ADAPT_INFO.getCode());
purchase.setStatus(TenderStatusEnum.TO_BE_SUBMIT_PURCHASE_INFO.getTenderStatus()); purchase.setStatus(TenderStatusEnum.TO_BE_SUBMIT_PURCHASE_INFO.getTenderStatus());
notices.add(buildPurchaseNotice(w, user));
if (Boolean.TRUE.equals(mhPurchaseNoticeOpen)) {
notices.add(buildPurchaseNotice(w, user));
}
return purchase; return purchase;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
purchaseService.saveOrUpdateBatch(purchases); purchaseService.saveOrUpdateBatch(purchases);
projectStateMachineUtil.pass(project); projectStateMachineUtil.pass(project);
projectService.updateById(project); projectService.updateById(project);
// 发布采购公告 // 发布采购公告
mhApiClient.publishPurchaseNotice(notices);
if (Boolean.TRUE.equals(mhPurchaseNoticeOpen)) {
mhApiClient.publishPurchaseNotice(notices);
}
} }


private MhPurchaseNoticeDTO buildPurchaseNotice(PurchaseNoticeTenderDTO w, UserInfoDetails user) { private MhPurchaseNoticeDTO buildPurchaseNotice(PurchaseNoticeTenderDTO w, UserInfoDetails user) {


+ 2
- 0
hz-pm-api/src/main/resources/application-prod.yml View File

@@ -192,6 +192,8 @@ mh:
detail-url: http://10.54.38.13:8081/mh-gateway/oss/ossfile/getFileInfoList detail-url: http://10.54.38.13:8081/mh-gateway/oss/ossfile/getFileInfoList
down-url: http://10.54.38.13:8081/mh-gateway/oss/oss/downloadFileNotLogin down-url: http://10.54.38.13:8081/mh-gateway/oss/oss/downloadFileNotLogin
upload-url: http://10.54.38.13:8081/mh-gateway/oss/oss/uploadFileSkipLogin upload-url: http://10.54.38.13:8081/mh-gateway/oss/oss/uploadFileSkipLogin
purchase-notice:
open: false
sync-mh-company: sync-mh-company:
open: false open: false
sync-mh-user: sync-mh-user:


Loading…
Cancel
Save