|
@@ -31,6 +31,27 @@
|
|
|
(select IFNULL(SUM(budget_count_money),0) FROM c_project_cost_budget WHERE project_id = #{projectId} and cost_type = 6) as outsourceCostTotal,
|
|
|
(select IFNULL(SUM(budget_count_money),0) FROM c_project_cost_budget WHERE project_id = #{projectId}) as projectCostTotal
|
|
|
</select>
|
|
|
+ <select id="page" resultType="org.springblade.control.vo.ControlProjectInfoVO">
|
|
|
+ select
|
|
|
+ pi.*,
|
|
|
+ (select dict_name from c_dict_info WHERE code = 'project_type' AND dict_value = pi.project_type) as projectTypeValue,
|
|
|
+ (select dict_name from c_dict_info WHERE code = 'project_server_type' AND dict_value = pi.project_server_type) as projectServerTypeValue,
|
|
|
+ IFNULL((select cpp.name from c_project_process cpp WHERE cpp.project_id = pi.id and cpp.start_time <= NOW() order by cpp.sort desc limit 1),
|
|
|
+ (select cpp.name from c_project_process cpp WHERE cpp.project_id = pi.id order by cpp.sort limit 1)) as CurrentProcessName
|
|
|
+ from c_control_project_info pi
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="dto.projectType != null and dto.projectType != ''">
|
|
|
+ and pi.project_type = #{dto.projectType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.projectServerType != null and dto.projectServerType != ''">
|
|
|
+ and pi.project_server_type = #{dto.projectServerType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.queryValue != null and dto.queryValue != ''">
|
|
|
+ and pi.name like concat('%', #{dto.queryValue}, '%')
|
|
|
+ </if>
|
|
|
+ and id in (select cbs.project_id from c_project_cost_budget_stats cbs WHERE cbs.approve = 1)
|
|
|
+
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
</mapper>
|