|
@@ -60,30 +60,30 @@ public class TrayController extends SuperController<TrayService, Long, Tray, Tra
|
|
|
|
|
|
wrapper.like(Tray::getName, tray.getName())
|
|
|
.like(Tray::getSpecification, tray.getSpecification())
|
|
|
- .eq(Tray::getBrand,tray.getBrand());
|
|
|
+ .eq(Tray::getBrand,tray.getBrand()).eq(Tray::getStatus,tray.getStatus());
|
|
|
|
|
|
IPage<Tray> list= baseService.pageList(page, wrapper);
|
|
|
- //取出分页里面得数据
|
|
|
- List<Tray> l = list.getRecords();
|
|
|
- //取出IDList
|
|
|
- List<Long> idList = l.stream().map(p -> p.getId()).collect(Collectors.toList());
|
|
|
- //根据IDList取出明细
|
|
|
- List<TrayPosition> detailList = trayPositionService.list(Wraps.<TrayPosition>lbQ().in(TrayPosition::getTrayId, idList));
|
|
|
- Map<Long,List<TrayPosition>>map = new HashMap<Long,List<TrayPosition>>();
|
|
|
- for(TrayPosition ms:detailList){
|
|
|
- if(map.containsKey(ms.getTrayId())){
|
|
|
- map.get(ms.getTrayId()).add(ms);
|
|
|
- }else{
|
|
|
- List a = new ArrayList<TrayPosition>();
|
|
|
- a.add(ms);
|
|
|
- map.put(ms.getTrayId(),a);
|
|
|
- }
|
|
|
- }
|
|
|
- for(Tray m:l){
|
|
|
- if(map.containsKey(m.getId())){
|
|
|
- m.setPositionList(map.get(m.getId()));
|
|
|
- }
|
|
|
- }
|
|
|
+// //取出分页里面得数据
|
|
|
+// List<Tray> l = list.getRecords();
|
|
|
+// //取出IDList
|
|
|
+// List<Long> idList = l.stream().map(p -> p.getId()).collect(Collectors.toList());
|
|
|
+// //根据IDList取出明细
|
|
|
+// List<TrayPosition> detailList = trayPositionService.list(Wraps.<TrayPosition>lbQ().in(TrayPosition::getTrayId, idList));
|
|
|
+// Map<Long,List<TrayPosition>>map = new HashMap<Long,List<TrayPosition>>();
|
|
|
+// for(TrayPosition ms:detailList){
|
|
|
+// if(map.containsKey(ms.getTrayId())){
|
|
|
+// map.get(ms.getTrayId()).add(ms);
|
|
|
+// }else{
|
|
|
+// List a = new ArrayList<TrayPosition>();
|
|
|
+// a.add(ms);
|
|
|
+// map.put(ms.getTrayId(),a);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// for(Tray m:l){
|
|
|
+// if(map.containsKey(m.getId())){
|
|
|
+// m.setPositionList(map.get(m.getId()));
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|