bug修复: 3880 用18187114427这个账户登录系统,分包合同管理工程名称字段新增不了数据
This commit is contained in:
parent
4d765aa1e8
commit
c2a12d3463
|
|
@ -64,6 +64,9 @@ public class SelectController {
|
||||||
@CrossOrigin
|
@CrossOrigin
|
||||||
@Log(title = "查询工程-orgId", businessType = BusinessType.SELECT)
|
@Log(title = "查询工程-orgId", businessType = BusinessType.SELECT)
|
||||||
public R getProByOrgId(SelectBean o){
|
public R getProByOrgId(SelectBean o){
|
||||||
|
// 前端穿的orgId实际是工程id,用工程id去查org信息肯定对不上。
|
||||||
|
o.setProId(o.getOrgId());
|
||||||
|
o.setOrgId(null);
|
||||||
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
||||||
return service.getProByOrgId(o);
|
return service.getProByOrgId(o);
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +164,10 @@ public class SelectController {
|
||||||
@CrossOrigin
|
@CrossOrigin
|
||||||
@Log(title = "查询公司和子公司", businessType = BusinessType.SELECT)
|
@Log(title = "查询公司和子公司", businessType = BusinessType.SELECT)
|
||||||
public R getCompanyAndSubCompany(SelectBean o){
|
public R getCompanyAndSubCompany(SelectBean o){
|
||||||
|
//api 从名字上看是查公司和子公司,但实际的sql却查的是工程信息,
|
||||||
|
// 存在歧义,下面这一行代码[o.setOrgId(null)]是根据sql语句来改的,
|
||||||
|
// 前端穿的orgId实际是工程id,用工程id去查org信息肯定对不上。
|
||||||
|
o.setOrgId(null);
|
||||||
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
||||||
return service.getCompanyAndSubCompany(o);
|
return service.getCompanyAndSubCompany(o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,19 +42,33 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCompanyAndSubCompany" resultType="com.bonus.system.api.domain.SelectBean">
|
<select id="getCompanyAndSubCompany" resultType="com.bonus.system.api.domain.SelectBean">
|
||||||
|
<!-- SELECT-->
|
||||||
|
<!-- id,-->
|
||||||
|
<!-- `NAME`-->
|
||||||
|
<!-- FROM-->
|
||||||
|
<!-- bm_project_general bpg-->
|
||||||
|
<!-- left join bm_project bp on-->
|
||||||
|
<!-- WHERE is_active = '1'-->
|
||||||
|
<!-- <if test="orgId != null and orgId != '' and roleLevel < 3 and roleLevel > 1">-->
|
||||||
|
<!-- AND FIND_IN_SET(id,getParentList(#{orgId}))-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- <if test="orgId != null and orgId != '' and roleLevel >= 3">-->
|
||||||
|
<!-- AND FIND_IN_SET(id,getParentList(#{orgId}))-->
|
||||||
|
<!-- limit 1,1-->
|
||||||
|
<!-- </if>-->
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
distinct
|
||||||
`NAME`
|
bpg.id,
|
||||||
|
bpg.NAME
|
||||||
FROM
|
FROM
|
||||||
bm_project_general
|
bm_project_general bpg
|
||||||
WHERE is_active = '1'
|
left join bm_project bp on bpg.id = bp.project_general_id
|
||||||
<if test="orgId != null and orgId != '' and roleLevel < 3 and roleLevel > 1">
|
WHERE bpg.is_active = '1'
|
||||||
AND FIND_IN_SET(id,getParentList(#{orgId}))
|
and bp.is_active = '1'
|
||||||
</if>
|
<if test="orgId != null and orgId != ''">
|
||||||
<if test="orgId != null and orgId != '' and roleLevel >= 3">
|
and (bp.company_id = #{orgId} or bp.two_com_id = #{orgId})
|
||||||
AND FIND_IN_SET(id,getParentList(#{orgId}))
|
|
||||||
limit 1,1
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPrincipal" resultType="com.bonus.system.api.domain.SelectBean">
|
<select id="getPrincipal" resultType="com.bonus.system.api.domain.SelectBean">
|
||||||
|
|
@ -81,7 +95,10 @@
|
||||||
SELECT bp.id,bp.name FROM bm_project bp
|
SELECT bp.id,bp.name FROM bm_project bp
|
||||||
WHERE bp.is_active = '1'
|
WHERE bp.is_active = '1'
|
||||||
<if test="orgId != null and orgId != ''">
|
<if test="orgId != null and orgId != ''">
|
||||||
AND bp.project_general_id = #{orgId}
|
AND (bp.company_id = #{orgId} or bp.two_com_id = #{orgId})
|
||||||
|
</if>
|
||||||
|
<if test="proId != null and proId != ''">
|
||||||
|
AND bp.project_general_id = #{proId}
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null and type != '' and type == 1">
|
<if test="type != null and type != '' and type == 1">
|
||||||
AND bp.pro_type in ('基建变电','基建线路','配网')
|
AND bp.pro_type in ('基建变电','基建线路','配网')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue