Commit 58f5b027 authored by 竹天卫's avatar 竹天卫

统计 日期筛选 优化

parent 3e78be57
......@@ -15,7 +15,8 @@
<if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if>
<if test="params.startDate == null and params.endDate == null">
<if test="(params.startDate == null or params.startDate == '')
and (params.endDate == null or params.endDate == '')">
and datediff(week, tw.Rq,getdate())=0
</if>
group by Convert(varchar(10),tw.Rq,120)
......@@ -36,7 +37,8 @@
<if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if>
<if test="params.startDate == null and params.endDate == null">
<if test="(params.startDate == null or params.startDate == '')
and (params.endDate == null or params.endDate == '')">
and datediff(week, tw.Rq,getdate())=0
</if>
</select>
......
......@@ -48,13 +48,12 @@
a.x,
a.y,
a.z,
a.StepHeight,
b.BlastVolume
a.StepHeight
FROM T_Processes_BlastDesign_Hole a
<include refid="TProcessesBlastdesignHoleJoins"/>
<where>
${ew.sqlSegment}
</where>
where 1=1
<if test="params.designDate != null and params.designDate != ''">
and Convert(varchar(10),a.DesignDate,120) <![CDATA[ = ]]> #{params.designDate}
</if>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment