1、异常处理过滤已推送评审结果数据的标段

2、重新评审增加提示信息
This commit is contained in:
dxc
2021-03-30 16:00:28 +08:00
parent d98964d26c
commit 165060f62a
7 changed files with 67 additions and 10 deletions

View File

@ -167,6 +167,8 @@ public enum ProjectExceptionEnum implements BusinessExceptionAssert {
FRAME_EXCEPTION_PROJECT_SECTION_NOT_STATUS(110074, "项目标段信息已经异常处理不可以进行操作!"),
FRAME_EXCEPTION_PROJECT_SUPP_REL_VO_LIST_EMPTY(110075, "供应商ID不能为空"),
FRAME_EXCEPTION_PROJECT_CHECK_STATUS_ERROR(110079, "调用采购系统校验是否可以发起接口错误"),
;
/**

View File

@ -9,6 +9,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
* 评审
* @author daixc
@ -34,4 +37,12 @@ public interface EbtpRsmsApi {
@GetMapping("/v1/jury/copy")
BaseResponse<Boolean> copyJury(@RequestParam(name = "oldRoomId") String oldRoomId,
@RequestParam(name = "newRoomId") String newRoomId);
/**
* 根据标段ID集合查询是否能够发起异常处理
* @param bsIds 标段id集合
* @return 返回结果
*/
@PostMapping("/v1/reviewresult/getToExceptionByBsId")
BaseResponse<Map<String,Boolean>> getToExceptionByBsId(@RequestBody List<String> bsIds);
}

View File

@ -66,4 +66,17 @@ public class ProjectSectionExceptionController{
return BaseResponse.success(projectSectionException);
}
/**
* 获取标段是否有异常信息
* @param sectionId 标段id
* @return 返回结果 ture 没有异常信息 false 有异常信息
*/
@ApiOperation("查询标段是否有异常信息")
@GetMapping ("/getBySectionId/{sectionId}")
public BaseResponse<Boolean> getBySectionId(@ApiParam(value = "标段ID", required = true) @PathVariable String sectionId){
return BaseResponse.success(projectSectionExceptionService.getBySectionId(sectionId));
}
}

View File

@ -18,4 +18,12 @@ public interface IProjectSectionExceptionService extends IBaseService<ProjectSec
* @return
*/
boolean deleteByExceptionId(String exceptionId);
/**
* 获取标段是否有异常信息
* @param sectionId 标段id
* @return 返回结果
*/
boolean getBySectionId(String sectionId);
}

View File

@ -1,6 +1,7 @@
package com.chinaunicom.mall.ebtp.project.projectexception.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.project.projectexception.dao.ProjectSectionExceptionMapper;
import com.chinaunicom.mall.ebtp.project.projectexception.entity.ProjectSectionException;
@ -24,4 +25,11 @@ public class ProjectSectionExceptionServiceImpl extends BaseServiceImpl<ProjectS
public boolean deleteByExceptionId(String exceptionId) {
return exceptionMapper.deleteByExceptionId(exceptionId) > 0;
}
@Override
public boolean getBySectionId(String sectionId) {
LambdaQueryWrapper<ProjectSectionException> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProjectSectionException::getSectionId,sectionId);
return this.count(queryWrapper) <= 0;
}
}

View File

@ -185,6 +185,7 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
//1 去采购系统校验子项目信息是否发生改变 如果发生改变不可以重新评审
ProjectReEvaluation evaluation = this.getById(id);
ProjectSection section = sectionService.getById(evaluation.getSectionId());
try {
log.info("重评校验子项目信息请求参数 子项目ID{}",section.getSubprojectId());
BaseResponse<Boolean> baseResponse = mallResuApi.findStatusByPurpIdForEval(Long.parseLong(section.getSubprojectId()));
log.info("重评校验子项目信息返回结果:{}",JsonUtils.objectToJson(baseResponse));
@ -194,6 +195,9 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
if(!baseResponse.getData()){
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_EXCEPTION_CHECK_STATUS_ERROR.throwException();
}
}catch (Exception e){
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_CHECK_STATUS_ERROR.throwException();
}
//3、调用流程中心 发起重新评审流程
ProjectReEvaluationTaskVO reEvaluationTaskVO = reEvalStart(id);

View File

@ -16,6 +16,7 @@ import com.chinaunicom.mall.ebtp.project.common.ProjectExceptionEnum;
import com.chinaunicom.mall.ebtp.project.dictchooseprocess.entity.DictChooseProcess;
import com.chinaunicom.mall.ebtp.project.dictchooseprocess.service.IDictChooseProcessService;
import com.chinaunicom.mall.ebtp.project.feign.EbtpMallProcessApi;
import com.chinaunicom.mall.ebtp.project.feign.EbtpRsmsApi;
import com.chinaunicom.mall.ebtp.project.feign.entity.BizAssessRoom;
import com.chinaunicom.mall.ebtp.project.feign.entity.DictProjectConfig;
import com.chinaunicom.mall.ebtp.project.feign.entity.SectionFlowVO;
@ -29,14 +30,12 @@ import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSectionVO;
import com.chinaunicom.mall.ebtp.project.projectsection.service.IProjectSectionFlowService;
import com.chinaunicom.mall.ebtp.project.projectsection.service.IProjectSectionService;
import io.seata.core.context.RootContext;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -67,6 +66,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
@Resource
private IDictChooseProcessService chooseProcessService;
@Resource
private EbtpRsmsApi rsmsApi;
/**
* 默认轮次
*/
@ -495,6 +497,15 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
List<ProjectSectionVO> sectionVOList = projectSectionMapper.selectEditSectionBySave(projectId);
sectionVOList = sectionVOList.stream().filter(n -> (n.getBusinessModule() > (isReviewMethod ? ProjectCommonUtil.BUSINESS_MODULE_2 : ProjectCommonUtil.BUSINESS_MODULE_7)
&& n.getStatus() < ProjectCommonUtil.BUSINESS_MODULE_12)).collect(Collectors.toList());
//查询接口过滤已推送数据的标段信息
List<String> sectionIds = sectionVOList.stream().map(ProjectSectionVO::getId).collect(Collectors.toList());
BaseResponse<Map<String,Boolean>> baseResponse = rsmsApi.getToExceptionByBsId(sectionIds);
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValidName(baseResponse.getMessage(),!baseResponse.isSuccess());
Map<String,Boolean> pushResultMap = baseResponse.getData();
sectionVOList = sectionVOList.stream().filter(n -> pushResultMap.get(n.getId())).collect(Collectors.toList());
return sectionVOList;
}