| | |
| | | List<BasicWarehouseType> basicWarehouseType=basicWarehouseTypeMapper.getBasicWarehouseType(type); |
| | | for (BasicWarehouseType item : basicWarehouseType){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | map.put("id",item.getId()); |
| | | map.put("OperateTypeId",item.getOperateTypeId()); |
| | | map.put("OperateTypeName",item.getOperateTypeName()); |
| | | map.put("OperateType",item.getOperateType()); |
| | |
| | | |
| | | } |
| | | |
| | | public Map<String, List<Object>> getBasicWarehouseTypes(String type){ |
| | | //返回基础数据里的所有类型 |
| | | List<String> orderBasicDataType = basicWarehouseTypeMapper.getBasicWarehouse(type); |
| | | //返回此类型基础数据所有数据 |
| | | List<BasicWarehouseType> orderBasicData = basicWarehouseTypeMapper.getBasicWarehouseType(type); |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | //创建List对象 |
| | | |
| | | //遍历订单基本数据类型 |
| | | for(String item :orderBasicDataType){ |
| | | List<Object> orderBasicDataList = new ArrayList<>(); |
| | | //将类型和List对象放入Map中 |
| | | BasicDataMap.put(item,orderBasicDataList); |
| | | } |
| | | //遍历订单基本数据 |
| | | |
| | | for (BasicWarehouseType item : orderBasicData){ |
| | | //将数据放入List中 |
| | | BasicDataMap.get(item.getOperateType()).add(item); |
| | | } |
| | | return BasicDataMap; |
| | | } |
| | | |
| | | |
| | | } |