Compare commits
No commits in common. '3c3342a28683f077ece816d2c23a29d0204471ec' and '183502d39f2217ec1774ae135a5cf7e800d229df' have entirely different histories.
3c3342a286
...
183502d39f
20 changed files with 0 additions and 1459 deletions
@ -1,161 +0,0 @@ |
|||||||
/** |
|
||||||
* 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 io.swagger.v3.oas.annotations.tags.Tag; |
|
||||||
import io.swagger.v3.oas.annotations.Operation; |
|
||||||
import io.swagger.v3.oas.annotations.Parameter; |
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
||||||
import lombok.AllArgsConstructor; |
|
||||||
import jakarta.validation.Valid; |
|
||||||
|
|
||||||
import org.springblade.core.secure.BladeUser; |
|
||||||
import org.springblade.core.secure.annotation.IsAdmin; |
|
||||||
import org.springblade.core.mp.support.Condition; |
|
||||||
import org.springblade.core.mp.support.Query; |
|
||||||
import org.springblade.core.tool.api.R; |
|
||||||
import org.springblade.core.tool.utils.Func; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import org.springblade.desk.energy.pojo.entity.BsEnergyQuotaEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyQuotaVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyQuotaExcel; |
|
||||||
import org.springblade.desk.energy.wrapper.BsEnergyQuotaWrapper; |
|
||||||
import org.springblade.desk.energy.service.IBsEnergyQuotaService; |
|
||||||
import org.springblade.core.boot.ctrl.BladeController; |
|
||||||
import org.springblade.core.tool.utils.DateUtil; |
|
||||||
import org.springblade.core.excel.util.ExcelUtil; |
|
||||||
import org.springblade.core.tool.constant.BladeConstant; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.List; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 控制器 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@AllArgsConstructor |
|
||||||
@RequestMapping("/bsEnergyQuota") |
|
||||||
@Tag(name = "能源定额", description = "能源定额接口") |
|
||||||
public class BsEnergyQuotaController extends BladeController { |
|
||||||
|
|
||||||
private final IBsEnergyQuotaService bsEnergyQuotaService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 详情 |
|
||||||
*/ |
|
||||||
@GetMapping("/detail") |
|
||||||
@ApiOperationSupport(order = 1) |
|
||||||
@Operation(summary = "详情", description = "传入bsEnergyQuota") |
|
||||||
public R<BsEnergyQuotaVO> detail(BsEnergyQuotaEntity bsEnergyQuota) { |
|
||||||
BsEnergyQuotaEntity detail = bsEnergyQuotaService.getOne(Condition.getQueryWrapper(bsEnergyQuota)); |
|
||||||
return R.data(BsEnergyQuotaWrapper.build().entityVO(detail)); |
|
||||||
} |
|
||||||
/** |
|
||||||
* 能源定额 分页 |
|
||||||
*/ |
|
||||||
@GetMapping("/list") |
|
||||||
@ApiOperationSupport(order = 2) |
|
||||||
@Operation(summary = "分页", description = "传入bsEnergyQuota") |
|
||||||
public R<IPage<BsEnergyQuotaVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> bsEnergyQuota, Query query) { |
|
||||||
IPage<BsEnergyQuotaEntity> pages = bsEnergyQuotaService.page(Condition.getPage(query), Condition.getQueryWrapper(bsEnergyQuota, BsEnergyQuotaEntity.class)); |
|
||||||
return R.data(BsEnergyQuotaWrapper.build().pageVO(pages)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 自定义分页 |
|
||||||
*/ |
|
||||||
@GetMapping("/page") |
|
||||||
@ApiOperationSupport(order = 3) |
|
||||||
@Operation(summary = "分页", description = "传入bsEnergyQuota") |
|
||||||
public R<IPage<BsEnergyQuotaVO>> page(BsEnergyQuotaVO bsEnergyQuota, Query query) { |
|
||||||
IPage<BsEnergyQuotaVO> pages = bsEnergyQuotaService.selectBsEnergyQuotaPage(Condition.getPage(query), bsEnergyQuota); |
|
||||||
return R.data(pages); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 新增 |
|
||||||
*/ |
|
||||||
@PostMapping("/save") |
|
||||||
@ApiOperationSupport(order = 4) |
|
||||||
@Operation(summary = "新增", description = "传入bsEnergyQuota") |
|
||||||
public R save(@Valid @RequestBody BsEnergyQuotaEntity bsEnergyQuota) { |
|
||||||
return R.status(bsEnergyQuotaService.save(bsEnergyQuota)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 修改 |
|
||||||
*/ |
|
||||||
@PostMapping("/update") |
|
||||||
@ApiOperationSupport(order = 5) |
|
||||||
@Operation(summary = "修改", description = "传入bsEnergyQuota") |
|
||||||
public R update(@Valid @RequestBody BsEnergyQuotaEntity bsEnergyQuota) { |
|
||||||
return R.status(bsEnergyQuotaService.updateById(bsEnergyQuota)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 新增或修改 |
|
||||||
*/ |
|
||||||
@PostMapping("/submit") |
|
||||||
@ApiOperationSupport(order = 6) |
|
||||||
@Operation(summary = "新增或修改", description = "传入bsEnergyQuota") |
|
||||||
public R submit(@Valid @RequestBody BsEnergyQuotaEntity bsEnergyQuota) { |
|
||||||
return R.status(bsEnergyQuotaService.saveOrUpdate(bsEnergyQuota)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 删除 |
|
||||||
*/ |
|
||||||
@PostMapping("/remove") |
|
||||||
@ApiOperationSupport(order = 7) |
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids") |
|
||||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
|
||||||
return R.status(bsEnergyQuotaService.deleteLogic(Func.toLongList(ids))); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 导出数据 |
|
||||||
*/ |
|
||||||
@IsAdmin |
|
||||||
@GetMapping("/export-bsEnergyQuota") |
|
||||||
@ApiOperationSupport(order = 9) |
|
||||||
@Operation(summary = "导出数据", description = "传入bsEnergyQuota") |
|
||||||
public void exportBsEnergyQuota(@Parameter(hidden = true) @RequestParam Map<String, Object> bsEnergyQuota, BladeUser bladeUser, HttpServletResponse response) { |
|
||||||
QueryWrapper<BsEnergyQuotaEntity> queryWrapper = Condition.getQueryWrapper(bsEnergyQuota, BsEnergyQuotaEntity.class); |
|
||||||
//if (!AuthUtil.isAdministrator()) {
|
|
||||||
// queryWrapper.lambda().eq(BsEnergyQuota::getTenantId, bladeUser.getTenantId());
|
|
||||||
//}
|
|
||||||
//queryWrapper.lambda().eq(BsEnergyQuotaEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
|
||||||
List<BsEnergyQuotaExcel> list = bsEnergyQuotaService.exportBsEnergyQuota(queryWrapper); |
|
||||||
ExcelUtil.export(response, "能源定额数据" + DateUtil.time(), "能源定额数据表", list, BsEnergyQuotaExcel.class); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,161 +0,0 @@ |
|||||||
/** |
|
||||||
* 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 io.swagger.v3.oas.annotations.tags.Tag; |
|
||||||
import io.swagger.v3.oas.annotations.Operation; |
|
||||||
import io.swagger.v3.oas.annotations.Parameter; |
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
||||||
import lombok.AllArgsConstructor; |
|
||||||
import jakarta.validation.Valid; |
|
||||||
|
|
||||||
import org.springblade.core.secure.BladeUser; |
|
||||||
import org.springblade.core.secure.annotation.IsAdmin; |
|
||||||
import org.springblade.core.mp.support.Condition; |
|
||||||
import org.springblade.core.mp.support.Query; |
|
||||||
import org.springblade.core.tool.api.R; |
|
||||||
import org.springblade.core.tool.utils.Func; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import org.springblade.desk.energy.pojo.entity.BsEnergyTargetEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyTargetVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyTargetExcel; |
|
||||||
import org.springblade.desk.energy.wrapper.BsEnergyTargetWrapper; |
|
||||||
import org.springblade.desk.energy.service.IBsEnergyTargetService; |
|
||||||
import org.springblade.core.boot.ctrl.BladeController; |
|
||||||
import org.springblade.core.tool.utils.DateUtil; |
|
||||||
import org.springblade.core.excel.util.ExcelUtil; |
|
||||||
import org.springblade.core.tool.constant.BladeConstant; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.List; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 控制器 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@AllArgsConstructor |
|
||||||
@RequestMapping("/bsEnergyTarget") |
|
||||||
@Tag(name = "能耗目标表", description = "能耗目标表接口") |
|
||||||
public class BsEnergyTargetController extends BladeController { |
|
||||||
|
|
||||||
private final IBsEnergyTargetService bsEnergyTargetService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 详情 |
|
||||||
*/ |
|
||||||
@GetMapping("/detail") |
|
||||||
@ApiOperationSupport(order = 1) |
|
||||||
@Operation(summary = "详情", description = "传入bsEnergyTarget") |
|
||||||
public R<BsEnergyTargetVO> detail(BsEnergyTargetEntity bsEnergyTarget) { |
|
||||||
BsEnergyTargetEntity detail = bsEnergyTargetService.getOne(Condition.getQueryWrapper(bsEnergyTarget)); |
|
||||||
return R.data(BsEnergyTargetWrapper.build().entityVO(detail)); |
|
||||||
} |
|
||||||
/** |
|
||||||
* 能耗目标表 分页 |
|
||||||
*/ |
|
||||||
@GetMapping("/list") |
|
||||||
@ApiOperationSupport(order = 2) |
|
||||||
@Operation(summary = "分页", description = "传入bsEnergyTarget") |
|
||||||
public R<IPage<BsEnergyTargetVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> bsEnergyTarget, Query query) { |
|
||||||
IPage<BsEnergyTargetEntity> pages = bsEnergyTargetService.page(Condition.getPage(query), Condition.getQueryWrapper(bsEnergyTarget, BsEnergyTargetEntity.class)); |
|
||||||
return R.data(BsEnergyTargetWrapper.build().pageVO(pages)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 自定义分页 |
|
||||||
*/ |
|
||||||
@GetMapping("/page") |
|
||||||
@ApiOperationSupport(order = 3) |
|
||||||
@Operation(summary = "分页", description = "传入bsEnergyTarget") |
|
||||||
public R<IPage<BsEnergyTargetVO>> page(BsEnergyTargetVO bsEnergyTarget, Query query) { |
|
||||||
IPage<BsEnergyTargetVO> pages = bsEnergyTargetService.selectBsEnergyTargetPage(Condition.getPage(query), bsEnergyTarget); |
|
||||||
return R.data(pages); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 新增 |
|
||||||
*/ |
|
||||||
@PostMapping("/save") |
|
||||||
@ApiOperationSupport(order = 4) |
|
||||||
@Operation(summary = "新增", description = "传入bsEnergyTarget") |
|
||||||
public R save(@Valid @RequestBody BsEnergyTargetEntity bsEnergyTarget) { |
|
||||||
return R.status(bsEnergyTargetService.save(bsEnergyTarget)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 修改 |
|
||||||
*/ |
|
||||||
@PostMapping("/update") |
|
||||||
@ApiOperationSupport(order = 5) |
|
||||||
@Operation(summary = "修改", description = "传入bsEnergyTarget") |
|
||||||
public R update(@Valid @RequestBody BsEnergyTargetEntity bsEnergyTarget) { |
|
||||||
return R.status(bsEnergyTargetService.updateById(bsEnergyTarget)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 新增或修改 |
|
||||||
*/ |
|
||||||
@PostMapping("/submit") |
|
||||||
@ApiOperationSupport(order = 6) |
|
||||||
@Operation(summary = "新增或修改", description = "传入bsEnergyTarget") |
|
||||||
public R submit(@Valid @RequestBody BsEnergyTargetEntity bsEnergyTarget) { |
|
||||||
return R.status(bsEnergyTargetService.saveOrUpdate(bsEnergyTarget)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 删除 |
|
||||||
*/ |
|
||||||
@PostMapping("/remove") |
|
||||||
@ApiOperationSupport(order = 7) |
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids") |
|
||||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
|
||||||
return R.status(bsEnergyTargetService.deleteLogic(Func.toLongList(ids))); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 导出数据 |
|
||||||
*/ |
|
||||||
@IsAdmin |
|
||||||
@GetMapping("/export-bsEnergyTarget") |
|
||||||
@ApiOperationSupport(order = 9) |
|
||||||
@Operation(summary = "导出数据", description = "传入bsEnergyTarget") |
|
||||||
public void exportBsEnergyTarget(@Parameter(hidden = true) @RequestParam Map<String, Object> bsEnergyTarget, BladeUser bladeUser, HttpServletResponse response) { |
|
||||||
QueryWrapper<BsEnergyTargetEntity> queryWrapper = Condition.getQueryWrapper(bsEnergyTarget, BsEnergyTargetEntity.class); |
|
||||||
//if (!AuthUtil.isAdministrator()) {
|
|
||||||
// queryWrapper.lambda().eq(BsEnergyTarget::getTenantId, bladeUser.getTenantId());
|
|
||||||
//}
|
|
||||||
//queryWrapper.lambda().eq(BsEnergyTargetEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
|
||||||
List<BsEnergyTargetExcel> list = bsEnergyTargetService.exportBsEnergyTarget(queryWrapper); |
|
||||||
ExcelUtil.export(response, "能耗目标表数据" + DateUtil.time(), "能耗目标表数据表", list, BsEnergyTargetExcel.class); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,116 +0,0 @@ |
|||||||
/** |
|
||||||
* 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-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@ColumnWidth(25) |
|
||||||
@HeadRowHeight(20) |
|
||||||
@ContentRowHeight(18) |
|
||||||
public class BsEnergyQuotaExcel implements Serializable { |
|
||||||
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* ID |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("ID") |
|
||||||
private Long id; |
|
||||||
/** |
|
||||||
* 类型 1-用水 2-用电 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("类型 1-用水 2-用电") |
|
||||||
private String type; |
|
||||||
/** |
|
||||||
* 作业中心ID |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("作业中心ID") |
|
||||||
private Long workCenterId; |
|
||||||
/** |
|
||||||
* 设备ID |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("设备ID") |
|
||||||
private Long equipmentId; |
|
||||||
/** |
|
||||||
* 月份 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("月份") |
|
||||||
private String month; |
|
||||||
/** |
|
||||||
* 日期 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("日期") |
|
||||||
private String date; |
|
||||||
/** |
|
||||||
* 自来水用水量 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("自来水用水量") |
|
||||||
private Long tapWaterNum; |
|
||||||
/** |
|
||||||
* 纯水用水量 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("纯水用水量") |
|
||||||
private Long pureWaterNum; |
|
||||||
/** |
|
||||||
* 用电量 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("用电量") |
|
||||||
private Long electricNum; |
|
||||||
/** |
|
||||||
* 是否已删除 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("是否已删除") |
|
||||||
private Long isDeleted; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,93 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.math.BigDecimal; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@ColumnWidth(25) |
|
||||||
@HeadRowHeight(20) |
|
||||||
@ContentRowHeight(18) |
|
||||||
public class BsEnergyTargetExcel implements Serializable { |
|
||||||
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* ID |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("ID") |
|
||||||
private Long id; |
|
||||||
/** |
|
||||||
* 类型 1-用水 2-用电 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("类型 1-用水 2-用电") |
|
||||||
private String type; |
|
||||||
/** |
|
||||||
* 月份 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("月份") |
|
||||||
private String month; |
|
||||||
/** |
|
||||||
* 日期 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("日期") |
|
||||||
private String date; |
|
||||||
/** |
|
||||||
* 目标 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("目标") |
|
||||||
private Long target; |
|
||||||
/** |
|
||||||
* 是否已删除 |
|
||||||
*/ |
|
||||||
@ColumnWidth(20) |
|
||||||
@ExcelProperty("是否已删除") |
|
||||||
private Long isDeleted; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyQuotaEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyQuotaVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyQuotaExcel; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
public interface BsEnergyQuotaMapper extends BaseMapper<BsEnergyQuotaEntity> { |
|
||||||
|
|
||||||
/** |
|
||||||
* 自定义分页 |
|
||||||
* |
|
||||||
* @param page 分页参数 |
|
||||||
* @param bsEnergyQuota 查询参数 |
|
||||||
* @return List<BsEnergyQuotaVO> |
|
||||||
*/ |
|
||||||
List<BsEnergyQuotaVO> selectBsEnergyQuotaPage(IPage page, BsEnergyQuotaVO bsEnergyQuota); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 获取导出数据 |
|
||||||
* |
|
||||||
* @param queryWrapper 查询条件 |
|
||||||
* @return List<BsEnergyQuotaExcel> |
|
||||||
*/ |
|
||||||
List<BsEnergyQuotaExcel> exportBsEnergyQuota(@Param("ew") Wrapper<BsEnergyQuotaEntity> queryWrapper); |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,35 +0,0 @@ |
|||||||
<?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.BsEnergyQuotaMapper"> |
|
||||||
|
|
||||||
<!-- 通用查询映射结果 --> |
|
||||||
<resultMap id="bsEnergyQuotaResultMap" type="org.springblade.desk.energy.pojo.entity.BsEnergyQuotaEntity"> |
|
||||||
<result column="ID" property="id"/> |
|
||||||
<result column="TYPE" property="type"/> |
|
||||||
<result column="WORK_CENTER_ID" property="workCenterId"/> |
|
||||||
<result column="EQUIPMENT_ID" property="equipmentId"/> |
|
||||||
<result column="MONTH" property="month"/> |
|
||||||
<result column="DATE" property="date"/> |
|
||||||
<result column="TAP_WATER_NUM" property="tapWaterNum"/> |
|
||||||
<result column="PURE_WATER_NUM" property="pureWaterNum"/> |
|
||||||
<result column="ELECTRIC_NUM" property="electricNum"/> |
|
||||||
<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="selectBsEnergyQuotaPage" resultMap="bsEnergyQuotaResultMap"> |
|
||||||
select * from BS_ENERGY_QUOTA where is_deleted = 0 |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
<select id="exportBsEnergyQuota" resultType="org.springblade.desk.energy.excel.BsEnergyQuotaExcel"> |
|
||||||
SELECT * FROM BS_ENERGY_QUOTA ${ew.customSqlSegment} |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyTargetVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyTargetExcel; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
public interface BsEnergyTargetMapper extends BaseMapper<BsEnergyTargetEntity> { |
|
||||||
|
|
||||||
/** |
|
||||||
* 自定义分页 |
|
||||||
* |
|
||||||
* @param page 分页参数 |
|
||||||
* @param bsEnergyTarget 查询参数 |
|
||||||
* @return List<BsEnergyTargetVO> |
|
||||||
*/ |
|
||||||
List<BsEnergyTargetVO> selectBsEnergyTargetPage(IPage page, BsEnergyTargetVO bsEnergyTarget); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 获取导出数据 |
|
||||||
* |
|
||||||
* @param queryWrapper 查询条件 |
|
||||||
* @return List<BsEnergyTargetExcel> |
|
||||||
*/ |
|
||||||
List<BsEnergyTargetExcel> exportBsEnergyTarget(@Param("ew") Wrapper<BsEnergyTargetEntity> queryWrapper); |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,31 +0,0 @@ |
|||||||
<?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.BsEnergyTargetMapper"> |
|
||||||
|
|
||||||
<!-- 通用查询映射结果 --> |
|
||||||
<resultMap id="bsEnergyTargetResultMap" type="org.springblade.desk.energy.pojo.entity.BsEnergyTargetEntity"> |
|
||||||
<result column="ID" property="id"/> |
|
||||||
<result column="TYPE" property="type"/> |
|
||||||
<result column="MONTH" property="month"/> |
|
||||||
<result column="DATE" property="date"/> |
|
||||||
<result column="TARGET" property="target"/> |
|
||||||
<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="selectBsEnergyTargetPage" resultMap="bsEnergyTargetResultMap"> |
|
||||||
select * from BS_ENERGY_TARGET where is_deleted = 0 |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
<select id="exportBsEnergyTarget" resultType="org.springblade.desk.energy.excel.BsEnergyTargetExcel"> |
|
||||||
SELECT * FROM BS_ENERGY_TARGET ${ew.customSqlSegment} |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
||||||
@ -1,45 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyQuotaEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
import java.io.Serial; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 数据传输对象实体类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyQuotaDTO extends BsEnergyQuotaEntity { |
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,45 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
import java.io.Serial; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 数据传输对象实体类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyTargetDTO extends BsEnergyTargetEntity { |
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,93 +0,0 @@ |
|||||||
/** |
|
||||||
* 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-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("BS_ENERGY_QUOTA") |
|
||||||
@Schema(description = "BsEnergyQuota对象") |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyQuotaEntity extends BaseEntity { |
|
||||||
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* 类型 1-用水 2-用电 |
|
||||||
*/ |
|
||||||
@Schema(description = "类型 1-用水 2-用电") |
|
||||||
private String type; |
|
||||||
/** |
|
||||||
* 作业中心ID |
|
||||||
*/ |
|
||||||
@Schema(description = "作业中心ID") |
|
||||||
private Long workCenterId; |
|
||||||
/** |
|
||||||
* 设备ID |
|
||||||
*/ |
|
||||||
@Schema(description = "设备ID") |
|
||||||
private Long equipmentId; |
|
||||||
/** |
|
||||||
* 月份 |
|
||||||
*/ |
|
||||||
@Schema(description = "月份") |
|
||||||
private String month; |
|
||||||
/** |
|
||||||
* 日期 |
|
||||||
*/ |
|
||||||
@Schema(description = "日期") |
|
||||||
private String date; |
|
||||||
/** |
|
||||||
* 自来水用水量 |
|
||||||
*/ |
|
||||||
@Schema(description = "自来水用水量") |
|
||||||
private Long tapWaterNum; |
|
||||||
/** |
|
||||||
* 纯水用水量 |
|
||||||
*/ |
|
||||||
@Schema(description = "纯水用水量") |
|
||||||
private Long pureWaterNum; |
|
||||||
/** |
|
||||||
* 用电量 |
|
||||||
*/ |
|
||||||
@Schema(description = "用电量") |
|
||||||
private Long electricNum; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,74 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.math.BigDecimal; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("BS_ENERGY_TARGET") |
|
||||||
@Schema(description = "BsEnergyTarget对象") |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyTargetEntity extends BaseEntity { |
|
||||||
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* 类型 1-用水 2-用电 |
|
||||||
*/ |
|
||||||
@Schema(description = "类型 1-用水 2-用电") |
|
||||||
private String type; |
|
||||||
/** |
|
||||||
* 月份 |
|
||||||
*/ |
|
||||||
@Schema(description = "月份") |
|
||||||
private String month; |
|
||||||
/** |
|
||||||
* 日期 |
|
||||||
*/ |
|
||||||
@Schema(description = "日期") |
|
||||||
private String date; |
|
||||||
/** |
|
||||||
* 目标 |
|
||||||
*/ |
|
||||||
@Schema(description = "目标") |
|
||||||
private Long target; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,54 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyQuotaEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
import java.io.Serial; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 视图实体类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyQuotaVO extends BsEnergyQuotaEntity { |
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* 作业中心名称 |
|
||||||
*/ |
|
||||||
private String workCenterName; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备名称 |
|
||||||
*/ |
|
||||||
private String equipmentName; |
|
||||||
} |
|
||||||
@ -1,45 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
import java.io.Serial; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 视图实体类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
public class BsEnergyTargetVO extends BsEnergyTargetEntity { |
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,61 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyQuotaEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyQuotaVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyQuotaExcel; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import org.springblade.core.mp.base.BaseService; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 服务类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
public interface IBsEnergyQuotaService extends BaseService<BsEnergyQuotaEntity> { |
|
||||||
/** |
|
||||||
* 自定义分页 |
|
||||||
* |
|
||||||
* @param page 分页参数 |
|
||||||
* @param bsEnergyQuota 查询参数 |
|
||||||
* @return IPage<BsEnergyQuotaVO> |
|
||||||
*/ |
|
||||||
IPage<BsEnergyQuotaVO> selectBsEnergyQuotaPage(IPage<BsEnergyQuotaVO> page, BsEnergyQuotaVO bsEnergyQuota); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 导出数据 |
|
||||||
* |
|
||||||
* @param queryWrapper 查询条件 |
|
||||||
* @return List<BsEnergyQuotaExcel> |
|
||||||
*/ |
|
||||||
List<BsEnergyQuotaExcel> exportBsEnergyQuota(Wrapper<BsEnergyQuotaEntity> queryWrapper); |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,61 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyTargetVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyTargetExcel; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import org.springblade.core.mp.base.BaseService; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 服务类 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
public interface IBsEnergyTargetService extends BaseService<BsEnergyTargetEntity> { |
|
||||||
/** |
|
||||||
* 自定义分页 |
|
||||||
* |
|
||||||
* @param page 分页参数 |
|
||||||
* @param bsEnergyTarget 查询参数 |
|
||||||
* @return IPage<BsEnergyTargetVO> |
|
||||||
*/ |
|
||||||
IPage<BsEnergyTargetVO> selectBsEnergyTargetPage(IPage<BsEnergyTargetVO> page, BsEnergyTargetVO bsEnergyTarget); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 导出数据 |
|
||||||
* |
|
||||||
* @param queryWrapper 查询条件 |
|
||||||
* @return List<BsEnergyTargetExcel> |
|
||||||
*/ |
|
||||||
List<BsEnergyTargetExcel> exportBsEnergyTarget(Wrapper<BsEnergyTargetEntity> queryWrapper); |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyQuotaEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyQuotaVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyQuotaExcel; |
|
||||||
import org.springblade.desk.energy.mapper.BsEnergyQuotaMapper; |
|
||||||
import org.springblade.desk.energy.service.IBsEnergyQuotaService; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class BsEnergyQuotaServiceImpl extends BaseServiceImpl<BsEnergyQuotaMapper, BsEnergyQuotaEntity> implements IBsEnergyQuotaService { |
|
||||||
|
|
||||||
@Override |
|
||||||
public IPage<BsEnergyQuotaVO> selectBsEnergyQuotaPage(IPage<BsEnergyQuotaVO> page, BsEnergyQuotaVO bsEnergyQuota) { |
|
||||||
return page.setRecords(baseMapper.selectBsEnergyQuotaPage(page, bsEnergyQuota)); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@Override |
|
||||||
public List<BsEnergyQuotaExcel> exportBsEnergyQuota(Wrapper<BsEnergyQuotaEntity> queryWrapper) { |
|
||||||
List<BsEnergyQuotaExcel> bsEnergyQuotaList = baseMapper.exportBsEnergyQuota(queryWrapper); |
|
||||||
//bsEnergyQuotaList.forEach(bsEnergyQuota -> {
|
|
||||||
// bsEnergyQuota.setTypeName(DictCache.getValue(DictEnum.YES_NO, BsEnergyQuota.getType()));
|
|
||||||
//});
|
|
||||||
return bsEnergyQuotaList; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyTargetVO; |
|
||||||
import org.springblade.desk.energy.excel.BsEnergyTargetExcel; |
|
||||||
import org.springblade.desk.energy.mapper.BsEnergyTargetMapper; |
|
||||||
import org.springblade.desk.energy.service.IBsEnergyTargetService; |
|
||||||
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-02 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class BsEnergyTargetServiceImpl extends BaseServiceImpl<BsEnergyTargetMapper, BsEnergyTargetEntity> implements IBsEnergyTargetService { |
|
||||||
|
|
||||||
@Override |
|
||||||
public IPage<BsEnergyTargetVO> selectBsEnergyTargetPage(IPage<BsEnergyTargetVO> page, BsEnergyTargetVO bsEnergyTarget) { |
|
||||||
return page.setRecords(baseMapper.selectBsEnergyTargetPage(page, bsEnergyTarget)); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@Override |
|
||||||
public List<BsEnergyTargetExcel> exportBsEnergyTarget(Wrapper<BsEnergyTargetEntity> queryWrapper) { |
|
||||||
List<BsEnergyTargetExcel> bsEnergyTargetList = baseMapper.exportBsEnergyTarget(queryWrapper); |
|
||||||
//bsEnergyTargetList.forEach(bsEnergyTarget -> {
|
|
||||||
// bsEnergyTarget.setTypeName(DictCache.getValue(DictEnum.YES_NO, BsEnergyTarget.getType()));
|
|
||||||
//});
|
|
||||||
return bsEnergyTargetList; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,73 +0,0 @@ |
|||||||
/** |
|
||||||
* 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 jakarta.annotation.Resource; |
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
|
||||||
import org.springblade.core.tool.utils.BeanUtil; |
|
||||||
import org.springblade.desk.basic.pojo.entity.WorkCenter; |
|
||||||
import org.springblade.desk.basic.service.IWorkCenterService; |
|
||||||
import org.springblade.desk.device.pojo.entity.EquipmentEntity; |
|
||||||
import org.springblade.desk.device.service.IEquipmentService; |
|
||||||
import org.springblade.desk.energy.pojo.entity.BsEnergyQuotaEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyQuotaVO; |
|
||||||
import java.util.Objects; |
|
||||||
import java.util.Optional; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能源定额 包装类,返回视图层所需的字段 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
public class BsEnergyQuotaWrapper extends BaseEntityWrapper<BsEnergyQuotaEntity, BsEnergyQuotaVO> { |
|
||||||
|
|
||||||
@Resource |
|
||||||
private IWorkCenterService iWorkCenterService; |
|
||||||
|
|
||||||
@Resource |
|
||||||
private IEquipmentService iEquipmentService; |
|
||||||
|
|
||||||
public static BsEnergyQuotaWrapper build() { |
|
||||||
return new BsEnergyQuotaWrapper(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public BsEnergyQuotaVO entityVO(BsEnergyQuotaEntity bsEnergyQuota) { |
|
||||||
BsEnergyQuotaVO bsEnergyQuotaVO = Objects.requireNonNull(BeanUtil.copyProperties(bsEnergyQuota, BsEnergyQuotaVO.class)); |
|
||||||
WorkCenter workCenter = iWorkCenterService.getById(bsEnergyQuota.getWorkCenterId()); |
|
||||||
if (workCenter != null) { |
|
||||||
bsEnergyQuotaVO.setWorkCenterName(workCenter.getWcName()); |
|
||||||
} |
|
||||||
EquipmentEntity equipmentEntity = iEquipmentService.getById(bsEnergyQuota.getEquipmentId()); |
|
||||||
if (equipmentEntity != null) { |
|
||||||
bsEnergyQuotaVO.setEquipmentName(equipmentEntity.getDeviceName()); |
|
||||||
} |
|
||||||
return bsEnergyQuotaVO; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -1,59 +0,0 @@ |
|||||||
/** |
|
||||||
* 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.BsEnergyTargetEntity; |
|
||||||
import org.springblade.desk.energy.pojo.vo.BsEnergyTargetVO; |
|
||||||
import java.util.Objects; |
|
||||||
|
|
||||||
/** |
|
||||||
* 能耗目标表 包装类,返回视图层所需的字段 |
|
||||||
* |
|
||||||
* @author BladeX |
|
||||||
* @since 2026-03-02 |
|
||||||
*/ |
|
||||||
public class BsEnergyTargetWrapper extends BaseEntityWrapper<BsEnergyTargetEntity, BsEnergyTargetVO> { |
|
||||||
|
|
||||||
public static BsEnergyTargetWrapper build() { |
|
||||||
return new BsEnergyTargetWrapper(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public BsEnergyTargetVO entityVO(BsEnergyTargetEntity bsEnergyTarget) { |
|
||||||
BsEnergyTargetVO bsEnergyTargetVO = Objects.requireNonNull(BeanUtil.copyProperties(bsEnergyTarget, BsEnergyTargetVO.class)); |
|
||||||
|
|
||||||
//User createUser = UserCache.getUser(bsEnergyTarget.getCreateUser());
|
|
||||||
//User updateUser = UserCache.getUser(bsEnergyTarget.getUpdateUser());
|
|
||||||
//bsEnergyTargetVO.setCreateUserName(createUser.getName());
|
|
||||||
//bsEnergyTargetVO.setUpdateUserName(updateUser.getName());
|
|
||||||
|
|
||||||
return bsEnergyTargetVO; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
Loading…
Reference in new issue