1、修改集合为空报错问题
2、项目列表增加查询展示信息
This commit is contained in:
@ -67,7 +67,7 @@ public class DictProjectServiceImpl extends BaseServiceImpl<DictProjectMapper,Di
|
||||
|
||||
DictProject dictProject = null;
|
||||
List<DictProject> dictProjectList = getDictList(parentCode,toParentCode);
|
||||
if(!dictProjectList.isEmpty()){
|
||||
if(null != dictProjectList && !dictProjectList.isEmpty()){
|
||||
dictProject = dictProjectList.stream().filter(n -> n.getCode().equals(code)).collect(Collectors.toList()).get(0);
|
||||
}
|
||||
return dictProject;
|
||||
|
@ -187,4 +187,10 @@ public class PurpBaseInfoVO {
|
||||
|
||||
@ApiModelProperty(value = "是否展示按钮")
|
||||
private String isDeleteShow;
|
||||
|
||||
@ApiModelProperty("机构code")
|
||||
private String companyCode;
|
||||
|
||||
@ApiModelProperty("机构名称")
|
||||
private String company;
|
||||
}
|
||||
|
@ -238,11 +238,11 @@ public class ProjectEntrustInquiryServiceImpl extends BaseServiceImpl<ProjectEnt
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_INQUIRY_ANNOUNCEMENT_STATUS_EMPTY.throwException();
|
||||
}
|
||||
//询价商品列表
|
||||
if(inquiryVO.getInquiryGoodsList().isEmpty()){
|
||||
if(null == inquiryVO.getInquiryGoodsList() || inquiryVO.getInquiryGoodsList().isEmpty()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_INQUIRY_INQUIRY_GOODS_EMPTY.throwException();
|
||||
}
|
||||
//询价文件不能为空
|
||||
if(inquiryVO.getAttachmentList().isEmpty()){
|
||||
if(null == inquiryVO.getAttachmentList() || inquiryVO.getAttachmentList().isEmpty()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_INQUIRY_ATTACHMENT_LIST_EMPTY.throwException();
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ public class ProjectEntrustInquiryServiceImpl extends BaseServiceImpl<ProjectEnt
|
||||
}
|
||||
|
||||
//询价应答格式不能为空
|
||||
if(inquiryVO.getResponseFormatList().isEmpty()){
|
||||
if(null == inquiryVO.getResponseFormatList() || inquiryVO.getResponseFormatList().isEmpty()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_INQUIRY_RESPONSE_FORMAT_LIST_EMPTY.throwException();
|
||||
}else{
|
||||
//询价应答格式code不能为空
|
||||
|
@ -560,7 +560,7 @@ public class ProjectEntrustServiceImpl extends BaseServiceImpl<ProjectEntrustMap
|
||||
}
|
||||
|
||||
List<PurpBaseInfoVO> purpBaseInfoVOList = implementSendVO.getPurpBaseInfoVoList();
|
||||
if(purpBaseInfoVOList.isEmpty()){
|
||||
if(null == purpBaseInfoVOList || purpBaseInfoVOList.isEmpty()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_PURP_BASE_INFO_VO_EMPTY.throwException();
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ public class ProjectEntrustServiceImpl extends BaseServiceImpl<ProjectEntrustMap
|
||||
}
|
||||
|
||||
List<ProjSuppRelVO> projSuppRelVOList = purpBaseInfo.getProjBaseInfoVO().getProjSuppRelVOList();
|
||||
if(!projSuppRelVOList.isEmpty()){
|
||||
if(null != projSuppRelVOList && !projSuppRelVOList.isEmpty()){
|
||||
Long suppIdCount = projSuppRelVOList.stream().filter(n -> null == n.getSuppId()).count();
|
||||
if(suppIdCount > 0){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SUPP_REL_VO_LIST_EMPTY.throwException();
|
||||
|
@ -178,7 +178,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
List<ProjectSectionException> sectionExceptionList = sectionExceptionService.list(sectionExceptionQueryWrapper);
|
||||
|
||||
//异常标段信息为空报异常
|
||||
if(sectionExceptionList.isEmpty()){
|
||||
if(null == sectionExceptionList || sectionExceptionList.isEmpty()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_EXCEPTION_UPDATE_ERROR.throwException();
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
section.setUpdateDate(null);
|
||||
//重新赋值新的项目ID和物资ID
|
||||
List<SectionSupplier> supplierList = sectionSupplierMap.get(section.getId());
|
||||
if (!supplierList.isEmpty()) {
|
||||
if (null != supplierList && !supplierList.isEmpty()) {
|
||||
for (SectionSupplier supplier : supplierList) {
|
||||
supplier.setSectionId(section.getId());
|
||||
supplier.setProjectId(projectRecord.getId());
|
||||
@ -342,7 +342,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
|
||||
//重新赋值新的项目ID和物资ID
|
||||
List<SectionMaterial> materialList = sectionMaterialMap.get(section.getId());
|
||||
if (!materialList.isEmpty()) {
|
||||
if (null != materialList && !materialList.isEmpty()) {
|
||||
for (SectionMaterial material : materialList) {
|
||||
material.setSectionId(section.getId());
|
||||
material.setProjectId(projectRecord.getId());
|
||||
@ -361,12 +361,12 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
projectSectionService.saveBatch(sectionList);
|
||||
|
||||
//插入供应商信息
|
||||
if (!sectionSupplierAddList.isEmpty()) {
|
||||
if (null != sectionSupplierAddList && !sectionSupplierAddList.isEmpty()) {
|
||||
sectionSupplierService.saveBatch(sectionSupplierAddList);
|
||||
}
|
||||
|
||||
//插入物资信息
|
||||
if (!materialAddList.isEmpty()) {
|
||||
if (null != materialAddList && !materialAddList.isEmpty()) {
|
||||
sectionMaterialService.saveBatch(materialAddList);
|
||||
}
|
||||
//通知招标服务邀请函信息
|
||||
@ -516,7 +516,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
|
||||
if(ProjectCommonUtil.IS_SEND_MESSAGE_0 == vo.getIsSendMessage()){
|
||||
List<AnnoVO> annoVOList = resultMap.get(vo.getId());
|
||||
if(!annoVOList.isEmpty()){
|
||||
if(null != annoVOList && !annoVOList.isEmpty()){
|
||||
vo.setSendMessageStatus(annoVOList.get(0).getStatus());
|
||||
vo.setSendMessageId(annoVOList.get(0).getId());
|
||||
}else{
|
||||
@ -542,7 +542,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
|
||||
BaseResponse<List<AnnoVO>> bidResponse = ebtpMallBidApi.getAnnoStatus(exceptionIds);
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_ERROR.customValidName(bidResponse.getMessage(), !bidResponse.isSuccess());
|
||||
List<AnnoVO> annoVOList = bidResponse.getData();
|
||||
if(!annoVOList.isEmpty()){
|
||||
if(null != annoVOList && !annoVOList.isEmpty()){
|
||||
if(ProjectCommonUtil.SEND_MESSAGE_STATUS_5 != annoVOList.get(0).getStatus()){
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_EXCEPTION_STATUS_ERROR.throwException();
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSectionVO;
|
||||
import com.chinaunicom.mall.ebtp.project.sectionmaterial.entity.SectionMaterial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
@ -14,6 +15,7 @@ import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@ -71,4 +73,7 @@ public class ProjectRecordVO extends ProjectRecord implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "不等于的状态字段")
|
||||
private Integer neStatus;
|
||||
|
||||
@ApiModelProperty(value = "项目下的第一个标段")
|
||||
private ProjectSectionVO sectionFirst;
|
||||
}
|
||||
|
@ -151,4 +151,12 @@ public interface IProjectRecordService extends IBaseService<ProjectRecord>{
|
||||
* @return 返回结果
|
||||
*/
|
||||
IPage<ProjectRecordVO> getPageByPurchase(ProjectRecordVO projectRecord);
|
||||
|
||||
/**
|
||||
* 获取标段信息进度比
|
||||
* @param businessModule 标段环节
|
||||
* @param vo 项目信息
|
||||
* @return 返回结果
|
||||
*/
|
||||
BigDecimal getLinkPercentage(Integer businessModule, ProjectRecordVO vo);
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import com.chinaunicom.mall.ebtp.project.dictchooseprocess.entity.DictChooseProc
|
||||
import com.chinaunicom.mall.ebtp.project.dictchooseprocess.service.IDictChooseProcessService;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpMallBidApi;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpMallProcessApi;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpTenderApi;
|
||||
import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ProjectEntrust;
|
||||
import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ProjectEntrustExpand;
|
||||
import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ProjectEntrustVO;
|
||||
@ -61,6 +62,7 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 对数据表 biz_project_record 操作的 serviceImpl
|
||||
@ -112,6 +114,9 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
@Resource
|
||||
private IDictProvincesCodeService provincesCodeService;
|
||||
|
||||
@Resource
|
||||
private EbtpTenderApi tenderApi;
|
||||
|
||||
|
||||
/**
|
||||
* 查询条件拼接
|
||||
@ -151,7 +156,7 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
query.ne("status", projectRecordVO.getNeStatus());
|
||||
}
|
||||
|
||||
if(null != projectRecordVO.getSelectIds() && projectRecordVO.getSelectIds().size() > 0){
|
||||
if(null != projectRecordVO.getSelectIds() && !projectRecordVO.getSelectIds().isEmpty()){
|
||||
query.in("id",projectRecordVO.getSelectIds());
|
||||
}
|
||||
|
||||
@ -159,7 +164,7 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
query.eq("ebp_project_id", projectRecordVO.getEbpProjectId());
|
||||
}
|
||||
|
||||
if(null != projectRecordVO.getSelectBidMethod() && projectRecordVO.getSelectBidMethod().size() > 0){
|
||||
if(null != projectRecordVO.getSelectBidMethod() && !projectRecordVO.getSelectBidMethod().isEmpty()){
|
||||
query.in("bid_method_dict", projectRecordVO.getSelectBidMethod());
|
||||
}
|
||||
|
||||
@ -202,7 +207,7 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
IPage<ProjectRecord> result = this.page(p, query);
|
||||
|
||||
IPage<ProjectRecordVO> voPage = result.convert(c -> BeanUtil.toBean(c,ProjectRecordVO.class));
|
||||
voPage.setRecords(JsonUtils.jsonToList(result.getRecords(),ProjectRecordVO.class));
|
||||
assembleProjectPage(voPage.getRecords());
|
||||
|
||||
return voPage;
|
||||
}
|
||||
@ -590,8 +595,10 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
record.setProjectName(projectEntrust.getProjectName());
|
||||
//项目组织形式
|
||||
record.setBidOrgDict(projectEntrust.getOrganization());
|
||||
//采购人(采购人组织机构)
|
||||
record.setTendereeOrgName(projectEntrust.getPurchaser());
|
||||
//采购实施机构
|
||||
record.setTendereeOrgId(purpBaseInfoVO.getCompanyCode());
|
||||
record.setTendereeOrgName(purpBaseInfoVO.getCompany());
|
||||
|
||||
//所属省分
|
||||
record.setProvince(purpBaseInfoVO.getSuborProvince());
|
||||
|
||||
@ -705,7 +712,7 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
//顺序号
|
||||
section.setBidSectCode(sectionOrderNumber++);
|
||||
//标段名称
|
||||
section.setBidSectName(projBaseInfoVO.getProjName());
|
||||
section.setBidSectName(projBaseInfoVO.getPurpName());
|
||||
//标段编号
|
||||
section.setSectionNumber(projBaseInfoVO.getProjNo());
|
||||
|
||||
@ -1000,4 +1007,45 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 瓶装分页查询信息
|
||||
* @param recordVOList 查询结果
|
||||
*/
|
||||
private void assembleProjectPage(List<ProjectRecordVO> recordVOList){
|
||||
if(null != recordVOList && !recordVOList.isEmpty()){
|
||||
List<String> projectIds = recordVOList.stream().map(ProjectRecordVO::getId).collect(Collectors.toList());
|
||||
List<ProjectSection> sectionList = projectSectionService.getListAssembleProjectPage(projectIds);
|
||||
List<String> sectionIds = sectionList.stream().map(ProjectSection::getId).collect(Collectors.toList());
|
||||
if(null != sectionList && !sectionList.isEmpty()){
|
||||
List<ProjectSectionVO> sectionVOList = JsonUtils.jsonToList(sectionList,ProjectSectionVO.class);
|
||||
BaseResponse<Map<String,Long>> response = tenderApi.getRegisterCountByPackage(sectionIds);
|
||||
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_NOT_UPDATE.customValidName(response.getMessage(),!response.isSuccess());
|
||||
Map<String,Long> resultMap = response.getData();
|
||||
Map<String,ProjectSectionVO> sectionMap = sectionVOList.stream().collect(Collectors.toMap(ProjectSection::getProjectId,a ->a,(k1,k2)->k1));
|
||||
recordVOList.forEach(n -> n.setSectionFirst(sectionMap.get(n.getId())));
|
||||
for (ProjectRecordVO vo:recordVOList) {
|
||||
ProjectSectionVO sectionVO = sectionMap.get(vo.getId());
|
||||
if(null != sectionVO){
|
||||
Long applyCount = (null == resultMap.get(sectionVO.getId()))? resultMap.get(sectionVO.getId()) : 0L;
|
||||
sectionVO.setApplyCount(applyCount);
|
||||
sectionVO.setLinkPercentage(getLinkPercentage(sectionVO.getBusinessModule(),vo));
|
||||
}
|
||||
vo.setSectionFirst(sectionVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getLinkPercentage(Integer businessModule, ProjectRecordVO vo){
|
||||
boolean isReviewMethod = this.isReviewMethod(vo);
|
||||
BigDecimal businessModuleTotal = new BigDecimal(isReviewMethod ? 12 : 7);
|
||||
if(businessModule > 1){
|
||||
businessModule = isReviewMethod ? businessModule : businessModule - 5;
|
||||
}
|
||||
BigDecimal module = new BigDecimal(businessModule);
|
||||
|
||||
return module.divide(businessModuleTotal,2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
|
||||
if(StringUtils.isNotBlank(vo.getProjectId())){
|
||||
queryWrapper.eq(ProjectReEvaluationField.PROJECT_ID,vo.getProjectId());
|
||||
}
|
||||
if(!vo.getAssessIds().isEmpty()){
|
||||
if(null != vo.getAssessIds() && !vo.getAssessIds().isEmpty()){
|
||||
queryWrapper.in(ProjectReEvaluationField.ASSESS_ID,vo.getAssessIds());
|
||||
}
|
||||
if(null != vo.getIsNotStatus()){
|
||||
@ -441,7 +441,7 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
|
||||
|
||||
if (null != resultList) {
|
||||
List<String> businessFileIdList = resultList.stream().map(ProjectReEvaluationVO::getUploadFileId).collect(Collectors.toList());
|
||||
if(!businessFileIdList.isEmpty()){
|
||||
if(null != businessFileIdList && !businessFileIdList.isEmpty()){
|
||||
Optional<AttachmentDetail> result = attachmentClient.findByBusinessId(businessFileIdList);
|
||||
|
||||
for (ProjectReEvaluationVO vo : resultList) {
|
||||
|
@ -341,7 +341,7 @@ public class ProjectSectionController{
|
||||
|
||||
List<ProjectSectionVO> result = projectSectionService.selectAllBatchIds(projectSection);
|
||||
|
||||
return BaseResponse.success(result.isEmpty() ? null : result.get(0));
|
||||
return BaseResponse.success((null ==result || result.isEmpty()) ? null : result.get(0));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -369,4 +369,16 @@ public class ProjectSectionController{
|
||||
return BaseResponse.success(projectSectionService.selectArchiveByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目ID查询标段信息 分页专用
|
||||
* @param projectId 项目标段查询
|
||||
* @return 返回结果
|
||||
*/
|
||||
@ApiOperation("根据项目ID查询标段信息 分页专用")
|
||||
@GetMapping("/selectListByProjectId/{projectId}")
|
||||
public BaseResponse<List<ProjectSectionVO>> selectListByProjectId(@ApiParam(value = "项目id", required = true) @PathVariable String projectId){
|
||||
|
||||
return BaseResponse.success(projectSectionService.selectListByProjectId(projectId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -181,7 +181,9 @@
|
||||
</select>
|
||||
|
||||
<select id="selectArchiveById" resultType="com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSectionVO">
|
||||
select t.*,m.room_sort as roomSort
|
||||
select t.*,
|
||||
m.room_sort as roomSort,
|
||||
m.id as roomId
|
||||
from biz_project_section t,biz_assess_room m
|
||||
<where>
|
||||
t.id = m.section_id
|
||||
|
@ -10,6 +10,7 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -82,4 +83,13 @@ public class ProjectSectionVO extends ProjectSection implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "评审室排序")
|
||||
private Integer roomSort;
|
||||
|
||||
@ApiModelProperty(value = "评审室ID")
|
||||
private Integer roomId;
|
||||
|
||||
@ApiModelProperty(value = "报名人数")
|
||||
private Long applyCount;
|
||||
|
||||
@ApiModelProperty(value = "所处环节百分比")
|
||||
private BigDecimal linkPercentage;
|
||||
}
|
||||
|
@ -180,4 +180,18 @@ public interface IProjectSectionService extends IBaseService<ProjectSection>{
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<ProjectSectionVO> selectArchiveByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 获取供应商信息
|
||||
* @param projectIds 项目ID集合查询条件
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<ProjectSection> getListAssembleProjectPage(List<String> projectIds);
|
||||
|
||||
/**
|
||||
* 根据项目ID查询标段信息 分页专用
|
||||
* @param projectId 项目ID
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<ProjectSectionVO> selectListByProjectId(String projectId);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.chinaunicom.mall.ebtp.project.projectsection.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -18,11 +19,13 @@ import com.chinaunicom.mall.ebtp.project.dictchooseprocess.service.IDictChoosePr
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpArchiveApi;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpMallProcessApi;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpRsmsApi;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.EbtpTenderApi;
|
||||
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;
|
||||
import com.chinaunicom.mall.ebtp.project.feign.entity.WfProjectConfigTask;
|
||||
import com.chinaunicom.mall.ebtp.project.projectrecord.entity.ProjectRecord;
|
||||
import com.chinaunicom.mall.ebtp.project.projectrecord.entity.ProjectRecordVO;
|
||||
import com.chinaunicom.mall.ebtp.project.projectrecord.service.IProjectRecordService;
|
||||
import com.chinaunicom.mall.ebtp.project.projectsection.dao.ProjectSectionMapper;
|
||||
import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSection;
|
||||
@ -37,6 +40,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -73,6 +77,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
@Resource
|
||||
private EbtpArchiveApi archiveApi;
|
||||
|
||||
@Resource
|
||||
private EbtpTenderApi tenderApi;
|
||||
|
||||
/**
|
||||
* 默认轮次
|
||||
*/
|
||||
@ -159,7 +166,7 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
public List<ProjectSection> selectBatchIds(List<String> sectionIds) {
|
||||
sectionIds = sectionIds.stream().filter(n -> StringUtils.isNotBlank(n)).collect(Collectors.toList());
|
||||
List<ProjectSection> projectSectionList = null;
|
||||
if(null != sectionIds && sectionIds.size() > 0 ){
|
||||
if(null != sectionIds && !sectionIds.isEmpty()){
|
||||
projectSectionList = projectSectionMapper.selectBatchIds(sectionIds);
|
||||
}
|
||||
return projectSectionList;
|
||||
@ -424,7 +431,7 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
sectionVO.setNotStatus(ProjectCommonUtil.SECTION_STATUS_9);
|
||||
QueryWrapper<ProjectSection> query = getQueryWrapper(sectionVO);
|
||||
List<ProjectSection> sectionList = this.list(query);
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValid(null == sectionList || sectionList.size() == 0);
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValid(null == sectionList || sectionList.isEmpty());
|
||||
ProjectSection section = sectionList.get(0);
|
||||
ProjectRecord projectRecord = recordService.getById(section.getProjectId());
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_RECORD_NOT_FIND.customValid(null == projectRecord);
|
||||
@ -447,7 +454,7 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
assessRoom.setReviewMark(ProjectCommonUtil.REVIEW_MARK_0);
|
||||
List<BizAssessRoom> bizAssessRoomList = ebtpMallProcessApi.listAll(assessRoom).getData();
|
||||
int rounds = ROUNDS;
|
||||
if(null != bizAssessRoomList && bizAssessRoomList.size() > 0){
|
||||
if(null != bizAssessRoomList && !bizAssessRoomList.isEmpty()){
|
||||
rounds = bizAssessRoomList.stream().collect(Collectors.groupingBy(BizAssessRoom::getRoomSort)).size();
|
||||
}
|
||||
|
||||
@ -488,6 +495,36 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
return sectionVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectSection> getListAssembleProjectPage(List<String> projectIds) {
|
||||
LambdaQueryWrapper<ProjectSection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(ProjectSection::getProjectId,projectIds);
|
||||
queryWrapper.groupBy(ProjectSection::getProjectId).groupBy(ProjectSection::getBidSectCode).having("bid_sect_code <=1");
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectSectionVO> selectListByProjectId(String projectId) {
|
||||
List<ProjectSectionVO> resultList = new ArrayList<>();
|
||||
LambdaQueryWrapper<ProjectSection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ProjectSection::getProjectId,projectId);
|
||||
List<ProjectSection> sectionList = this.list(queryWrapper);
|
||||
List<String> sectionIds = sectionList.stream().map(ProjectSection::getId).collect(Collectors.toList());
|
||||
BaseResponse<Map<String,Long>> response = tenderApi.getRegisterCountByPackage(sectionIds);
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValidName(response.getMessage(),!response.isSuccess());
|
||||
Map<String,Long> resultMap = response.getData();
|
||||
ProjectRecord record = recordService.getById(projectId);
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValid(null == record);
|
||||
for (ProjectSection section:sectionList) {
|
||||
ProjectSectionVO vo = BeanUtil.toBean(section,ProjectSectionVO.class);
|
||||
Long applyCount = (null == resultMap.get(vo.getId()))? resultMap.get(vo.getId()) : 0L;
|
||||
vo.setApplyCount(applyCount);
|
||||
vo.setLinkPercentage(recordService.getLinkPercentage(vo.getBusinessModule(),BeanUtil.toBean(record, ProjectRecordVO.class)));
|
||||
resultList.add(vo);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼装标段模块修改流程实体并插入数据
|
||||
* @param sectionId 标段ID
|
||||
|
Reference in New Issue
Block a user