SQL 修改
This commit is contained in:
parent
6543215b70
commit
183106222f
|
|
@ -29,12 +29,15 @@
|
|||
</select>
|
||||
|
||||
<select id="selectProOrgByTeamId" resultType="com.bonus.system.api.domain.SysUser">
|
||||
select bsc.pro_id as proId,po.company_id as companyId,po.name as companyName,
|
||||
bp.company_id as orgId from bm_sub_relation bsr
|
||||
left join bm_sub_contract bsc on bsc.id = bsr.sub_contract_id and bsc.is_active = 1
|
||||
left join bm_project bp on bp.id = bsc.pro_id and bp.is_active = 1
|
||||
LEFT JOIN pm_organization po on po.id = bp.company_id and po.IS_ACTIVE = 1
|
||||
where bsr.is_active = 1 and bsr.type = 3 and bsr.value = #{teamId}
|
||||
select bsc."pro_id" as proId,
|
||||
po."company_id" as companyId,
|
||||
po.NAME as companyName,
|
||||
bp."company_id" as orgId
|
||||
from "ynrealname"."bm_sub_relation" bsr
|
||||
left join "ynrealname"."bm_sub_contract" bsc on bsc."id" = bsr."sub_contract_id" and bsc."is_active" = 1
|
||||
left join "ynrealname"."bm_project" bp on bp."id" = bsc."pro_id" and bp."is_active" = 1
|
||||
LEFT JOIN "ynrealname"."pm_organization" po on po.ID = bp."company_id" and po.IS_ACTIVE = 1
|
||||
where bsr."is_active" = 1 and bsr."type" = 3 and bsr."value" = #{teamId}
|
||||
</select>
|
||||
|
||||
<select id="getSubCompany" resultType="com.bonus.system.api.domain.SelectBean">
|
||||
|
|
|
|||
Loading…
Reference in New Issue