Commit a07b5a5d by 丁伟峰

bugfix:根据groupId查询

1 parent f4c7eb5a
......@@ -12,6 +12,10 @@ public interface WarehouseInfoDao extends JpaRepository<OrgWarehouseInfoEntity,
@Query("select a from OrgWarehouseInfoEntity a join OrgTeamEntity o on a.branchId=o.branchId where o.teamId= :teamId")
List<OrgWarehouseInfoEntity> getAllByTeamId(String teamId);
// 返回工作队所在的分部所有的配件仓
@Query("select a from OrgWarehouseInfoEntity a join OrgGroupEntity o on a.branchId=o.branchId where o.groupId= :groupId")
List<OrgWarehouseInfoEntity> getAllByGroupId(String groupId);
// 返回工作队关联的配件仓
@Query("select a from OrgWarehouseInfoEntity a join OrgTeamEntity o on a.warehouseId=o.warehouseId where o.teamId= :teamId")
OrgWarehouseInfoEntity getByTeamAssigned(String teamId);
......
......@@ -95,7 +95,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
@Override
public Result<?> getWarehouses(BusinessWarehousesDTO.Request req) {
List<OrgWarehouseInfoEntity> warehouseInfoEntityList = warehouseInfoDao.getAllByTeamId(req.getGroupId());
List<OrgWarehouseInfoEntity> warehouseInfoEntityList = warehouseInfoDao.getAllByGroupId(req.getGroupId());
List<BusinessWarehousesDTO.Content> contents = warehouseInfoEntityList.stream().map(entity -> {
BusinessWarehousesDTO.Content dto = new BusinessWarehousesDTO.Content();
dto.setWarehouseId(entity.getWarehouseId());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!