|
@@ -133,5 +133,56 @@
|
|
|
from d_project_invest_plan
|
|
|
where is_deleted = 0 and project_id = #{projectId}
|
|
|
</select>
|
|
|
+ <select id="dataProjectStat1" resultType="org.springblade.modules.project.pojo.vo.DataProjectStatVO2">
|
|
|
+ SELECT dpi.id
|
|
|
+ FROM d_project_info dpi
|
|
|
+ JOIN d_project_invest_plan dpip ON dpi.id = dpip.project_id
|
|
|
+ WHERE
|
|
|
+ #{dto.year} NOT BETWEEN dpi.start_year AND dpi.end_year
|
|
|
+ AND dpip.plan_year = #{dto.year}
|
|
|
+ AND (dpip.yearly_invest IS NOT NULL AND dpip.yearly_invest != 0)
|
|
|
+ AND dpi.is_deleted = 0
|
|
|
+ <if test="dto.projectStage != null ">
|
|
|
+ and dpi.project_stage = #{dto.projectStage}
|
|
|
+ </if>
|
|
|
+ <if test="dto.projectType != null ">
|
|
|
+ and dpi.project_type = #{dto.projectType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <select id="dataInvestStat1" resultType="org.springblade.modules.project.pojo.vo.DataInvestStatVO2">
|
|
|
+ select dpi.id,dpi.project_stage,dpi.project_type,
|
|
|
+ (select dict_value from blade_dict_biz where code = 'projectStage' and dict_key = dpi.project_stage and is_deleted = 0) as projectStageName,
|
|
|
+ (select dict_value from blade_dict_biz where code = 'projectType' and dict_key = dpi.project_type and is_deleted = 0) as projectTypeName
|
|
|
+ from d_project_info dpi JOIN d_project_invest_plan dpip ON dpi.id = dpip.project_id
|
|
|
+ where #{dto.year} NOT BETWEEN dpi.start_year AND dpi.end_year
|
|
|
+ AND dpip.plan_year = #{dto.year}
|
|
|
+ AND (dpip.yearly_invest IS NOT NULL AND dpip.yearly_invest != 0)
|
|
|
+ AND dpi.is_deleted = 0
|
|
|
+ <if test="dto.projectStage != null ">
|
|
|
+ and dpi.project_stage = #{dto.projectStage}
|
|
|
+ </if>
|
|
|
+ <if test="dto.projectType != null ">
|
|
|
+ and dpi.project_type = #{dto.projectType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <select id="dataScheduleStat1" resultType="org.springblade.modules.project.pojo.vo.DataScheduleStatVO2">
|
|
|
+ select dpi.id,dpi.project_stage,dpi.project_type,
|
|
|
+ (select dict_value from blade_dict_biz where code = 'projectStage' and dict_key = dpi.project_stage and is_deleted = 0) as projectStageName,
|
|
|
+ (select dict_value from blade_dict_biz where code = 'projectType' and dict_key = dpi.project_type and is_deleted = 0) as projectTypeName
|
|
|
+ from d_project_info dpi JOIN d_project_invest_plan dpip ON dpi.id = dpip.project_id
|
|
|
+ where #{dto.year} NOT BETWEEN dpi.start_year AND dpi.end_year
|
|
|
+ AND dpip.plan_year = #{dto.year}
|
|
|
+ AND (dpip.yearly_invest IS NOT NULL AND dpip.yearly_invest != 0)
|
|
|
+ AND dpi.is_deleted = 0
|
|
|
+ <if test="dto.projectStage != null ">
|
|
|
+ and dpi.project_stage = #{dto.projectStage}
|
|
|
+ </if>
|
|
|
+ <if test="dto.projectType != null ">
|
|
|
+ and dpi.project_type = #{dto.projectType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|