|
@@ -276,7 +276,7 @@ public class MerchantApiController {
|
|
|
|
|
|
if (shiftInfoList.size() > 0) {
|
|
|
//今日收益
|
|
|
- BigDecimal todaySum = orderInfoService.paySum(null, shiftInfoList, null, null, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ BigDecimal todaySum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, null, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (todaySum != null) {
|
|
|
todayRevenue = todaySum;
|
|
|
}
|
|
@@ -285,7 +285,7 @@ public class MerchantApiController {
|
|
|
List<ShiftInfo> shiftInfoList1 = shiftInfoService.findByVehicleDateAccount(DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1)), DateUtil.endOfDay(DateUtil.offsetDay(new Date(), -1)), accountInfo);
|
|
|
if (shiftInfoList1.size() > 0) {
|
|
|
//昨日收益
|
|
|
- BigDecimal yesterdaySum = orderInfoService.paySum(null, shiftInfoList1, null, null, DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1)), DateUtil.endOfDay(DateUtil.offsetDay(new Date(), -1)), null);
|
|
|
+ BigDecimal yesterdaySum = orderInfoService.paySum(vehicleInfoList, shiftInfoList1, null, null, DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1)), DateUtil.endOfDay(DateUtil.offsetDay(new Date(), -1)), null);
|
|
|
if (yesterdaySum != null) {
|
|
|
yesterdayRevenue = yesterdaySum;
|
|
|
}
|
|
@@ -294,7 +294,7 @@ public class MerchantApiController {
|
|
|
List<ShiftInfo> shiftInfoList2 = shiftInfoService.findByVehicleDateAccount(null, new cn.hutool.core.date.DateTime(), accountInfo);
|
|
|
if (shiftInfoList2.size() > 0) {
|
|
|
//总收益
|
|
|
- BigDecimal totalSum = orderInfoService.paySum(null, shiftInfoList2, null, null, null, new cn.hutool.core.date.DateTime(), null);
|
|
|
+ BigDecimal totalSum = orderInfoService.paySum(vehicleInfoList, shiftInfoList2, null, null, null, new cn.hutool.core.date.DateTime(), null);
|
|
|
|
|
|
if (totalSum != null) {
|
|
|
totalRevenue = totalSum;
|
|
@@ -364,29 +364,29 @@ public class MerchantApiController {
|
|
|
|
|
|
|
|
|
//微信
|
|
|
- BigDecimal wechatSum = orderInfoService.paySum(null, shiftInfoList, null, "wechat", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ BigDecimal wechatSum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, "wechat", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (wechatSum != null) {
|
|
|
wechatRevenue = wechatSum;
|
|
|
}
|
|
|
//支付宝
|
|
|
- BigDecimal alipaySum = orderInfoService.paySum(null, shiftInfoList, null, "alipay", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ BigDecimal alipaySum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, "alipay", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (alipaySum != null) {
|
|
|
alipayRevenue = alipaySum;
|
|
|
}
|
|
|
|
|
|
//现金
|
|
|
- BigDecimal cashSum = orderInfoService.paySum(null, shiftInfoList, null, "cash", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ BigDecimal cashSum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, "cash", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (cashSum != null) {
|
|
|
cashRevenue = cashSum;
|
|
|
}
|
|
|
|
|
|
//车票
|
|
|
- BigDecimal ticketSum = orderInfoService.paySum(null, shiftInfoList, null, "ticket", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ BigDecimal ticketSum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, "ticket", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (ticketSum != null) {
|
|
|
ticketRevenue = ticketSum;
|
|
|
}
|
|
|
|
|
|
- Integer ticketNum = orderInfoService.payNum(null, shiftInfoList, null, null, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
+ Integer ticketNum = orderInfoService.payNum(vehicleInfoList, shiftInfoList, null, null, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), null);
|
|
|
if (ticketNum != null) {
|
|
|
num = ticketNum;
|
|
|
}
|
|
@@ -715,7 +715,7 @@ public class MerchantApiController {
|
|
|
BigDecimal baseSum = BigDecimal.ZERO;
|
|
|
List<ShiftInfo> shiftInfoList = shiftInfoService.findByVehicleDateAccount(baseStartDate, baseDate, accountInfo);
|
|
|
if (shiftInfoList.size() > 0) {
|
|
|
- baseSum = orderInfoService.paySum(null, shiftInfoList, null, payName, null, null, null);
|
|
|
+ baseSum = orderInfoService.paySum(vehicleInfoList, shiftInfoList, null, payName, null, null, null);
|
|
|
|
|
|
|
|
|
}
|
|
@@ -771,11 +771,6 @@ public class MerchantApiController {
|
|
|
vehicleInfoList = vehicleInfoService.getAllVehicleByAccount(accountInfo);
|
|
|
}
|
|
|
|
|
|
- Map<String, Object> searchParams = new HashMap<>();
|
|
|
- searchParams.put("payStatus", 20);
|
|
|
- if (StringUtils.isNotBlank(payName)) {
|
|
|
- searchParams.put("payName", payName);
|
|
|
- }
|
|
|
|
|
|
Date date = DateUtil.parse(dateStr, "yyyy-MM-dd");
|
|
|
Date startTime = DateUtil.beginOfDay(date);
|
|
@@ -788,13 +783,28 @@ public class MerchantApiController {
|
|
|
startTime = middleTime;
|
|
|
}
|
|
|
|
|
|
+ List<ShiftInfo> shiftInfoList = shiftInfoService.findByVehicleDateAccount(DateUtil.beginOfDay(startTime), DateUtil.endOfDay(endTime), accountInfo);
|
|
|
+
|
|
|
+ Map<String, Object> pageMap = new HashMap<>();
|
|
|
+ if (shiftInfoList.size() > 0) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Map<String, Object> searchParams = new HashMap<>();
|
|
|
+ searchParams.put("payStatus", 20);
|
|
|
+ if (StringUtils.isNotBlank(payName)) {
|
|
|
+ searchParams.put("payName", payName);
|
|
|
+ }
|
|
|
searchParams.put("payBeginTime", startTime);
|
|
|
searchParams.put("payEndTime", endTime);
|
|
|
- if (StringUtils.isNotBlank(vehicleId)) {
|
|
|
+ /*if (StringUtils.isNotBlank(vehicleId)) {
|
|
|
searchParams.put("vehicleId", vehicleId);
|
|
|
- }
|
|
|
+ }*/
|
|
|
// searchParams.put("orderCompanyId", companyInfo.getId());
|
|
|
searchParams.put("vehicleInfoList", vehicleInfoList);
|
|
|
+ searchParams.put("shiftInfoList",shiftInfoList);
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("a.pay_time", "desc"));
|
|
@@ -817,7 +827,7 @@ public class MerchantApiController {
|
|
|
list.add(sellListDTO);
|
|
|
}
|
|
|
}
|
|
|
- Map<String, Object> pageMap = new HashMap<>();
|
|
|
+
|
|
|
pageMap.put("recordsTotal", page.getTotal());
|
|
|
pageMap.put("recordsFiltered", page.getTotal());
|
|
|
pageMap.put("totalPage", page.getPages());
|
|
@@ -825,6 +835,9 @@ public class MerchantApiController {
|
|
|
pageMap.put("pageSize", page.getPageSize());
|
|
|
pageMap.put("data", list);
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
messageResult.setData(pageMap);
|
|
|
messageResult.setResult(true);
|
|
|
messageResult.setCode(200);
|