|
@@ -4,36 +4,45 @@
|
|
|
|
|
|
|
|
|
|
<select id="selectByPage" resultType="org.springblade.control.vo.ControlProjectInfoVO">
|
|
<select id="selectByPage" resultType="org.springblade.control.vo.ControlProjectInfoVO">
|
|
- select pi.*,d1.dict_value as projectTypeValue,d2.dict_value as contractTypeValue
|
|
|
|
|
|
+ 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
|
|
from c_control_project_info pi
|
|
from c_control_project_info pi
|
|
- LEFT JOIN ( SELECT * FROM blade_dict_biz WHERE CODE = 'project_type' ) d1 ON pi.project_type = d1.dict_key
|
|
|
|
- LEFT JOIN ( SELECT * FROM blade_dict_biz WHERE CODE = 'contract_type' ) d2 ON pi.contract_type = d2.dict_key
|
|
|
|
where pi.is_deleted = 0
|
|
where pi.is_deleted = 0
|
|
<if test="dto.projectType != null and dto.projectType != ''">
|
|
<if test="dto.projectType != null and dto.projectType != ''">
|
|
and pi.project_type = #{dto.projectType}
|
|
and pi.project_type = #{dto.projectType}
|
|
</if>
|
|
</if>
|
|
- <if test="dto.contractType != null and dto.contractType != ''">
|
|
|
|
- and pi.contract_type = #{dto.contractType}
|
|
|
|
|
|
+ <if test="dto.projectServerType != null and dto.projectServerType != ''">
|
|
|
|
+ and pi.project_server_type = #{dto.projectServerType}
|
|
</if>
|
|
</if>
|
|
- <if test="dto.process != null and dto.process != ''">
|
|
|
|
- and pi.process = #{dto.process}
|
|
|
|
|
|
+ <if test="dto.implementPrincipal != null and dto.implementPrincipal != ''">
|
|
|
|
+ and pi.implement_principal = #{dto.implementPrincipal}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.queryDate != null and dto.queryDate != ''">
|
|
|
|
+ and #{dto.queryDate} BETWEEN pi.start_time AND pi.end_time
|
|
</if>
|
|
</if>
|
|
<if test="dto.queryValue != null and dto.queryValue != ''">
|
|
<if test="dto.queryValue != null and dto.queryValue != ''">
|
|
and pi.name like concat('%', #{dto.queryValue}, '%')
|
|
and pi.name like concat('%', #{dto.queryValue}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
-
|
|
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getProjectInfoById" resultType="org.springblade.control.vo.ControlProjectInfoVO">
|
|
<select id="getProjectInfoById" resultType="org.springblade.control.vo.ControlProjectInfoVO">
|
|
- select pi.*
|
|
|
|
|
|
+ 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
|
|
from c_control_project_info pi
|
|
from c_control_project_info pi
|
|
where pi.is_deleted = 0 and pi.id = #{id}
|
|
where pi.is_deleted = 0 and pi.id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getProjectTypeDict" resultType="org.springblade.system.entity.DictBiz">
|
|
<select id="getProjectTypeDict" resultType="org.springblade.system.entity.DictBiz">
|
|
- SELECT * FROM blade_dict_biz WHERE CODE = 'project_type' and parent_id > 0
|
|
|
|
|
|
+ SELECT * FROM c_dict_info WHERE CODE = 'project_type' order by sort
|
|
</select>
|
|
</select>
|
|
- <select id="getContractTypeDict" resultType="org.springblade.system.entity.DictBiz">
|
|
|
|
- SELECT * FROM blade_dict_biz WHERE CODE = 'contract_type' and parent_id > 0
|
|
|
|
|
|
+
|
|
|
|
+ <select id="getProjectServerTypeDict" resultType="org.springblade.system.entity.DictBiz">
|
|
|
|
+ SELECT * FROM c_dict_info WHERE CODE = 'project_server_type' order by sort
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|