diff --git a/modules/bmw/src/main/java/com/bonus/bmw/subrank/controller/SubCorePersonRankController.java b/modules/bmw/src/main/java/com/bonus/bmw/subrank/controller/SubCorePersonRankController.java index 538d9b9..8fdc4eb 100644 --- a/modules/bmw/src/main/java/com/bonus/bmw/subrank/controller/SubCorePersonRankController.java +++ b/modules/bmw/src/main/java/com/bonus/bmw/subrank/controller/SubCorePersonRankController.java @@ -56,7 +56,7 @@ public class SubCorePersonRankController { @Override public int count(PageTableRequest request) { - return service.rankCount(request.getParams()); + return service.rankCount(request.getParams()); } }, new PageTableHandler.ListHandler() { @Override diff --git a/modules/bmw/src/main/resources/mapper/SubContractor/SubContractMapper.xml b/modules/bmw/src/main/resources/mapper/SubContractor/SubContractMapper.xml index 7d92572..70a9e72 100644 --- a/modules/bmw/src/main/resources/mapper/SubContractor/SubContractMapper.xml +++ b/modules/bmw/src/main/resources/mapper/SubContractor/SubContractMapper.xml @@ -97,9 +97,9 @@ select count(1) from ( LEFT JOIN pm_organization po ON po.id = bp.company_id and po.is_active = '1' LEFT JOIN bm_sub_relation bsr1 on bsc.id = bsr1.sub_contract_id and bsr1.type = '1' and bsr1.is_active = '1' LEFT JOIN bm_sub_relation bsr2 on bsc.id = bsr2.sub_contract_id and bsr2.type = '2' and bsr2.is_active = '1' - LEFT JOIN bm_sub_relation bsr3 on bsc.id = bsr3.sub_contract_id and bsr3.type = '3' and bsr3.is_active = '1' + LEFT JOIN sys_user su ON su.id = bsr1.`value` and su.sub_id = bsc.sub_id and su.is_active = '1' - LEFT JOIN bm_sub_team bst ON bst.id = bsr3.`value` and bst.is_active = '1' + LEFT JOIN bm_team_user_relation btur ON btur.team_id = bst.id and btur.is_active = '1' and btur.id_number is not null GROUP BY bsc.id @@ -115,7 +115,7 @@ select count(1) from ( bsc.is_complete as isComplete, bsc.contract_money as contractMoney, su.username as principal, - COUNT(DISTINCT bst.id) as teamNumber, + COUNT(DISTINCT btur.id) as personNumber, COUNT(DISTINCT bsr2.id) as fileNumber, GROUP_CONCAT(DISTINCT bsr2.`value`) as filePaths, @@ -130,9 +130,9 @@ select count(1) from ( LEFT JOIN pm_organization po ON po.id = bp.company_id and po.is_active = '1' LEFT JOIN bm_sub_relation bsr1 on bsc.id = bsr1.sub_contract_id and bsr1.type = '1' and bsr1.is_active = '1' LEFT JOIN bm_sub_relation bsr2 on bsc.id = bsr2.sub_contract_id and bsr2.type = '2' and bsr2.is_active = '1' - LEFT JOIN bm_sub_relation bsr3 on bsc.id = bsr3.sub_contract_id and bsr3.type = '3' and bsr3.is_active = '1' + LEFT JOIN sys_user su ON su.id = bsr1.`value` and su.sub_id = bsc.sub_id and su.is_active = '1' - LEFT JOIN bm_sub_team bst ON bst.id = bsr3.v and bst.is_active = '1' + LEFT JOIN bm_team_user_relation btur ON btur.team_id = bst.id and btur.is_active = '1' and btur.id_number is not null LEFT JOIN bm_worker_ein_history bweh ON bweh.sub_id = bsc.sub_id AND bweh.is_active='1' diff --git a/modules/bmw/src/main/resources/mapper/subeva/SubCorepersonMapper.xml b/modules/bmw/src/main/resources/mapper/subeva/SubCorepersonMapper.xml index 265281d..23df4d2 100644 --- a/modules/bmw/src/main/resources/mapper/subeva/SubCorepersonMapper.xml +++ b/modules/bmw/src/main/resources/mapper/subeva/SubCorepersonMapper.xml @@ -24,7 +24,7 @@ `bm_sub_contract` bsc LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1' LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1' - LEFT JOIN bm_sub_team bst ON bst.sub_id = bst.bs.id AND bst.is_active = '1' + LEFT JOIN bm_sub_team bst ON bst.sub_id = bs.id AND bst.is_active = '1' LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1' LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year} @@ -53,7 +53,7 @@ `bm_sub_contract` bsc LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1' LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1' - LEFT JOIN bm_sub_team bst ON bst.sub_id = bst.bs.id AND bst.is_active = '1' + LEFT JOIN bm_sub_team bst ON bst.sub_id = bs.id AND bst.is_active = '1' LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1' LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year} diff --git a/modules/bmw/src/main/resources/mapper/subeva/SubProjectMapper.xml b/modules/bmw/src/main/resources/mapper/subeva/SubProjectMapper.xml index de1241f..b6ddf4c 100644 --- a/modules/bmw/src/main/resources/mapper/subeva/SubProjectMapper.xml +++ b/modules/bmw/src/main/resources/mapper/subeva/SubProjectMapper.xml @@ -2,153 +2,44 @@ - - - - - - - + select + IFNULL(su.username,'') as personName, + su.id as personId + from bm_sub_relation bsr + left join sys_user su on su.id = bsr.value + where bsr.sub_contract_id = #{contractId} and bsr.type = 1 and bsr.is_active =1 + + AND bp.id =#{proId} + + + AND bs.sub_name LIKE concat ('%',#{subName},'%') + + + + + + + + - insert into fbeva_sub_project (id,eva_month,eva_score,eva_name,eva_date,contract_id,eva_year,eva_id) - values (#{uuid},#{evaMonth},#{evaToal},#{evaName},#{evaDate},#{contractId},#{evaYear},#{evaId}) + insert into fbeva_sub_project (id, eva_month, eva_score, eva_name, eva_date, contract_id, eva_year, eva_id) + values (#{uuid}, #{evaMonth}, #{evaToal}, #{evaName}, #{evaDate}, #{contractId}, #{evaYear}, #{evaId}) - insert into fbeva_sub_projectdetails(sub_pro_id,eva_id,eva_score,contract_id,person_name,person_id) - values (#{uuid},#{evaId},#{score},#{contractId},#{personName},#{personId}) + insert into fbeva_sub_projectdetails(sub_pro_id, eva_id, eva_score, contract_id, person_name, person_id) + values (#{uuid}, #{evaId}, #{score}, #{contractId}, #{personName}, #{personId}) - insert into fbeva_stant_scoredetails(detail_grade,grade_time,evaid,type,detail_id,reason) - values (#{score},#{evaDate},#{evaId},#{type},#{uuid},#{reason}) + insert into fbeva_stant_scoredetails(detail_grade, grade_time, evaid, type, detail_id, reason) + values (#{score}, #{evaDate}, #{evaId}, #{type}, #{uuid}, #{reason}) - \ No newline at end of file