parent
3f43215377
commit
037c019df6
29 changed files with 1720 additions and 125 deletions
@ -0,0 +1,131 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.energy.excel.BsEnergyMonitorExcel; |
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsEnergyMonitorVO; |
||||
import org.springblade.desk.energy.service.IBsEnergyMonitorService; |
||||
import org.springblade.desk.energy.wrapper.BsEnergyMonitorWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 能源监控表 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/bsEnergyMonitor") |
||||
@Tag(name = "能源监控表", description = "能源监控表接口") |
||||
public class BsEnergyMonitorController extends BladeController { |
||||
|
||||
private final IBsEnergyMonitorService bsEnergyMonitorService; |
||||
|
||||
/** |
||||
* 能源监控表 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@Operation(summary = "详情", description = "传入bsEnergyMonitor") |
||||
public R<BsEnergyMonitorVO> detail(BsEnergyMonitorEntity bsEnergyMonitor) { |
||||
BsEnergyMonitorEntity detail = bsEnergyMonitorService.getOne(Condition.getQueryWrapper(bsEnergyMonitor)); |
||||
return R.data(BsEnergyMonitorWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* 能源监控表 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@Operation(summary = "分页", description = "传入bsEnergyMonitor") |
||||
public R<IPage<BsEnergyMonitorVO>> page(BsEnergyMonitorVO bsEnergyMonitor, Query query) { |
||||
IPage<BsEnergyMonitorVO> pages = bsEnergyMonitorService.selectBsEnergyMonitorPage(Condition.getPage(query), bsEnergyMonitor); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 能源监控表 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@Operation(summary = "新增或修改", description = "传入bsEnergyMonitor") |
||||
public R submit(@Valid @RequestBody BsEnergyMonitorEntity bsEnergyMonitor) { |
||||
if (bsEnergyMonitor.getId() == null) { |
||||
// 新增需要校验
|
||||
BsEnergyMonitorEntity bsEnergyMonitorEntity = bsEnergyMonitorService.getOne(new QueryWrapper<BsEnergyMonitorEntity>().eq("month", bsEnergyMonitor.getMonth())); |
||||
if (bsEnergyMonitorEntity != null) { |
||||
return R.fail("该月份能源监控表已存在"); |
||||
} |
||||
} |
||||
bsEnergyMonitor.setLastWaterRate(bsEnergyMonitor.getLastWater().divide(bsEnergyMonitor.getLastWaterTarget(), 2)); |
||||
bsEnergyMonitor.setLastElectricRate(bsEnergyMonitor.getLastElectric().divide(bsEnergyMonitor.getLastElectricTarget(), 2)); |
||||
bsEnergyMonitor.setCurrentWaterRate(bsEnergyMonitor.getCurrentWater().divide(bsEnergyMonitor.getCurrentWaterTarget(), 2)); |
||||
bsEnergyMonitor.setCurrentElectricRate(bsEnergyMonitor.getCurrentElectric().divide(bsEnergyMonitor.getCurrentElectricTarget(), 2)); |
||||
return R.status(bsEnergyMonitorService.saveOrUpdate(bsEnergyMonitor)); |
||||
} |
||||
|
||||
/** |
||||
* 能源监控表 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(bsEnergyMonitorService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-bsEnergyMonitor") |
||||
@Operation(summary = "导出数据", description = "传入bsEnergyMonitor") |
||||
public void exportBsEnergyMonitor(@Parameter(hidden = true) @RequestParam Map<String, Object> bsEnergyMonitor, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<BsEnergyMonitorEntity> queryWrapper = Condition.getQueryWrapper(bsEnergyMonitor, BsEnergyMonitorEntity.class); |
||||
List<BsEnergyMonitorExcel> list = bsEnergyMonitorService.exportBsEnergyMonitor(queryWrapper); |
||||
ExcelUtil.export(response, "能源监控表数据" + DateUtil.time(), "能源监控表数据表", list, BsEnergyMonitorExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,130 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.energy.excel.BsPeakFlatValleyExcel; |
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsPeakFlatValleyVO; |
||||
import org.springblade.desk.energy.service.IBsPeakFlatValleyService; |
||||
import org.springblade.desk.energy.wrapper.BsPeakFlatValleyWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 峰平谷 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/bsPeakFlatValley") |
||||
@Tag(name = "峰平谷", description = "峰平谷接口") |
||||
public class BsPeakFlatValleyController extends BladeController { |
||||
|
||||
private final IBsPeakFlatValleyService bsPeakFlatValleyService; |
||||
|
||||
/** |
||||
* 峰平谷 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@Operation(summary = "详情", description = "传入bsPeakFlatValley") |
||||
public R<BsPeakFlatValleyVO> detail(BsPeakFlatValleyEntity bsPeakFlatValley) { |
||||
BsPeakFlatValleyEntity detail = bsPeakFlatValleyService.getOne(Condition.getQueryWrapper(bsPeakFlatValley)); |
||||
return R.data(BsPeakFlatValleyWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* 峰平谷 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@Operation(summary = "分页", description = "传入bsPeakFlatValley") |
||||
public R<IPage<BsPeakFlatValleyVO>> page(BsPeakFlatValleyVO bsPeakFlatValley, Query query) { |
||||
IPage<BsPeakFlatValleyVO> pages = bsPeakFlatValleyService.selectBsPeakFlatValleyPage(Condition.getPage(query), bsPeakFlatValley); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 峰平谷 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@Operation(summary = "新增或修改", description = "传入bsPeakFlatValley") |
||||
public R submit(@Valid @RequestBody BsPeakFlatValleyEntity bsPeakFlatValley) { |
||||
if (bsPeakFlatValley.getId() == null){ |
||||
// 新增校验是否存在
|
||||
BsPeakFlatValleyEntity bsPeakFlatValleyEntity = bsPeakFlatValleyService.getOne(new LambdaQueryWrapper<BsPeakFlatValleyEntity>() |
||||
.eq(BsPeakFlatValleyEntity::getMonth, bsPeakFlatValley.getMonth())); |
||||
if (bsPeakFlatValleyEntity != null) { |
||||
return R.fail("该月份峰平谷已存在"); |
||||
} |
||||
} |
||||
return R.status(bsPeakFlatValleyService.saveOrUpdate(bsPeakFlatValley)); |
||||
} |
||||
|
||||
/** |
||||
* 峰平谷 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(bsPeakFlatValleyService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-bsPeakFlatValley") |
||||
@ApiOperationSupport(order = 9) |
||||
@Operation(summary = "导出数据", description = "传入bsPeakFlatValley") |
||||
public void exportBsPeakFlatValley(@Parameter(hidden = true) @RequestParam Map<String, Object> bsPeakFlatValley, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<BsPeakFlatValleyEntity> queryWrapper = Condition.getQueryWrapper(bsPeakFlatValley, BsPeakFlatValleyEntity.class); |
||||
List<BsPeakFlatValleyExcel> list = bsPeakFlatValleyService.exportBsPeakFlatValley(queryWrapper); |
||||
ExcelUtil.export(response, "峰平谷数据" + DateUtil.time(), "峰平谷数据表", list, BsPeakFlatValleyExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,159 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.excel; |
||||
|
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import java.io.Serializable; |
||||
import java.io.Serial; |
||||
|
||||
|
||||
/** |
||||
* 能源监控表 Excel实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BsEnergyMonitorExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* ID |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("ID") |
||||
private Long id; |
||||
/** |
||||
* 月份 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("月份") |
||||
private Date month; |
||||
/** |
||||
* 上月用水 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用水") |
||||
private BigDecimal lastWater; |
||||
/** |
||||
* 上月用电 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用电") |
||||
private BigDecimal lastElectric; |
||||
/** |
||||
* 上月产能 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月产能") |
||||
private BigDecimal lastOutput; |
||||
/** |
||||
* 上月用水 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用水") |
||||
private BigDecimal currentWater; |
||||
/** |
||||
* 上月用电 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用电") |
||||
private BigDecimal currentElectric; |
||||
/** |
||||
* 上月产能 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月产能") |
||||
private BigDecimal currentOutput; |
||||
/** |
||||
* 上月用水目标 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用水目标") |
||||
private BigDecimal lastWaterTarget; |
||||
/** |
||||
* 上月用电目标 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用电目标") |
||||
private BigDecimal lastElectricTarget; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Long isDeleted; |
||||
/** |
||||
* 本月用水目标 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("本月用水目标") |
||||
private BigDecimal currentWaterTarget; |
||||
/** |
||||
* 本月用电目标 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("本月用电目标") |
||||
private BigDecimal currentElectricTarget; |
||||
/** |
||||
* 上月用水实际完成 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用水实际完成") |
||||
private BigDecimal lastWaterRate; |
||||
/** |
||||
* 上月用电实际完成 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上月用电实际完成") |
||||
private BigDecimal lastElectricRate; |
||||
/** |
||||
* 本月用水实际完成 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("本月用水实际完成") |
||||
private BigDecimal currentWaterRate; |
||||
/** |
||||
* 本月用电实际完成 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("本月用电实际完成") |
||||
private BigDecimal currentElectricRate; |
||||
|
||||
} |
||||
@ -0,0 +1,158 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.excel; |
||||
|
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import java.io.Serializable; |
||||
import java.io.Serial; |
||||
|
||||
|
||||
/** |
||||
* 峰平谷 Excel实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BsPeakFlatValleyExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* ID |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("ID") |
||||
private Long id; |
||||
/** |
||||
* 月份 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("月份") |
||||
private Date month; |
||||
/** |
||||
* 尖时一开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("尖时一开始时间") |
||||
private String sharpOneStartTime; |
||||
/** |
||||
* 尖时一结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("尖时一结束时间") |
||||
private String sharpOneEndTime; |
||||
/** |
||||
* 峰时一开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("峰时一开始时间") |
||||
private String peakOneStartTime; |
||||
/** |
||||
* 峰时一结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("峰时一结束时间") |
||||
private String peakOneEndTime; |
||||
/** |
||||
* 平时一开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("平时一开始时间") |
||||
private String flatOneStartTime; |
||||
/** |
||||
* 平时一结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("平时一结束时间") |
||||
private String flatOneEndTime; |
||||
/** |
||||
* 谷时一开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("谷时一开始时间") |
||||
private String valleyOneStartTime; |
||||
/** |
||||
* 谷时一结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("谷时一结束时间") |
||||
private String valleyOneEndTime; |
||||
/** |
||||
* 尖时二开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("尖时二开始时间") |
||||
private String sharpTwoStartTime; |
||||
/** |
||||
* 尖时二结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("尖时二结束时间") |
||||
private String sharpTwoEndTime; |
||||
/** |
||||
* 峰时二开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("峰时二开始时间") |
||||
private String peakTwoStartTime; |
||||
/** |
||||
* 峰时二结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("峰时二结束时间") |
||||
private String peakTwoEndTime; |
||||
/** |
||||
* 平时二开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("平时二开始时间") |
||||
private String flatTwoStartTime; |
||||
/** |
||||
* 平时二结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("平时二结束时间") |
||||
private String flatTwoEndTime; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Long isDeleted; |
||||
|
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.mapper; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsEnergyMonitorVO; |
||||
import org.springblade.desk.energy.excel.BsEnergyMonitorExcel; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 能源监控表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public interface BsEnergyMonitorMapper extends BaseMapper<BsEnergyMonitorEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param bsEnergyMonitor 查询参数 |
||||
* @return List<BsEnergyMonitorVO> |
||||
*/ |
||||
List<BsEnergyMonitorVO> selectBsEnergyMonitorPage(IPage page, BsEnergyMonitorVO bsEnergyMonitor); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<BsEnergyMonitorExcel> |
||||
*/ |
||||
List<BsEnergyMonitorExcel> exportBsEnergyMonitor(@Param("ew") Wrapper<BsEnergyMonitorEntity> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.mapper; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsPeakFlatValleyVO; |
||||
import org.springblade.desk.energy.excel.BsPeakFlatValleyExcel; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 峰平谷 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public interface BsPeakFlatValleyMapper extends BaseMapper<BsPeakFlatValleyEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param bsPeakFlatValley 查询参数 |
||||
* @return List<BsPeakFlatValleyVO> |
||||
*/ |
||||
List<BsPeakFlatValleyVO> selectBsPeakFlatValleyPage(IPage page, BsPeakFlatValleyVO bsPeakFlatValley); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<BsPeakFlatValleyExcel> |
||||
*/ |
||||
List<BsPeakFlatValleyExcel> exportBsPeakFlatValley(@Param("ew") Wrapper<BsPeakFlatValleyEntity> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,42 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.energy.mapper.BsEnergyMonitorMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="bsEnergyMonitorResultMap" type="org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="MONTH" property="month"/> |
||||
<result column="LAST_WATER" property="lastWater"/> |
||||
<result column="LAST_ELECTRIC" property="lastElectric"/> |
||||
<result column="LAST_OUTPUT" property="lastOutput"/> |
||||
<result column="CURRENT_WATER" property="currentWater"/> |
||||
<result column="CURRENT_ELECTRIC" property="currentElectric"/> |
||||
<result column="CURRENT_OUTPUT" property="currentOutput"/> |
||||
<result column="LAST_WATER_TARGET" property="lastWaterTarget"/> |
||||
<result column="LAST_ELECTRIC_TARGET" property="lastElectricTarget"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
<result column="CURRENT_WATER_TARGET" property="currentWaterTarget"/> |
||||
<result column="CURRENT_ELECTRIC_TARGET" property="currentElectricTarget"/> |
||||
<result column="LAST_WATER_RATE" property="lastWaterRate"/> |
||||
<result column="LAST_ELECTRIC_RATE" property="lastElectricRate"/> |
||||
<result column="CURRENT_WATER_RATE" property="currentWaterRate"/> |
||||
<result column="CURRENT_ELECTRIC_RATE" property="currentElectricRate"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectBsEnergyMonitorPage" resultMap="bsEnergyMonitorResultMap"> |
||||
select * from BS_ENERGY_MONITOR where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportBsEnergyMonitor" resultType="org.springblade.desk.energy.excel.BsEnergyMonitorExcel"> |
||||
SELECT * FROM BS_ENERGY_MONITOR ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,42 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.energy.mapper.BsPeakFlatValleyMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="bsPeakFlatValleyResultMap" type="org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="MONTH" property="month"/> |
||||
<result column="SHARP_ONE_START_TIME" property="sharpOneStartTime"/> |
||||
<result column="SHARP_ONE_END_TIME" property="sharpOneEndTime"/> |
||||
<result column="PEAK_ONE_START_TIME" property="peakOneStartTime"/> |
||||
<result column="PEAK_ONE_END_TIME" property="peakOneEndTime"/> |
||||
<result column="FLAT_ONE_START_TIME" property="flatOneStartTime"/> |
||||
<result column="FLAT_ONE_END_TIME" property="flatOneEndTime"/> |
||||
<result column="VALLEY_ONE_START_TIME" property="valleyOneStartTime"/> |
||||
<result column="VALLEY_ONE_END_TIME" property="valleyOneEndTime"/> |
||||
<result column="SHARP_TWO_START_TIME" property="sharpTwoStartTime"/> |
||||
<result column="SHARP_TWO_END_TIME" property="sharpTwoEndTime"/> |
||||
<result column="PEAK_TWO_START_TIME" property="peakTwoStartTime"/> |
||||
<result column="PEAK_TWO_END_TIME" property="peakTwoEndTime"/> |
||||
<result column="FLAT_TWO_START_TIME" property="flatTwoStartTime"/> |
||||
<result column="FLAT_TWO_END_TIME" property="flatTwoEndTime"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectBsPeakFlatValleyPage" resultMap="bsPeakFlatValleyResultMap"> |
||||
select * from BS_PEAK_FLAT_VALLEY where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportBsPeakFlatValley" resultType="org.springblade.desk.energy.excel.BsPeakFlatValleyExcel"> |
||||
SELECT * FROM BS_PEAK_FLAT_VALLEY ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.dto; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 能源监控表 数据传输对象实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsEnergyMonitorDTO extends BsEnergyMonitorEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.dto; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 峰平谷 数据传输对象实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsPeakFlatValleyDTO extends BsPeakFlatValleyEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,128 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.entity; |
||||
|
||||
import lombok.Data; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 能源监控表 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@TableName("BS_ENERGY_MONITOR") |
||||
@Schema(description = "BsEnergyMonitor对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsEnergyMonitorEntity extends TenantEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 月份 |
||||
*/ |
||||
@Schema(description = "月份") |
||||
private Date month; |
||||
/** |
||||
* 上月用水 |
||||
*/ |
||||
@Schema(description = "上月用水") |
||||
private BigDecimal lastWater; |
||||
/** |
||||
* 上月用电 |
||||
*/ |
||||
@Schema(description = "上月用电") |
||||
private BigDecimal lastElectric; |
||||
/** |
||||
* 上月产能 |
||||
*/ |
||||
@Schema(description = "上月产能") |
||||
private BigDecimal lastOutput; |
||||
/** |
||||
* 上月用水 |
||||
*/ |
||||
@Schema(description = "上月用水") |
||||
private BigDecimal currentWater; |
||||
/** |
||||
* 上月用电 |
||||
*/ |
||||
@Schema(description = "上月用电") |
||||
private BigDecimal currentElectric; |
||||
/** |
||||
* 上月产能 |
||||
*/ |
||||
@Schema(description = "上月产能") |
||||
private BigDecimal currentOutput; |
||||
/** |
||||
* 上月用水目标 |
||||
*/ |
||||
@Schema(description = "上月用水目标") |
||||
private BigDecimal lastWaterTarget; |
||||
/** |
||||
* 上月用电目标 |
||||
*/ |
||||
@Schema(description = "上月用电目标") |
||||
private BigDecimal lastElectricTarget; |
||||
/** |
||||
* 本月用水目标 |
||||
*/ |
||||
@Schema(description = "本月用水目标") |
||||
private BigDecimal currentWaterTarget; |
||||
/** |
||||
* 本月用电目标 |
||||
*/ |
||||
@Schema(description = "本月用电目标") |
||||
private BigDecimal currentElectricTarget; |
||||
/** |
||||
* 上月用水实际完成 |
||||
*/ |
||||
@Schema(description = "上月用水实际完成") |
||||
private BigDecimal lastWaterRate; |
||||
/** |
||||
* 上月用电实际完成 |
||||
*/ |
||||
@Schema(description = "上月用电实际完成") |
||||
private BigDecimal lastElectricRate; |
||||
/** |
||||
* 本月用水实际完成 |
||||
*/ |
||||
@Schema(description = "本月用水实际完成") |
||||
private BigDecimal currentWaterRate; |
||||
/** |
||||
* 本月用电实际完成 |
||||
*/ |
||||
@Schema(description = "本月用电实际完成") |
||||
private BigDecimal currentElectricRate; |
||||
|
||||
} |
||||
@ -0,0 +1,137 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.entity; |
||||
|
||||
import lombok.Data; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import java.util.Date; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 峰平谷 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@TableName("BS_PEAK_FLAT_VALLEY") |
||||
@Schema(description = "BsPeakFlatValley对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsPeakFlatValleyEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 月份 |
||||
*/ |
||||
@Schema(description = "月份") |
||||
private Date month; |
||||
/** |
||||
* 尖时一开始时间 |
||||
*/ |
||||
@Schema(description = "尖时一开始时间") |
||||
private String sharpOneStartTime; |
||||
/** |
||||
* 尖时一结束时间 |
||||
*/ |
||||
@Schema(description = "尖时一结束时间") |
||||
private String sharpOneEndTime; |
||||
/** |
||||
* 峰时一开始时间 |
||||
*/ |
||||
@Schema(description = "峰时一开始时间") |
||||
private String peakOneStartTime; |
||||
/** |
||||
* 峰时一结束时间 |
||||
*/ |
||||
@Schema(description = "峰时一结束时间") |
||||
private String peakOneEndTime; |
||||
/** |
||||
* 平时一开始时间 |
||||
*/ |
||||
@Schema(description = "平时一开始时间") |
||||
private String flatOneStartTime; |
||||
/** |
||||
* 平时一结束时间 |
||||
*/ |
||||
@Schema(description = "平时一结束时间") |
||||
private String flatOneEndTime; |
||||
/** |
||||
* 谷时一开始时间 |
||||
*/ |
||||
@Schema(description = "谷时一开始时间") |
||||
private String valleyOneStartTime; |
||||
/** |
||||
* 谷时一结束时间 |
||||
*/ |
||||
@Schema(description = "谷时一结束时间") |
||||
private String valleyOneEndTime; |
||||
/** |
||||
* 尖时二开始时间 |
||||
*/ |
||||
@Schema(description = "尖时二开始时间") |
||||
private String sharpTwoStartTime; |
||||
/** |
||||
* 尖时二结束时间 |
||||
*/ |
||||
@Schema(description = "尖时二结束时间") |
||||
private String sharpTwoEndTime; |
||||
/** |
||||
* 峰时二开始时间 |
||||
*/ |
||||
@Schema(description = "峰时二开始时间") |
||||
private String peakTwoStartTime; |
||||
/** |
||||
* 峰时二结束时间 |
||||
*/ |
||||
@Schema(description = "峰时二结束时间") |
||||
private String peakTwoEndTime; |
||||
/** |
||||
* 平时二开始时间 |
||||
*/ |
||||
@Schema(description = "平时二开始时间") |
||||
private String flatTwoStartTime; |
||||
/** |
||||
* 平时二结束时间 |
||||
*/ |
||||
@Schema(description = "平时二结束时间") |
||||
private String flatTwoEndTime; |
||||
/** |
||||
* 谷时二开始时间 |
||||
*/ |
||||
@Schema(description = "谷时二开始时间") |
||||
private String valleyTwoStartTime; |
||||
/** |
||||
* 谷时二结束时间 |
||||
*/ |
||||
@Schema(description = "谷时二结束时间") |
||||
private String valleyTwoEndTime; |
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.vo; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 能源监控表 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsEnergyMonitorVO extends BsEnergyMonitorEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.pojo.vo; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 峰平谷 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsPeakFlatValleyVO extends BsPeakFlatValleyEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,61 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsEnergyMonitorVO; |
||||
import org.springblade.desk.energy.excel.BsEnergyMonitorExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 能源监控表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public interface IBsEnergyMonitorService extends BaseService<BsEnergyMonitorEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param bsEnergyMonitor 查询参数 |
||||
* @return IPage<BsEnergyMonitorVO> |
||||
*/ |
||||
IPage<BsEnergyMonitorVO> selectBsEnergyMonitorPage(IPage<BsEnergyMonitorVO> page, BsEnergyMonitorVO bsEnergyMonitor); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<BsEnergyMonitorExcel> |
||||
*/ |
||||
List<BsEnergyMonitorExcel> exportBsEnergyMonitor(Wrapper<BsEnergyMonitorEntity> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,61 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsPeakFlatValleyVO; |
||||
import org.springblade.desk.energy.excel.BsPeakFlatValleyExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 峰平谷 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public interface IBsPeakFlatValleyService extends BaseService<BsPeakFlatValleyEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param bsPeakFlatValley 查询参数 |
||||
* @return IPage<BsPeakFlatValleyVO> |
||||
*/ |
||||
IPage<BsPeakFlatValleyVO> selectBsPeakFlatValleyPage(IPage<BsPeakFlatValleyVO> page, BsPeakFlatValleyVO bsPeakFlatValley); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<BsPeakFlatValleyExcel> |
||||
*/ |
||||
List<BsPeakFlatValleyExcel> exportBsPeakFlatValley(Wrapper<BsPeakFlatValleyEntity> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.service.impl; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsEnergyMonitorVO; |
||||
import org.springblade.desk.energy.excel.BsEnergyMonitorExcel; |
||||
import org.springblade.desk.energy.mapper.BsEnergyMonitorMapper; |
||||
import org.springblade.desk.energy.service.IBsEnergyMonitorService; |
||||
import org.springframework.stereotype.Service; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 能源监控表 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Service |
||||
public class BsEnergyMonitorServiceImpl extends BaseServiceImpl<BsEnergyMonitorMapper, BsEnergyMonitorEntity> implements IBsEnergyMonitorService { |
||||
|
||||
@Override |
||||
public IPage<BsEnergyMonitorVO> selectBsEnergyMonitorPage(IPage<BsEnergyMonitorVO> page, BsEnergyMonitorVO bsEnergyMonitor) { |
||||
return page.setRecords(baseMapper.selectBsEnergyMonitorPage(page, bsEnergyMonitor)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<BsEnergyMonitorExcel> exportBsEnergyMonitor(Wrapper<BsEnergyMonitorEntity> queryWrapper) { |
||||
List<BsEnergyMonitorExcel> bsEnergyMonitorList = baseMapper.exportBsEnergyMonitor(queryWrapper); |
||||
//bsEnergyMonitorList.forEach(bsEnergyMonitor -> {
|
||||
// bsEnergyMonitor.setTypeName(DictCache.getValue(DictEnum.YES_NO, BsEnergyMonitor.getType()));
|
||||
//});
|
||||
return bsEnergyMonitorList; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.service.impl; |
||||
|
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsPeakFlatValleyVO; |
||||
import org.springblade.desk.energy.excel.BsPeakFlatValleyExcel; |
||||
import org.springblade.desk.energy.mapper.BsPeakFlatValleyMapper; |
||||
import org.springblade.desk.energy.service.IBsPeakFlatValleyService; |
||||
import org.springframework.stereotype.Service; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 峰平谷 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@Service |
||||
public class BsPeakFlatValleyServiceImpl extends BaseServiceImpl<BsPeakFlatValleyMapper, BsPeakFlatValleyEntity> implements IBsPeakFlatValleyService { |
||||
|
||||
@Override |
||||
public IPage<BsPeakFlatValleyVO> selectBsPeakFlatValleyPage(IPage<BsPeakFlatValleyVO> page, BsPeakFlatValleyVO bsPeakFlatValley) { |
||||
return page.setRecords(baseMapper.selectBsPeakFlatValleyPage(page, bsPeakFlatValley)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<BsPeakFlatValleyExcel> exportBsPeakFlatValley(Wrapper<BsPeakFlatValleyEntity> queryWrapper) { |
||||
List<BsPeakFlatValleyExcel> bsPeakFlatValleyList = baseMapper.exportBsPeakFlatValley(queryWrapper); |
||||
//bsPeakFlatValleyList.forEach(bsPeakFlatValley -> {
|
||||
// bsPeakFlatValley.setTypeName(DictCache.getValue(DictEnum.YES_NO, BsPeakFlatValley.getType()));
|
||||
//});
|
||||
return bsPeakFlatValleyList; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,59 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.wrapper; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.energy.pojo.entity.BsEnergyMonitorEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsEnergyMonitorVO; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 能源监控表 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public class BsEnergyMonitorWrapper extends BaseEntityWrapper<BsEnergyMonitorEntity, BsEnergyMonitorVO> { |
||||
|
||||
public static BsEnergyMonitorWrapper build() { |
||||
return new BsEnergyMonitorWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public BsEnergyMonitorVO entityVO(BsEnergyMonitorEntity bsEnergyMonitor) { |
||||
BsEnergyMonitorVO bsEnergyMonitorVO = Objects.requireNonNull(BeanUtil.copyProperties(bsEnergyMonitor, BsEnergyMonitorVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(bsEnergyMonitor.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(bsEnergyMonitor.getUpdateUser());
|
||||
//bsEnergyMonitorVO.setCreateUserName(createUser.getName());
|
||||
//bsEnergyMonitorVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return bsEnergyMonitorVO; |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,59 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.energy.wrapper; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.energy.pojo.entity.BsPeakFlatValleyEntity; |
||||
import org.springblade.desk.energy.pojo.vo.BsPeakFlatValleyVO; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 峰平谷 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
public class BsPeakFlatValleyWrapper extends BaseEntityWrapper<BsPeakFlatValleyEntity, BsPeakFlatValleyVO> { |
||||
|
||||
public static BsPeakFlatValleyWrapper build() { |
||||
return new BsPeakFlatValleyWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public BsPeakFlatValleyVO entityVO(BsPeakFlatValleyEntity bsPeakFlatValley) { |
||||
BsPeakFlatValleyVO bsPeakFlatValleyVO = Objects.requireNonNull(BeanUtil.copyProperties(bsPeakFlatValley, BsPeakFlatValleyVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(bsPeakFlatValley.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(bsPeakFlatValley.getUpdateUser());
|
||||
//bsPeakFlatValleyVO.setCreateUserName(createUser.getName());
|
||||
//bsPeakFlatValleyVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return bsPeakFlatValleyVO; |
||||
} |
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue