数据概览导出+优化
This commit is contained in:
parent
4b136acc80
commit
322bdab810
|
@ -64,29 +64,17 @@ public class BusStoreDayHistoryInfoController extends BaseController
|
|||
public TableDataInfo list1(String account, String expStartTime, String expEndTime)
|
||||
{
|
||||
// startPage();
|
||||
TableDataInfo list = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoList1(true,account, expStartTime,expEndTime);
|
||||
// TableDataInfo list = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoList1(true,account, expStartTime,expEndTime);
|
||||
TableDataInfo list = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoListNew(true,account, expStartTime,expEndTime);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Resource
|
||||
private BusAgentInfoMapper agentInfoMapper;
|
||||
|
||||
@PostMapping("/exportDataOverview")
|
||||
public void exportDataOverview(HttpServletResponse response,String account, String expStartTime, String expEndTime) throws Exception{
|
||||
|
||||
Map<String,Object> sql = new HashMap<>();
|
||||
if(StringUtils.isNotBlank(account)){
|
||||
sql.put("account",account);
|
||||
}
|
||||
if(StringUtils.isNotBlank(expStartTime)){
|
||||
sql.put("expStartTime",expStartTime);
|
||||
}
|
||||
if(StringUtils.isNotBlank(expEndTime)){
|
||||
sql.put("expEndTime",expEndTime);
|
||||
}
|
||||
// TableDataInfo tdi = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoList1(false,account, expStartTime,expEndTime);
|
||||
// List<BusOverviewInfo> datas = (List<BusOverviewInfo>) tdi.getRows();
|
||||
List<BusOverviewInfo> datas = agentInfoMapper.selectDaataOverview(sql);
|
||||
|
||||
TableDataInfo tdi = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoListNew(false,account, expStartTime,expEndTime);
|
||||
List<BusOverviewInfo> datas = (List<BusOverviewInfo>) tdi.getRows();
|
||||
ExcelUtil<BusOverviewInfo> util = new ExcelUtil<>(BusOverviewInfo.class);
|
||||
util.exportExcel(response, datas, "数据概览统计数据");
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ public interface IBusStoreDayHistoryInfoService
|
|||
*/
|
||||
public List<BusStoreExcelInfo> selectBusStoreDayHistoryInfoList(BusStoreExcelInfo busStoreExcelInfo);
|
||||
public TableDataInfo selectBusStoreDayHistoryInfoList1(boolean isPage,String account, String expStartTime, String expEndTime);
|
||||
public TableDataInfo selectBusStoreDayHistoryInfoListNew(boolean isPage,String account, String expStartTime, String expEndTime);
|
||||
|
||||
/**
|
||||
* 新增店铺单日信息
|
||||
|
|
|
@ -20,9 +20,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
@ -76,6 +74,33 @@ public class BusStoreDayHistoryInfoServiceImpl implements IBusStoreDayHistoryInf
|
|||
return busStoreDayHistoryInfoMapper.selectBusStoreDayHistoryInfoList(busStoreExcelInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectBusStoreDayHistoryInfoListNew(boolean isPage,String account, String expStartTime, String expEndTime) {
|
||||
Map<String,Object> sql = new HashMap<>();
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(account)){
|
||||
sql.put("account",account);
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(expStartTime)){
|
||||
sql.put("expStartTime",expStartTime);
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(expEndTime)){
|
||||
sql.put("expEndTime",expEndTime);
|
||||
}
|
||||
|
||||
|
||||
if(isPage){
|
||||
PageUtils.startPage();
|
||||
}
|
||||
List<BusOverviewInfo> datas = agentInfoMapper.selectDaataOverview(sql);
|
||||
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(datas);
|
||||
rspData.setTotal(new PageInfo(datas).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectBusStoreDayHistoryInfoList1(boolean isPage,String account, String expStartTime, String expEndTime) {
|
||||
if(isPage){
|
||||
|
@ -161,6 +186,8 @@ public class BusStoreDayHistoryInfoServiceImpl implements IBusStoreDayHistoryInf
|
|||
return rspData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增店铺单日信息
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue