|
@@ -1,5 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.AuthDetailDTO;
|
|
@@ -183,24 +184,20 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
* @param productOrderVO (订单编号,机构名称,申请状态)
|
|
|
* @return 所有订单信息
|
|
|
*/
|
|
|
- public RespDTO<Page<ProductOrderWrapper>> selectAllProductOrder(ProductOrderVO productOrderVO){
|
|
|
+ public RespDTO<IPage<ProductOrderWrapper>> selectAllProductOrder(ProductOrderVO productOrderVO){
|
|
|
+ Page page =new Page();
|
|
|
+ if(productOrderVO.getCurrent() !=0 && productOrderVO.getSize() != 0){
|
|
|
+ page.setCurrent(productOrderVO.getCurrent());
|
|
|
+ page.setSize(productOrderVO.getSize());
|
|
|
+ }
|
|
|
ProductOrderIndex productOrderIndex =new ProductOrderIndex();
|
|
|
- Long curren = productOrderVO.getCurrent();
|
|
|
- Long size =productOrderVO.getSize();
|
|
|
- if(curren==null){
|
|
|
- productOrderVO.setCurrent(1L);
|
|
|
- }
|
|
|
- if (size==null){
|
|
|
- productOrderVO.setSize(10L);
|
|
|
- }
|
|
|
BeanUtil.copyProperties(productOrderVO, productOrderIndex);
|
|
|
- productOrderIndex.setIndex((productOrderVO.getCurrent().longValue()-1)*productOrderVO.getSize().longValue());
|
|
|
//TODO
|
|
|
if(productOrderVO.getOrgName()!=null&&productOrderVO.getOrgName()!=""){
|
|
|
RespDTO<List<Long>> rlist = userServiceClient.getUserByOrgName(productOrderVO.getOrgName());
|
|
|
productOrderIndex.setUserId(rlist.data);
|
|
|
}
|
|
|
- List<ProductOrderWrapper> list =productOrderFacade.selectAllProductOrder(productOrderIndex);
|
|
|
+ List<ProductOrderWrapper> list =productOrderFacade.selectAllProductOrder(page,productOrderIndex).getRecords();
|
|
|
List<Long> list1 =new ArrayList<>();
|
|
|
for (ProductOrderWrapper productOrderWrapper:list) {
|
|
|
Long longs = productOrderWrapper.getUserId();
|
|
@@ -222,11 +219,6 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
bean.setOrgName(uo.getOrgName());
|
|
|
}
|
|
|
}
|
|
|
- Page page =new Page();
|
|
|
- page.setRecords(list);
|
|
|
- page.setCurrent(productOrderVO.getCurrent());
|
|
|
- page.setSize(productOrderVO.getSize());
|
|
|
- page.setTotal(productOrderFacade.selectProductOrderCount(productOrderIndex));
|
|
|
return RespDTO.onSuc(page);
|
|
|
}
|
|
|
|
|
@@ -275,7 +267,7 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
Map<String, Object> userMap = new HashMap<String, Object>();
|
|
|
userMap.put("startTime", productOrderExportVO.getStartTime());
|
|
|
userMap.put("endTime", productOrderExportVO.getEndTime());
|
|
|
- RespDTO<Page<ProductOrderWrapper>> datas = this.selectAllProductOrder(productOrderVO);
|
|
|
+ RespDTO<IPage<ProductOrderWrapper>> datas = this.selectAllProductOrder(productOrderVO);
|
|
|
GsonUtil.toJson(datas.data.getRecords());
|
|
|
List<String> listName = new ArrayList<>();
|
|
|
|