|
@@ -5,9 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.ozs.base.domain.BaseAgency;
|
|
|
import com.ozs.base.domain.BaseExpert;
|
|
|
+import com.ozs.base.domain.BaseProfessional;
|
|
|
import com.ozs.base.domain.vo.BaseExpertVo;
|
|
|
+import com.ozs.base.domain.vo.BaseProfessionalVo;
|
|
|
import com.ozs.base.service.BaseAgencyService;
|
|
|
import com.ozs.base.service.BaseExpertService;
|
|
|
+import com.ozs.base.service.BaseProfessionalService;
|
|
|
import com.ozs.common.annotation.Log;
|
|
|
import com.ozs.common.constant.ModularConstans;
|
|
|
import com.ozs.common.core.controller.BaseController;
|
|
@@ -58,6 +61,10 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
private PmDemandExpertRefService pmDemandExpertRefService;
|
|
|
@Autowired
|
|
|
private PmBidOpeningService pmBidOpeningService;
|
|
|
+ @Autowired
|
|
|
+ private BaseProfessionalService baseProfessionalService;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 采购执行查询列表
|
|
|
*/
|
|
@@ -258,6 +265,15 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
return success(baseExpert);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询专业库树结构", notes = "非必传 查询条件:品目名称")
|
|
|
+ @PostMapping("/selectBaseProfessional")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:purchaseExecution:selectBaseProfessional')")
|
|
|
+ @Log(title = ModularConstans.professional, businessType = BusinessType.QUERY)
|
|
|
+ public AjaxResult selectBaseProfessional(@RequestBody BaseProfessionalVo baseProfessionalVo) {
|
|
|
+ List<BaseProfessionalVo> baseSupplierList = baseProfessionalService.selectBaseProfessionalVo(baseProfessionalVo);
|
|
|
+ return success(baseSupplierList);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@ApiOperation(value = "填写专家信息批量提交", notes = "必传 采购需求ID和专家信息列表,注意:若该专家已经在库里存在,需要传专家对象BaseExpert的ID")
|
|
|
@PostMapping("/insertExpertBatch")
|
|
@@ -516,7 +532,7 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
if(baseExpert != null){
|
|
|
BaseExpertVo baseExpertVo = new BaseExpertVo();
|
|
|
BeanUtils.copyProperties(baseExpert,baseExpertVo);
|
|
|
- baseExpertVo.setMajorTypeName(MajorType.getCodeToInfo(baseExpertVo.getMajorType()));
|
|
|
+ baseExpertVo.setMajorTypeName(getMajorTypeName(baseExpertVo.getMajorType()));
|
|
|
baseExpertVo.setExpertTypeName(ExpertType.getCodeToInfo(baseExpertVo.getExpertType()));
|
|
|
baseExpertVo.setVarietyPurchaseName(PurchaseType.getCodeToInfo(baseExpertVo.getVarietyPurchase()));
|
|
|
baseExpertVoList.add(baseExpertVo);
|
|
@@ -527,6 +543,27 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
return success(baseExpertVoList);
|
|
|
}
|
|
|
|
|
|
+ private String getMajorTypeName(String majorType){
|
|
|
+ if(ObjectUtils.isEmpty(majorType)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<BaseProfessional> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.in(BaseProfessional::getProfessionalCode,majorType.split(","));
|
|
|
+ List<BaseProfessional> list = this.baseProfessionalService.list(lambdaQueryWrapper);
|
|
|
+ if(ObjectUtils.isEmpty(list)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ for(BaseProfessional baseProfessional : list){
|
|
|
+ sb.append(baseProfessional.getProfessionalName()).append(",");
|
|
|
+ }
|
|
|
+ String majorTypeName = sb.toString();
|
|
|
+ if(majorTypeName.endsWith(",")){
|
|
|
+ majorTypeName = majorTypeName.substring(0, majorTypeName.length() - 1);
|
|
|
+ }
|
|
|
+ return majorTypeName;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 开标信息查看详情列表
|
|
|
*/
|