公用查询下拉框修改
This commit is contained in:
parent
fd89ce9b4d
commit
4c87d3ee8d
|
|
@ -255,10 +255,7 @@
|
||||||
bst.team_name as name
|
bst.team_name as name
|
||||||
FROM
|
FROM
|
||||||
bm_sub_contract bsc
|
bm_sub_contract bsc
|
||||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id
|
LEFT JOIN bm_sub_team bst ON bst.sub_id = bsc.sub_id
|
||||||
AND bsr.type = '3'
|
|
||||||
AND bsr.is_active = '1'
|
|
||||||
LEFT JOIN bm_sub_team bst ON bst.id = bsr.`v`
|
|
||||||
AND bst.is_active = '1'
|
AND bst.is_active = '1'
|
||||||
WHERE bst.id is not null and bsc.is_active = '1'
|
WHERE bst.id is not null and bsc.is_active = '1'
|
||||||
<if test="proId != null and proId != '' ">
|
<if test="proId != null and proId != '' ">
|
||||||
|
|
@ -278,8 +275,7 @@
|
||||||
if(btur.is_foreman = 1, btur.id_number, 0) as isForeman
|
if(btur.is_foreman = 1, btur.id_number, 0) as isForeman
|
||||||
FROM
|
FROM
|
||||||
bm_sub_team bst
|
bm_sub_team bst
|
||||||
LEFT JOIN bm_sub_relation bsr ON bsr.v = bst.id and bsr.is_active = '1' and bsr.type = 3
|
LEFT JOIN bm_sub_contract bsc ON bst.sub_id = bsc.sub_id and bsc.is_active= '1'
|
||||||
LEFT JOIN bm_sub_contract bsc ON bsr.sub_contract_id = bsc.id and bsc.is_active= '1'
|
|
||||||
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active= '1'
|
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active= '1'
|
||||||
left join bm_team_user_relation btur on btur.team_id = bst.id and btur.is_active = 1
|
left join bm_team_user_relation btur on btur.team_id = bst.id and btur.is_active = 1
|
||||||
WHERE bst.is_active = '1'
|
WHERE bst.is_active = '1'
|
||||||
|
|
@ -422,8 +418,8 @@
|
||||||
bp.`name`
|
bp.`name`
|
||||||
FROM
|
FROM
|
||||||
bm_sub_team bst
|
bm_sub_team bst
|
||||||
LEFT JOIN bm_sub_relation bsr ON bsr.v = bst.id and bsr.is_active = '1' and bsr.type = 3
|
|
||||||
LEFT JOIN bm_sub_contract bsc ON bsr.sub_contract_id = bsc.id and bsc.is_active= '1'
|
LEFT JOIN bm_sub_contract bsc ON bst.sub_id = bsc.sub_id and bsc.is_active= '1'
|
||||||
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active= '1'
|
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active= '1'
|
||||||
WHERE bst.is_active = '1'and bst.id = #{teamId}
|
WHERE bst.is_active = '1'and bst.id = #{teamId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue