|
@@ -270,11 +270,29 @@
|
|
|
|
|
|
<select id="selectpurchaseProjectCompleteNumberMonth" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
|
|
|
resultType="java.util.Map">
|
|
|
- select ifnull(sum(a.evaluation), 0) evaluation, date_format(plan_demand_sub_time,'%m') yy, ifnull(sum(b.contract_amount), 0) contractAmount from (
|
|
|
- select evaluation, plan_demand_sub_time, demand_id from pm_demand where project_status = '17' and year(plan_demand_sub_time) = year(NOW())
|
|
|
- ) a left join (
|
|
|
- select contract_amount, demand_id from pm_contract_info
|
|
|
+ select ifnull(sum(a.evaluation), 0) evaluation,
|
|
|
+ date_format(plan_demand_sub_time, '%m') yy,
|
|
|
+ ifnull(sum(b.contract_amount), 0) contractAmount
|
|
|
+ from (
|
|
|
+ select evaluation, plan_demand_sub_time, demand_id
|
|
|
+ from pm_demand
|
|
|
+ where project_status = '17'
|
|
|
+ and year(plan_demand_sub_time) = year(NOW())
|
|
|
+ ) a
|
|
|
+ left join (
|
|
|
+ select contract_amount, demand_id
|
|
|
+ from pm_contract_info
|
|
|
) b on a.demand_id = b.demand_id
|
|
|
- group by date_format(a.plan_demand_sub_time,'%y%m')
|
|
|
+ group by date_format(a.plan_demand_sub_time, '%y%m')
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="countProjectExceedAndMajor" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
|
|
|
+ SELECT COUNT(demand_id) num, SUM(evaluation) evaluationTotal
|
|
|
+ FROM `pm_demand`
|
|
|
+ WHERE (real_demand_commit_time > plan_demand_sub_time
|
|
|
+ or real_purchase_finish_time > plan_purchase_finish_time
|
|
|
+ or real_deliver_time > plan_deliver_time)
|
|
|
+ AND find_in_set('1', project_attr)
|
|
|
+ and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
|
|
|
</select>
|
|
|
</mapper>
|