|
@@ -138,6 +138,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
plan DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectUnitClueCityList" parameterType="string" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|
|
|
+ SELECT
|
|
|
+ ifnull( s1.dept_name, '' ) AS deptName,
|
|
|
+ ifnull( s1.target_arrival_amount, 0 ) AS targetArrivalAmount,
|
|
|
+ ifnull( count( p.id ), 0 ) AS successMission
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ sd.dept_id,
|
|
|
+ sd.dept_name,
|
|
|
+ sd.parent_id,
|
|
|
+ a.sys_dept_id,
|
|
|
+ a.target_arrival_amount
|
|
|
+ FROM
|
|
|
+ sys_dept sd
|
|
|
+ LEFT JOIN `bm_dept_plan` a ON a.sys_dept_id = sd.dept_id
|
|
|
+ AND a.is_del = '0'
|
|
|
+ WHERE
|
|
|
+ sd.del_flag = '0'
|
|
|
+ ) s1
|
|
|
+ LEFT JOIN bm_project p ON p.dept_id = s1.sys_dept_id
|
|
|
+ AND p.is_del = '0'
|
|
|
+ and year(p.create_time) = #{year}
|
|
|
+ where
|
|
|
+ s1.parent_id = 124
|
|
|
+ and p.project_status in (1,2,3,4)
|
|
|
+ GROUP BY
|
|
|
+ s1.dept_id
|
|
|
+ ORDER BY
|
|
|
+ successMission DESC,
|
|
|
+ targetArrivalAmount DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectTargetSigningList" parameterType="String" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|
|
|
SELECT
|
|
|
ifnull(s1.dept_name,'') AS deptName,
|
|
@@ -252,6 +285,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
s1.payForMoney DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectProjectAreaAmountUnit" parameterType="string" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|
|
|
+ SELECT
|
|
|
+ ifnull(s1.dept_name,'') AS deptName,
|
|
|
+ ifnull(s1.target_signing_num,0) AS targetSigningNum,
|
|
|
+ ifnull(count( p.id ),0) AS successMission
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ sd.dept_id,
|
|
|
+ sd.dept_name,
|
|
|
+ sd.parent_id,
|
|
|
+ a.sys_dept_id,
|
|
|
+ (ifnull(a.project_million_num,0)+ ifnull(a.project_pro_num,0)+ ifnull(a.project_investment_num,0))as target_signing_num
|
|
|
+ FROM
|
|
|
+ sys_dept sd
|
|
|
+ LEFT JOIN `bm_dept_plan_area` a ON a.sys_dept_id = sd.dept_id and a.is_del = '0'
|
|
|
+ where sd.del_flag = '0'
|
|
|
+ ) s1
|
|
|
+ LEFT JOIN bm_project p ON p.dept_id = s1.sys_dept_id
|
|
|
+ and p.is_del = '0' and p.project_status in (8,9) and year(p.create_time) = #{year}
|
|
|
+ where
|
|
|
+ s1.parent_id = 105
|
|
|
+ GROUP BY
|
|
|
+ s1.dept_id
|
|
|
+ ORDER BY
|
|
|
+ successMission DESC,
|
|
|
+ targetSigningNum DESC
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectInvestmentList" parameterType="string" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|
|
|
SELECT
|
|
@@ -270,6 +331,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
targetSigningNum DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectInvestmentCityList" parameterType="string" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|
|
|
+ SELECT
|
|
|
+ sd.dept_name AS deptName,
|
|
|
+ ifnull( s1.payForMoney, 0 ) AS payForMoney,
|
|
|
+ ifnull( count(p.id), 0 ) AS successMission
|
|
|
+ FROM
|
|
|
+ sys_dept sd
|
|
|
+ LEFT JOIN `bm_project` p ON p.dept_id = sd.dept_id and p.project_status > 8
|
|
|
+ AND p.is_del = '0' and year(p.create_time) = #{year}
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ sum( s.payForMoney ) AS payForMoney,
|
|
|
+ s.dept_id
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ cp.pay_for_money AS payForMoney,
|
|
|
+ p.dept_id
|
|
|
+ FROM
|
|
|
+ bm_project p
|
|
|
+ LEFT JOIN bm_construction_pay cp ON cp.bm_project_id = p.id
|
|
|
+ AND p.is_del = '0' and year(cp.create_time) = #{year}
|
|
|
+ ) s
|
|
|
+ GROUP BY
|
|
|
+ s.dept_id
|
|
|
+ ) s1 ON s1.dept_id = p.dept_id
|
|
|
+ WHERE
|
|
|
+ sd.del_flag = '0'
|
|
|
+ and sd.parent_id = 124
|
|
|
+ GROUP BY
|
|
|
+ sd.dept_id
|
|
|
+ ORDER BY
|
|
|
+ s1.payForMoney DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
|
|
|
<select id="selectProjectInvestmentEharts" parameterType="string" resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
|