|
@@ -14,18 +14,17 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectRunProjectChart" parameterType="java.util.Map" resultType="api.common.pojo.vo.home.LineChartVO">
|
|
|
- select count(id) from simulation_manual_project
|
|
|
- where
|
|
|
- is_deleted = '0'
|
|
|
- <if test="createUserId != null and createUserId != ''">
|
|
|
- and create_user_id=#{createUserId,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="startDate != null">
|
|
|
- and start_time >= #{startDate}
|
|
|
- </if>
|
|
|
- <if test="endDate != null">
|
|
|
- and start_time <= #{endDate}
|
|
|
- </if>
|
|
|
+ SELECT
|
|
|
+ COUNT(1) as num,
|
|
|
+ DATE(t.start_time) as toDate
|
|
|
+ FROM(
|
|
|
+ SELECT start_time FROM simulation_manual_project
|
|
|
+ WHERE start_time >= #{dateBegin,jdbcType=VARCHAR} and create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
+ UNION ALL
|
|
|
+ SELECT start_time FROM simulation_automatic_subproject
|
|
|
+ WHERE start_time >= #{dateBegin,jdbcType=VARCHAR} and create_user_id = #{createUserId,jdbcType=VARCHAR}) as t
|
|
|
+ GROUP BY DATE(t.start_time)
|
|
|
+ ORDER BY toDate ASC
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|