管辖范围考核人员
This commit is contained in:
@@ -181,9 +181,7 @@
|
||||
left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id
|
||||
left join xfsg_shop_info s on s.id = u.shop_id
|
||||
where u.deleted = 0
|
||||
<if test="practicalAssessmentUserId != null and practicalAssessmentUserId != ''">
|
||||
and e.practical_assessment_user_id = #{practicalAssessmentUserId}
|
||||
</if>
|
||||
|
||||
<if test="assessmentStatus != null">
|
||||
and e.assessment_status = #{assessmentStatus}
|
||||
</if>
|
||||
@@ -202,17 +200,19 @@
|
||||
<if test="name != null and name != ''">
|
||||
and u.username like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="storeIdList != null and storeIdList.size() > 0">
|
||||
<if test="practicalAssessmentUserId != null and practicalAssessmentUserId != '' and storeIdList != null and storeIdList.size() > 0">
|
||||
and (e.practical_assessment_user_id = #{practicalAssessmentUserId}
|
||||
or e.training_store_id in
|
||||
<foreach collection="storeIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="practicalAssessmentUserId == null and storeIdList != null and storeIdList.size() > 0">
|
||||
and e.training_store_id in
|
||||
<foreach collection="storeIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="authRegionIdList != null and authRegionIdList.size() > 0">
|
||||
and u.region_id in
|
||||
<foreach collection="authRegionIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -285,6 +285,17 @@
|
||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" > region_path like concat("%", #{region}, "%")</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getStoreIdsByRegionIds" resultType="string">
|
||||
select
|
||||
store_id
|
||||
from
|
||||
region_${enterpriseId}
|
||||
where
|
||||
deleted = 0
|
||||
and
|
||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" > region_path like concat("%", #{region}, "%")</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getSubIdsByRegionpaths" resultType="string">
|
||||
select
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user