Commit ac9da698 authored by tangwei's avatar tangwei

增加单位过滤 货位

parent 014db0b1
......@@ -177,6 +177,14 @@ public class WarehouseStructureController extends AbstractBaseController {
return iWarehouseStructureService.tree(id);
}
@RequestMapping(value = "/gettree/{id}", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "树查询", notes = "树查询")
public List<WarehouseStructure> gettree(@PathVariable Long id,String bizOrgCode) {
return iWarehouseStructureService.gettree(id,bizOrgCode);
}
/**
* 批量删除
*
......
......@@ -17,7 +17,7 @@ public interface IWarehouseStructureService extends IService<WarehouseStructure>
WarehouseStructure saveOne(WarehouseStructure warehouseStructure);
List<WarehouseStructure> tree(Long warehouseId);
List<WarehouseStructure> gettree(Long warehouseId,String bizOrgCode);
WarehouseStructure updateOneById(WarehouseStructure warehouseStructure);
boolean removeOneById(Long id) throws Exception;
......
......@@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.equipmanage.common.entity.FormInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -63,6 +64,18 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
return list;
}
@Override
public List<WarehouseStructure> gettree(Long warehouseId,String bizOrgCode) {
QueryWrapper<WarehouseStructure> one = new QueryWrapper<>();
one.eq("warehouse_id",warehouseId);
one.likeRight("biz_org_code",bizOrgCode);
List<WarehouseStructure> list = warehouseStructureMapper.selectList(one);
list = buildByRecursive(list,warehouseId);
return list;
}
/**
* 生成code
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment