Browse Source

添加时间筛选条件

dev
曲树通 6 years ago
parent
commit
1521bfd197
  1. 32
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml

32
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml

@ -42,6 +42,10 @@
</otherwise> </otherwise>
</choose> </choose>
/*待补充按时间筛选*/ /*待补充按时间筛选*/
<if test="startTime != null and endTime != null and endTime != ''">
AND uu.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
AND ad.id IS NOT NULL AND ad.id IS NOT NULL
) t ) t
GROUP BY t.streetId GROUP BY t.streetId
@ -69,6 +73,10 @@
and ad2.ID in and ad2.ID in
<foreach collection="streetIdList" item="deptId" open="(" separator="," close=")">#{deptId}</foreach> <foreach collection="streetIdList" item="deptId" open="(" separator="," close=")">#{deptId}</foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND uu.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY GROUP BY
ad2.ID ad2.ID
</select> </select>
@ -112,6 +120,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND nn.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND nn.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND nn.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY nn.DEPT_ID GROUP BY nn.DEPT_ID
</select> </select>
@ -127,6 +139,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND nn.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND nn.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND nn.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY nn.DEPT_ID GROUP BY nn.DEPT_ID
</select> </select>
@ -142,6 +158,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND epen.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND epen.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND epen.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY epen.GRID_ID GROUP BY epen.GRID_ID
</select> </select>
@ -159,6 +179,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND epen.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND epen.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND epen.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY epen.GRID_ID GROUP BY epen.GRID_ID
</select> </select>
@ -178,6 +202,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND epgr.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND epgr.GRID_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND epgr.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
GROUP BY epgr.GRID_ID GROUP BY epgr.GRID_ID
</select> </select>
@ -332,6 +360,10 @@
<if test="gridIdList != null and gridIdList.size() > 0"> <if test="gridIdList != null and gridIdList.size() > 0">
AND uu.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach> AND uu.DEPT_ID in <foreach item="item" collection="gridIdList" open="(" separator="," close=")"> #{item} </foreach>
</if> </if>
<if test="startTime != null and endTime != null and endTime != ''">
AND uu.CREATED_TIME BETWEEN #{startTime}
AND #{endTime}
</if>
AND uu.DEPT_ID IS NOT NULL AND uu.DEPT_ID IS NOT NULL
) t ) t
GROUP BY t.DEPT_ID GROUP BY t.DEPT_ID

Loading…
Cancel
Save