|
@@ -37,6 +37,12 @@
|
|
<if test="code != null and code != ''">
|
|
<if test="code != null and code != ''">
|
|
AND code LIKE CONCAT('%', #{code}, '%')
|
|
AND code LIKE CONCAT('%', #{code}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="keyWord != null and keyWord != ''">
|
|
|
|
+ AND (
|
|
|
|
+ name LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
|
+ OR company LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="projectType != null and projectType != 0">
|
|
<if test="projectType != null and projectType != 0">
|
|
AND project_type = #{projectType}
|
|
AND project_type = #{projectType}
|
|
</if>
|
|
</if>
|
|
@@ -54,6 +60,12 @@
|
|
<if test="code != null and code != ''">
|
|
<if test="code != null and code != ''">
|
|
AND code LIKE CONCAT('%', #{code}, '%')
|
|
AND code LIKE CONCAT('%', #{code}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="keyWord != null and keyWord != ''">
|
|
|
|
+ AND (
|
|
|
|
+ name LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
|
+ OR company LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="projectType != null and projectType != 0">
|
|
<if test="projectType != null and projectType != 0">
|
|
AND project_type = #{projectType}
|
|
AND project_type = #{projectType}
|
|
</if>
|
|
</if>
|
|
@@ -92,4 +104,30 @@
|
|
COUNT(*) AS total
|
|
COUNT(*) AS total
|
|
FROM t_project
|
|
FROM t_project
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="selectOtherSupply" resultType="com.siwei.apply.domain.res.ProjectSupplyRes">
|
|
|
|
+ SELECT
|
|
|
|
+ '其他' AS gdType,
|
|
|
|
+ '亩' AS gdUnit,
|
|
|
|
+ CAST(0 AS double precision) AS gdArea,
|
|
|
|
+ CAST(0 AS int) AS count
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectOtherSupplyExcludeProject" resultType="com.siwei.apply.domain.res.ProjectSupplyRes">
|
|
|
|
+ SELECT
|
|
|
|
+ '其他' AS gdType,
|
|
|
|
+ '亩' AS gdUnit,
|
|
|
|
+ COALESCE(
|
|
|
|
+ SUM(
|
|
|
|
+ CASE
|
|
|
|
+ WHEN gd_unit = '0' THEN COALESCE(gd_area, 0) / 666.6666667
|
|
|
|
+ WHEN gd_unit = '1' THEN COALESCE(gd_area, 0) * 15
|
|
|
|
+ ELSE COALESCE(gd_area, 0)
|
|
|
|
+ END
|
|
|
|
+ ), 0
|
|
|
|
+ ) AS gdArea,
|
|
|
|
+ COUNT(*) AS count
|
|
|
|
+ FROM t_tdgy
|
|
|
|
+ WHERE project_id IS NULL OR project_id = ''
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|