|
|
|
@ -10,46 +10,34 @@ |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND A.OrderNo like '%' + #{query.orderNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.orderType != null and query.orderType != ''"> |
|
|
|
AND A.OrderType like '%' + #{query.orderType} + '%' |
|
|
|
<if test="query.orderStatus != null and query.orderStatus != ''"> |
|
|
|
AND A.Status = #{query.orderStatus} |
|
|
|
</if> |
|
|
|
<if test="query.seqNo != null and query.seqNo != ''"> |
|
|
|
AND B.SeqNo like '%' + #{query.seqNo} + '%' |
|
|
|
<if test="(query.orderStatus == null or query.orderStatus == '') and query.status != null and query.status != ''"> |
|
|
|
AND A.Status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
AND A.PartNo like '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partDescription != null and query.partDescription != ''"> |
|
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND P.PartDescription like '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test="(query.partDesc == null or query.partDesc == '') and query.partDescription != null and query.partDescription != ''"> |
|
|
|
AND P.PartDescription like '%' + #{query.partDescription} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.userName != null and query.userName != ''"> |
|
|
|
AND C.OperatorID like '%' + #{query.userName} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.workCenterNo != null and query.workCenterNo != ''"> |
|
|
|
AND C.WorkCenterNo like '%' + #{query.workCenterNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.date1 != null"> |
|
|
|
AND A.create_date >= #{query.date1} |
|
|
|
</if> |
|
|
|
<if test="query.date2 != null"> |
|
|
|
AND dateadd(DAY, 1, #{query.date2}) > A.create_date |
|
|
|
</if> |
|
|
|
<if test="query.date3 != null"> |
|
|
|
AND B.PlanFinishTime >= #{query.date3} |
|
|
|
<if test="query.reportStartDate != null"> |
|
|
|
AND C.ReportDate >= #{query.reportStartDate} |
|
|
|
</if> |
|
|
|
<if test="query.date4 != null"> |
|
|
|
AND dateadd(DAY, 1, #{query.date4}) > B.PlanFinishTime |
|
|
|
</if> |
|
|
|
<if test="query.finishDate1 != null"> |
|
|
|
AND B.finishtime >= #{query.finishDate1} |
|
|
|
</if> |
|
|
|
<if test="query.finishDate2 != null"> |
|
|
|
AND dateadd(DAY, 1, #{query.finishDate2}) > B.finishtime |
|
|
|
</if> |
|
|
|
<if test="query.reportDate1 != null"> |
|
|
|
<if test="(query.reportStartDate == null) and query.reportDate1 != null"> |
|
|
|
AND C.ReportDate >= #{query.reportDate1} |
|
|
|
</if> |
|
|
|
<if test="query.reportDate2 != null"> |
|
|
|
<if test="query.reportEndDate != null"> |
|
|
|
AND dateadd(DAY, 1, #{query.reportEndDate}) > C.ReportDate |
|
|
|
</if> |
|
|
|
<if test="(query.reportEndDate == null) and query.reportDate2 != null"> |
|
|
|
AND dateadd(DAY, 1, #{query.reportDate2}) > C.ReportDate |
|
|
|
</if> |
|
|
|
</sql> |
|
|
|
|