This commit is contained in:
磷叶 2024-11-28 13:45:58 +08:00
parent 0a14baad16
commit d74938ad92
4 changed files with 37 additions and 2 deletions

View File

@ -87,4 +87,10 @@ public enum TransactionBillStatus {
return asList(SUCCESS, REFUNDED, REFUNDING, WITHDRAW_SUCCESS);
}
/**
* 产生收入的状态
*/
public static List<String> income() {
return asList(SUCCESS, REFUNDING, REFUNDED);
}
}

View File

@ -4,6 +4,8 @@ import com.ruoyi.common.utils.collection.CollectionUtils;
import com.ruoyi.iot.domain.IotDeviceInfo;
import com.ruoyi.iot.service.IotService;
import com.ruoyi.ss.device.domain.enums.DeviceOnlineStatus;
import com.ruoyi.ss.suit.domain.enums.SuitFeeMode;
import com.ruoyi.ss.suit.domain.enums.SuitFeeType;
import com.ruoyi.ss.transactionBill.domain.TransactionBillQuery;
import com.ruoyi.ss.transactionBill.domain.bo.EndUseBO;
import com.ruoyi.ss.transactionBill.domain.dto.EndUseDTO;
@ -46,13 +48,14 @@ public class BillLowPowerTask {
int cd = sysConfigService.getInt(ConfigKey.ORDER_AUTO_CLOSE_CD);
LocalDateTime createTimeEnd = LocalDateTime.now().minusMinutes(cd); // 获取冷却时间之前的时间
// 获取开启了低功率关闭且未结束的订单
// 获取开启了低功率关闭且未结束的电量订单
TransactionBillQuery query = new TransactionBillQuery();
query.setSuitEnableLowPowerClose(true);
query.setType(TransactionBillType.RECHARGE.getType());
query.setStatusList(TransactionBillStatus.canClose());
query.setCreateTimeEnd(createTimeEnd);
query.setIsFinished(false);
query.setSuitFeeTypes(SuitFeeType.rechargeCountList());
List<TransactionBillVO> list = transactionBillService.selectSmTransactionBillList(query);
// 从OneNet获取设备信息

View File

@ -0,0 +1,26 @@
package com.ruoyi.web.controller.app;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.dashboard.service.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author wjh
* 2024/11/28
*/
@RestController
@RequestMapping("/app/dashboard")
public class AppDashboardController extends BaseController {
@Autowired
private DashboardService dashboardService;
// @ApiOperation("按日查询分成列表")
// @GetMapping("/bonusSumOfDaily")
// public AjaxResult bonusDaily() {
// return success(dashboardService.selectBonusDaily());
// }
}

View File

@ -175,7 +175,7 @@ public class AppTransactionBillController extends BaseController
// FIXME 需要统计退款的订单并且需要过滤掉退款的金额
dto.setMchId(getUserId());
dto.setStatus(TransactionBillStatus.SUCCESS.getStatus());
dto.setStatusList(TransactionBillStatus.income());
AjaxResult ajax = AjaxResult.success(transactionBillService.selectLandlordCount(dto));
// 总收入