zhangfeng
2022-12-23 f7d2f20365467a834188edd35c464d9fb9349214
equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/baseService/impl/SafeMaterialClassifyInfoServiceImpl.java
@@ -1,6 +1,7 @@
package com.gkhy.safePlatform.equipment.service.baseService.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.commons.enums.ResultCodes;
import com.gkhy.safePlatform.commons.utils.StringUtils;
@@ -8,6 +9,7 @@
import com.gkhy.safePlatform.equipment.enums.IssueReceiptEnum;
import com.gkhy.safePlatform.equipment.enums.ValidStatusEnum;
import com.gkhy.safePlatform.equipment.excepiton.EquipmentException;
import com.gkhy.safePlatform.equipment.model.dto.req.MaterialClassifyQuery;
import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyQuery;
import com.gkhy.safePlatform.equipment.repository.SafeMaterialClassifyInfoRepository;
import com.gkhy.safePlatform.equipment.service.baseService.SafeMaterialClassifyInfoService;
@@ -58,7 +60,7 @@
    }
    @Override
    public List<SafeMaterialClassifyInfo> getList(){
    public List<SafeMaterialClassifyInfo> getParentList(){
        List<SafeMaterialClassifyInfo> list = repository.selectList(new LambdaQueryWrapper<SafeMaterialClassifyInfo>()
                .eq(SafeMaterialClassifyInfo::getDelFlag,0)
                .eq(SafeMaterialClassifyInfo::getParentId,0l));
@@ -100,5 +102,18 @@
        return repository.getTraceabilityClassifyList(smallClassifyIds);
    }
    @Override
    public List<SafeMaterialClassifyInfo> listByPage(Page<SafeMaterialClassifyInfo> page, MaterialClassifyQuery query) {
        return repository.listByConditions(page,query);
    }
    @Override
    public List<SafeMaterialClassifyInfo> getListByParentIds(List<Long> parentIdList) {
       if (CollectionUtils.isEmpty(parentIdList)){
           throw new EquipmentException(ResultCodes.CLIENT_PARAM_NULL);
       }
        return repository.getListByParentIds(parentIdList);
    }
}