Explorar el Código

采购公告发布增加开关

tags/24080901
WendyYang hace 7 meses
padre
commit
03a0a3e6c5
Se han modificado 2 ficheros con 14 adiciones y 2 borrados
  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 Ver fichero

@@ -74,6 +74,7 @@ import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.file.entity.File;
import com.ningdatech.file.entity.vo.result.FileResultVO;
import com.ningdatech.file.service.FileService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.OrgInfoDTO;
@@ -82,6 +83,8 @@ import com.wflow.workflow.service.ProcessInstanceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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.transaction.annotation.Transactional;

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

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

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

private MhPurchaseNoticeDTO buildPurchaseNotice(PurchaseNoticeTenderDTO w, UserInfoDetails user) {


+ 2
- 0
hz-pm-api/src/main/resources/application-prod.yml Ver fichero

@@ -192,6 +192,8 @@ mh:
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
upload-url: http://10.54.38.13:8081/mh-gateway/oss/oss/uploadFileSkipLogin
purchase-notice:
open: false
sync-mh-company:
open: false
sync-mh-user:


Cargando…
Cancelar
Guardar