chenshudong 1 mese fa
parent
commit
0b4cb14124

+ 28 - 0
airport-equipment/src/main/java/com/sundot/airport/equipment/domain/EquipmentLedger.java

@@ -163,6 +163,18 @@ public class EquipmentLedger extends BaseEntity {
163
     @TableField(exist = false)
163
     @TableField(exist = false)
164
     private String colorType;
164
     private String colorType;
165
 
165
 
166
+    /** 查询最近定/自检到期日期开始日期 */
167
+    @TableField(exist = false)
168
+    @JsonFormat(pattern = "yyyy-MM-dd")
169
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
170
+    private Date startDate;
171
+
172
+    /** 查询最近定/自检到期日期结束日期 */
173
+    @TableField(exist = false)
174
+    @JsonFormat(pattern = "yyyy-MM-dd")
175
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
176
+    private Date endDate;
177
+
166
     public void setTenantId(String tenantId) {
178
     public void setTenantId(String tenantId) {
167
         this.tenantId = tenantId;
179
         this.tenantId = tenantId;
168
     }
180
     }
@@ -419,6 +431,22 @@ public class EquipmentLedger extends BaseEntity {
419
         this.colorType = colorType;
431
         this.colorType = colorType;
420
     }
432
     }
421
 
433
 
434
+    public Date getStartDate() {
435
+        return startDate;
436
+    }
437
+
438
+    public void setStartDate(Date startDate) {
439
+        this.startDate = startDate;
440
+    }
441
+
442
+    public Date getEndDate() {
443
+        return endDate;
444
+    }
445
+
446
+    public void setEndDate(Date endDate) {
447
+        this.endDate = endDate;
448
+    }
449
+
422
     @Override
450
     @Override
423
     public String toString() {
451
     public String toString() {
424
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
452
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 4 - 0
airport-equipment/src/main/resources/mapper/equipment/EquipmentLedgerMapper.xml

@@ -133,6 +133,10 @@
133
                 inspection_team_member2_name like concat('%', #{inspectionTeamUserName}, '%')
133
                 inspection_team_member2_name like concat('%', #{inspectionTeamUserName}, '%')
134
                 )
134
                 )
135
             </if>
135
             </if>
136
+            <if test="startDate != null and endDate != null">
137
+                and (next_inspection_due_date >= #{startDate}
138
+                and next_inspection_due_date <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
139
+            </if>
136
             <choose>
140
             <choose>
137
                 <!-- 使用状态=在用 + 早于今天 -->
141
                 <!-- 使用状态=在用 + 早于今天 -->
138
                 <when test="'RED'.equals(colorType)">
142
                 <when test="'RED'.equals(colorType)">