diff --git a/ruoyi-admin/src/main/java/com/ruoyi/business/controller/BusStoreDayHistoryInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/business/controller/BusStoreDayHistoryInfoController.java index 0b69388..9681a72 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/business/controller/BusStoreDayHistoryInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/business/controller/BusStoreDayHistoryInfoController.java @@ -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 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 datas = (List) tdi.getRows(); - List datas = agentInfoMapper.selectDaataOverview(sql); + + TableDataInfo tdi = busStoreDayHistoryInfoService.selectBusStoreDayHistoryInfoListNew(false,account, expStartTime,expEndTime); + List datas = (List) tdi.getRows(); ExcelUtil util = new ExcelUtil<>(BusOverviewInfo.class); util.exportExcel(response, datas, "数据概览统计数据"); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/IBusStoreDayHistoryInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/IBusStoreDayHistoryInfoService.java index 4bf3e21..e7416bd 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/IBusStoreDayHistoryInfoService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/IBusStoreDayHistoryInfoService.java @@ -31,6 +31,7 @@ public interface IBusStoreDayHistoryInfoService */ public List 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); /** * 新增店铺单日信息 diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreDayHistoryInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreDayHistoryInfoServiceImpl.java index f870dc6..53cf006 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreDayHistoryInfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusStoreDayHistoryInfoServiceImpl.java @@ -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 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 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; } + + /** * 新增店铺单日信息 *