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

统计 日期筛选 优化

parent 3e78be57
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<if test="params.endDate != null and params.endDate != ''"> <if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate} and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if> </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 and datediff(week, tw.Rq,getdate())=0
</if> </if>
group by Convert(varchar(10),tw.Rq,120) group by Convert(varchar(10),tw.Rq,120)
...@@ -36,7 +37,8 @@ ...@@ -36,7 +37,8 @@
<if test="params.endDate != null and params.endDate != ''"> <if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate} and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if> </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 and datediff(week, tw.Rq,getdate())=0
</if> </if>
</select> </select>
......
...@@ -48,13 +48,12 @@ ...@@ -48,13 +48,12 @@
a.x, a.x,
a.y, a.y,
a.z, a.z,
a.StepHeight, a.StepHeight
b.BlastVolume
FROM T_Processes_BlastDesign_Hole a FROM T_Processes_BlastDesign_Hole a
<include refid="TProcessesBlastdesignHoleJoins"/> where 1=1
<where> <if test="params.designDate != null and params.designDate != ''">
${ew.sqlSegment} and Convert(varchar(10),a.DesignDate,120) <![CDATA[ = ]]> #{params.designDate}
</where> </if>
</select> </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