Ver código fonte

物业费管理

LIVE_YE 4 meses atrás
pai
commit
edfbc19768

+ 118 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/houseInfo/PropertyFeeController.java

@@ -0,0 +1,118 @@
+package com.ruoyi.web.controller.houseInfo;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.system.domain.houseInfo.PropertyFee;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.service.IPropertyFeeService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 物业费管理Controller
+ *
+ * @author boman
+ * @date 2025-03-03
+ */
+@RestController
+@RequestMapping("/wuYe/fee")
+public class PropertyFeeController extends BaseController
+{
+    @Autowired
+    private IPropertyFeeService propertyFeeService;
+
+/**
+ * 查询物业费管理列表
+ */
+@PreAuthorize("@ss.hasPermi('wuYe:fee:list')")
+@GetMapping("/list")
+    public TableDataInfo list(PropertyFee propertyFee)
+    {
+        startPage();
+        List<PropertyFee> list = propertyFeeService.selectPropertyFeeList(propertyFee);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出物业费管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:export')")
+    @Log(title = "物业费管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PropertyFee propertyFee)
+    {
+        List<PropertyFee> list = propertyFeeService.selectPropertyFeeList(propertyFee);
+        ExcelUtil<PropertyFee> util = new ExcelUtil<PropertyFee>(PropertyFee.class);
+        util.exportExcel(response, list, "物业费管理数据");
+    }
+
+    /**
+     * 获取物业费管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:query')")
+    @GetMapping(value = "/{propertyId}")
+    public AjaxResult getInfo(@PathVariable("propertyId") Long propertyId)
+    {
+        return success(propertyFeeService.selectPropertyFeeByPropertyId(propertyId));
+    }
+
+    /**
+     * 新增物业费管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:add')")
+    @Log(title = "物业费管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PropertyFee propertyFee)
+    {
+        return toAjax(propertyFeeService.insertPropertyFee(propertyFee));
+    }
+
+    /**
+     * 修改物业费管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:edit')")
+    @Log(title = "物业费管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody PropertyFee propertyFee)
+    {
+        return toAjax(propertyFeeService.updatePropertyFee(propertyFee));
+    }
+
+    /**
+     * 删除物业费管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:remove')")
+    @Log(title = "物业费管理", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{propertyIds}")
+    public AjaxResult remove(@PathVariable Long[] propertyIds)
+    {
+        return toAjax(propertyFeeService.deletePropertyFeeByPropertyIds(propertyIds));
+    }
+
+
+    /**
+     * 物业费统计
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:statistics')")
+    @Log(title = "物业费管理", businessType = BusinessType.DELETE)
+    @GetMapping("/statistics")
+    public AjaxResult statistics(PropertyFee propertyFee)
+    {
+        return propertyFeeService.statistics(propertyFee);
+    }
+
+}

+ 5 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -50,6 +50,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return dateTimeNow(YYYY_MM_DD);
     }
 
+    public static String getYear()
+    {
+        return dateTimeNow(YYYY);
+    }
+
     public static final String getTime()
     {
         return dateTimeNow(YYYY_MM_DD_HH_MM_SS);

+ 267 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/houseInfo/PropertyFee.java

@@ -0,0 +1,267 @@
+package com.ruoyi.system.domain.houseInfo;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 物业费管理对象 property_fee
+ * 
+ * @author boman
+ * @date 2025-03-03
+ */
+public class PropertyFee extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 物业费信息主键 */
+    private Long propertyId;
+
+    /** 房屋信息主键id */
+    @Excel(name = "房屋信息主键id")
+    private Long houseId;
+
+    /** 权利人姓名 */
+    @Excel(name = "权利人姓名")
+    private String ownerName;
+
+    /** 房屋坐落位置 */
+    @Excel(name = "房屋坐落位置")
+    private String location;
+
+    /** 房屋面积,单位为平方米 */
+    @Excel(name = "房屋面积,单位为平方米")
+    private BigDecimal area;
+
+    /** 不动产单元号,唯一标识不动产单元 */
+    @Excel(name = "不动产单元号,唯一标识不动产单元")
+    private String propertyUnitNumber;
+
+    /** 房屋的详细门牌号 */
+    @Excel(name = "房屋的详细门牌号")
+    private String detailedAddress;
+
+    /** 是否有车位,Y表示有,N表示无 */
+    @Excel(name = "是否有车位,Y表示有,N表示无")
+    private String hasParkingSpace;
+
+    /** 车位编号 */
+    @Excel(name = "车位编号")
+    private String parkingNumber;
+
+    /** 房屋所在小区名称 */
+    @Excel(name = "房屋所在小区名称")
+    private String communityName;
+
+    /** 物业费缴费年份 */
+    @Excel(name = "物业费缴费年份")
+    private String year;
+
+    /** 业主缴费时间 */
+    @Excel(name = "业主缴费时间")
+    private String time;
+
+    /** 应缴物业费用 */
+    @Excel(name = "应缴物业费用")
+    private BigDecimal tenementExpense;
+
+    /** 应缴车位费用 */
+    @Excel(name = "应缴车位费用")
+    private BigDecimal parkingExpense;
+
+    /** 应缴能耗费用 */
+    @Excel(name = "应缴能耗费用")
+    private BigDecimal energyExpense;
+
+    /** 应缴总费用 */
+    @Excel(name = "应缴总费用")
+    private BigDecimal totalExpense;
+
+    /** 是否缴费,Y表示有,N表示无 */
+    @Excel(name = "是否缴费,Y表示有,N表示无")
+    private String isExpense;
+
+    public void setPropertyId(Long propertyId) 
+    {
+        this.propertyId = propertyId;
+    }
+
+    public Long getPropertyId() 
+    {
+        return propertyId;
+    }
+    public void setHouseId(Long houseId) 
+    {
+        this.houseId = houseId;
+    }
+
+    public Long getHouseId() 
+    {
+        return houseId;
+    }
+    public void setOwnerName(String ownerName) 
+    {
+        this.ownerName = ownerName;
+    }
+
+    public String getOwnerName() 
+    {
+        return ownerName;
+    }
+    public void setLocation(String location) 
+    {
+        this.location = location;
+    }
+
+    public String getLocation() 
+    {
+        return location;
+    }
+    public void setArea(BigDecimal area) 
+    {
+        this.area = area;
+    }
+
+    public BigDecimal getArea() 
+    {
+        return area;
+    }
+    public void setPropertyUnitNumber(String propertyUnitNumber) 
+    {
+        this.propertyUnitNumber = propertyUnitNumber;
+    }
+
+    public String getPropertyUnitNumber() 
+    {
+        return propertyUnitNumber;
+    }
+    public void setDetailedAddress(String detailedAddress) 
+    {
+        this.detailedAddress = detailedAddress;
+    }
+
+    public String getDetailedAddress() 
+    {
+        return detailedAddress;
+    }
+    public void setHasParkingSpace(String hasParkingSpace) 
+    {
+        this.hasParkingSpace = hasParkingSpace;
+    }
+
+    public String getHasParkingSpace() 
+    {
+        return hasParkingSpace;
+    }
+    public void setParkingNumber(String parkingNumber) 
+    {
+        this.parkingNumber = parkingNumber;
+    }
+
+    public String getParkingNumber() 
+    {
+        return parkingNumber;
+    }
+    public void setCommunityName(String communityName) 
+    {
+        this.communityName = communityName;
+    }
+
+    public String getCommunityName() 
+    {
+        return communityName;
+    }
+    public void setYear(String year) 
+    {
+        this.year = year;
+    }
+
+    public String getYear() 
+    {
+        return year;
+    }
+    public void setTime(String time) 
+    {
+        this.time = time;
+    }
+
+    public String getTime() 
+    {
+        return time;
+    }
+    public void setTenementExpense(BigDecimal tenementExpense) 
+    {
+        this.tenementExpense = tenementExpense;
+    }
+
+    public BigDecimal getTenementExpense() 
+    {
+        return tenementExpense;
+    }
+    public void setParkingExpense(BigDecimal parkingExpense) 
+    {
+        this.parkingExpense = parkingExpense;
+    }
+
+    public BigDecimal getParkingExpense() 
+    {
+        return parkingExpense;
+    }
+    public void setEnergyExpense(BigDecimal energyExpense) 
+    {
+        this.energyExpense = energyExpense;
+    }
+
+    public BigDecimal getEnergyExpense() 
+    {
+        return energyExpense;
+    }
+    public void setTotalExpense(BigDecimal totalExpense) 
+    {
+        this.totalExpense = totalExpense;
+    }
+
+    public BigDecimal getTotalExpense() 
+    {
+        return totalExpense;
+    }
+    public void setIsExpense(String isExpense) 
+    {
+        this.isExpense = isExpense;
+    }
+
+    public String getIsExpense() 
+    {
+        return isExpense;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("propertyId", getPropertyId())
+            .append("houseId", getHouseId())
+            .append("ownerName", getOwnerName())
+            .append("location", getLocation())
+            .append("area", getArea())
+            .append("propertyUnitNumber", getPropertyUnitNumber())
+            .append("detailedAddress", getDetailedAddress())
+            .append("hasParkingSpace", getHasParkingSpace())
+            .append("parkingNumber", getParkingNumber())
+            .append("communityName", getCommunityName())
+            .append("year", getYear())
+            .append("time", getTime())
+            .append("tenementExpense", getTenementExpense())
+            .append("parkingExpense", getParkingExpense())
+            .append("energyExpense", getEnergyExpense())
+            .append("totalExpense", getTotalExpense())
+            .append("isExpense", getIsExpense())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PropertyFeeMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.houseInfo.PropertyFee;
+
+import java.util.List;
+
+/**
+ * 物业费管理Mapper接口
+ * 
+ * @author boman
+ * @date 2025-03-03
+ */
+public interface PropertyFeeMapper 
+{
+    /**
+     * 查询物业费管理
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 物业费管理
+     */
+    public PropertyFee selectPropertyFeeByPropertyId(Long propertyId);
+
+    /**
+     * 查询物业费管理列表
+     * 
+     * @param propertyFee 物业费管理
+     * @return 物业费管理集合
+     */
+    public List<PropertyFee> selectPropertyFeeList(PropertyFee propertyFee);
+
+    /**
+     * 新增物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    public int insertPropertyFee(PropertyFee propertyFee);
+
+    /**
+     * 修改物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    public int updatePropertyFee(PropertyFee propertyFee);
+
+    /**
+     * 删除物业费管理
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 结果
+     */
+    public int deletePropertyFeeByPropertyId(Long propertyId);
+
+    /**
+     * 批量删除物业费管理
+     * 
+     * @param propertyIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePropertyFeeByPropertyIds(Long[] propertyIds);
+}

+ 65 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IPropertyFeeService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.houseInfo.PropertyFee;
+
+import java.util.List;
+
+/**
+ * 物业费管理Service接口
+ * 
+ * @author boman
+ * @date 2025-03-03
+ */
+public interface IPropertyFeeService 
+{
+    /**
+     * 查询物业费管理
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 物业费管理
+     */
+    public PropertyFee selectPropertyFeeByPropertyId(Long propertyId);
+
+    /**
+     * 查询物业费管理列表
+     * 
+     * @param propertyFee 物业费管理
+     * @return 物业费管理集合
+     */
+    public List<PropertyFee> selectPropertyFeeList(PropertyFee propertyFee);
+
+    /**
+     * 新增物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    public int insertPropertyFee(PropertyFee propertyFee);
+
+    /**
+     * 修改物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    public int updatePropertyFee(PropertyFee propertyFee);
+
+    /**
+     * 批量删除物业费管理
+     * 
+     * @param propertyIds 需要删除的物业费管理主键集合
+     * @return 结果
+     */
+    public int deletePropertyFeeByPropertyIds(Long[] propertyIds);
+
+    /**
+     * 删除物业费管理信息
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 结果
+     */
+    public int deletePropertyFeeByPropertyId(Long propertyId);
+
+    AjaxResult statistics(PropertyFee propertyFee);
+}

+ 145 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PropertyFeeServiceImpl.java

@@ -0,0 +1,145 @@
+package com.ruoyi.system.service.impl;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.houseInfo.PropertyFee;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.PropertyFeeMapper;
+import com.ruoyi.system.service.IPropertyFeeService;
+
+/**
+ * 物业费管理Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-03-03
+ */
+@Service
+public class PropertyFeeServiceImpl implements IPropertyFeeService 
+{
+    @Autowired
+    private PropertyFeeMapper propertyFeeMapper;
+
+    /**
+     * 查询物业费管理
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 物业费管理
+     */
+    @Override
+    public PropertyFee selectPropertyFeeByPropertyId(Long propertyId)
+    {
+        return propertyFeeMapper.selectPropertyFeeByPropertyId(propertyId);
+    }
+
+    /**
+     * 查询物业费管理列表
+     * 
+     * @param propertyFee 物业费管理
+     * @return 物业费管理
+     */
+    @Override
+    public List<PropertyFee> selectPropertyFeeList(PropertyFee propertyFee)
+    {
+        return propertyFeeMapper.selectPropertyFeeList(propertyFee);
+    }
+
+    /**
+     * 新增物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    @Override
+    public int insertPropertyFee(PropertyFee propertyFee)
+    {
+        propertyFee.setCreateTime(DateUtils.getNowDate());
+        return propertyFeeMapper.insertPropertyFee(propertyFee);
+    }
+
+    /**
+     * 修改物业费管理
+     * 
+     * @param propertyFee 物业费管理
+     * @return 结果
+     */
+    @Override
+    public int updatePropertyFee(PropertyFee propertyFee)
+    {
+        propertyFee.setUpdateTime(DateUtils.getNowDate());
+        return propertyFeeMapper.updatePropertyFee(propertyFee);
+    }
+
+    /**
+     * 批量删除物业费管理
+     * 
+     * @param propertyIds 需要删除的物业费管理主键
+     * @return 结果
+     */
+    @Override
+    public int deletePropertyFeeByPropertyIds(Long[] propertyIds)
+    {
+        return propertyFeeMapper.deletePropertyFeeByPropertyIds(propertyIds);
+    }
+
+    /**
+     * 删除物业费管理信息
+     * 
+     * @param propertyId 物业费管理主键
+     * @return 结果
+     */
+    @Override
+    public int deletePropertyFeeByPropertyId(Long propertyId)
+    {
+        return propertyFeeMapper.deletePropertyFeeByPropertyId(propertyId);
+    }
+
+    @Override
+    public AjaxResult statistics(PropertyFee propertyFee) {
+        Map<String,BigDecimal> map = new HashMap<>();
+        //物业费
+        BigDecimal yjwyf = new BigDecimal("0.00");
+        BigDecimal wjwyf = new BigDecimal("0.00");
+
+        //车位费
+        BigDecimal yjcwf = new BigDecimal("0.00");
+        BigDecimal wjcwf = new BigDecimal("0.00");
+
+        //能耗费
+        BigDecimal yjnhf = new BigDecimal("0.00");
+        BigDecimal wjnhf = new BigDecimal("0.00");
+
+        //查询本年份所有数据并统计
+        if(StringUtils.isEmpty(propertyFee.getYear())){
+            propertyFee.setYear(DateUtils.getYear());
+        }
+
+        List<PropertyFee> propertyFees = propertyFeeMapper.selectPropertyFeeList(propertyFee);
+        if(propertyFees!=null && propertyFees.size()>0){
+            for (PropertyFee fee : propertyFees) {
+                if("Y".equals(fee.getIsExpense())){
+                    yjwyf = yjwyf.add(fee.getTenementExpense());
+                    yjcwf = yjcwf.add(fee.getParkingExpense());
+                    yjnhf = yjnhf.add(fee.getEnergyExpense());
+                }else{
+                    wjwyf = wjwyf.add(fee.getTenementExpense());
+                    wjcwf = wjcwf.add(fee.getParkingExpense());
+                    wjnhf = wjnhf.add(fee.getEnergyExpense());
+                }
+            }
+        }
+        map.put("yjwyf",yjwyf);
+        map.put("wjwyf",wjwyf);
+        map.put("yjcwf",yjcwf);
+        map.put("wjcwf",wjcwf);
+        map.put("yjnhf",yjnhf);
+        map.put("wjnhf",wjnhf);
+        return AjaxResult.success(map);
+    }
+}

+ 151 - 0
ruoyi-system/src/main/resources/mapper/system/PropertyFeeMapper.xml

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.PropertyFeeMapper">
+    
+    <resultMap type="PropertyFee" id="PropertyFeeResult">
+        <result property="propertyId"    column="property_id"    />
+        <result property="houseId"    column="house_id"    />
+        <result property="ownerName"    column="owner_name"    />
+        <result property="location"    column="location"    />
+        <result property="area"    column="area"    />
+        <result property="propertyUnitNumber"    column="property_unit_number"    />
+        <result property="detailedAddress"    column="detailed_address"    />
+        <result property="hasParkingSpace"    column="has_parking_space"    />
+        <result property="parkingNumber"    column="parking_number"    />
+        <result property="communityName"    column="community_name"    />
+        <result property="year"    column="year"    />
+        <result property="time"    column="time"    />
+        <result property="tenementExpense"    column="tenement_expense"    />
+        <result property="parkingExpense"    column="parking_expense"    />
+        <result property="energyExpense"    column="energy_expense"    />
+        <result property="totalExpense"    column="total_expense"    />
+        <result property="isExpense"    column="is_expense"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectPropertyFeeVo">
+        select property_id, house_id, owner_name, location, area, property_unit_number, detailed_address, has_parking_space, parking_number, community_name, year, time, tenement_expense, parking_expense, energy_expense, total_expense, is_expense, create_by, create_time, update_by, update_time, remark from property_fee
+    </sql>
+
+    <select id="selectPropertyFeeList" parameterType="PropertyFee" resultMap="PropertyFeeResult">
+        <include refid="selectPropertyFeeVo"/>
+        <where>  
+            <if test="houseId != null "> and house_id = #{houseId}</if>
+            <if test="ownerName != null  and ownerName != ''"> and owner_name like concat('%', #{ownerName}, '%')</if>
+            <if test="location != null  and location != ''"> and location = #{location}</if>
+            <if test="area != null "> and area = #{area}</if>
+            <if test="propertyUnitNumber != null  and propertyUnitNumber != ''"> and property_unit_number = #{propertyUnitNumber}</if>
+            <if test="detailedAddress != null  and detailedAddress != ''"> and detailed_address = #{detailedAddress}</if>
+            <if test="hasParkingSpace != null  and hasParkingSpace != ''"> and has_parking_space = #{hasParkingSpace}</if>
+            <if test="parkingNumber != null  and parkingNumber != ''"> and parking_number = #{parkingNumber}</if>
+            <if test="communityName != null  and communityName != ''"> and community_name like concat('%', #{communityName}, '%')</if>
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="time != null  and time != ''"> and time = #{time}</if>
+            <if test="tenementExpense != null "> and tenement_expense = #{tenementExpense}</if>
+            <if test="parkingExpense != null "> and parking_expense = #{parkingExpense}</if>
+            <if test="energyExpense != null "> and energy_expense = #{energyExpense}</if>
+            <if test="totalExpense != null "> and total_expense = #{totalExpense}</if>
+            <if test="isExpense != null  and isExpense != ''"> and is_expense = #{isExpense}</if>
+        </where>
+    </select>
+    
+    <select id="selectPropertyFeeByPropertyId" parameterType="Long" resultMap="PropertyFeeResult">
+        <include refid="selectPropertyFeeVo"/>
+        where property_id = #{propertyId}
+    </select>
+
+    <insert id="insertPropertyFee" parameterType="PropertyFee" useGeneratedKeys="true" keyProperty="propertyId">
+        insert into property_fee
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="houseId != null">house_id,</if>
+            <if test="ownerName != null">owner_name,</if>
+            <if test="location != null">location,</if>
+            <if test="area != null">area,</if>
+            <if test="propertyUnitNumber != null">property_unit_number,</if>
+            <if test="detailedAddress != null">detailed_address,</if>
+            <if test="hasParkingSpace != null">has_parking_space,</if>
+            <if test="parkingNumber != null">parking_number,</if>
+            <if test="communityName != null">community_name,</if>
+            <if test="year != null">year,</if>
+            <if test="time != null">time,</if>
+            <if test="tenementExpense != null">tenement_expense,</if>
+            <if test="parkingExpense != null">parking_expense,</if>
+            <if test="energyExpense != null">energy_expense,</if>
+            <if test="totalExpense != null">total_expense,</if>
+            <if test="isExpense != null">is_expense,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="houseId != null">#{houseId},</if>
+            <if test="ownerName != null">#{ownerName},</if>
+            <if test="location != null">#{location},</if>
+            <if test="area != null">#{area},</if>
+            <if test="propertyUnitNumber != null">#{propertyUnitNumber},</if>
+            <if test="detailedAddress != null">#{detailedAddress},</if>
+            <if test="hasParkingSpace != null">#{hasParkingSpace},</if>
+            <if test="parkingNumber != null">#{parkingNumber},</if>
+            <if test="communityName != null">#{communityName},</if>
+            <if test="year != null">#{year},</if>
+            <if test="time != null">#{time},</if>
+            <if test="tenementExpense != null">#{tenementExpense},</if>
+            <if test="parkingExpense != null">#{parkingExpense},</if>
+            <if test="energyExpense != null">#{energyExpense},</if>
+            <if test="totalExpense != null">#{totalExpense},</if>
+            <if test="isExpense != null">#{isExpense},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePropertyFee" parameterType="PropertyFee">
+        update property_fee
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="houseId != null">house_id = #{houseId},</if>
+            <if test="ownerName != null">owner_name = #{ownerName},</if>
+            <if test="location != null">location = #{location},</if>
+            <if test="area != null">area = #{area},</if>
+            <if test="propertyUnitNumber != null">property_unit_number = #{propertyUnitNumber},</if>
+            <if test="detailedAddress != null">detailed_address = #{detailedAddress},</if>
+            <if test="hasParkingSpace != null">has_parking_space = #{hasParkingSpace},</if>
+            <if test="parkingNumber != null">parking_number = #{parkingNumber},</if>
+            <if test="communityName != null">community_name = #{communityName},</if>
+            <if test="year != null">year = #{year},</if>
+            <if test="time != null">time = #{time},</if>
+            <if test="tenementExpense != null">tenement_expense = #{tenementExpense},</if>
+            <if test="parkingExpense != null">parking_expense = #{parkingExpense},</if>
+            <if test="energyExpense != null">energy_expense = #{energyExpense},</if>
+            <if test="totalExpense != null">total_expense = #{totalExpense},</if>
+            <if test="isExpense != null">is_expense = #{isExpense},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where property_id = #{propertyId}
+    </update>
+
+    <delete id="deletePropertyFeeByPropertyId" parameterType="Long">
+        delete from property_fee where property_id = #{propertyId}
+    </delete>
+
+    <delete id="deletePropertyFeeByPropertyIds" parameterType="String">
+        delete from property_fee where property_id in 
+        <foreach item="propertyId" collection="array" open="(" separator="," close=")">
+            #{propertyId}
+        </foreach>
+    </delete>
+</mapper>