|
@@ -111,36 +111,36 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
PageHelper.startPage(page.getPageNum(), page.getPageSize());
|
|
PageHelper.startPage(page.getPageNum(), page.getPageSize());
|
|
List<GoodsVO> list = new ArrayList<>();
|
|
List<GoodsVO> list = new ArrayList<>();
|
|
- if(tagId != null){
|
|
|
|
- if(tagId==-1){
|
|
|
|
- //机柜列表
|
|
|
|
- list = goodsMapper.getRackListBycondition(keyName, tagId, uid);
|
|
|
|
- PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
|
|
- msg.data = info;
|
|
|
|
- return msg;
|
|
|
|
- }else if(tagId==-2){
|
|
|
|
|
|
+// if(tagId != null){
|
|
|
|
+// if(tagId==-1){
|
|
|
|
+// //机柜列表
|
|
|
|
+//// list = goodsMapper.getRackListBycondition(keyName, tagId, uid);
|
|
|
|
+//// PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
|
|
+//// msg.data = info;
|
|
|
|
+//// return msg;
|
|
|
|
+// }else if(tagId==-2){
|
|
//设备列表
|
|
//设备列表
|
|
- QueryWrapper<GoodsNo> qw = new QueryWrapper();
|
|
|
|
- if(keyName!=null && !"".equals(keyName)){
|
|
|
|
- qw.eq("device_name",keyName);
|
|
|
|
- }
|
|
|
|
- List <GoodsNo> equipmentList = goodsNoMapper.selectList(qw.eq("type",1).select("id", "model_no", "state","indate", "goods_id"
|
|
|
|
- ,"user_id", "update_indate", "is_maintain", "type", " device_name", "device_model", "good_sn_no",
|
|
|
|
- "label_id", "rack_id", "model_id", "u_bit_num","current_state","alarm_level").orderByDesc("id"));
|
|
|
|
- PageInfo<GoodsNo> info = new PageInfo<>(equipmentList);
|
|
|
|
- msg.data = info;
|
|
|
|
- return msg;
|
|
|
|
- }else{
|
|
|
|
- list = goodsMapper.getListBycondition(keyName, tagId, uid);
|
|
|
|
- PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
|
|
- msg.data = info;
|
|
|
|
- return msg;
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
|
|
+// QueryWrapper<GoodsNo> qw = new QueryWrapper();
|
|
|
|
+// if(keyName!=null && !"".equals(keyName)){
|
|
|
|
+// qw.eq("device_name",keyName);
|
|
|
|
+// }
|
|
|
|
+// List <GoodsNo> equipmentList = goodsNoMapper.selectList(qw.eq("type",1).select("id", "model_no", "state","indate", "goods_id"
|
|
|
|
+// ,"user_id", "update_indate", "is_maintain", "type", " device_name", "device_model", "good_sn_no",
|
|
|
|
+// "label_id", "rack_id", "model_id", "u_bit_num","current_state","alarm_level").orderByDesc("id"));
|
|
|
|
+// PageInfo<GoodsNo> info = new PageInfo<>(equipmentList);
|
|
|
|
+// msg.data = info;
|
|
|
|
+// return msg;
|
|
|
|
+// }else{
|
|
|
|
+// list = goodsMapper.getListBycondition(keyName, tagId, uid);
|
|
|
|
+// PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
|
|
+// msg.data = info;
|
|
|
|
+// return msg;
|
|
|
|
+// }
|
|
|
|
+// }else{
|
|
list = goodsMapper.getListBycondition(keyName, tagId, uid);
|
|
list = goodsMapper.getListBycondition(keyName, tagId, uid);
|
|
PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
PageInfo<GoodsVO> info = new PageInfo<>(list);
|
|
msg.data = info;
|
|
msg.data = info;
|
|
- }
|
|
|
|
|
|
+// }
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|