|
|
@@ -39,12 +39,12 @@
|
|
|
|
|
|
select * from project_declaration where id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findByCondition" resultType="platform.modules.government.entity.ProjectDeclaration">
|
|
|
SELECT distinct
|
|
|
- p.* FROM
|
|
|
- project_declaration p
|
|
|
- LEFT JOIN notices_accept n on n.recorde_id = p.id
|
|
|
+ p.* FROM
|
|
|
+ project_declaration p
|
|
|
+ LEFT JOIN notices_accept n on n.recorde_id = p.id
|
|
|
where 1=1
|
|
|
<if test="projectName != null and projectName != '' ">
|
|
|
and p.project_name LIKE CONCAT ('%',#{projectName},'%')
|
|
|
@@ -62,26 +62,27 @@
|
|
|
and p.apply_endDate <![CDATA[<=]]> left(#{endTime2},10)
|
|
|
</if>
|
|
|
<if test="request.company_id != null and request.company_id != '' ">
|
|
|
- and n.user_id = #{request.company_id}
|
|
|
+ and n.user_id = #{request.company_id}
|
|
|
</if>
|
|
|
<if test="request.isActive != null and request.isActive != '' ">
|
|
|
- and p.apply_startDate <![CDATA[<=]]> left(now(),10)
|
|
|
- and p.apply_endDate <![CDATA[>=]]> left(now(),10)
|
|
|
- and p.status != 0
|
|
|
+ and p.apply_startDate <![CDATA[<=]]> left(now(),10)
|
|
|
+ and p.apply_endDate <![CDATA[>=]]> left(now(),10)
|
|
|
+ and p.status != 0
|
|
|
</if>
|
|
|
<if test="searchCondition.is_online_application != null ">
|
|
|
- and p.is_online_application =#{searchCondition.is_online_application}
|
|
|
+ and p.is_online_application =#{searchCondition.is_online_application}
|
|
|
</if>
|
|
|
order by p.create_time desc
|
|
|
</select>
|
|
|
|
|
|
- <select id="findUnionProjectsOnHome" resultType="platform.modules.government.entity.ProjectDeclaration">
|
|
|
+ <select id="findUnionProjectsOnHome" resultType="platform.modules.government.entity.ProjectDeclaration">
|
|
|
<if test="request.type != null and request.type != '' and request.type =='4'.toString()">
|
|
|
select * from
|
|
|
(
|
|
|
SELECT
|
|
|
- a.id,a.project_name,a.create_time,a.project_source,a.apply_enddate,0 as isFilling,a.project_content AS content
|
|
|
- FROM project_declaration a
|
|
|
+ a.id,a.project_name,a.create_time,a.project_source,a.apply_enddate,0 as isFilling,a.project_content AS
|
|
|
+ content
|
|
|
+ FROM project_declaration a
|
|
|
where
|
|
|
a.del_flag=0
|
|
|
and a.is_open = 1
|
|
|
@@ -105,8 +106,9 @@
|
|
|
select * from
|
|
|
(
|
|
|
SELECT
|
|
|
- a.id,a.project_name,a.create_time,a.project_source,a.apply_enddate,0 as isFilling,a.project_content AS content
|
|
|
- FROM project_declaration a
|
|
|
+ a.id,a.project_name,a.create_time,a.project_source,a.apply_enddate,0 as isFilling,a.project_content AS
|
|
|
+ content
|
|
|
+ FROM project_declaration a
|
|
|
where
|
|
|
a.del_flag=0
|
|
|
and a.is_open = 1
|
|
|
@@ -122,21 +124,28 @@
|
|
|
from project_intelligent_declaration b
|
|
|
where b.del_flag = 0 and b.status=1
|
|
|
) temp
|
|
|
+ where 1=1
|
|
|
+ <if test="request.startTime !='' and request.startTime !=null ">
|
|
|
+ and temp.create_time <![CDATA[>=]]> #{request.startTime}
|
|
|
+ </if>
|
|
|
+ <if test="request.endTime !='' and request.endTime !=null ">
|
|
|
+ and temp.create_time <![CDATA[<=]]> #{request.endTime}
|
|
|
+ </if>
|
|
|
order by temp.create_time desc
|
|
|
</if>
|
|
|
|
|
|
- </select>
|
|
|
- <select id="findProjectsOnHome" resultType="platform.modules.government.entity.ProjectDeclaration">
|
|
|
+ </select>
|
|
|
+ <select id="findProjectsOnHome" resultType="platform.modules.government.entity.ProjectDeclaration">
|
|
|
SELECT
|
|
|
a.project_name,a.id,a.create_time,a.project_source,a.apply_enddate
|
|
|
- FROM project_declaration a
|
|
|
- where
|
|
|
- a.del_flag=0
|
|
|
- and a.is_open = 1
|
|
|
- and a.status = 1
|
|
|
+ FROM project_declaration a
|
|
|
+ where
|
|
|
+ a.del_flag=0
|
|
|
+ and a.is_open = 1
|
|
|
+ and a.status = 1
|
|
|
<if test="request.keyword!=null and request.keyword!=''">
|
|
|
and a.project_name LIKE CONCAT ('%',#{ request.keyword},'%')
|
|
|
-
|
|
|
+
|
|
|
</if>
|
|
|
<if test="request.type!=null and request.type!=''">
|
|
|
and a.project_source = #{ request.type}
|
|
|
@@ -144,18 +153,18 @@
|
|
|
order by a.create_time desc
|
|
|
limit #{request.start},#{request.page_size}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findProjectsCountOnHome" resultType="integer">
|
|
|
SELECT
|
|
|
count(0)
|
|
|
- FROM project_declaration a
|
|
|
+ FROM project_declaration a
|
|
|
where a.del_flag = 0
|
|
|
- and a.is_open = 1
|
|
|
- and a.status = 1
|
|
|
+ and a.is_open = 1
|
|
|
+ and a.status = 1
|
|
|
<if test="request.keyword!=null and request.keyword!=''">
|
|
|
and a.project_name LIKE CONCAT ('%',#{ request.keyword},'%')
|
|
|
</if>
|
|
|
- <if test="request.type!=null and request.type!=''">
|
|
|
+ <if test="request.type!=null and request.type!=''">
|
|
|
and a.project_source = #{ request.type}
|
|
|
</if>
|
|
|
</select>
|