Commit a55a189b by jianan

辅导人查看被辅导人

parent e24d304f
...@@ -293,11 +293,9 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -293,11 +293,9 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
cal2.set(Calendar.SECOND, 0); cal2.set(Calendar.SECOND, 0);
Date weekOne = cal2.getTime(); Date weekOne = cal2.getTime();
List<Long> practitionerIdList = scheduleTrackMapper.queryTeamAllPractitionerId(practitionerId); // 获取团队成员及被辅导人的practitionerId
if (CollectionUtils.isEmpty(practitionerIdList)) { List<Long> practitionerIdList = this.getPractitionerIdList(practitionerId);
// 集合为空,说明该经纪人不是团队长
practitionerIdList.add(practitionerId);
}
// 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC // 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC
List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList); List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList);
// 获取mobileNoList // 获取mobileNoList
...@@ -333,6 +331,14 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -333,6 +331,14 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
return resp; return resp;
} }
private List<Long> getPractitionerIdList(Long practitionerId) {
List<Long> practitionerIdList1 = scheduleTrackMapper.queryTeamAllPractitionerId(practitionerId);
List<Long> practitionerIdList2 = scheduleTrackMapper.queryMentoredByPractitionerId(practitionerId);
practitionerIdList1.addAll(practitionerIdList2);
return practitionerIdList1;
}
private void computeTotalFYC(List<PersonalPEPScore> saleAndRecuit, List<PersonalOffLineFYC> personalOffLineFYCList) { private void computeTotalFYC(List<PersonalPEPScore> saleAndRecuit, List<PersonalOffLineFYC> personalOffLineFYCList) {
for (PersonalPEPScore online: saleAndRecuit ) { for (PersonalPEPScore online: saleAndRecuit ) {
for (PersonalOffLineFYC offline: personalOffLineFYCList) { for (PersonalOffLineFYC offline: personalOffLineFYCList) {
......
...@@ -31,5 +31,7 @@ public interface ScheduleTrackMapper { ...@@ -31,5 +31,7 @@ public interface ScheduleTrackMapper {
int checkIsExist(@Param("practitionerId")Long practitionerId, @Param("trackTime")Date trackTime, @Param("mdDropOptionId")Long mdDropOptionId, int checkIsExist(@Param("practitionerId")Long practitionerId, @Param("trackTime")Date trackTime, @Param("mdDropOptionId")Long mdDropOptionId,
@Param("taskTimeFrom")String taskTimeFrom, @Param("taskTimeEnd")String taskTimeEnd); @Param("taskTimeFrom")String taskTimeFrom, @Param("taskTimeEnd")String taskTimeEnd);
List<Long> queryMentoredByPractitionerId(Long practitionerId);
} }
...@@ -258,4 +258,8 @@ ...@@ -258,4 +258,8 @@
AND md_drop_option_id = #{mdDropOptionId,jdbcType=BIGINT} AND md_drop_option_id = #{mdDropOptionId,jdbcType=BIGINT}
</select> </select>
<select id="queryMentoredByPractitionerId" resultType="java.lang.Long" statementType="CALLABLE">
CALL proc_queryMentoredByPractitionerId(#{practitionerId,jdbcType=BIGINT});
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment