|
|
|
@ -8,6 +8,9 @@
|
|
|
|
|
IFNULL(SUM(CASE WHEN a.xzfl = 1 THEN 1 ELSE 0 END), 0) AS allBuilding1,
|
|
|
|
|
IFNULL(SUM(CASE WHEN a.xzfl = 2 THEN 1 ELSE 0 END), 0) AS allBuilding2,
|
|
|
|
|
IFNULL(SUM(CASE WHEN a.xzfl = 3 THEN 1 ELSE 0 END), 0) AS allBuilding3,
|
|
|
|
|
IFNULL(SUM(a.ztze), 0) AS allInvest1,
|
|
|
|
|
IFNULL(SUM(a.jhtze), 0) AS allInvest2,
|
|
|
|
|
IFNULL(SUM(b.zydmj), 0) AS allInvest3,
|
|
|
|
|
<!-- 当前新开工项目数 -->
|
|
|
|
|
IFNULL(SUM(
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN 1 ELSE 0 END
|
|
|
|
@ -27,7 +30,41 @@
|
|
|
|
|
<!-- 当年_拟建数量 -->
|
|
|
|
|
IFNULL(SUM(
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) and a.xzfl = 3 THEN 1 ELSE 0 END
|
|
|
|
|
), 0) AS currentBuilding3
|
|
|
|
|
), 0) AS currentBuilding3,
|
|
|
|
|
<!-- 当年_总投资额 -->
|
|
|
|
|
IFNULL(SUM(
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="years != null and years != ''">
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = #{years} THEN a.ztze ELSE 0 END
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN a.ztze ELSE 0 END
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
), 0) AS currentAllInvest1,
|
|
|
|
|
<!-- 当年_计划投资额 -->
|
|
|
|
|
IFNULL(SUM(
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="years != null and years != ''">
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = #{years} THEN a.jhtze ELSE 0 END
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN a.jhtze ELSE 0 END
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
), 0) AS currentAllInvest2,
|
|
|
|
|
<!-- 当年_占地面积 -->
|
|
|
|
|
IFNULL(SUM(
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="years != null and years != ''">
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = #{years} THEN b.zydmj ELSE 0 END
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN b.zydmj ELSE 0 END
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
), 0) AS currentAllInvest3
|
|
|
|
|
|
|
|
|
|
FROM gysl_basic_information a
|
|
|
|
|
LEFT JOIN gysl_plan_information b ON a.id = b.xm_id
|
|
|
|
|
where a.tyshxydm = #{userName}
|
|
|
|
|