|
@@ -136,14 +136,14 @@
|
|
|
mp.status AS status
|
|
|
FROM maintenance_plan mp
|
|
|
LEFT JOIN project p ON mp.project_id = p.id
|
|
|
- <if test="request.currentRoleCode == REGION_DIRECTOR ">
|
|
|
+ <if test="request.currentRoleCode == 'REGION_DIRECTOR' ">
|
|
|
LEFT JOIN project_user pu ON p.id = pu.project_id
|
|
|
</if>
|
|
|
LEFT JOIN lift l ON mp.lift_id = l.id
|
|
|
LEFT JOIN user_info ui ON mp.worker_id = ui.user_id
|
|
|
WHERE mp.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
<choose>
|
|
|
- <when test="request.userId > 0 and request.currentRoleCode == REGION_DIRECTOR ">
|
|
|
+ <when test="request.userId > 0 and request.currentRoleCode == 'REGION_DIRECTOR' ">
|
|
|
AND pu.user_id = #{request.userId,jdbcType=BIGINT}
|
|
|
</when>
|
|
|
<otherwise>
|
|
@@ -176,14 +176,14 @@
|
|
|
count(1) total
|
|
|
FROM maintenance_plan mp
|
|
|
LEFT JOIN project p ON mp.project_id = p.id
|
|
|
- <if test="request.currentRoleCode == REGION_DIRECTOR ">
|
|
|
+ <if test="request.currentRoleCode == 'REGION_DIRECTOR' ">
|
|
|
LEFT JOIN project_user pu ON p.id = pu.project_id
|
|
|
</if>
|
|
|
LEFT JOIN lift l ON mp.lift_id = l.id
|
|
|
LEFT JOIN user_info ui ON mp.worker_id = ui.user_id
|
|
|
WHERE mp.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
<choose>
|
|
|
- <when test="request.userId > 0 and request.currentRoleCode == REGION_DIRECTOR ">
|
|
|
+ <when test="request.userId > 0 and request.currentRoleCode == 'REGION_DIRECTOR' ">
|
|
|
AND pu.user_id = #{request.userId,jdbcType=BIGINT}
|
|
|
</when>
|
|
|
<otherwise>
|