|
@@ -134,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select report_year,report_date,t1.submit_org_nm,'1' team_type,t1.work_team_nm,t1.person_nm,
|
|
|
work_level_1+work_level_2+work_level_3+work_level_4+work_level_5
|
|
|
-IFNULL(province_violation_1,0)-IFNULL(province_violation_2,0)-IFNULL(city_violation_1,0)-IFNULL(city_violation_2,0)
|
|
|
- -IFNULL(city_problem_1,0)-IFNULL(city_problem_2,0) score
|
|
|
+ -IFNULL(city_problem_1,0) score
|
|
|
from
|
|
|
(
|
|
|
SELECT
|
|
@@ -170,8 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
SELECT t3.submit_org_nm,work_team_nm,person_nm,person_id,
|
|
|
- sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level = '2070001',1,0))*3*0.3 city_problem_1,
|
|
|
- sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level in('2070004','2070005','2070006','2070007'),1,0))*1*0.3 city_problem_2
|
|
|
+ sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level in('2070004','2070005','2070006','2070007'),1,0))*3*0.3 city_problem_1,
|
|
|
+ sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level = '2070001',1,0))*1*0.3 city_problem_2
|
|
|
from
|
|
|
ads_cst_hywzqlc_pdminspectionproblemrecords_df t1,ads_cst_hywzqlc_pdminspectionrecords_df t2,ads_cst_hywzqlc_pdmworkplan_df t3,ads_cst_hywzqlc_pdmworkplanworker_df t4
|
|
|
where t1.day_op_info_id = t2.day_op_info_id and t2.day_op_info_id = t3.uuid and t3.uuid =t4.op_plan_id
|
|
@@ -222,8 +222,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
SELECT work_team_nm,person_nm,person_id,
|
|
|
- sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level = '2070001',1,0))*3*0.3 city_problem_1,
|
|
|
- sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level in('2070004','2070005','2070006','2070007'),1,0))*1*0.3 city_problem_2
|
|
|
+ sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level in('2070004','2070005','2070006','2070007'),1,0))*3*0.3 city_problem_1,
|
|
|
+ sum(if(t2.scene_rating_cd = '2018003' and audit_lvl_cd ='2025002' and t1.problem_level = '2070001',1,0))*1*0.3 city_problem_2
|
|
|
from
|
|
|
ads_cst_hywzqlc_pdminspectionproblemrecords_df t1,ads_cst_hywzqlc_pdminspectionrecords_df t2,ads_cst_hywzqlc_pdmworkplan_df t3,ads_cst_hywzqlc_pdmworkplanworker_df t4
|
|
|
where t1.day_op_info_id = t2.day_op_info_id and t2.day_op_info_id = t3.uuid and t3.uuid =t4.op_plan_id
|