数据报表 按分类和商品名称筛选

统计增加 按现金支付统计
用户列表返回数据更新
This commit is contained in:
2024-05-17 15:19:59 +08:00
parent e32436e744
commit f35c2b4c59
8 changed files with 90 additions and 33 deletions

View File

@@ -169,9 +169,9 @@ public class SummaryServiceImpl implements SummaryService {
List<CountDateVO> numList = new ArrayList<>();
for (Object[] o : objects) {
CountDateVO countDateVO = new CountDateVO();
BigInteger integers = (BigInteger)o[1];
BigInteger integers = (BigInteger) o[1];
countDateVO.setCount(new BigDecimal(integers.toString()));
Date date =(Date)o[2];
Date date = (Date) o[2];
countDateVO.setTradeDay(date.toString());
numList.add(countDateVO);
}
@@ -209,9 +209,9 @@ public class SummaryServiceImpl implements SummaryService {
} else if (day == 1) {
startTime = DateUtil.getDayBegin();
log.info("1天时间"+startTime.toString());
log.info("1天时间" + startTime.toString());
endTime = DateUtil.getDayEnd();
log.info("1天时间末"+endTime.toString());
log.info("1天时间末" + endTime.toString());
} else {
throw new BadRequestException("日期有误");
}
@@ -238,7 +238,7 @@ public class SummaryServiceImpl implements SummaryService {
Tuple paySum = tbOrderInfoRepository.queryPaySumByDayAll(shopId.toString(), startTimeLong, endTimeLong);
map.put("productCount", payCount == null ? 0 : payCount.get(0, BigDecimal.class));
map.put("productSum", paySum == null ? 0 : paySum.get(0,BigDecimal.class));
map.put("productSum", paySum == null ? 0 : paySum.get(0, BigDecimal.class));
map.put("totalProduct", list);
map.put("total", tuple1 == null ? 0 : tuple1.get(0, BigInteger.class));
return map;
@@ -360,7 +360,7 @@ public class SummaryServiceImpl implements SummaryService {
summaryDto.setStartTime(DateUtil.toDate(DateUtil.fromTimeStamp(1704038400L)));
summaryDto.setEndTime(new Date());
}
return (Page<T>) detailRepository.queryTbOrderSalesCountByDay(Integer.valueOf(summaryDto.getShopId()), summaryDto.getStartTime(), summaryDto.getEndTime(), pageable);
return (Page<T>) detailRepository.queryTbOrderSalesCountByDay(Integer.valueOf(summaryDto.getShopId()),summaryDto.getCateId(),summaryDto.getProName(), summaryDto.getStartTime(), summaryDto.getEndTime(), pageable);
}
}
@@ -394,6 +394,7 @@ public class SummaryServiceImpl implements SummaryService {
for (TbOrderSalesCountByDayVo all : tbOrderSalesCountByDayVos) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("商品名称", all.getProductName());
map.put("商品分类", all.getCateName());
map.put("商品规格", StringUtils.isBlank(all.getProductSkuName()) ? "" : all.getProductSkuName());
map.put("销量", all.getSalesNum());
map.put("退单量", all.getRefNum());
@@ -419,6 +420,9 @@ public class SummaryServiceImpl implements SummaryService {
TbOrderPayCountVo payCount = tbOrderInfoRepository.queryOrderPayCount(shopId, start, end);
payCount.setIcon("el-icon-coin");
list.add(payCount);
TbOrderPayCountVo cashCount = tbOrderInfoRepository.queryOrderPayCash(shopId, start, end);
cashCount.setIcon("el-icon-circle-check");
list.add(cashCount);
TbOrderPayCountVo refCount = tbOrderInfoRepository.queryTbOrderRefund(shopId, start, end);
refCount.setPayType("退款金额");
refCount.setIcon("el-icon-money");

View File

@@ -53,7 +53,7 @@ public class TbShopUserServiceImpl implements TbShopUserService {
private final TbShopUserMapper tbShopUserMapper;
@Override
public Map<String, Object> queryAllShopUser(TbShopUserQueryCriteria criteria, Pageable pageable) {
public Map<String, Object> queryShopUser(TbShopUserQueryCriteria criteria, Pageable pageable) {
Page<ShopUserInfoVo> shopUserJoinUserInfo =
tbShopUserRepository.findShopUserJoinUserInfo(
criteria.getShopId(),
@@ -64,7 +64,7 @@ public class TbShopUserServiceImpl implements TbShopUserService {
}
@Override
public Map<String, Object> queryShopUser(TbShopUserQueryCriteria criteria, Pageable pageable) {
public Map<String, Object> queryAllShopUser(TbShopUserQueryCriteria criteria, Pageable pageable) {
Page<ShopUserInfoVo> shopUserJoinUserInfo =
tbShopUserRepository.findAllShopUserJoinUserInfo(
criteria.getIsVip(),