Browse Source

feat(pms): 添加工单查询中的创建日期范围筛选功能

- 在 EamMapper.xml 中增加 createdStartDate 和 createdEndDate 查询条件
- 为 EamWorkOrderInData 类添加 createdStartDate 和 createdEndDate 字段
- 配置日期格式化注解以支持前端日期参数解析
- 实现 getter 和 setter 方法供查询条件使用
- 修复注释中的多余空格格式问题
ecss-tx
qiankanghui 1 month ago
parent
commit
1c8c9dfb79
  1. 25
      src/main/java/com/xujie/sys/modules/pms/data/EamWorkOrderInData.java
  2. 19
      src/main/resources/mapper/pms/EamMapper.xml

25
src/main/java/com/xujie/sys/modules/pms/data/EamWorkOrderInData.java

@ -28,6 +28,12 @@ public class EamWorkOrderInData extends EamWorkOrderData{
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date actualEndDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createdStartDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createdEndDate;
private String userId;
private String planOperatorName;
@ -117,6 +123,8 @@ public class EamWorkOrderInData extends EamWorkOrderData{
// 查询三色灯 ip 地址 用到
private String ip;
public String getIp() {
return ip;
}
@ -404,6 +412,22 @@ public class EamWorkOrderInData extends EamWorkOrderData{
this.createdDate = createdDate;
}
public Date getCreatedStartDate() {
return createdStartDate;
}
public void setCreatedStartDate(Date createdStartDate) {
this.createdStartDate = createdStartDate;
}
public Date getCreatedEndDate() {
return createdEndDate;
}
public void setCreatedEndDate(Date createdEndDate) {
this.createdEndDate = createdEndDate;
}
public String getReachOperatorName() {
return reachOperatorName;
}
@ -651,4 +675,5 @@ public class EamWorkOrderInData extends EamWorkOrderData{
public void setReportSparPartFlag(String reportSparPartFlag) {
this.reportSparPartFlag = reportSparPartFlag;
}
}

19
src/main/resources/mapper/pms/EamMapper.xml

@ -1132,6 +1132,12 @@
<if test="query.feedBackDesc != null and query.feedBackDesc != ''">
AND b.FeedBackDesc like '%' +#{query.feedBackDesc}+'%'
</if>
<if test="query.createdStartDate != null ">
AND b.CreatedDate >= #{query.createdStartDate}
</if>
<if test="query.createdEndDate != null ">
AND #{query.createdEndDate} >= b.CreatedDate
</if>
and a.FunctionType =#{query.functionType}
</where>
ORDER BY a.PlanDate,
@ -3260,6 +3266,7 @@
a.reach_date,
b.CreatedDate,
a.handling_method,
a.repair_reporting_type as repairReportingType,
dbo.eam_Get_eamResourceDesc(a.Site, a.ObjectID) as resourceDesc,
CASE
WHEN (DATEDIFF(SECOND, b.CreatedDate, a.reach_date) <![CDATA[<]]> 60) THEN DATEDIFF(SECOND, b.CreatedDate, a.reach_date) / 60.0
@ -3325,6 +3332,9 @@
<if test="query.documentSource != null and query.documentSource != ''">
AND a.document_source = #{query.documentSource}
</if>
<if test="query.createdDate != null ">
And a.CreatedDate >= #{query.createdDate}
</if>
<if test="query.startDate != null ">
AND a.PlanDate >= #{query.startDate}
</if>
@ -3343,6 +3353,15 @@
<if test="query.itemDesc != null and query.itemDesc != ''">
AND ewi.ItemDesc like '%' + #{query.itemDesc} +'%'
</if>
<if test="query.createdStartDate != null ">
AND b.CreatedDate >= #{query.createdStartDate}
</if>
<if test="query.createdEndDate != null ">
AND #{query.createdEndDate} >= b.CreatedDate
</if>
<if test="query.repairReportingType != null and query.repairReportingType != ''">
AND a.repair_reporting_type like '%' + #{query.repairReportingType} + '%'
</if>
and a.FunctionType =#{query.functionType}
</where>
</select>

Loading…
Cancel
Save