1、查询异常归档标段接口

2、增加初始化项目根据所属省分填充项目所在行政区域省分字段
This commit is contained in:
dxc
2021-04-02 13:54:56 +08:00
parent d1b3874048
commit cf46440546
14 changed files with 118 additions and 1 deletions

View File

@ -47,4 +47,10 @@ public class DictProvincesCode extends BaseEntity implements Serializable {
private String provincesCode; private String provincesCode;
/**
* 省份地市编码
*/
@ApiModelProperty(value = "省份地市编码")
private String provinces;
} }

View File

@ -0,0 +1,29 @@
package com.chinaunicom.mall.ebtp.project.feign;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
/**
* 归档服务API
* @author daixc
* @date 2020/11/25
*/
@FeignClient(value = "${mconfig.service-name-archive}")
public interface EbtpArchiveApi {
/**
* 查询标段信息是否归档
* @param sectionIds 标段ID集合
* @return 返回结果
*/
@ApiOperation("查询标段信息是否归档")
@PostMapping("/v1/archiveRounds/getArchiveSection")
BaseResponse<Map<String,Boolean>> getArchiveSection(@ApiParam(value = "对象数据", required = true) @RequestBody List<String> sectionIds);
}

View File

@ -217,6 +217,7 @@ public class ProjectExceptionServiceImpl extends BaseServiceImpl<ProjectExceptio
UpdateWrapper<ProjectSection> sectionUpdateWrapper = new UpdateWrapper<>(); UpdateWrapper<ProjectSection> sectionUpdateWrapper = new UpdateWrapper<>();
sectionUpdateWrapper.in("id",sectionExceptionIds); sectionUpdateWrapper.in("id",sectionExceptionIds);
sectionUpdateWrapper.set("status",ProjectCommonUtil.SECTION_STATUS_9); sectionUpdateWrapper.set("status",ProjectCommonUtil.SECTION_STATUS_9);
sectionUpdateWrapper.set("business_module",ProjectCommonUtil.BUSINESS_MODULE_12);
projectSectionService.update(sectionUpdateWrapper); projectSectionService.update(sectionUpdateWrapper);
/*项目终止 通知采购平台接 */ /*项目终止 通知采购平台接 */

View File

@ -2,6 +2,7 @@ package com.chinaunicom.mall.ebtp.project.projectrecord.service.impl;
import cn.hutool.core.bean.BeanUtil; 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.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -19,6 +20,8 @@ import com.chinaunicom.mall.ebtp.project.common.EbpProjectCommonUtil;
import com.chinaunicom.mall.ebtp.project.common.InquiryCommonUtil; import com.chinaunicom.mall.ebtp.project.common.InquiryCommonUtil;
import com.chinaunicom.mall.ebtp.project.common.ProjectCommonUtil; import com.chinaunicom.mall.ebtp.project.common.ProjectCommonUtil;
import com.chinaunicom.mall.ebtp.project.common.ProjectExceptionEnum; import com.chinaunicom.mall.ebtp.project.common.ProjectExceptionEnum;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictProvincesCodeService;
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.EbtpMallBidApi; import com.chinaunicom.mall.ebtp.project.feign.EbtpMallBidApi;
@ -107,6 +110,9 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
@Resource @Resource
private IDictChooseProcessService chooseProcessService; private IDictChooseProcessService chooseProcessService;
@Resource
private IDictProvincesCodeService provincesCodeService;
/** /**
* 查询条件拼接 * 查询条件拼接
@ -589,6 +595,15 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
record.setTendereeOrgName(projectEntrust.getPurchaser()); record.setTendereeOrgName(projectEntrust.getPurchaser());
//所属省分 //所属省分
record.setProvince(purpBaseInfoVO.getSuborProvince()); record.setProvince(purpBaseInfoVO.getSuborProvince());
//项目所在行政区域字典编号
LambdaQueryWrapper<DictProvincesCode> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DictProvincesCode::getProvincesNumber,purpBaseInfoVO.getSuborProvince());
DictProvincesCode provincesCode = provincesCodeService.getOne(queryWrapper);
if(null != provincesCode){
record.setRegionDictId(provincesCode.getProvinces());
}
//采购实施部门 //采购实施部门
record.setTendereeId(purpSuperVO.getProcImplDeptCode()); record.setTendereeId(purpSuperVO.getProcImplDeptCode());
record.setTendereeName(purpSuperVO.getProcImplDept()); record.setTendereeName(purpSuperVO.getProcImplDept());

View File

@ -342,7 +342,7 @@ public class ProjectSectionController{
List<ProjectSectionVO> result = projectSectionService.selectAllBatchIds(projectSection); List<ProjectSectionVO> result = projectSectionService.selectAllBatchIds(projectSection);
return BaseResponse.success((null != result && result.size() > 0)?result.get(0):null); return BaseResponse.success(result.isEmpty() ? null : result.get(0));
} }
/** /**
@ -357,5 +357,17 @@ public class ProjectSectionController{
return BaseResponse.success(projectSectionService.selectByPlanId(planId)); return BaseResponse.success(projectSectionService.selectByPlanId(planId));
} }
/**
* 查询可以归档异常标段信息
* @param projectId 项目标段查询
* @return 返回结果
*/
@ApiOperation("查询可以归档异常标段信息")
@GetMapping("/selectArchiveByProjectId/{projectId}")
public BaseResponse<List<ProjectSectionVO>> selectArchiveByProjectId(@ApiParam(value = "项目id", required = true) @PathVariable String projectId){
return BaseResponse.success(projectSectionService.selectArchiveByProjectId(projectId));
}
} }

