diff --git a/ruoyi-common/ruoyi-common-core/src/main/resources/mapper/CostPayFeeAuditMapper.xml b/ruoyi-common/ruoyi-common-core/src/main/resources/mapper/CostPayFeeAuditMapper.xml new file mode 100644 index 00000000..3187edd2 --- /dev/null +++ b/ruoyi-common/ruoyi-common-core/src/main/resources/mapper/CostPayFeeAuditMapper.xml @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into cost_pay_fee_audit(house_charge_iditem_idstart_timeend_timereceived_amountreceivable_amountpay_timestateremarkcreate_timecreate_byupdate_timeupdate_bysearch_valuecreate_depttenant_id) + values (#{houseChargeId}#{itemId}#{startTime}#{endTime}#{receivedAmount}#{receivableAmount}#{payTime}#{state}#{remark}#{createTime}#{createBy}#{updateTime}#{updateBy}#{searchValue}#{createDept}#{tenantId}) + + + + insert into cost_pay_fee_audit(house_charge_iditem_idstart_timeend_timereceived_amountreceivable_amountpay_timestateremarkcreate_timecreate_byupdate_timeupdate_bysearch_valuecreate_depttenant_id) + values + + (#{entity.houseChargeId}#{entity.itemId}#{entity.startTime}#{entity.endTime}#{entity.receivedAmount}#{entity.receivableAmount}#{entity.payTime}#{entity.state}#{entity.remark}#{entity.createTime}#{entity.createBy}#{entity.updateTime}#{entity.updateBy}#{entity.searchValue}#{entity.createDept}#{entity.tenantId}) + + + + + insert into cost_pay_fee_audit(house_charge_iditem_idstart_timeend_timereceived_amountreceivable_amountpay_timestateremarkcreate_timecreate_byupdate_timeupdate_bysearch_valuecreate_depttenant_id) + values + + (#{entity.houseChargeId}#{entity.itemId}#{entity.startTime}#{entity.endTime}#{entity.receivedAmount}#{entity.receivableAmount}#{entity.payTime}#{entity.state}#{entity.remark}#{entity.createTime}#{entity.createBy}#{entity.updateTime}#{entity.updateBy}#{entity.searchValue}#{entity.createDept}#{entity.tenantId}) + + on duplicate key update +house_charge_id = values(house_charge_id)item_id = values(item_id)start_time = values(start_time)end_time = values(end_time)received_amount = values(received_amount)receivable_amount = values(receivable_amount)pay_time = values(pay_time)state = values(state)remark = values(remark)create_time = values(create_time)create_by = values(create_by)update_time = values(update_time)update_by = values(update_by)search_value = values(search_value)create_dept = values(create_dept)tenant_id = values(tenant_id) + + + + + update cost_pay_fee_audit + + + house_charge_id = #{houseChargeId}, + + + item_id = #{itemId}, + + + start_time = #{startTime}, + + + end_time = #{endTime}, + + + received_amount = #{receivedAmount}, + + + receivable_amount = #{receivableAmount}, + + + pay_time = #{payTime}, + + + state = #{state}, + + + remark = #{remark}, + + + create_time = #{createTime}, + + + create_by = #{createBy}, + + + update_time = #{updateTime}, + + + update_by = #{updateBy}, + + + search_value = #{searchValue}, + + + create_dept = #{createDept}, + + + tenant_id = #{tenantId}, + + + where id = #{id} + + + + + delete from cost_pay_fee_audit where id = #{id} + + + + + diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostHouseChargeController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostHouseChargeController.java index d519800a..26d4f29c 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostHouseChargeController.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostHouseChargeController.java @@ -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 getInfo(@NotNull(message = "主键不能为空") + public R getInfo(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) { return R.ok(costHouseChargeService.queryById(id)); } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostPayFeeAuditController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostPayFeeAuditController.java index 91264539..338c4702 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostPayFeeAuditController.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/CostPayFeeAuditController.java @@ -40,7 +40,7 @@ public class CostPayFeeAuditController extends BaseController { /** * 查询费用-缴费审核列表 */ - @SaCheckPermission("system:payFeeAudit:list") + // @SaCheckPermission("system:payFeeAudit:list") @GetMapping("/list") public TableDataInfo list(CostPayFeeAuditBo bo, PageQuery pageQuery) { return costPayFeeAuditService.queryPageList(bo, pageQuery); diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostItems.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostItems.java index 68e65aa0..9e45b3df 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostItems.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostItems.java @@ -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; } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterType.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterType.java index 6d208417..70229a7e 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterType.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterType.java @@ -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; - - } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java index d3250a20..a45d5dd3 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostMeterWater.java @@ -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; } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostPayFeeAudit.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostPayFeeAudit.java index d4f3a67e..6ea7a44d 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostPayFeeAudit.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/CostPayFeeAudit.java @@ -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; - - } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/MachineMaintainPlan.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/MachineMaintainPlan.java index 1d4c6c74..3309a767 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/MachineMaintainPlan.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/MachineMaintainPlan.java @@ -77,10 +77,4 @@ public class MachineMaintainPlan extends TenantEntity { */ private String state; - /** - * 搜索值 - */ - private String searchValue; - - } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/TbRoom.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/TbRoom.java index 72c3820c..0c6536b0 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/TbRoom.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/TbRoom.java @@ -60,6 +60,10 @@ public class TbRoom extends TenantEntity { * 面积(平方米) */ private Float area; + /** + * 套内面积(平方米) + */ + private Float insideInArea; /** * 户型(如2室1厅1卫) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostItemsBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostItemsBo.java index 78e745fc..210dcde4 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostItemsBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostItemsBo.java @@ -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; /** * 是否手机缴费 @@ -83,12 +94,12 @@ public class CostItemsBo extends BaseEntity { /** * 计费单价 */ - private Long unitPrice; + private BigDecimal unitPrice; /** * 附加费 */ - private Long surcharge; + private BigDecimal surcharge; /** * 搜索值 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java index 8232ab36..274ab26c 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostMeterWaterBo.java @@ -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 */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostPayFeeAuditBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostPayFeeAuditBo.java index 22612abd..0f6c833f 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostPayFeeAuditBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/CostPayFeeAuditBo.java @@ -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; /** * 缴费时间 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/MachineMaintainPlanBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/MachineMaintainPlanBo.java index 40ae33aa..bd503179 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/MachineMaintainPlanBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/MachineMaintainPlanBo.java @@ -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 machineMaintainPlanStaffBoList; + } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbRoomBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbRoomBo.java index 13163106..bd2a9c6a 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbRoomBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbRoomBo.java @@ -47,7 +47,10 @@ public class TbRoomBo extends BaseEntity { * 面积(平方米) */ private Float area; - + /** + * 套内面积(平方米) + */ + private Float insideInArea; /** * 户型(如2室1厅1卫) */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostHouseChargeDetailVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostHouseChargeDetailVo.java new file mode 100644 index 00000000..bf5e2686 --- /dev/null +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostHouseChargeDetailVo.java @@ -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; + +} diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostItemsVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostItemsVo.java index 455980f7..e2ed7ba5 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostItemsVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostItemsVo.java @@ -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; } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterTypeVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterTypeVo.java index ebce0fa5..feaf37cf 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterTypeVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterTypeVo.java @@ -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; /** * 搜索值 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java index 0b72aa74..32349fec 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostMeterWaterVo.java @@ -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 */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostPayFeeAuditVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostPayFeeAuditVo.java index 3d2c6341..306df5be 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostPayFeeAuditVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/CostPayFeeAuditVo.java @@ -8,6 +8,7 @@ import org.dromara.property.domain.CostPayFeeAudit; import java.io.Serial; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; @@ -38,12 +39,26 @@ public class CostPayFeeAuditVo implements Serializable { @ExcelProperty(value = "房屋收费id") private Long houseChargeId; + /** + * 房间号(如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 +75,13 @@ public class CostPayFeeAuditVo implements Serializable { * 实付金额 */ @ExcelProperty(value = "实付金额") - private String receivedAmount; + private BigDecimal receivedAmount; /** * 应收金额 */ @ExcelProperty(value = "应收金额") - private Long receivableAmount; + private BigDecimal receivableAmount; /** * 缴费时间 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/MachineMaintainPlanVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/MachineMaintainPlanVo.java index d5f8658c..8e3a8ebd 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/MachineMaintainPlanVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/MachineMaintainPlanVo.java @@ -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 machineMaintainPlanStaffVos; } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/TbRoomVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/TbRoomVo.java index 90b87bf2..1ebd32f5 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/TbRoomVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/TbRoomVo.java @@ -77,7 +77,10 @@ public class TbRoomVo implements Serializable { */ @ExcelProperty(value = "面积(平方米)") private Long area; - + /** + * 套内面积(平方米) + */ + private Float insideInArea; /** * 户型(如2室1厅1卫) */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CostPayFeeAuditMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CostPayFeeAuditMapper.java index dc74e2e1..000b755f 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CostPayFeeAuditMapper.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/CostPayFeeAuditMapper.java @@ -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; diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICostHouseChargeService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICostHouseChargeService.java index 7a413523..bd998b01 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICostHouseChargeService.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/ICostHouseChargeService.java @@ -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); /** * 分页查询房屋收费列表 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostHouseChargeServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostHouseChargeServiceImpl.java index fb892c03..b946d797 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostHouseChargeServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostHouseChargeServiceImpl.java @@ -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; @@ -32,6 +38,8 @@ import java.util.Collection; public class CostHouseChargeServiceImpl implements ICostHouseChargeService { private final CostHouseChargeMapper baseMapper; + private final CostItemsMapper costItemsMapper; + private final TbRoomMapper tbRoomMapper; /** * 查询房屋收费 @@ -40,8 +48,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; } /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostItemsServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostItemsServiceImpl.java index 2b9e954e..c30245ae 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostItemsServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostItemsServiceImpl.java @@ -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) { diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java index 0be06bb1..40b62e0d 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostPayFeeAuditServiceImpl.java @@ -78,7 +78,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()); diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineLocationServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineLocationServiceImpl.java index 7a95e84c..942eb66e 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineLocationServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineLocationServiceImpl.java @@ -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)); + } /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineMaintainPlanServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineMaintainPlanServiceImpl.java index e649a73e..a4e227dc 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineMaintainPlanServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/MachineMaintainPlanServiceImpl.java @@ -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 planQueryWrapper = new LambdaQueryWrapper<>(); + planQueryWrapper.eq(MachineMaintainPlanStaff::getMaintainPlanId,id); + List 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 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"); + } /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsOrderChargeServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsOrderChargeServiceImpl.java index 1dd6f559..955be64c 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsOrderChargeServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsOrderChargeServiceImpl.java @@ -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())); - } + } /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java index c56d9dac..866ef1d5 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java @@ -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()); + } /**