|
|
@@ -1,6 +1,7 @@ |
|
|
|
package cn.com.taiji.invw.manager.warehouse; |
|
|
|
|
|
|
|
import cn.com.taiji.common.manager.ManagerException; |
|
|
|
import cn.com.taiji.common.manager.net.http.ServiceHandleException; |
|
|
|
import cn.com.taiji.common.model.dao.Pagination; |
|
|
|
import cn.com.taiji.core.entity.dict.EnableStatus; |
|
|
|
import cn.com.taiji.core.entity.dict.log.OperateType; |
|
|
@@ -24,6 +25,7 @@ import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class InvwWarehouseManagerImpl extends AbstractInvwManager implements InvwWarehouseManager { |
|
|
@@ -261,7 +263,7 @@ public class InvwWarehouseManagerImpl extends AbstractInvwManager implements Inv |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public InvwWarehouseIdNameResponseDTO getWarehouseIdNames(InvwWarehouseIdNameRequestDTO req) { |
|
|
|
public InvwWarehouseIdNameResponseDTO getWarehouseIdNames(InvwWarehouseIdNameRequestDTO req) throws ServiceHandleException { |
|
|
|
List<InvwWarehouseIdNameModel> idNames = new ArrayList<>(); |
|
|
|
List<InvwWarehouse> warehouseList = new ArrayList<>(); |
|
|
|
InvwWarehouseIdNameResponseDTO response = new InvwWarehouseIdNameResponseDTO(); |
|
|
@@ -317,6 +319,10 @@ public class InvwWarehouseManagerImpl extends AbstractInvwManager implements Inv |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
String agencyId = findAgencyIdByToken(req.getAccessToken()); |
|
|
|
if (!isManager(agencyId)){ |
|
|
|
warehouseList = warehouseList.stream().filter(item -> agencyId.equals(item.getAgencyId())).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
if (!isEmpty(warehouseList)) { |
|
|
|
for (InvwWarehouse invwWarehouse : warehouseList) { |
|
|
|
InvwWarehouseIdNameModel idName = new InvwWarehouseIdNameModel(); |