View File

@ -60,4 +60,10 @@ public interface ProjectSectionMapper extends IBaseMapper<ProjectSection> {
*/ */
List<ProjectSectionVO> selectEditSectionBySelect(@Param(value = "projectId") String projectId, @Param(value = "exceptionId") String exceptionId); List<ProjectSectionVO> selectEditSectionBySelect(@Param(value = "projectId") String projectId, @Param(value = "exceptionId") String exceptionId);
/**
* 查询可以归档异常标段信息
* @param projectSection 查询条件
* @return 返回结果
*/
List<ProjectSectionVO> selectArchiveById(@Param(value = "section") ProjectSectionVO projectSection);
} }

View File

@ -180,4 +180,14 @@
and e.exception_id = ${exceptionId} and e.exception_id = ${exceptionId}
</select> </select>
<select id="selectArchiveById" resultType="com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSectionVO">
select t.*,m.room_sort as roomSort
from biz_project_section t,biz_assess_room m
<where>
t.id = m.section_id
and t.project_id = ${section.projectId}
and t.status = #{section.status} group by m.section_id,m.room_sort
</where>
</select>
</mapper> </mapper>

View File

@ -79,4 +79,7 @@ public class ProjectSectionVO extends ProjectSection implements Serializable {
*/ */
@ApiModelProperty(value = "需要排除的状态") @ApiModelProperty(value = "需要排除的状态")
private Integer notStatus; private Integer notStatus;
@ApiModelProperty(value = "评审室排序")
private Integer roomSort;
} }

View File

@ -174,4 +174,10 @@ public interface IProjectSectionService extends IBaseService<ProjectSection>{
*/ */
ProjectSectionVO selectByPlanId(String planId); ProjectSectionVO selectByPlanId(String planId);
/**
* 查询可以归档异常标段信息
* @param projectId 查询条件
* @return 返回结果
*/
List<ProjectSectionVO> selectArchiveByProjectId(String projectId);
} }

View File

@ -15,6 +15,7 @@ import com.chinaunicom.mall.ebtp.project.common.ProjectCommonUtil;
import com.chinaunicom.mall.ebtp.project.common.ProjectExceptionEnum; 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.EbtpArchiveApi;
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.EbtpRsmsApi;
import com.chinaunicom.mall.ebtp.project.feign.entity.BizAssessRoom; import com.chinaunicom.mall.ebtp.project.feign.entity.BizAssessRoom;
@ -69,6 +70,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
@Resource @Resource
private EbtpRsmsApi rsmsApi; private EbtpRsmsApi rsmsApi;
@Resource
private EbtpArchiveApi archiveApi;
/** /**
* 默认轮次 * 默认轮次
*/ */
@ -463,6 +467,27 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
return BeanUtil.toBean(this.getOne(getQueryWrapper(sectionVO)),ProjectSectionVO.class); return BeanUtil.toBean(this.getOne(getQueryWrapper(sectionVO)),ProjectSectionVO.class);
} }
@Override
public List<ProjectSectionVO> selectArchiveByProjectId(String projectId) {
//获取异常标段信息
ProjectSectionVO projectSection = new ProjectSectionVO();
projectSection.setProjectId(projectId);
projectSection.setStatus(ProjectCommonUtil.SECTION_STATUS_9);
List<ProjectSectionVO> sectionVOList = projectSectionMapper.selectArchiveById(projectSection);
List<String> sectionIds = sectionVOList.stream().map(n -> n.getId() + "_" + n.getRoomSort()).collect(Collectors.toList());
//调用归档信息查询是否已归档
BaseResponse<Map<String,Boolean>> baseResponse = archiveApi.getArchiveSection(sectionIds);
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_NOT_FIND.customValidName(baseResponse.getMessage(),!baseResponse.isSuccess());
Map<String,Boolean> archiveMap = baseResponse.getData();
sectionVOList = sectionVOList.stream().filter(n -> archiveMap.get(n.getId() + "_" +n.getRoomSort())).collect(Collectors.toList());
return sectionVOList;
}
/** /**
* 拼装标段模块修改流程实体并插入数据 * 拼装标段模块修改流程实体并插入数据
* @param sectionId 标段ID * @param sectionId 标段ID

View File

@ -155,6 +155,7 @@ mconfig:
service-price-query : biz-service-price-query #商城询价服务 service-price-query : biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务 service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务 #内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口 service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程 service-name-bid: biz-service-ebtp-bid #标段出始化流程

View File

@ -154,6 +154,7 @@ mconfig:
service-price-query: biz-service-price-query #商城询价服务 service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务 service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务 #内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口 service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程 service-name-bid: biz-service-ebtp-bid #标段出始化流程

View File

@ -155,6 +155,7 @@ mconfig:
service-price-query: biz-service-price-query #商城询价服务 service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务 service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务 #内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口 service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程 service-name-bid: biz-service-ebtp-bid #标段出始化流程

View File

@ -153,6 +153,7 @@ mconfig:
service-price-query: biz-service-price-query #商城询价服务 service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务 service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务 #内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口 service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程 service-name-bid: biz-service-ebtp-bid #标段出始化流程