|
@@ -24,11 +24,9 @@ import com.ozs.pm.mapper.PmDemandMapper;
|
|
|
import com.ozs.pm.service.*;
|
|
|
import com.ozs.system.domain.SysFileInfo;
|
|
|
import com.ozs.system.domain.SysFileRef;
|
|
|
+import com.ozs.system.domain.vo.SysRegionVO;
|
|
|
import com.ozs.system.domain.vo.responseVo.SysDeptResponseVo;
|
|
|
-import com.ozs.system.service.ISysDeptService;
|
|
|
-import com.ozs.system.service.ISysDictDataService;
|
|
|
-import com.ozs.system.service.SysFileRefService;
|
|
|
-import com.ozs.system.service.SysFileService;
|
|
|
+import com.ozs.system.service.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -77,8 +75,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
private PmBidWinningOpeningRefService pmBidWinningOpeningRefService;
|
|
|
@Autowired
|
|
|
private PmContractInfoService pmContractInfoService;
|
|
|
- @Autowired
|
|
|
- private BaseSupplierService baseSupplierService;
|
|
|
|
|
|
@Autowired
|
|
|
private BaseAgencyService baseAgencyService;
|
|
@@ -92,6 +88,9 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
@Autowired
|
|
|
private BaseNoticeService baseNoticeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysRegionService iSysRegionService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询采购需求
|
|
@@ -475,7 +474,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
@Override
|
|
|
public PmFlowChartResVo getModuleInfo(Long demandId,String moduleName){
|
|
|
PmDemand pmDemand = this.getById(demandId);
|
|
|
- String projectType = pmDemand.getProjectType();
|
|
|
|
|
|
LambdaQueryWrapper<PmFlowChart> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.eq(PmFlowChart::getModuleName,moduleName);
|
|
@@ -835,20 +833,35 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
if(spareExpertNumber > 0 && ObjectUtils.isEmpty(professional)){
|
|
|
throw new Exception("抽取备用专家必须选择专家专业");
|
|
|
}
|
|
|
- String localArea = pmBaseExpertExtractReqVo.getLocalArea();
|
|
|
- if(spareExpertNumber > 0 && ObjectUtils.isEmpty(localArea)){
|
|
|
- throw new Exception("抽取备用专家必须选择所在区域");
|
|
|
- }
|
|
|
|
|
|
PmDemand pmDemand = this.getById(pmBaseExpertExtractReqVo.getDemandId());
|
|
|
if(ObjectUtils.isEmpty(pmDemand)){
|
|
|
throw new Exception("参数错误");
|
|
|
}
|
|
|
|
|
|
- //从专家库中查询符合项目类型的以及是白名单的全部列表
|
|
|
- LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<BaseExpert>();
|
|
|
+
|
|
|
+ String localArea = pmBaseExpertExtractReqVo.getLocalArea();
|
|
|
+ if(!StringUtils.isNumeric(localArea)){
|
|
|
+ throw new Exception("地域必须传数字代码");
|
|
|
+ }
|
|
|
+ List<String> sysRegionCodeList = new ArrayList<>();
|
|
|
+ if(!ObjectUtils.isEmpty(localArea)) {
|
|
|
+ sysRegionCodeList.add(localArea);
|
|
|
+ //找到该地域code对应的子列表
|
|
|
+ List<SysRegionVO> sysRegionVOList = iSysRegionService.findChildDivisions(localArea);
|
|
|
+ if(!ObjectUtils.isEmpty(sysRegionVOList)){
|
|
|
+ for(SysRegionVO vo : sysRegionVOList) {
|
|
|
+ sysRegionCodeList.add(vo.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //从专家库中查询符合项目类型的以及是白名单的全部列表
|
|
|
+ LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<>();
|
|
|
lw.eq(BaseExpert::getVarietyPurchase,pmDemand.getProjectType())
|
|
|
- .eq(BaseExpert::getStatus,NameListType.WHITE.getCode());
|
|
|
+ .eq(BaseExpert::getStatus,NameListType.WHITE.getCode())
|
|
|
+ .in(!ObjectUtils.isEmpty(sysRegionCodeList), BaseExpert::getLocalArea,sysRegionCodeList);
|
|
|
+
|
|
|
List<BaseExpert> baseExpertList = baseExpertService.list(lw);
|
|
|
if(ObjectUtils.isEmpty(baseExpertList)){
|
|
|
throw new Exception("没抽取到符合条件的专家");
|
|
@@ -860,7 +873,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
List<BaseExpert> legalAffairsExpertList = new ArrayList<>();
|
|
|
List<BaseExpert> spareExpertList = new ArrayList<>();
|
|
|
|
|
|
- //TODO 所在区域判读
|
|
|
+
|
|
|
|
|
|
for(BaseExpert baseExpert : baseExpertList){
|
|
|
if(technicalExpertNumber > 0) {
|