| package com.zy.asrs.wms.asrs.service.impl; | 
|   | 
| import com.alibaba.fastjson.JSON; | 
| import com.zy.asrs.framework.common.Cools; | 
| import com.zy.asrs.wms.asrs.entity.LocType; | 
| import com.zy.asrs.wms.asrs.mapper.LocTypeBindMapper; | 
| import com.zy.asrs.wms.asrs.entity.LocTypeBind; | 
| import com.zy.asrs.wms.asrs.service.LocTypeBindService; | 
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import java.util.Collections; | 
| import java.util.List; | 
|   | 
| @Service("locTypeBindService") | 
| public class LocTypeBindServiceImpl extends ServiceImpl<LocTypeBindMapper, LocTypeBind> implements LocTypeBindService { | 
|   | 
|     @Override | 
|     public List<Long> getLocIdListByTypeId(Long typeId) { | 
|         return this.baseMapper.getLocIdListByTypeId(typeId); | 
|     } | 
|   | 
|     @Override | 
|     public List<Long> getLocIdListByType(LocType locType) { | 
|         List<Long> locIdList = this.getLocIdListByTypeId(locType.getId()); | 
|   | 
|         if (!Cools.isEmpty(locType.getContain())) { | 
|             List<Long> list = JSON.parseArray(locType.getContain(), Long.class); | 
|             for (Long id : list) { | 
|                 List<Long> longs = this.getLocIdListByTypeId(id); | 
|                 if (!longs.isEmpty()) { | 
|                     locIdList.addAll(longs); | 
|                 } | 
|             } | 
|         } | 
|         return locIdList; | 
|     } | 
| } |