1.按固定人员考勤、临时人员考勤区分
This commit is contained in:
parent
7f2fdd3c85
commit
8cdb25e97c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
<include refid="where" />
|
||||
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'
|
||||
<include refid="where" />
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,153 +2,44 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.bmw.subeva.dao.SubProjectDao">
|
||||
<select id="getList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
SELECT
|
||||
SELECT
|
||||
fcpe.id as uuid,
|
||||
bsc.`id` as id,
|
||||
bsc.contract_money AS contractMoney,
|
||||
bp.`NAME` as proName,
|
||||
bs.sub_name as subName,
|
||||
bsc.contract_name as contractName,
|
||||
su.username AS sitePersonInCharge,
|
||||
td.`value` AS evaMonth,
|
||||
fcpe.eva_score AS evaGrade,
|
||||
fcpe.eva_name AS evaName,
|
||||
fcpe.eva_date AS evaDate,
|
||||
fcpe.eva_year as evaYear,
|
||||
fcpe.eva_id as evaId
|
||||
bsc.`id` as id,
|
||||
bsc.contract_money AS contractMoney,
|
||||
bp.`NAME` as proName,
|
||||
bs.sub_name as subName,
|
||||
bsc.contract_name as contractName,
|
||||
su.username AS sitePersonInCharge,
|
||||
td.`value` AS evaMonth,
|
||||
fcpe.eva_score AS evaGrade,
|
||||
fcpe.eva_name AS evaName,
|
||||
fcpe.eva_date AS evaDate,
|
||||
fcpe.eva_year as evaYear,
|
||||
fcpe.eva_id as evaId
|
||||
FROM
|
||||
`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_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '1' and bsr.is_active = '1'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
|
||||
LEFT JOIN fbeva_sub_project fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
|
||||
LEFT JOIN sys_user su on su.id = bsr.`value` and su.is_active = '1'
|
||||
`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_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '1' and bsr.is_active = '1'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
|
||||
LEFT JOIN fbeva_sub_project fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year
|
||||
= #{params.year}
|
||||
LEFT JOIN sys_user su on su.id = bsr.`value` and su.is_active = '1'
|
||||
WHERE bsc.is_active = '1' and td.`value` = #{params.month}
|
||||
<if test="params != null and params != ''">
|
||||
<if test="params.proId != null and params.proId != ''">
|
||||
AND bp.id =#{params.proId}
|
||||
</if>
|
||||
<if test="params.subName != null and params.subName != ''">
|
||||
AND bsc.contract_name LIKE concat ('%',#{params.subName},'%')
|
||||
AND bsc.contract_name LIKE concat ('%',#{params.subName},'%')
|
||||
</if>
|
||||
|
||||
</if>
|
||||
GROUP BY bsc.id
|
||||
limit #{offset}, #{limit}
|
||||
limit #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
`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_relation bsr ON bsr.sub_contract_id = bsc.id
|
||||
AND bsr.type = '1'
|
||||
AND bsr.is_active = '1'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck'
|
||||
AND td.is_active = '1'
|
||||
LEFT JOIN fbeva_sub_project fcpe ON fcpe.eva_month = td.`value`
|
||||
AND bsc.id = fcpe.contract_id
|
||||
AND fcpe.eva_year = #{params.year}
|
||||
LEFT JOIN sys_user su ON su.id = bsr.`value`
|
||||
WHERE
|
||||
bsc.is_active = '1'
|
||||
AND td.`value` = #{params.month}
|
||||
<if test="params != null and params != ''">
|
||||
<if test="params.proId != null and params.proId != ''">
|
||||
AND bp.id =#{params.proId}
|
||||
</if>
|
||||
<if test="params.subName != null and params.subName != ''">
|
||||
AND bsc.contract_name LIKE concat ('%',#{params.subName},'%')
|
||||
</if>
|
||||
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
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
|
||||
<if test="proId != null and proId != ''">
|
||||
AND bp.id =#{proId}
|
||||
</if>
|
||||
<if test="subName != null and subName != ''">
|
||||
AND bs.sub_name LIKE concat ('%',#{subName},'%')
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getHeadContentList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select
|
||||
fsh.eva_id as evaId,
|
||||
head,
|
||||
itemized,
|
||||
content,
|
||||
accound,
|
||||
fshs.type as type
|
||||
from fbeva_stand_headdetails fshs
|
||||
left join fbeva_stand_head fsh on fsh.eva_id = fshs.eva_id
|
||||
where fsh.type = #{type}
|
||||
</select>
|
||||
<select id="getPersonScoreList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select
|
||||
detail_grade as evaScore,
|
||||
evaid as evaIds,
|
||||
reason,
|
||||
type
|
||||
from fbeva_stant_scoredetails
|
||||
where detail_id = #{uuid}
|
||||
</select>
|
||||
<select id="getPersonList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select
|
||||
eva_score as evaScore,
|
||||
person_name as personName,
|
||||
person_id as personId,
|
||||
sub_pro_id as uuid
|
||||
from fbeva_sub_projectdetails
|
||||
where eva_id = #{evaId} and contract_id = #{contractId} and sub_pro_id = #{uuid}
|
||||
</select>
|
||||
<select id="getRankList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
SELECT
|
||||
fsp.id as uuid,
|
||||
bs.id as subId,
|
||||
bs.sub_name AS subName,
|
||||
bsc.id AS cid,
|
||||
bsc.contract_name,
|
||||
fsp.eva_month as evaMonth,
|
||||
fsp.eva_score,
|
||||
COUNT(bs.sub_name) as proNum,
|
||||
SUM(fsp.eva_score) / COUNT(bs.sub_name) as evaScore,
|
||||
case WHEN FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 90 then 1
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 80 then 2
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 60 then 3
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) < 61 then 4
|
||||
else 0
|
||||
End as status
|
||||
FROM
|
||||
bm_subcontractor bs
|
||||
RIGHT JOIN bm_sub_contract bsc ON bsc.sub_id = bs.id
|
||||
AND bsc.is_active = 1
|
||||
AND bs.id IS NOT NULL
|
||||
LEFT JOIN fbeva_sub_project fsp ON fsp.contract_id = bsc.id
|
||||
WHERE
|
||||
bs.id IS NOT NULL
|
||||
AND fsp.eva_month IS NOT NULL
|
||||
GROUP BY
|
||||
bs.sub_name
|
||||
<if test="params.status != null and params.status != '' ">
|
||||
having status = #{params.status}
|
||||
</if>
|
||||
limit #{offset}, #{limit}
|
||||
</select>
|
||||
<select id="getRankListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
|
|
@ -168,69 +59,178 @@
|
|||
LEFT JOIN sys_user su ON su.id = bsr.`value`
|
||||
WHERE
|
||||
bsc.is_active = '1'
|
||||
AND td.`value` = #{params.month} and fcpe.eva_date is not null
|
||||
AND td.`value` = #{params.month}
|
||||
<if test="params != null and params != ''">
|
||||
<if test="params.proId != null and params.proId != ''">
|
||||
AND bp.id =#{params.proId}
|
||||
</if>
|
||||
<if test="params.subName != null and params.subName != ''">
|
||||
AND bsc.contract_name LIKE concat ('%',#{params.subName},'%')
|
||||
AND bsc.contract_name LIKE concat ('%',#{params.subName},'%')
|
||||
</if>
|
||||
|
||||
</if>
|
||||
</select>
|
||||
<select id="getMonthRankHistoryList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
<select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
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
|
||||
<if test="proId != null and proId != ''">
|
||||
AND bp.id =#{proId}
|
||||
</if>
|
||||
<if test="subName != null and subName != ''">
|
||||
AND bs.sub_name LIKE concat ('%',#{subName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getHeadContentList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select fsh.eva_id as evaId,
|
||||
head,
|
||||
itemized,
|
||||
content,
|
||||
accound,
|
||||
fshs.type as type
|
||||
from fbeva_stand_headdetails fshs
|
||||
left join fbeva_stand_head fsh on fsh.eva_id = fshs.eva_id
|
||||
where fsh.type = #{type}
|
||||
</select>
|
||||
<select id="getPersonScoreList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select detail_grade as evaScore,
|
||||
evaid as evaIds,
|
||||
reason,
|
||||
type
|
||||
from fbeva_stant_scoredetails
|
||||
where detail_id = #{uuid}
|
||||
</select>
|
||||
<select id="getPersonList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select eva_score as evaScore,
|
||||
person_name as personName,
|
||||
person_id as personId,
|
||||
sub_pro_id as uuid
|
||||
from fbeva_sub_projectdetails
|
||||
where eva_id = #{evaId}
|
||||
and contract_id = #{contractId}
|
||||
and sub_pro_id = #{uuid}
|
||||
</select>
|
||||
<select id="getRankList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
SELECT
|
||||
DISTINCT
|
||||
su.username AS sitePersonInCharge,
|
||||
fsp.id as uuid,
|
||||
bp.NAME as proName,
|
||||
bs.sub_name AS subName,
|
||||
bsc.contract_name AS contractName,
|
||||
fsp.contract_id as id,
|
||||
fsp.eva_month as evaMonth,
|
||||
fsp.eva_year as evaYear,
|
||||
fsp.eva_score as evaScore,
|
||||
fsp.eva_name as evaName,
|
||||
fsp.eva_date as evaDate,
|
||||
fsp.eva_id as evaId
|
||||
from bm_subcontractor bs
|
||||
left join bm_sub_contract bsc on bsc.sub_id = bs.id
|
||||
left join pm_company pc on pc.id = bs.org_id
|
||||
left join bm_project bp on bp.id = bsc.pro_id
|
||||
left join bm_sub_relation bsr on bsr.sub_contract_id = bsc.id and bsr.type = 1
|
||||
left join sys_user su on su.id = bsr.value
|
||||
left join fbeva_sub_project fsp on fsp.contract_id = bsc.id
|
||||
where bs.id = #{params.subId} and fsp.eva_date is not null
|
||||
limit #{offset}, #{limit}
|
||||
fsp.id as uuid,
|
||||
bs.id as subId,
|
||||
bs.sub_name AS subName,
|
||||
bsc.id AS cid,
|
||||
bsc.contract_name,
|
||||
fsp.eva_month as evaMonth,
|
||||
fsp.eva_score,
|
||||
COUNT(bs.sub_name) as proNum,
|
||||
SUM(fsp.eva_score) / COUNT(bs.sub_name) as evaScore,
|
||||
case WHEN FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 90 then 1
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 80 then 2
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 60 then 3
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) < 61 then 4
|
||||
else 0
|
||||
End as status
|
||||
FROM
|
||||
bm_subcontractor bs
|
||||
RIGHT JOIN bm_sub_contract bsc ON bsc.sub_id = bs.id
|
||||
AND bsc.is_active = 1
|
||||
AND bs.id IS NOT NULL
|
||||
LEFT JOIN fbeva_sub_project fsp ON fsp.contract_id = bsc.id
|
||||
WHERE
|
||||
bs.id IS NOT NULL
|
||||
AND fsp.eva_month IS NOT NULL
|
||||
GROUP BY
|
||||
bs.sub_name
|
||||
<if test="params.status != null and params.status != '' ">
|
||||
having status = #{params.status}
|
||||
</if>
|
||||
limit #{offset}, #{limit}
|
||||
</select>
|
||||
<select id="getRankListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM (
|
||||
SELECT
|
||||
fsp.id as uuid,
|
||||
bs.id as subId,
|
||||
bs.sub_name AS subName,
|
||||
bsc.id AS cid,
|
||||
bsc.contract_name,
|
||||
fsp.eva_month as evaMonth,
|
||||
fsp.eva_score,
|
||||
COUNT(bs.sub_name) as proNum,
|
||||
SUM(fsp.eva_score) / COUNT(bs.sub_name) as evaScore,
|
||||
case WHEN FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 90 then 1
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 80 then 2
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) > 60 then 3
|
||||
when FORMAT(SUM(fsp.eva_score) / COUNT(bs.sub_name),2) < 61 then 4
|
||||
else 0
|
||||
End as status
|
||||
FROM
|
||||
bm_subcontractor bs
|
||||
RIGHT JOIN bm_sub_contract bsc ON bsc.sub_id = bs.id
|
||||
AND bsc.is_active = 1
|
||||
AND bs.id IS NOT NULL
|
||||
LEFT JOIN fbeva_sub_project fsp ON fsp.contract_id = bsc.id
|
||||
WHERE
|
||||
bs.id IS NOT NULL
|
||||
AND fsp.eva_month IS NOT NULL
|
||||
GROUP BY
|
||||
bs.sub_name
|
||||
<if test="params.status != null and params.status != '' ">
|
||||
having status = #{params.status}
|
||||
</if>
|
||||
) a
|
||||
</select>
|
||||
<select id="getMonthRankHistoryList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
SELECT DISTINCT su.username AS sitePersonInCharge,
|
||||
fsp.id as uuid,
|
||||
bp.NAME as proName,
|
||||
bs.sub_name AS subName,
|
||||
bsc.contract_name AS contractName,
|
||||
fsp.contract_id as id,
|
||||
fsp.eva_month as evaMonth,
|
||||
fsp.eva_year as evaYear,
|
||||
fsp.eva_score as evaScore,
|
||||
fsp.eva_name as evaName,
|
||||
fsp.eva_date as evaDate,
|
||||
fsp.eva_id as evaId
|
||||
from bm_subcontractor bs
|
||||
left join bm_sub_contract bsc on bsc.sub_id = bs.id
|
||||
left join pm_company pc on pc.id = bs.org_id
|
||||
left join bm_project bp on bp.id = bsc.pro_id
|
||||
left join bm_sub_relation bsr on bsr.sub_contract_id = bsc.id and bsr.type = 1
|
||||
left join sys_user su on su.id = bsr.value
|
||||
left join fbeva_sub_project fsp on fsp.contract_id = bsc.id
|
||||
where bs.id = #{params.subId}
|
||||
and fsp.eva_date is not null
|
||||
limit #{offset}
|
||||
, #{limit}
|
||||
</select>
|
||||
<select id="getMonthRankHistoryCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(DISTINCT su.username)
|
||||
FROM
|
||||
bm_subcontractor bs
|
||||
LEFT JOIN bm_sub_contract bsc ON bsc.sub_id = bs.id
|
||||
LEFT JOIN pm_company pc ON pc.id = bs.org_id
|
||||
LEFT JOIN bm_project bp ON bp.id = bsc.pro_id
|
||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id
|
||||
AND bsr.type = 1
|
||||
LEFT JOIN sys_user su ON su.id = bsr.
|
||||
VALUE
|
||||
LEFT JOIN fbeva_sub_project fsp ON fsp.contract_id = bsc.id
|
||||
where bs.id =#{params.subId} and fsp.eva_date is not null
|
||||
SELECT COUNT(DISTINCT su.username)
|
||||
FROM bm_subcontractor bs
|
||||
LEFT JOIN bm_sub_contract bsc ON bsc.sub_id = bs.id
|
||||
LEFT JOIN pm_company pc ON pc.id = bs.org_id
|
||||
LEFT JOIN bm_project bp ON bp.id = bsc.pro_id
|
||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id
|
||||
AND bsr.type = 1
|
||||
LEFT JOIN sys_user su ON su.id = bsr.
|
||||
VALUE
|
||||
LEFT JOIN fbeva_sub_project fsp ON fsp.contract_id = bsc.id
|
||||
where bs.id = #{params.subId}
|
||||
and fsp.eva_date is not null
|
||||
</select>
|
||||
|
||||
<insert id="insertFbevaSubProject" parameterType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
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>
|
||||
<insert id="insertFbevaSubProjectdetails" parameterType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
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>
|
||||
<insert id="insertFbevaStantScoredetails" parameterType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
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})
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue