ソースを参照

feat(property): 增加收据起止日期字段并优化房屋查询条件

- 在 AReceiptInfoMapper.xml 中新增 startDate 和 endDate 字段映射- 更新 ASimplifiedHouseInfoDto.java 添加 houseName 属性
- 修改 ASimplifiedHouseInfoMapper.xml 支持 houseName 模糊查询
- 调整 ARentalContractServiceImpl.java 中 markToFieldCount 的值
- 更新 pom.xml 设置 finalName 为 enterprise-assets-service
林仔 6 ヶ月 前
コミット
903f6920a6

+ 1 - 1
pom.xml

@@ -122,7 +122,7 @@
 
 
     <build>
-        <finalName>${project.artifactId}</finalName>
+        <finalName>enterprise-assets-service</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>

+ 1 - 0
src/main/java/com/zksy/property/domain/dto/ASimplifiedHouseInfoDto.java

@@ -14,6 +14,7 @@ public class ASimplifiedHouseInfoDto {
     private String assetType;
     private String building;
     private String floor;
+    private String houseName;
     private String sortSearch;
     private Integer rentRangeMin;
     private Integer rentRangeMax;

+ 1 - 1
src/main/java/com/zksy/property/service/impl/ARentalContractServiceImpl.java

@@ -70,7 +70,7 @@ public class ARentalContractServiceImpl extends ServiceImpl<ARentalContractMappe
         markToFieldCount.put("1", 9);
         markToFieldCount.put("2", 56);
         markToFieldCount.put("3", 27);
-        markToFieldCount.put("4", 13);
+        markToFieldCount.put("4", 15);
         markToFieldCount.put("5", 8);
 
         // 验证标记类型

+ 7 - 1
src/main/resources/mapper/property/AReceiptInfoMapper.xml

@@ -18,6 +18,8 @@
             <result property="attachmentUrl" column="attachment_url" jdbcType="VARCHAR"/>
             <result property="receiptReason" column="receipt_reason" jdbcType="VARCHAR"/>
             <result property="generationDate" column="generation_date" javaType="DATE"/>
+            <result property="startDate" column="start_date" jdbcType="DATE"/>
+            <result property="endDate" column="end_date" jdbcType="DATE"/>
             <result property="accountingDate" column="accounting_date" jdbcType="DATE"/>
             <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
             <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
@@ -37,6 +39,8 @@
         <result property="attachmentUrl" column="attachment_url" jdbcType="VARCHAR"/>
         <result property="receiptReason" column="receipt_reason" jdbcType="VARCHAR"/>
         <result property="generationDate" column="generation_date" jdbcType="DATE" javaType="java.time.LocalDate"/>
+        <result property="startDate" column="start_date" jdbcType="DATE" javaType="java.time.LocalDate"/>
+        <result property="endDate" column="end_date" jdbcType="DATE" javaType="java.time.LocalDate"/>
         <result property="accountingDate" column="accounting_date" jdbcType="DATE" javaType="java.time.LocalDate"/>
         <result property="createTime" column="create_time" jdbcType="TIMESTAMP" javaType="java.time.LocalDateTime"/>
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP" javaType="java.time.LocalDateTime"/>
@@ -48,7 +52,7 @@
         payment_method,total_amount,rent,
         property_fee,deposit,water_fee,
         receipt_reason,attachment_url,accounting_date,
-        generation_date,create_time,update_time
+        generation_date,start_date,end_date,create_time,update_time
     </sql>
     <select id="selectReceiptWithContractByPage" resultMap="VoResultMap">
         SELECT
@@ -66,6 +70,8 @@
         r.attachment_url,
         r.accounting_date,
         r.generation_date,
+        r.start_date,
+        r.end_date,
         r.create_time,
         r.update_time,
         c.contract_number

+ 3 - 0
src/main/resources/mapper/property/ASimplifiedHouseInfoMapper.xml

@@ -37,6 +37,9 @@
             <if test="entity.floor != null and entity.floor != ''">
                 AND a.floor LIKE CONCAT(#{entity.floor}, '%')
             </if>
+            <if test="entity.houseName != null and entity.houseName != ''">
+                AND a.house_name LIKE CONCAT(#{entity.houseName}, '%')
+            </if>
             <if test="entity.rentRangeMin != null">
                 AND a.rent_range >= COALESCE(#{entity.rentRangeMin}, a.rent_range)
             </if>