浏览代码

设备管理

chenshudong 1 月之前
父节点
当前提交
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 163
     @TableField(exist = false)
164 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 178
     public void setTenantId(String tenantId) {
167 179
         this.tenantId = tenantId;
168 180
     }
@@ -419,6 +431,22 @@ public class EquipmentLedger extends BaseEntity {
419 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 450
     @Override
423 451
     public String toString() {
424 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 133
                 inspection_team_member2_name like concat('%', #{inspectionTeamUserName}, '%')
134 134
                 )
135 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 140
             <choose>
137 141
                 <!-- 使用状态=在用 + 早于今天 -->
138 142
                 <when test="'RED'.equals(colorType)">