|
@@ -2003,8 +2003,43 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PDADepotItemVO> inventoryInquiry(String type, String keyword) {
|
|
|
- return materialMapperEx.inventoryInquiry();
|
|
|
+ public List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) {
|
|
|
+ return materialMapperEx.inventoryInquiry(pdaInventoryDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询库位树
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<PDATypeTree> selectPosition() {
|
|
|
+ List<String> positions = materialExtendMapper.selectPosition();
|
|
|
+ Map<String,List<String>> map = new HashMap<>();
|
|
|
+ for (String s : positions) {
|
|
|
+ String [] str = s.split("-");
|
|
|
+ if (map.get(str[0]) == null){
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ list.add(str[1]);
|
|
|
+ map.put(str[0],list);
|
|
|
+ }else {
|
|
|
+ map.get(str[0]).add(str[1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<PDATypeTree> typeTrees = new ArrayList<>();
|
|
|
+ map.forEach((key,value) -> {
|
|
|
+ PDATypeTree typeTree = new PDATypeTree();
|
|
|
+ typeTree.setLabel(key);
|
|
|
+ typeTree.setValue(key);
|
|
|
+ List<PDATypeTree> children = new ArrayList<>();
|
|
|
+ for (String s : value) {
|
|
|
+ PDATypeTree childrenTree = new PDATypeTree();
|
|
|
+ childrenTree.setLabel(key + "-" + s);
|
|
|
+ childrenTree.setValue(key + "-" + s);
|
|
|
+ children.add(childrenTree);
|
|
|
+ }
|
|
|
+ typeTree.setChildren(children);
|
|
|
+ typeTrees.add(typeTree);
|
|
|
+ });
|
|
|
+ return typeTrees;
|
|
|
}
|
|
|
|
|
|
/**
|