Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.vo.CostHouseChargeDetailVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
@@ -64,7 +65,7 @@ public class CostHouseChargeController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("property:houseCharge:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CostHouseChargeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
public R<CostHouseChargeDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(costHouseChargeService.queryById(id));
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public class CostPayFeeAuditController extends BaseController {
|
||||
/**
|
||||
* 查询费用-缴费审核列表
|
||||
*/
|
||||
@SaCheckPermission("system:payFeeAudit:list")
|
||||
// @SaCheckPermission("system:payFeeAudit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CostPayFeeAuditVo> list(CostPayFeeAuditBo bo, PageQuery pageQuery) {
|
||||
return costPayFeeAuditService.queryPageList(bo, pageQuery);
|
||||
|
@@ -17,44 +17,44 @@ import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbMeterVo;
|
||||
import org.dromara.property.domain.bo.TbMeterBo;
|
||||
import org.dromara.property.service.ITbMeterService;
|
||||
import org.dromara.property.domain.vo.TbMeterInfoVo;
|
||||
import org.dromara.property.domain.bo.TbMeterInfoBo;
|
||||
import org.dromara.property.service.ITbMeterInfoService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 水电气
|
||||
* 前端访问路由地址为:/property/meter
|
||||
* 前端访问路由地址为:/property/meterInfo
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/meter")
|
||||
public class TbMeterController extends BaseController {
|
||||
@RequestMapping("/meterInfo")
|
||||
public class TbMeterInfoController extends BaseController {
|
||||
|
||||
private final ITbMeterService tbMeterService;
|
||||
private final ITbMeterInfoService tbMeterInfoService;
|
||||
|
||||
/**
|
||||
* 查询水电气列表
|
||||
*/
|
||||
@SaCheckPermission("property:meter:list")
|
||||
@SaCheckPermission("property:meterInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbMeterVo> list(TbMeterBo bo, PageQuery pageQuery) {
|
||||
return tbMeterService.queryPageList(bo, pageQuery);
|
||||
public TableDataInfo<TbMeterInfoVo> list(TbMeterInfoBo bo, PageQuery pageQuery) {
|
||||
return tbMeterInfoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水电气列表
|
||||
*/
|
||||
@SaCheckPermission("property:meter:export")
|
||||
@SaCheckPermission("property:meterInfo:export")
|
||||
@Log(title = "水电气", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbMeterBo bo, HttpServletResponse response) {
|
||||
List<TbMeterVo> list = tbMeterService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "水电气", TbMeterVo.class, response);
|
||||
public void export(TbMeterInfoBo bo, HttpServletResponse response) {
|
||||
List<TbMeterInfoVo> list = tbMeterInfoService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "水电气", TbMeterInfoVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,33 +62,33 @@ public class TbMeterController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:meter:query")
|
||||
@SaCheckPermission("property:meterInfo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbMeterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
public R<TbMeterInfoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbMeterService.queryById(id));
|
||||
return R.ok(tbMeterInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水电气
|
||||
*/
|
||||
@SaCheckPermission("property:meter:add")
|
||||
@SaCheckPermission("property:meterInfo:add")
|
||||
@Log(title = "水电气", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbMeterBo bo) {
|
||||
return toAjax(tbMeterService.insertByBo(bo));
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbMeterInfoBo bo) {
|
||||
return toAjax(tbMeterInfoService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水电气
|
||||
*/
|
||||
@SaCheckPermission("property:meter:edit")
|
||||
@SaCheckPermission("property:meterInfo:edit")
|
||||
@Log(title = "水电气", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbMeterBo bo) {
|
||||
return toAjax(tbMeterService.updateByBo(bo));
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbMeterInfoBo bo) {
|
||||
return toAjax(tbMeterInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,11 +96,11 @@ public class TbMeterController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:meter:remove")
|
||||
@SaCheckPermission("property:meterInfo:remove")
|
||||
@Log(title = "水电气", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbMeterService.deleteWithValidByIds(List.of(ids), true));
|
||||
return toAjax(tbMeterInfoService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbMeterRecordVo;
|
||||
import org.dromara.property.domain.bo.TbMeterRecordBo;
|
||||
import org.dromara.property.service.ITbMeterRecordService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 抄记录
|
||||
* 前端访问路由地址为:/property/meterRecord
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/meterRecord")
|
||||
public class TbMeterRecordController extends BaseController {
|
||||
|
||||
private final ITbMeterRecordService tbMeterRecordService;
|
||||
|
||||
/**
|
||||
* 查询抄记录列表
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbMeterRecordVo> list(TbMeterRecordBo bo, PageQuery pageQuery) {
|
||||
return tbMeterRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出抄记录列表
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:export")
|
||||
@Log(title = "抄记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbMeterRecordBo bo, HttpServletResponse response) {
|
||||
List<TbMeterRecordVo> list = tbMeterRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "抄记录", TbMeterRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取抄记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbMeterRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbMeterRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增抄记录
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:add")
|
||||
@Log(title = "抄记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbMeterRecordBo bo) {
|
||||
return toAjax(tbMeterRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改抄记录
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:edit")
|
||||
@Log(title = "抄记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbMeterRecordBo bo) {
|
||||
return toAjax(tbMeterRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除抄记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:meterRecord:remove")
|
||||
@Log(title = "抄记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbMeterRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -48,6 +50,11 @@ public class CostCarCharge extends TenantEntity {
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
private BigDecimal amountReceivable;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
@@ -6,16 +6,17 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 费用项设置对象 costItemSetting
|
||||
* 费用项设置对象 costItems
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("costItemSetting")
|
||||
@TableName("cost_items")
|
||||
public class CostItems extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
@@ -31,6 +32,10 @@ public class CostItems extends TenantEntity {
|
||||
* 费用类型
|
||||
*/
|
||||
private String costType;
|
||||
/**
|
||||
* 费用编号
|
||||
*/
|
||||
private String chargeNo;
|
||||
|
||||
/**
|
||||
* 收费项目
|
||||
@@ -50,7 +55,7 @@ public class CostItems extends TenantEntity {
|
||||
/**
|
||||
* 缴费周期(月)
|
||||
*/
|
||||
private Long chargeCycle;
|
||||
private Integer chargeCycle;
|
||||
|
||||
/**
|
||||
* 是否手机缴费
|
||||
@@ -80,17 +85,17 @@ public class CostItems extends TenantEntity {
|
||||
/**
|
||||
* 计费单价
|
||||
*/
|
||||
private Long unitPrice;
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 附加费
|
||||
*/
|
||||
private Long surcharge;
|
||||
private BigDecimal surcharge;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*单位
|
||||
*/
|
||||
private String searchValue;
|
||||
private String unit;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -8,14 +8,14 @@ import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 抄表类型对象 meterReadingType
|
||||
* 抄表类型对象 CostMeterType
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("meterReadingType")
|
||||
@TableName("cost_meter_type")
|
||||
public class CostMeterType extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
@@ -41,11 +41,4 @@ public class CostMeterType extends TenantEntity {
|
||||
* 说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -29,10 +29,18 @@ public class CostMeterWater extends TenantEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 费用类型id
|
||||
*/
|
||||
private Long itemId;
|
||||
/**
|
||||
* 房间id
|
||||
*/
|
||||
private Long roomId;
|
||||
|
||||
/**
|
||||
* 抄表类型id
|
||||
@@ -70,10 +78,6 @@ public class CostMeterWater extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -51,12 +53,12 @@ public class CostPayFeeAudit extends TenantEntity {
|
||||
/**
|
||||
* 实付金额
|
||||
*/
|
||||
private String receivedAmount;
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
private Long receivableAmount;
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
/**
|
||||
* 缴费时间
|
||||
@@ -75,10 +77,4 @@ public class CostPayFeeAudit extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -77,10 +77,4 @@ public class MachineMaintainPlan extends TenantEntity {
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -8,15 +8,15 @@ import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 水电气对象 tb_meter
|
||||
* 水电气对象 tb_meter_info
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
* @author lsm
|
||||
* @since 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_meter")
|
||||
public class TbMeter extends BaseEntity {
|
||||
@TableName("tb_meter_info")
|
||||
public class TbMeterInfo extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -28,12 +28,12 @@ public class TbMeter extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 水表名称
|
||||
* 仪表名称
|
||||
*/
|
||||
private String meterName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
* 仪表编码
|
||||
*/
|
||||
private String meterCode;
|
||||
|
||||
@@ -48,39 +48,24 @@ public class TbMeter extends BaseEntity {
|
||||
private Long meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
* 计量单位(1-度,2-吨,3-立方米)
|
||||
*/
|
||||
private Long meterPurpose;
|
||||
private Long meterUnit;
|
||||
|
||||
/**
|
||||
* 分摊类型(1-不公摊,2-按分表用量,3-按租客面积,4-按房源数量,5-按固定比例)
|
||||
* 安装位置
|
||||
*/
|
||||
private Long shareType;
|
||||
private String installLocation;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
* 初始读数
|
||||
*/
|
||||
private Long payType;
|
||||
private Long initReading;
|
||||
|
||||
/**
|
||||
* 当前表显示读数
|
||||
* 最大量程
|
||||
*/
|
||||
private Long display;
|
||||
|
||||
/**
|
||||
* 最大表显读数(超过归0)
|
||||
*/
|
||||
private Long maxDisplay;
|
||||
|
||||
/**
|
||||
* 计费倍率
|
||||
*/
|
||||
private Long billingRate;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
private Long surplus;
|
||||
private Long maxRang;
|
||||
|
||||
/**
|
||||
* 通信状态
|
@@ -0,0 +1,73 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 抄记录对象 tb_meter_record
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_meter_record")
|
||||
public class TbMeterRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 仪表编号
|
||||
*/
|
||||
private String meterId;
|
||||
|
||||
/**
|
||||
* 抄表员ID
|
||||
*/
|
||||
private Long readerId;
|
||||
|
||||
/**
|
||||
* 抄表时间
|
||||
*/
|
||||
private Date readingTime;
|
||||
|
||||
/**
|
||||
* 当前读数
|
||||
*/
|
||||
private Long currentReading;
|
||||
|
||||
/**
|
||||
* 上次读数
|
||||
*/
|
||||
private Long previousReading;
|
||||
|
||||
/**
|
||||
* 用量
|
||||
*/
|
||||
private Long consumption;
|
||||
|
||||
/**
|
||||
* 抄表方式(1手动 2自动 3用户上报)
|
||||
*/
|
||||
private Long readingMethod;
|
||||
|
||||
/**
|
||||
* 抄表照片
|
||||
*/
|
||||
private Long imgOssid;
|
||||
|
||||
|
||||
}
|
@@ -60,6 +60,10 @@ public class TbRoom extends TenantEntity {
|
||||
* 面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
|
@@ -8,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@@ -53,7 +55,7 @@ public class CostHouseChargeBo extends BaseEntity {
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
private Long amountReceivable;
|
||||
private BigDecimal amountReceivable;
|
||||
|
||||
/**
|
||||
* 计费开始时间
|
||||
@@ -75,10 +77,6 @@ public class CostHouseChargeBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.property.domain.CostItems;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
@@ -9,6 +10,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 费用项设置业务对象 costItemSetting
|
||||
*
|
||||
@@ -25,7 +28,10 @@ public class CostItemsBo extends BaseEntity {
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 费用编号
|
||||
*/
|
||||
private String chargeNo;
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@@ -49,11 +55,16 @@ public class CostItemsBo extends BaseEntity {
|
||||
*/
|
||||
@NotBlank(message = "付费类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String paymentType;
|
||||
/**
|
||||
*单位
|
||||
*/
|
||||
@ExcelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 缴费周期(月)
|
||||
*/
|
||||
private Long chargeCycle;
|
||||
private Integer chargeCycle;
|
||||
|
||||
/**
|
||||
* 是否手机缴费
|
||||
@@ -63,11 +74,13 @@ public class CostItemsBo extends BaseEntity {
|
||||
/**
|
||||
* 进位方式
|
||||
*/
|
||||
@NotBlank(message = "进位方式不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String roundingMode;
|
||||
|
||||
/**
|
||||
* 保留小数
|
||||
*/
|
||||
@NotBlank(message = "保留小数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String currencyDecimals;
|
||||
|
||||
/**
|
||||
@@ -78,17 +91,19 @@ public class CostItemsBo extends BaseEntity {
|
||||
/**
|
||||
* 计算公式
|
||||
*/
|
||||
@NotBlank(message = "计算公式不能", groups = { AddGroup.class, EditGroup.class })
|
||||
private String formula;
|
||||
|
||||
/**
|
||||
* 计费单价
|
||||
*/
|
||||
private Long unitPrice;
|
||||
@NotBlank(message = "计费单价", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 附加费
|
||||
*/
|
||||
private Long surcharge;
|
||||
private BigDecimal surcharge;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
|
@@ -29,12 +29,21 @@ public class CostMeterWaterBo extends BaseEntity {
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
@NotNull(message = "业主id不能为空", groups = { EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 费用类型id
|
||||
*/
|
||||
@NotNull(message = "费用类型id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 房间id
|
||||
*/
|
||||
private Long roomId;
|
||||
/**
|
||||
* 抄表类型id
|
||||
*/
|
||||
|
@@ -10,6 +10,7 @@ import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.property.domain.CostPayFeeAudit;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -56,13 +57,13 @@ public class CostPayFeeAuditBo extends BaseEntity {
|
||||
/**
|
||||
* 实付金额
|
||||
*/
|
||||
private String receivedAmount;
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
@NotNull(message = "应收金额不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long receivableAmount;
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
/**
|
||||
* 缴费时间
|
||||
|
@@ -11,6 +11,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.MachineMaintainPlan;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养计划业务对象 machine_maintain_plan
|
||||
@@ -85,5 +86,10 @@ public class MachineMaintainPlanBo extends BaseEntity {
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
/**
|
||||
* 选择员工
|
||||
*/
|
||||
private List<MachineMaintainPlanStaffBo> machineMaintainPlanStaffBoList;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbMeter;
|
||||
import org.dromara.property.domain.TbMeterInfo;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
@@ -9,15 +10,15 @@ import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 水电气业务对象 tb_meter
|
||||
* 水电气业务对象 tb_meter_info
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
* @author lsm
|
||||
* @since 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbMeter.class, reverseConvertGenerate = false)
|
||||
public class TbMeterBo extends BaseEntity {
|
||||
@AutoMapper(target = TbMeterInfo.class, reverseConvertGenerate = false)
|
||||
public class TbMeterInfoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
@@ -26,12 +27,12 @@ public class TbMeterBo extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 水表名称
|
||||
* 仪表名称
|
||||
*/
|
||||
private String meterName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
* 仪表编码
|
||||
*/
|
||||
private String meterCode;
|
||||
|
||||
@@ -43,42 +44,29 @@ public class TbMeterBo extends BaseEntity {
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
@NotNull(message = "设备类型(1-电表,2-水表,3-气表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
* 计量单位(1-度,2-吨,3-立方米)
|
||||
*/
|
||||
private Long meterPurpose;
|
||||
@NotNull(message = "计量单位(1-度,2-吨,3-立方米)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long meterUnit;
|
||||
|
||||
/**
|
||||
* 分摊类型(1-不公摊,2-按分表用量,3-按租客面积,4-按房源数量,5-按固定比例)
|
||||
* 安装位置
|
||||
*/
|
||||
private Long shareType;
|
||||
private String installLocation;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
* 初始读数
|
||||
*/
|
||||
private Long payType;
|
||||
private Long initReading;
|
||||
|
||||
/**
|
||||
* 当前表显示读数
|
||||
* 最大量程
|
||||
*/
|
||||
private Long display;
|
||||
|
||||
/**
|
||||
* 最大表显读数(超过归0)
|
||||
*/
|
||||
private Long maxDisplay;
|
||||
|
||||
/**
|
||||
* 计费倍率
|
||||
*/
|
||||
private Long billingRate;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
private Long surplus;
|
||||
private Long maxRang;
|
||||
|
||||
/**
|
||||
* 通信状态
|
@@ -0,0 +1,78 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbMeterRecord;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 抄记录业务对象 tb_meter_record
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbMeterRecord.class, reverseConvertGenerate = false)
|
||||
public class TbMeterRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@NotNull(message = "记录ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 仪表编号
|
||||
*/
|
||||
@NotBlank(message = "仪表编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String meterId;
|
||||
|
||||
/**
|
||||
* 抄表员ID
|
||||
*/
|
||||
@NotNull(message = "抄表员ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long readerId;
|
||||
|
||||
/**
|
||||
* 抄表时间
|
||||
*/
|
||||
@NotNull(message = "抄表时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date readingTime;
|
||||
|
||||
/**
|
||||
* 当前读数
|
||||
*/
|
||||
@NotNull(message = "当前读数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long currentReading;
|
||||
|
||||
/**
|
||||
* 上次读数
|
||||
*/
|
||||
@NotNull(message = "上次读数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long previousReading;
|
||||
|
||||
/**
|
||||
* 用量
|
||||
*/
|
||||
private Long consumption;
|
||||
|
||||
/**
|
||||
* 抄表方式(1手动 2自动 3用户上报)
|
||||
*/
|
||||
@NotNull(message = "抄表方式(1手动 2自动 3用户上报)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long readingMethod;
|
||||
|
||||
/**
|
||||
* 抄表照片
|
||||
*/
|
||||
private Long imgOssid;
|
||||
|
||||
|
||||
}
|
@@ -47,7 +47,10 @@ public class TbRoomBo extends BaseEntity {
|
||||
* 面积(平方米)
|
||||
*/
|
||||
private Float area;
|
||||
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.CostCarCharge;
|
||||
@@ -60,6 +61,10 @@ public class CostCarChargeVo implements Serializable {
|
||||
@ExcelProperty(value = "车位")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
private BigDecimal amountReceivable;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
@@ -0,0 +1,98 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.CostHouseCharge;
|
||||
import org.dromara.property.domain.CostItems;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/18 16:03
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CostHouseCharge.class)
|
||||
public class CostHouseChargeDetailVo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 房屋
|
||||
*/
|
||||
@ExcelProperty(value = "房屋")
|
||||
private Long roomId;
|
||||
|
||||
/**
|
||||
* 收费项目
|
||||
*/
|
||||
@ExcelProperty(value = "收费项目")
|
||||
private Long costItemsId;
|
||||
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
@ExcelProperty(value = "支付方式")
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 支付周期
|
||||
*/
|
||||
@ExcelProperty(value = "支付周期")
|
||||
private String chargeCycle;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
@ExcelProperty(value = "应收金额")
|
||||
private Long amountReceivable;
|
||||
|
||||
/**
|
||||
* 计费开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "计费开始时间")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 计费结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "计费结束时间")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@ExcelProperty(value = "说明")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 房间信息
|
||||
*/
|
||||
@ExcelProperty(value = "房间信息")
|
||||
private TbRoomVo roomVo;
|
||||
|
||||
/**
|
||||
* 收费项设置
|
||||
*/
|
||||
@ExcelProperty(value = "收费项设置")
|
||||
private CostItemsVo costItemsVo;
|
||||
|
||||
}
|
@@ -10,12 +10,13 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 费用项设置视图对象 costItemSetting
|
||||
* 费用项设置视图对象 costItems
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-17
|
||||
@@ -33,7 +34,10 @@ public class CostItemsVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 费用编号
|
||||
*/
|
||||
private String chargeNo;
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@@ -64,7 +68,7 @@ public class CostItemsVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "缴费周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "月=")
|
||||
private Long chargeCycle;
|
||||
private Integer chargeCycle;
|
||||
|
||||
/**
|
||||
* 是否手机缴费
|
||||
@@ -100,19 +104,24 @@ public class CostItemsVo implements Serializable {
|
||||
* 计费单价
|
||||
*/
|
||||
@ExcelProperty(value = "计费单价")
|
||||
private Long unitPrice;
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 附加费
|
||||
*/
|
||||
@ExcelProperty(value = "附加费")
|
||||
private Long surcharge;
|
||||
private BigDecimal surcharge;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
/**
|
||||
*单位
|
||||
*/
|
||||
@ExcelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ import org.dromara.property.domain.CostMeterType;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -51,6 +51,11 @@ public class CostMeterTypeVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "说明")
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
|
@@ -32,12 +32,20 @@ public class CostMeterWaterVo implements Serializable {
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 费用类型id
|
||||
*/
|
||||
@ExcelProperty(value = "费用类型id")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 房间id
|
||||
*/
|
||||
private Long roomId;
|
||||
/**
|
||||
* 抄表类型id
|
||||
*/
|
||||
|
@@ -4,10 +4,13 @@ import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.property.domain.CostPayFeeAudit;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@@ -30,6 +33,7 @@ public class CostPayFeeAuditVo implements Serializable {
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -37,13 +41,32 @@ public class CostPayFeeAuditVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "房屋收费id")
|
||||
private Long houseChargeId;
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@ExcelProperty(value = "费用类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "pro_expense_type")
|
||||
private String costType;
|
||||
/**
|
||||
* 房间号(如101,202)
|
||||
*/
|
||||
@ExcelProperty(value = "房间号(如101,202)")
|
||||
private String roomNumber;
|
||||
|
||||
/**
|
||||
* 费用项目id
|
||||
*/
|
||||
@ExcelProperty(value = "费用项目id")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 收费项目
|
||||
*/
|
||||
@ExcelProperty(value = "收费项目")
|
||||
private String chargeItem;
|
||||
/**
|
||||
* 缴费周期(月)
|
||||
*/
|
||||
private Integer chargeCycle;
|
||||
/**
|
||||
* 缴费开始时间
|
||||
*/
|
||||
@@ -60,13 +83,13 @@ public class CostPayFeeAuditVo implements Serializable {
|
||||
* 实付金额
|
||||
*/
|
||||
@ExcelProperty(value = "实付金额")
|
||||
private String receivedAmount;
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 应收金额
|
||||
*/
|
||||
@ExcelProperty(value = "应收金额")
|
||||
private Long receivableAmount;
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
/**
|
||||
* 缴费时间
|
||||
|
@@ -9,7 +9,7 @@ import org.dromara.property.domain.MachineMaintainPlan;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -98,5 +98,9 @@ public class MachineMaintainPlanVo implements Serializable {
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
/**
|
||||
* 员工
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private List<MachineMaintainPlanStaffVo> machineMaintainPlanStaffVos;
|
||||
}
|
||||
|
@@ -0,0 +1,107 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.property.domain.TbMeterInfo;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 水电气视图对象 tb_meter_info
|
||||
*
|
||||
* @author lsm
|
||||
* @since 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbMeterInfo.class)
|
||||
public class TbMeterInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 仪表名称
|
||||
*/
|
||||
@ExcelProperty(value = "仪表名称")
|
||||
private String meterName;
|
||||
|
||||
/**
|
||||
* 仪表编码
|
||||
*/
|
||||
@ExcelProperty(value = "仪表编码")
|
||||
private String meterCode;
|
||||
|
||||
/**
|
||||
* 设备厂商
|
||||
*/
|
||||
@ExcelProperty(value = "设备厂商")
|
||||
private String factoryNo;
|
||||
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型(1-电表,2-水表,3-气表)" ,converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "meter_type")
|
||||
private Long meterType;
|
||||
|
||||
/**
|
||||
* 计量单位(1-度,2-吨,3-立方米)
|
||||
*/
|
||||
@ExcelProperty(value = "计量单位(1-度,2-吨,3-立方米)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "meter_unit")
|
||||
private Long meterUnit;
|
||||
|
||||
/**
|
||||
* 安装位置
|
||||
*/
|
||||
@ExcelProperty(value = "安装位置")
|
||||
private String installLocation;
|
||||
|
||||
/**
|
||||
* 初始读数
|
||||
*/
|
||||
@ExcelProperty(value = "初始读数")
|
||||
private Long initReading;
|
||||
|
||||
/**
|
||||
* 最大量程
|
||||
*/
|
||||
@ExcelProperty(value = "最大量程")
|
||||
private Long maxRang;
|
||||
|
||||
/**
|
||||
* 通信状态
|
||||
*/
|
||||
@ExcelProperty(value = "通信状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sis_device_status")
|
||||
private Long communicationState;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
@ExcelProperty(value = "运行状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sis_device_status")
|
||||
private Long runningState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.TbMeterRecord;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 抄记录视图对象 tb_meter_record
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbMeterRecord.class)
|
||||
public class TbMeterRecordVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "记录ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 仪表编号
|
||||
*/
|
||||
@ExcelProperty(value = "仪表编号")
|
||||
private String meterId;
|
||||
|
||||
/**
|
||||
* 抄表员ID
|
||||
*/
|
||||
@ExcelProperty(value = "抄表员ID")
|
||||
private Long readerId;
|
||||
|
||||
/**
|
||||
* 抄表时间
|
||||
*/
|
||||
@ExcelProperty(value = "抄表时间")
|
||||
private Date readingTime;
|
||||
|
||||
/**
|
||||
* 当前读数
|
||||
*/
|
||||
@ExcelProperty(value = "当前读数")
|
||||
private Long currentReading;
|
||||
|
||||
/**
|
||||
* 上次读数
|
||||
*/
|
||||
@ExcelProperty(value = "上次读数")
|
||||
private Long previousReading;
|
||||
|
||||
/**
|
||||
* 用量
|
||||
*/
|
||||
@ExcelProperty(value = "用量")
|
||||
private Long consumption;
|
||||
|
||||
/**
|
||||
* 抄表方式(1手动 2自动 3用户上报)
|
||||
*/
|
||||
@ExcelProperty(value = "抄表方式(1手动 2自动 3用户上报)")
|
||||
private Long readingMethod;
|
||||
|
||||
/**
|
||||
* 抄表照片
|
||||
*/
|
||||
@ExcelProperty(value = "抄表照片")
|
||||
private Long imgOssid;
|
||||
|
||||
|
||||
}
|
@@ -1,122 +0,0 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.TbMeter;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 水电气视图对象 tb_meter
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbMeter.class)
|
||||
public class TbMeterVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 水表名称
|
||||
*/
|
||||
@ExcelProperty(value = "水表名称")
|
||||
private String meterName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@ExcelProperty(value = "设备编码")
|
||||
private String meterCode;
|
||||
|
||||
/**
|
||||
* 设备厂商
|
||||
*/
|
||||
@ExcelProperty(value = "设备厂商")
|
||||
private String factoryNo;
|
||||
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型(1-电表,2-水表,3-气表)")
|
||||
private Long meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
*/
|
||||
@ExcelProperty(value = "表用途(1-分表,2-总表,3-公摊表)")
|
||||
private Long meterPurpose;
|
||||
|
||||
/**
|
||||
* 分摊类型(1-不公摊,2-按分表用量,3-按租客面积,4-按房源数量,5-按固定比例)
|
||||
*/
|
||||
@ExcelProperty(value = "分摊类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "1=-不公摊,2-按分表用量,3-按租客面积,4-按房源数量,5-按固定比例")
|
||||
private Long shareType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
@ExcelProperty(value = "付费类型(1-先付费,2-后付费)")
|
||||
private Long payType;
|
||||
|
||||
/**
|
||||
* 当前表显示读数
|
||||
*/
|
||||
@ExcelProperty(value = "当前表显示读数")
|
||||
private Long display;
|
||||
|
||||
/**
|
||||
* 最大表显读数(超过归0)
|
||||
*/
|
||||
@ExcelProperty(value = "最大表显读数(超过归0)")
|
||||
private Long maxDisplay;
|
||||
|
||||
/**
|
||||
* 计费倍率
|
||||
*/
|
||||
@ExcelProperty(value = "计费倍率")
|
||||
private Long billingRate;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
@ExcelProperty(value = "剩余量")
|
||||
private Long surplus;
|
||||
|
||||
/**
|
||||
* 通信状态
|
||||
*/
|
||||
@ExcelProperty(value = "通信状态")
|
||||
private Long communicationState;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private Long runningState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -76,8 +76,11 @@ public class TbRoomVo implements Serializable {
|
||||
* 面积(平方米)
|
||||
*/
|
||||
@ExcelProperty(value = "面积(平方米)")
|
||||
private Long area;
|
||||
|
||||
private Float area;
|
||||
/**
|
||||
* 套内面积(平方米)
|
||||
*/
|
||||
private Float insideInArea;
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
*/
|
||||
|
@@ -1,6 +1,9 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.CostPayFeeAudit;
|
||||
import org.dromara.property.domain.vo.CostPayFeeAuditVo;
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbMeterInfo;
|
||||
import org.dromara.property.domain.vo.TbMeterInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 水电气Mapper接口
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface TbMeterInfoMapper extends BaseMapperPlus<TbMeterInfo, TbMeterInfoVo> {
|
||||
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.TbMeter;
|
||||
import org.dromara.property.domain.vo.TbMeterVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 水电气Mapper接口
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbMeterMapper extends BaseMapperPlus<TbMeter, TbMeterVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbMeterRecord;
|
||||
import org.dromara.property.domain.vo.TbMeterRecordVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 抄记录Mapper接口
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface TbMeterRecordMapper extends BaseMapperPlus<TbMeterRecord, TbMeterRecordVo> {
|
||||
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.CostHouseCharge;
|
||||
import org.dromara.property.domain.vo.CostHouseChargeDetailVo;
|
||||
import org.dromara.property.domain.vo.CostHouseChargeVo;
|
||||
import org.dromara.property.domain.bo.CostHouseChargeBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -23,7 +24,7 @@ public interface ICostHouseChargeService {
|
||||
* @param id 主键
|
||||
* @return 房屋收费
|
||||
*/
|
||||
CostHouseChargeVo queryById(Long id);
|
||||
CostHouseChargeDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询房屋收费列表
|
||||
|
@@ -1,7 +1,8 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.vo.TbMeterVo;
|
||||
import org.dromara.property.domain.bo.TbMeterBo;
|
||||
import org.dromara.property.domain.TbMeterInfo;
|
||||
import org.dromara.property.domain.vo.TbMeterInfoVo;
|
||||
import org.dromara.property.domain.bo.TbMeterInfoBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
@@ -11,10 +12,10 @@ import java.util.List;
|
||||
/**
|
||||
* 水电气Service接口
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface ITbMeterService {
|
||||
public interface ITbMeterInfoService {
|
||||
|
||||
/**
|
||||
* 查询水电气
|
||||
@@ -22,7 +23,7 @@ public interface ITbMeterService {
|
||||
* @param id 主键
|
||||
* @return 水电气
|
||||
*/
|
||||
TbMeterVo queryById(Long id);
|
||||
TbMeterInfoVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询水电气列表
|
||||
@@ -31,7 +32,7 @@ public interface ITbMeterService {
|
||||
* @param pageQuery 分页参数
|
||||
* @return 水电气分页列表
|
||||
*/
|
||||
TableDataInfo<TbMeterVo> queryPageList(TbMeterBo bo, PageQuery pageQuery);
|
||||
TableDataInfo<TbMeterInfoVo> queryPageList(TbMeterInfoBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的水电气列表
|
||||
@@ -39,7 +40,7 @@ public interface ITbMeterService {
|
||||
* @param bo 查询条件
|
||||
* @return 水电气列表
|
||||
*/
|
||||
List<TbMeterVo> queryList(TbMeterBo bo);
|
||||
List<TbMeterInfoVo> queryList(TbMeterInfoBo bo);
|
||||
|
||||
/**
|
||||
* 新增水电气
|
||||
@@ -47,7 +48,7 @@ public interface ITbMeterService {
|
||||
* @param bo 水电气
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbMeterBo bo);
|
||||
Boolean insertByBo(TbMeterInfoBo bo);
|
||||
|
||||
/**
|
||||
* 修改水电气
|
||||
@@ -55,7 +56,7 @@ public interface ITbMeterService {
|
||||
* @param bo 水电气
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbMeterBo bo);
|
||||
Boolean updateByBo(TbMeterInfoBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除水电气信息
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbMeterRecord;
|
||||
import org.dromara.property.domain.vo.TbMeterRecordVo;
|
||||
import org.dromara.property.domain.bo.TbMeterRecordBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 抄记录Service接口
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface ITbMeterRecordService {
|
||||
|
||||
/**
|
||||
* 查询抄记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 抄记录
|
||||
*/
|
||||
TbMeterRecordVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询抄记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 抄记录分页列表
|
||||
*/
|
||||
TableDataInfo<TbMeterRecordVo> queryPageList(TbMeterRecordBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的抄记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 抄记录列表
|
||||
*/
|
||||
List<TbMeterRecordVo> queryList(TbMeterRecordBo bo);
|
||||
|
||||
/**
|
||||
* 新增抄记录
|
||||
*
|
||||
* @param bo 抄记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbMeterRecordBo bo);
|
||||
|
||||
/**
|
||||
* 修改抄记录
|
||||
*
|
||||
* @param bo 抄记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbMeterRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除抄记录信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.vo.CostItemsVo;
|
||||
import org.dromara.property.mapper.CostItemsMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.CostCarChargeBo;
|
||||
import org.dromara.property.domain.vo.CostCarChargeVo;
|
||||
@@ -16,6 +18,7 @@ import org.dromara.property.domain.CostCarCharge;
|
||||
import org.dromara.property.mapper.CostCarChargeMapper;
|
||||
import org.dromara.property.service.ICostCarChargeService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@@ -32,6 +35,8 @@ import java.util.Collection;
|
||||
public class CostCarChargeServiceImpl implements ICostCarChargeService {
|
||||
|
||||
private final CostCarChargeMapper baseMapper;
|
||||
private final CostItemsMapper costItemsMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询费用-车辆收费
|
||||
@@ -95,6 +100,9 @@ public class CostCarChargeServiceImpl implements ICostCarChargeService {
|
||||
@Override
|
||||
public Boolean insertByBo(CostCarChargeBo bo) {
|
||||
CostCarCharge add = MapstructUtils.convert(bo, CostCarCharge.class);
|
||||
CostItemsVo costItemsVo = costItemsMapper.selectVoById(add.getCostItemsId());
|
||||
BigDecimal unitPrice = costItemsVo.getUnitPrice();
|
||||
add.setAmountReceivable(unitPrice);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -9,6 +10,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.vo.CostHouseChargeDetailVo;
|
||||
import org.dromara.property.domain.vo.CostItemsVo;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.mapper.CostItemsMapper;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.CostHouseChargeBo;
|
||||
import org.dromara.property.domain.vo.CostHouseChargeVo;
|
||||
@@ -16,6 +22,8 @@ import org.dromara.property.domain.CostHouseCharge;
|
||||
import org.dromara.property.mapper.CostHouseChargeMapper;
|
||||
import org.dromara.property.service.ICostHouseChargeService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@@ -32,6 +40,8 @@ import java.util.Collection;
|
||||
public class CostHouseChargeServiceImpl implements ICostHouseChargeService {
|
||||
|
||||
private final CostHouseChargeMapper baseMapper;
|
||||
private final CostItemsMapper costItemsMapper;
|
||||
private final TbRoomMapper tbRoomMapper;
|
||||
|
||||
/**
|
||||
* 查询房屋收费
|
||||
@@ -40,8 +50,14 @@ public class CostHouseChargeServiceImpl implements ICostHouseChargeService {
|
||||
* @return 房屋收费
|
||||
*/
|
||||
@Override
|
||||
public CostHouseChargeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
public CostHouseChargeDetailVo queryById(Long id){
|
||||
CostHouseChargeVo costHouseChargeVo = baseMapper.selectVoById(id);
|
||||
CostHouseChargeDetailVo costHouseChargeDetailVo = BeanUtil.copyProperties(costHouseChargeVo, CostHouseChargeDetailVo.class);
|
||||
CostItemsVo costItemsVo = costItemsMapper.selectVoById(costHouseChargeDetailVo.getCostItemsId());
|
||||
costHouseChargeDetailVo.setCostItemsVo( costItemsVo );
|
||||
TbRoomVo tbRoomVo = tbRoomMapper.selectVoById(costHouseChargeDetailVo.getRoomId());
|
||||
costHouseChargeDetailVo.setRoomVo(tbRoomVo);
|
||||
return costHouseChargeDetailVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,6 +111,24 @@ public class CostHouseChargeServiceImpl implements ICostHouseChargeService {
|
||||
@Override
|
||||
public Boolean insertByBo(CostHouseChargeBo bo) {
|
||||
CostHouseCharge add = MapstructUtils.convert(bo, CostHouseCharge.class);
|
||||
//查询房间面积
|
||||
TbRoomVo tbRoomVo = tbRoomMapper.selectVoById(bo.getRoomId());
|
||||
BigDecimal area = new BigDecimal(tbRoomVo.getArea());
|
||||
CostItemsVo costItemsVo = costItemsMapper.selectVoById(add.getCostItemsId());
|
||||
BigDecimal unitPrice = costItemsVo.getUnitPrice();
|
||||
//向上取整
|
||||
if(costItemsVo.getRoundingMode().equals("1")){
|
||||
add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale(Integer.valueOf(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_UP).longValue());
|
||||
}
|
||||
//向下取整
|
||||
if(costItemsVo.getRoundingMode().equals("2")){
|
||||
add.setAmountReceivable( area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale(Integer.valueOf(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_DOWN).longValue());
|
||||
}
|
||||
//四舍五入
|
||||
if(costItemsVo.getRoundingMode().equals("0")){
|
||||
add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale( Integer.valueOf(costItemsVo.getCurrencyDecimals()), RoundingMode.HALF_UP).longValue());
|
||||
}
|
||||
//area
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -99,6 +100,7 @@ public class CostItemsServiceImpl implements ICostItemsService {
|
||||
@Override
|
||||
public Boolean insertByBo(CostItemsBo bo) {
|
||||
CostItems add = MapstructUtils.convert(bo, CostItems.class);
|
||||
add.setChargeNo( RandomUtil.randomNumbers(11));
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -11,14 +13,18 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.CostPayFeeAudit;
|
||||
import org.dromara.property.domain.bo.CostPayFeeAuditBo;
|
||||
import org.dromara.property.domain.vo.CostPayFeeAuditVo;
|
||||
import org.dromara.property.domain.vo.*;
|
||||
import org.dromara.property.mapper.CostItemsMapper;
|
||||
import org.dromara.property.mapper.CostPayFeeAuditMapper;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.dromara.property.service.ICostPayFeeAuditService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 费用-缴费审核Service业务层处理
|
||||
@@ -32,6 +38,8 @@ import java.util.Collection;
|
||||
public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
|
||||
|
||||
private final CostPayFeeAuditMapper baseMapper;
|
||||
private final CostItemsMapper costItemsMapper;
|
||||
private final TbRoomMapper roomMapper;
|
||||
|
||||
/**
|
||||
* 查询费用-缴费审核
|
||||
@@ -55,7 +63,30 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
|
||||
public TableDataInfo<CostPayFeeAuditVo> queryPageList(CostPayFeeAuditBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CostPayFeeAudit> lqw = buildQueryWrapper(bo);
|
||||
Page<CostPayFeeAuditVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
List<Long> itemIdList = result.getRecords().stream()
|
||||
.map(vo -> vo.getItemId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<Long> roomIdList = result.getRecords().stream()
|
||||
.map(vo -> vo.getHouseChargeId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<CostItemsVo> costItemsVoList = costItemsMapper.selectVoByIds(itemIdList);
|
||||
List<TbRoomVo> roomVoList = roomMapper.selectVoByIds(roomIdList);
|
||||
List<CostPayFeeAuditVo> costPayFeeAuditVoList = new ArrayList<>();
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
CostItemsVo costItemsVo = costItemsVoList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(s.getItemId())).findFirst().orElse(null);
|
||||
s.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getChargeItem():null);
|
||||
s.setCostType(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getCostType():null);
|
||||
s.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo)?costItemsVo.getChargeCycle():null);
|
||||
TbRoomVo tbRoomVo = roomVoList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(s.getHouseChargeId())).findFirst().orElse(null);
|
||||
s.setRoomNumber(ObjectUtil.isNotEmpty(tbRoomVo)?tbRoomVo.getRoomNumber():null);
|
||||
|
||||
costPayFeeAuditVoList.add(s);
|
||||
});
|
||||
return TableDataInfo.build(new Page<CostPayFeeAuditVo>().setRecords(costPayFeeAuditVoList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,7 +109,6 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
|
||||
lqw.eq(bo.getItemId() != null, CostPayFeeAudit::getItemId, bo.getItemId());
|
||||
lqw.eq(bo.getStartTime() != null, CostPayFeeAudit::getStartTime, bo.getStartTime());
|
||||
lqw.eq(bo.getEndTime() != null, CostPayFeeAudit::getEndTime, bo.getEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceivedAmount()), CostPayFeeAudit::getReceivedAmount, bo.getReceivedAmount());
|
||||
lqw.eq(bo.getReceivableAmount() != null, CostPayFeeAudit::getReceivableAmount, bo.getReceivableAmount());
|
||||
lqw.eq(bo.getPayTime() != null, CostPayFeeAudit::getPayTime, bo.getPayTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getState()), CostPayFeeAudit::getState, bo.getState());
|
||||
|
@@ -153,6 +153,7 @@ public class MachineLocationServiceImpl implements IMachineLocationService {
|
||||
@Override
|
||||
public Boolean insertByBo(MachineLocationBo bo) {
|
||||
MachineLocation add = MapstructUtils.convert(bo, MachineLocation.class);
|
||||
add.setLocationCode(RandomUtil.randomNumbers(11));
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@@ -179,7 +180,7 @@ public class MachineLocationServiceImpl implements IMachineLocationService {
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineLocation entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setLocationCode(RandomUtil.randomNumbers(11));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -9,10 +11,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.InspectionPlanStaff;
|
||||
import org.dromara.property.domain.MachineMaintainPlan;
|
||||
import org.dromara.property.domain.MachineMaintainPlanStaff;
|
||||
import org.dromara.property.domain.bo.InspectionPlanStaffBo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainPlanBo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainPlanStaffBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanStaffVo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanVo;
|
||||
import org.dromara.property.mapper.MachineMaintainPlanMapper;
|
||||
import org.dromara.property.mapper.MachineMaintainPlanStaffMapper;
|
||||
import org.dromara.property.service.IMachineMaintainPlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -32,6 +40,7 @@ import java.util.Collection;
|
||||
public class MachineMaintainPlanServiceImpl implements IMachineMaintainPlanService {
|
||||
|
||||
private final MachineMaintainPlanMapper baseMapper;
|
||||
private final MachineMaintainPlanStaffMapper machineMaintainPlanStaffMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养计划
|
||||
@@ -41,7 +50,12 @@ public class MachineMaintainPlanServiceImpl implements IMachineMaintainPlanServi
|
||||
*/
|
||||
@Override
|
||||
public MachineMaintainPlanVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
MachineMaintainPlanVo machineMaintainPlanVo = baseMapper.selectVoById(id);
|
||||
LambdaQueryWrapper<MachineMaintainPlanStaff> planQueryWrapper = new LambdaQueryWrapper<>();
|
||||
planQueryWrapper.eq(MachineMaintainPlanStaff::getMaintainPlanId,id);
|
||||
List<MachineMaintainPlanStaffVo> machineMaintainPlanStaffVos = machineMaintainPlanStaffMapper.selectVoList(planQueryWrapper);
|
||||
machineMaintainPlanVo.setMachineMaintainPlanStaffVos(machineMaintainPlanStaffVos );
|
||||
return machineMaintainPlanVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,10 +111,18 @@ public class MachineMaintainPlanServiceImpl implements IMachineMaintainPlanServi
|
||||
@Override
|
||||
public Boolean insertByBo(MachineMaintainPlanBo bo) {
|
||||
MachineMaintainPlan add = MapstructUtils.convert(bo, MachineMaintainPlan.class);
|
||||
add.setState("0");
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
List<MachineMaintainPlanStaffBo> machineMaintainPlanStaffBoList = bo.getMachineMaintainPlanStaffBoList();
|
||||
if (CollectionUtil.isNotEmpty(machineMaintainPlanStaffBoList)) {
|
||||
for (MachineMaintainPlanStaffBo staffBo : machineMaintainPlanStaffBoList) {
|
||||
staffBo.setMaintainPlanId(add.getId());
|
||||
}
|
||||
machineMaintainPlanStaffMapper.insertBatch(BeanUtil.copyToList(machineMaintainPlanStaffBoList, MachineMaintainPlanStaff.class));
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -123,7 +145,7 @@ public class MachineMaintainPlanServiceImpl implements IMachineMaintainPlanServi
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineMaintainPlan entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setState("0");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -109,6 +109,9 @@ public class PlantsOrderChargeServiceImpl implements IPlantsOrderChargeService {
|
||||
@Override
|
||||
public Boolean insertByBo(PlantsOrderChargeBo bo) {
|
||||
PlantsOrderCharge add = MapstructUtils.convert(bo, PlantsOrderCharge.class);
|
||||
if(add.getRent()!=null&&add.getDeposit()!=null&&add.getPenalty()!=null){
|
||||
add.setTotalAmount(add.getRent().add(add.getDeposit()).add(add.getPenalty()));
|
||||
}
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@@ -134,9 +137,7 @@ public class PlantsOrderChargeServiceImpl implements IPlantsOrderChargeService {
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsOrderCharge entity){
|
||||
if(entity.getRent()!=null&&entity.getDeposit()!=null&&entity.getPenalty()!=null){
|
||||
entity.setTotalAmount(entity.getRent().add(entity.getDeposit()).add(entity.getPenalty()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -137,7 +137,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(ServiceWorkOrdersBo bo) {
|
||||
ServiceWorkOrders add = MapstructUtils.convert(bo, ServiceWorkOrders.class);
|
||||
|
||||
add.setOrderNo("GD" + IdUtil.getSnowflakeNextIdStr());
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@@ -165,7 +165,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
*/
|
||||
private void validEntityBeforeSave(ServiceWorkOrders entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setOrderNo("GD" + IdUtil.getSnowflakeNextIdStr());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -10,11 +10,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbMeterBo;
|
||||
import org.dromara.property.domain.vo.TbMeterVo;
|
||||
import org.dromara.property.domain.TbMeter;
|
||||
import org.dromara.property.mapper.TbMeterMapper;
|
||||
import org.dromara.property.service.ITbMeterService;
|
||||
import org.dromara.property.domain.bo.TbMeterInfoBo;
|
||||
import org.dromara.property.domain.vo.TbMeterInfoVo;
|
||||
import org.dromara.property.domain.TbMeterInfo;
|
||||
import org.dromara.property.mapper.TbMeterInfoMapper;
|
||||
import org.dromara.property.service.ITbMeterInfoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -23,15 +23,15 @@ import java.util.Collection;
|
||||
/**
|
||||
* 水电气Service业务层处理
|
||||
*
|
||||
* @author LionLi
|
||||
* @since 2025-07-17
|
||||
* @author lsm
|
||||
* @since 2025-07-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbMeterServiceImpl implements ITbMeterService {
|
||||
public class TbMeterInfoServiceImpl implements ITbMeterInfoService {
|
||||
|
||||
private final TbMeterMapper baseMapper;
|
||||
private final TbMeterInfoMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询水电气
|
||||
@@ -40,7 +40,7 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
* @return 水电气
|
||||
*/
|
||||
@Override
|
||||
public TbMeterVo queryById(Long id){
|
||||
public TbMeterInfoVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
* @return 水电气分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbMeterVo> queryPageList(TbMeterBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbMeter> lqw = buildQueryWrapper(bo);
|
||||
Page<TbMeterVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
public TableDataInfo<TbMeterInfoVo> queryPageList(TbMeterInfoBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbMeterInfo> lqw = buildQueryWrapper(bo);
|
||||
Page<TbMeterInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -65,28 +65,25 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
* @return 水电气列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbMeterVo> queryList(TbMeterBo bo) {
|
||||
LambdaQueryWrapper<TbMeter> lqw = buildQueryWrapper(bo);
|
||||
public List<TbMeterInfoVo> queryList(TbMeterInfoBo bo) {
|
||||
LambdaQueryWrapper<TbMeterInfo> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbMeter> buildQueryWrapper(TbMeterBo bo) {
|
||||
private LambdaQueryWrapper<TbMeterInfo> buildQueryWrapper(TbMeterInfoBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbMeter> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbMeter::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMeterName()), TbMeter::getMeterName, bo.getMeterName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMeterCode()), TbMeter::getMeterCode, bo.getMeterCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactoryNo()), TbMeter::getFactoryNo, bo.getFactoryNo());
|
||||
lqw.eq(bo.getMeterType() != null, TbMeter::getMeterType, bo.getMeterType());
|
||||
lqw.eq(bo.getMeterPurpose() != null, TbMeter::getMeterPurpose, bo.getMeterPurpose());
|
||||
lqw.eq(bo.getShareType() != null, TbMeter::getShareType, bo.getShareType());
|
||||
lqw.eq(bo.getPayType() != null, TbMeter::getPayType, bo.getPayType());
|
||||
lqw.eq(bo.getDisplay() != null, TbMeter::getDisplay, bo.getDisplay());
|
||||
lqw.eq(bo.getMaxDisplay() != null, TbMeter::getMaxDisplay, bo.getMaxDisplay());
|
||||
lqw.eq(bo.getBillingRate() != null, TbMeter::getBillingRate, bo.getBillingRate());
|
||||
lqw.eq(bo.getSurplus() != null, TbMeter::getSurplus, bo.getSurplus());
|
||||
lqw.eq(bo.getCommunicationState() != null, TbMeter::getCommunicationState, bo.getCommunicationState());
|
||||
lqw.eq(bo.getRunningState() != null, TbMeter::getRunningState, bo.getRunningState());
|
||||
LambdaQueryWrapper<TbMeterInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbMeterInfo::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMeterName()), TbMeterInfo::getMeterName, bo.getMeterName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMeterCode()), TbMeterInfo::getMeterCode, bo.getMeterCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactoryNo()), TbMeterInfo::getFactoryNo, bo.getFactoryNo());
|
||||
lqw.eq(bo.getMeterType() != null, TbMeterInfo::getMeterType, bo.getMeterType());
|
||||
lqw.eq(bo.getMeterUnit() != null, TbMeterInfo::getMeterUnit, bo.getMeterUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInstallLocation()), TbMeterInfo::getInstallLocation, bo.getInstallLocation());
|
||||
lqw.eq(bo.getInitReading() != null, TbMeterInfo::getInitReading, bo.getInitReading());
|
||||
lqw.eq(bo.getMaxRang() != null, TbMeterInfo::getMaxRang, bo.getMaxRang());
|
||||
lqw.eq(bo.getCommunicationState() != null, TbMeterInfo::getCommunicationState, bo.getCommunicationState());
|
||||
lqw.eq(bo.getRunningState() != null, TbMeterInfo::getRunningState, bo.getRunningState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -97,8 +94,8 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbMeterBo bo) {
|
||||
TbMeter add = MapstructUtils.convert(bo, TbMeter.class);
|
||||
public Boolean insertByBo(TbMeterInfoBo bo) {
|
||||
TbMeterInfo add = MapstructUtils.convert(bo, TbMeterInfo.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@@ -114,8 +111,8 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbMeterBo bo) {
|
||||
TbMeter update = MapstructUtils.convert(bo, TbMeter.class);
|
||||
public Boolean updateByBo(TbMeterInfoBo bo) {
|
||||
TbMeterInfo update = MapstructUtils.convert(bo, TbMeterInfo.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
@@ -123,7 +120,7 @@ public class TbMeterServiceImpl implements ITbMeterService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbMeter entity){
|
||||
private void validEntityBeforeSave(TbMeterInfo entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
@@ -0,0 +1,139 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbMeterRecordBo;
|
||||
import org.dromara.property.domain.vo.TbMeterRecordVo;
|
||||
import org.dromara.property.domain.TbMeterRecord;
|
||||
import org.dromara.property.mapper.TbMeterRecordMapper;
|
||||
import org.dromara.property.service.ITbMeterRecordService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 抄记录Service业务层处理
|
||||
*
|
||||
* @author lsm
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbMeterRecordServiceImpl implements ITbMeterRecordService {
|
||||
|
||||
private final TbMeterRecordMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询抄记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 抄记录
|
||||
*/
|
||||
@Override
|
||||
public TbMeterRecordVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询抄记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 抄记录分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbMeterRecordVo> queryPageList(TbMeterRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbMeterRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<TbMeterRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的抄记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 抄记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbMeterRecordVo> queryList(TbMeterRecordBo bo) {
|
||||
LambdaQueryWrapper<TbMeterRecord> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbMeterRecord> buildQueryWrapper(TbMeterRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbMeterRecord> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbMeterRecord::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMeterId()), TbMeterRecord::getMeterId, bo.getMeterId());
|
||||
lqw.eq(bo.getReaderId() != null, TbMeterRecord::getReaderId, bo.getReaderId());
|
||||
lqw.eq(bo.getReadingTime() != null, TbMeterRecord::getReadingTime, bo.getReadingTime());
|
||||
lqw.eq(bo.getCurrentReading() != null, TbMeterRecord::getCurrentReading, bo.getCurrentReading());
|
||||
lqw.eq(bo.getPreviousReading() != null, TbMeterRecord::getPreviousReading, bo.getPreviousReading());
|
||||
lqw.eq(bo.getConsumption() != null, TbMeterRecord::getConsumption, bo.getConsumption());
|
||||
lqw.eq(bo.getReadingMethod() != null, TbMeterRecord::getReadingMethod, bo.getReadingMethod());
|
||||
lqw.eq(bo.getImgOssid() != null, TbMeterRecord::getImgOssid, bo.getImgOssid());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增抄记录
|
||||
*
|
||||
* @param bo 抄记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbMeterRecordBo bo) {
|
||||
TbMeterRecord add = MapstructUtils.convert(bo, TbMeterRecord.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改抄记录
|
||||
*
|
||||
* @param bo 抄记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbMeterRecordBo bo) {
|
||||
TbMeterRecord update = MapstructUtils.convert(bo, TbMeterRecord.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbMeterRecord entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除抄记录信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user