1、异常处理过滤已推送评审结果数据的标段
2、重新评审增加提示信息
This commit is contained in:
@ -167,6 +167,8 @@ public enum ProjectExceptionEnum implements BusinessExceptionAssert {
|
|||||||
FRAME_EXCEPTION_PROJECT_SECTION_NOT_STATUS(110074, "项目标段信息已经异常处理不可以进行操作!"),
|
FRAME_EXCEPTION_PROJECT_SECTION_NOT_STATUS(110074, "项目标段信息已经异常处理不可以进行操作!"),
|
||||||
|
|
||||||
FRAME_EXCEPTION_PROJECT_SUPP_REL_VO_LIST_EMPTY(110075, "供应商ID不能为空!"),
|
FRAME_EXCEPTION_PROJECT_SUPP_REL_VO_LIST_EMPTY(110075, "供应商ID不能为空!"),
|
||||||
|
|
||||||
|
FRAME_EXCEPTION_PROJECT_CHECK_STATUS_ERROR(110079, "调用采购系统校验是否可以发起接口错误"),
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评审
|
* 评审
|
||||||
* @author daixc
|
* @author daixc
|
||||||
@ -34,4 +37,12 @@ public interface EbtpRsmsApi {
|
|||||||
@GetMapping("/v1/jury/copy")
|
@GetMapping("/v1/jury/copy")
|
||||||
BaseResponse<Boolean> copyJury(@RequestParam(name = "oldRoomId") String oldRoomId,
|
BaseResponse<Boolean> copyJury(@RequestParam(name = "oldRoomId") String oldRoomId,
|
||||||
@RequestParam(name = "newRoomId") String newRoomId);
|
@RequestParam(name = "newRoomId") String newRoomId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据标段ID集合查询是否能够发起异常处理
|
||||||
|
* @param bsIds 标段id集合
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/v1/reviewresult/getToExceptionByBsId")
|
||||||
|
BaseResponse<Map<String,Boolean>> getToExceptionByBsId(@RequestBody List<String> bsIds);
|
||||||
}
|
}
|
||||||
|
@ -66,4 +66,17 @@ public class ProjectSectionExceptionController{
|
|||||||
return BaseResponse.success(projectSectionException);
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,4 +18,12 @@ public interface IProjectSectionExceptionService extends IBaseService<ProjectSec
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean deleteByExceptionId(String exceptionId);
|
boolean deleteByExceptionId(String exceptionId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标段是否有异常信息
|
||||||
|
* @param sectionId 标段id
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
boolean getBySectionId(String sectionId);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.chinaunicom.mall.ebtp.project.projectexception.service.impl;
|
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.common.base.service.impl.BaseServiceImpl;
|
||||||
import com.chinaunicom.mall.ebtp.project.projectexception.dao.ProjectSectionExceptionMapper;
|
import com.chinaunicom.mall.ebtp.project.projectexception.dao.ProjectSectionExceptionMapper;
|
||||||
import com.chinaunicom.mall.ebtp.project.projectexception.entity.ProjectSectionException;
|
import com.chinaunicom.mall.ebtp.project.projectexception.entity.ProjectSectionException;
|
||||||
@ -24,4 +25,11 @@ public class ProjectSectionExceptionServiceImpl extends BaseServiceImpl<ProjectS
|
|||||||
public boolean deleteByExceptionId(String exceptionId) {
|
public boolean deleteByExceptionId(String exceptionId) {
|
||||||
return exceptionMapper.deleteByExceptionId(exceptionId) > 0;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,14 +185,18 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
|
|||||||
//1 去采购系统校验子项目信息是否发生改变 如果发生改变不可以重新评审
|
//1 去采购系统校验子项目信息是否发生改变 如果发生改变不可以重新评审
|
||||||
ProjectReEvaluation evaluation = this.getById(id);
|
ProjectReEvaluation evaluation = this.getById(id);
|
||||||
ProjectSection section = sectionService.getById(evaluation.getSectionId());
|
ProjectSection section = sectionService.getById(evaluation.getSectionId());
|
||||||
log.info("重评校验子项目信息请求参数 子项目ID:{}",section.getSubprojectId());
|
try {
|
||||||
BaseResponse<Boolean> baseResponse = mallResuApi.findStatusByPurpIdForEval(Long.parseLong(section.getSubprojectId()));
|
log.info("重评校验子项目信息请求参数 子项目ID:{}",section.getSubprojectId());
|
||||||
log.info("重评校验子项目信息返回结果:{}",JsonUtils.objectToJson(baseResponse));
|
BaseResponse<Boolean> baseResponse = mallResuApi.findStatusByPurpIdForEval(Long.parseLong(section.getSubprojectId()));
|
||||||
if(!baseResponse.isSuccess()){
|
log.info("重评校验子项目信息返回结果:{}",JsonUtils.objectToJson(baseResponse));
|
||||||
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_NOT_UPDATE.customValidName(baseResponse.getMessage(),!baseResponse.isSuccess());
|
if(!baseResponse.isSuccess()){
|
||||||
}
|
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_NOT_UPDATE.customValidName(baseResponse.getMessage(),!baseResponse.isSuccess());
|
||||||
if(!baseResponse.getData()){
|
}
|
||||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_EXCEPTION_CHECK_STATUS_ERROR.throwException();
|
if(!baseResponse.getData()){
|
||||||
|
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_EXCEPTION_CHECK_STATUS_ERROR.throwException();
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_CHECK_STATUS_ERROR.throwException();
|
||||||
}
|
}
|
||||||
|
|
||||||
//3、调用流程中心 发起重新评审流程
|
//3、调用流程中心 发起重新评审流程
|
||||||
|
@ -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.entity.DictChooseProcess;
|
||||||
import com.chinaunicom.mall.ebtp.project.dictchooseprocess.service.IDictChooseProcessService;
|
import com.chinaunicom.mall.ebtp.project.dictchooseprocess.service.IDictChooseProcessService;
|
||||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpMallProcessApi;
|
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.BizAssessRoom;
|
||||||
import com.chinaunicom.mall.ebtp.project.feign.entity.DictProjectConfig;
|
import com.chinaunicom.mall.ebtp.project.feign.entity.DictProjectConfig;
|
||||||
import com.chinaunicom.mall.ebtp.project.feign.entity.SectionFlowVO;
|
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.IProjectSectionFlowService;
|
||||||
import com.chinaunicom.mall.ebtp.project.projectsection.service.IProjectSectionService;
|
import com.chinaunicom.mall.ebtp.project.projectsection.service.IProjectSectionService;
|
||||||
import io.seata.core.context.RootContext;
|
import io.seata.core.context.RootContext;
|
||||||
import io.seata.spring.annotation.GlobalTransactional;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -67,6 +66,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
|||||||
@Resource
|
@Resource
|
||||||
private IDictChooseProcessService chooseProcessService;
|
private IDictChooseProcessService chooseProcessService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EbtpRsmsApi rsmsApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认轮次
|
* 默认轮次
|
||||||
*/
|
*/
|
||||||
@ -495,6 +497,15 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
|||||||
List<ProjectSectionVO> sectionVOList = projectSectionMapper.selectEditSectionBySave(projectId);
|
List<ProjectSectionVO> sectionVOList = projectSectionMapper.selectEditSectionBySave(projectId);
|
||||||
sectionVOList = sectionVOList.stream().filter(n -> (n.getBusinessModule() > (isReviewMethod ? ProjectCommonUtil.BUSINESS_MODULE_2 : ProjectCommonUtil.BUSINESS_MODULE_7)
|
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());
|
&& 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;
|
return sectionVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user