Explorar o código

专家库和供应商去掉采购品种和供应商类型

buzhanyi hai 1 ano
pai
achega
17b2a23ed4

+ 0 - 3
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseExpertController.java

@@ -153,9 +153,6 @@ public class BaseExpertController extends BaseController {
         if (!ObjectUtils.isEmpty(baseExpertVo.getMajorGrade())) {
             lw.eq(BaseExpert::getMajorGrade, baseExpertVo.getMajorGrade());
         }
-        if (!ObjectUtils.isEmpty(baseExpertVo.getVarietyPurchase())) {
-            lw.eq(BaseExpert::getVarietyPurchase, baseExpertVo.getVarietyPurchase());
-        }
         lw.orderBy(true, false, BaseExpert::getCreateTime);
         List<BaseExpert> list = baseExpertService.list(lw);
         List<BaseExpertVo> listVo = BeanUtils.entityListToVOList(list, BaseExpertVo.class);

+ 0 - 3
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseSupplierController.java

@@ -126,9 +126,6 @@ public class BaseSupplierController extends BaseController {
         if (!StringUtils.isBlank(baseSupplierVo.getSupplierState())) {
             lw.eq(BaseSupplier::getSupplierState, baseSupplierVo.getSupplierState());
         }
-        if (!StringUtils.isBlank(baseSupplierVo.getSupplierType())) {
-            lw.eq(BaseSupplier::getSupplierType, baseSupplierVo.getSupplierType());
-        }
         if (!StringUtils.isBlank(baseSupplierVo.getSupplierAdvancePurchase())) {
             lw.eq(BaseSupplier::getSupplierAdvancePurchase, baseSupplierVo.getSupplierAdvancePurchase());
         }

+ 1 - 21
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmPurchaseExecutionController.java

@@ -337,8 +337,7 @@ public class PmPurchaseExecutionController extends BaseController {
         }
 
         LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<BaseExpert>();
-        lw.eq(BaseExpert::getVarietyPurchase, pmDemand.getProjectType())
-                .eq(BaseExpert::getStatus, NameListType.WHITE.getCode());
+        lw.eq(BaseExpert::getStatus, NameListType.WHITE.getCode());
         List<BaseExpert> baseExpertList = baseExpertService.list(lw);
         List<String> idNumberList = new ArrayList<>();
         if (!ObjectUtils.isEmpty(baseExpertList)) {
@@ -368,9 +367,6 @@ public class PmPurchaseExecutionController extends BaseController {
             if (NameListType.BLACK.getCode().equals(baseExpert.getStatus())) {
                 return error("该专家属于黑名单");
             }
-            if (!ObjectUtils.isEmpty(pmDemand.getProjectType()) && !pmDemand.getProjectType().equals(baseExpert.getVarietyPurchase())) {
-                return error("该专家所属采购品种和项目类型不匹配");
-            }
         }
 
         return success(baseExpert);
@@ -424,20 +420,6 @@ public class PmPurchaseExecutionController extends BaseController {
         return success(set);
     }
 
-    @ApiOperation(value = "获取回避单位下拉列表(抽取专家时,显示与项目类型和专家类型相符的部门)", notes = "查询条件:采购品种")
-    @PostMapping("/getExpertUnitListBC")
-    @Log(title = ModularConstans.professional, businessType = BusinessType.QUERY)
-    public AjaxResult getExpertUnitListBC(@RequestBody BaseUnitInformation unitInformation) {
-        List<BaseUnitInformation> baseUnitInformationList = baseExpertService.getBaseUnitInformationListBC(unitInformation);
-        if (ObjectUtils.isEmpty(baseUnitInformationList)) {
-            return error("专家单位列表是空的");
-        }
-        Set<String> set = new HashSet<>();
-        for (BaseUnitInformation baseUnitInformation : baseUnitInformationList) {
-            set.add(baseUnitInformation.getUnitName());
-        }
-        return success(set);
-    }
 
     /**
      * 抽取专家
@@ -801,7 +783,6 @@ public class PmPurchaseExecutionController extends BaseController {
                     BeanUtils.copyProperties(baseExpert, baseExpertVo);
                     baseExpertVo.setMajorTypeName(getMajorTypeName(baseExpertVo.getMajorType()));
                     baseExpertVo.setExpertTypeName(ExpertType.getCodeToInfo(baseExpertVo.getExpertType()));
-                    baseExpertVo.setVarietyPurchaseName(PurchaseType.getCodeToInfo(baseExpertVo.getVarietyPurchase()));
                     baseExpertVoList.add(baseExpertVo);
                 }
             }
@@ -840,7 +821,6 @@ public class PmPurchaseExecutionController extends BaseController {
                     BeanUtils.copyProperties(baseExpert, baseExpertVo);
                     baseExpertVo.setMajorTypeName(getMajorTypeName(baseExpertVo.getMajorType()));
                     baseExpertVo.setExpertTypeName(ExpertType.getCodeToInfo(baseExpertVo.getExpertType()));
-                    baseExpertVo.setVarietyPurchaseName(PurchaseType.getCodeToInfo(baseExpertVo.getVarietyPurchase()));
                     baseExpertVoList.add(baseExpertVo);
                 }
             }

+ 0 - 7
purchase-system/src/main/java/com/ozs/base/domain/BaseExpert.java

@@ -81,13 +81,6 @@ public class BaseExpert extends BaseDto {
     @TableField("major_grade")
     private String majorGrade;
 
-    /**
-     * 采购品种
-     */
-    @ApiModelProperty(value = "采购品种,多个使用英文逗号分隔")
-    @TableField("variety_purchase")
-    private String varietyPurchase;
-
     /**
      * 职称
      */

+ 0 - 4
purchase-system/src/main/java/com/ozs/base/domain/BaseSupplier.java

@@ -37,10 +37,6 @@ public class BaseSupplier {
     @TableField("supplier_address")
     private String supplierAddress;
 
-    @ApiModelProperty(value = "供应商类型")
-    @TableField("supplier_type")
-    private String supplierType;
-
     @ApiModelProperty(value = "状态 黑名单0,白名单1")
     @TableField("supplier_state")
     private String supplierState;

+ 0 - 6
purchase-system/src/main/java/com/ozs/base/domain/BaseUnitInformation.java

@@ -29,12 +29,6 @@ public class BaseUnitInformation {
     @TableField("unit_name")
     private String unitName;
 
-    /**
-     * 采购品种
-     */
-    @ApiModelProperty(value = "采购品种")
-    private String varietyPurchase;
-
     /**
      * 创建人
      */

+ 0 - 5
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseExpertVo.java

@@ -86,11 +86,6 @@ public class BaseExpertVo {
     @ApiModelProperty(value = "专业等级")
     private String majorGrade;
 
-    /**
-     * 采购品种
-     */
-    @ApiModelProperty(value = "采购品种,多个使用英文逗号分隔")
-    private String varietyPurchase;
 
     /**
      * 采购品种名

+ 0 - 3
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseSupplierVo.java

@@ -19,9 +19,6 @@ public class BaseSupplierVo extends PageVo {
     @ApiModelProperty("供应商地址")
     private String supplierAddress;
 
-    @ApiModelProperty("供应商类型")
-    private String supplierType;
-
     @ApiModelProperty("状态 黑白名单")
     private String supplierState;
 

+ 0 - 7
purchase-system/src/main/java/com/ozs/base/mapper/BaseExpertMapper.java

@@ -23,11 +23,4 @@ public interface BaseExpertMapper extends BaseMapper<BaseExpert> {
 
     List<PmDemandExpertRef> getExpertIdList(@Param("demandId") Long demandId);
 
-    /**
-     * 根据采购品种查询
-     *
-     * @param unitInformation
-     * @return
-     */
-    List<BaseUnitInformation> selectByUnitInformationBC(BaseUnitInformation unitInformation);
 }

+ 0 - 1
purchase-system/src/main/java/com/ozs/base/service/BaseExpertService.java

@@ -20,5 +20,4 @@ public interface BaseExpertService extends IService<BaseExpert> {
 
     List<BaseUnitInformation> getBaseUnitInformationList();
 
-    List<BaseUnitInformation> getBaseUnitInformationListBC(BaseUnitInformation unitInformation);
 }

+ 0 - 27
purchase-system/src/main/java/com/ozs/base/service/impl/BaseExpertServiceImpl.java

@@ -63,7 +63,6 @@ public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExp
             if (baseUnitInformationList.size() <= 0) {
                 BaseUnitInformation baseUnitInformation = new BaseUnitInformation();
                 baseUnitInformation.setUnitName(baseExpertVo.getUnitInformation());
-                baseUnitInformation.setVarietyPurchase(baseExpertVo.getVarietyPurchase());
                 baseUnitInformation.setCreated(baseExpertVo.getExpertName());
                 baseUnitInformation.setCreateTime(new Date());
                 Integer i = baseExpertMapper.insertBaseUnitInformation(baseUnitInformation);
@@ -131,22 +130,7 @@ public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExp
                     if (!ObjectUtils.isEmpty(map)) {
                         // 专家名称
                         String expertNameStr = map.get("expertName");
-                        // 采购品种
-                        String varietyPurchaseStr = map.get("varietyPurchase");
-                        List<String> list = Arrays.stream(varietyPurchaseStr.split(",")).map(s -> String.valueOf(s.trim())).collect(Collectors.toList());
-                        List<String> newList = method(list);
-                        // 查询采购品种 中文
-                        String varietyPurchaseName = "";
-                        for (String i : newList) {
-                            String name = PurchaseType.getCodeToInfo(i);
-                            if ("".equals(varietyPurchaseName)) {
-                                varietyPurchaseName = name;
-                            } else {
-                                varietyPurchaseName = "," + name;
-                            }
-                        }
                         pmDemandResVo.setExpertNameStr(expertNameStr);
-                        pmDemandResVo.setVarietyPurchaseStr(varietyPurchaseName);
                     }
                     pmDemandResVo.setAccessTime(accessTime);
                 }
@@ -187,17 +171,6 @@ public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExp
         return baseUnitInformationList;
     }
 
-    /**
-     * 根据采购品种查询
-     *
-     * @param unitInformation
-     * @return
-     */
-    @Override
-    public List<BaseUnitInformation> getBaseUnitInformationListBC(BaseUnitInformation unitInformation) {
-        List<BaseUnitInformation> baseUnitInformationList = baseExpertMapper.selectByUnitInformationBC(unitInformation);
-        return baseUnitInformationList;
-    }
 
     private List<PmDemandResVo> changTo(List<PmDemand> pmDemandList) {
         List<PmDemandResVo> pmDemandResponseVoList = new ArrayList<>();

+ 1 - 8
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -1266,11 +1266,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                     baseExpert.setStatus(NameListType.WHITE.getCode());
                 }
             }
-            if (!ObjectUtils.isEmpty(baseExpert.getVarietyPurchase()) && !baseExpert.getVarietyPurchase().contains(pmDemand.getProjectType())) {
-                throw new Exception("该专家(身份证号:" + baseExpert.getIdNumber() + ")所属采购品种和项目类型不匹配");
-            } else {
-                baseExpert.setVarietyPurchase(pmDemand.getProjectType());
-            }
 
             if (ObjectUtils.isEmpty(baseExpert.getCreated())) {
                 baseExpert.setCreated(pmBaseExpertFillReqVo.getCreateBy());
@@ -1313,7 +1308,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                     if (baseUnitInformationList.size() <= 0) {
                         BaseUnitInformation baseUnitInformation = new BaseUnitInformation();
                         baseUnitInformation.setUnitName(baseExpert.getUnitInformation());
-                        baseUnitInformation.setVarietyPurchase(baseExpert.getVarietyPurchase());
                         baseUnitInformation.setCreated(baseExpert.getExpertName());
                         baseUnitInformation.setCreateTime(new Date());
                         Integer i = baseExpertMapper.insertBaseUnitInformation(baseUnitInformation);
@@ -1395,8 +1389,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
         //从专家库中查询符合项目类型的以及是白名单的全部列表
         LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<>();
-        lw.eq(BaseExpert::getVarietyPurchase, pmDemand.getProjectType())
-                .eq(BaseExpert::getStatus, NameListType.WHITE.getCode())
+        lw.eq(BaseExpert::getStatus, NameListType.WHITE.getCode())
                 .notIn(!ObjectUtils.isEmpty(needAvoidUnitList), BaseExpert::getUnitInformation, needAvoidUnitList)
                 .in(!ObjectUtils.isEmpty(sysRegionCodeList), BaseExpert::getLocalArea, sysRegionCodeList); //地域
 

+ 1 - 13
purchase-system/src/main/resources/mapper/base/BaseExpertMapper.xml

@@ -138,9 +138,6 @@
             <if test="unitName != null and unitName != '' ">
                 unit_name,
             </if>
-            <if test="varietyPurchase != null and varietyPurchase != '' ">
-                variety_purchase,
-            </if>
             <if test="created != null and created != '' ">
                 created,
             </if>
@@ -169,7 +166,7 @@
     </select>
 
     <select id="getExpertNameList" resultType="java.util.Map" parameterType="java.util.List">
-        select GROUP_CONCAT(variety_purchase) varietyPurchase, GROUP_CONCAT(expert_name) expertName from base_expert
+        select GROUP_CONCAT(expert_name) expertName from base_expert
         where id in
         <foreach collection="expertList" item="id" open="(" separator="," close=")">
             #{id}
@@ -177,13 +174,4 @@
 
     </select>
 
-    <select id="selectByUnitInformationBC" resultType="com.ozs.base.domain.BaseUnitInformation"
-            parameterType="com.ozs.base.domain.BaseUnitInformation">
-        select * from base_unit_information
-        <where>
-            <if test="varietyPurchase != null and varietyPurchase != ''">
-                variety_purchase = #{varietyPurchase}
-            </if>
-        </where>
-    </select>
 </mapper>