Commit 6b59f98e by yao.xiao

增加-已离职经纪人不显示

parent 501e2b02
...@@ -224,5 +224,5 @@ public interface PractitionerService { ...@@ -224,5 +224,5 @@ public interface PractitionerService {
* @param practitionerId * @param practitionerId
* @return * @return
*/ */
List<Long> getPractitionerIdList(Long practitionerId); List<Long> getPractitionerIdList(Long practitionerId,Integer isActive);
} }
...@@ -253,7 +253,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -253,7 +253,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
try { try {
// 获取团队成员或被辅导人的practitionerId // 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId); List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,1);
List<TeamMemberDetail> dataList = aclPractitionerDALService.queryTeamMemberDetailList(practitionerIdList); List<TeamMemberDetail> dataList = aclPractitionerDALService.queryTeamMemberDetailList(practitionerIdList);
......
...@@ -1807,7 +1807,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1807,7 +1807,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
TeamActionsAverageQueryResponseVO responseVO = new TeamActionsAverageQueryResponseVO(); TeamActionsAverageQueryResponseVO responseVO = new TeamActionsAverageQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
//该团队长下团队所有经纪人信息 //该团队长下团队所有经纪人信息
List<Long> practitionerIds = this.getPractitionerIdList(practitionerId); List<Long> practitionerIds = this.getPractitionerIdList(practitionerId,1);
//团队经纪人个数 //团队经纪人个数
BigDecimal practitionerNum = BigDecimal.valueOf(practitionerIds.size()); BigDecimal practitionerNum = BigDecimal.valueOf(practitionerIds.size());
...@@ -1866,14 +1866,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1866,14 +1866,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
} }
@Override @Override
public List<Long> getPractitionerIdList(Long practitionerId) { public List<Long> getPractitionerIdList(Long practitionerId,Integer isActive) {
List<Long> practitionerIdList = new ArrayList<>(); List<Long> practitionerIdList = new ArrayList<>();
practitionerIdList.add(practitionerId); practitionerIdList.add(practitionerId);
// 判断当前经纪人是否为团队长 // 判断当前经纪人是否为团队长
int count = aclPractitionerDALService.isTeamLeader(practitionerId); int count = aclPractitionerDALService.isTeamLeader(practitionerId);
if (count > 0) { if (count > 0) {
List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId); List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId,isActive);
practitionerIdList.addAll(practitionerIdList1); practitionerIdList.addAll(practitionerIdList1);
} else { } else {
List<Long> practitionerIdList2 = aclPractitionerDALService.queryMentoredByPractitionerId(practitionerId); List<Long> practitionerIdList2 = aclPractitionerDALService.queryMentoredByPractitionerId(practitionerId);
...@@ -1980,7 +1980,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1980,7 +1980,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<SalesPerformanceForecastInfo> infos = new ArrayList<>(); List<SalesPerformanceForecastInfo> infos = new ArrayList<>();
//通过团队长经纪人id,查询此团队所有经纪人id //通过团队长经纪人id,查询此团队所有经纪人id
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId)); List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,1));
if (practitioners.isEmpty()){ if (practitioners.isEmpty()){
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO; return responseVO;
...@@ -2399,6 +2399,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2399,6 +2399,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
getMemberInfoForOnLine(memberInfoMap,practitionerId,time); getMemberInfoForOnLine(memberInfoMap,practitionerId,time);
//eGolden //eGolden
getMemberInfoForEGolden(memberInfoMap,practitionerId,time); getMemberInfoForEGolden(memberInfoMap,practitionerId,time);
//20210303增加逻辑,已离职经纪人没有数据不显示
//查询这个团队已离职经纪人电话
List<String> leaveOfficeList = aclPractitionerDALService.findLeaveOfficeByPractitionerId(practitionerId);
for (String m : leaveOfficeList) {
SubordinateSystemMemberInfo subordinateSystemMemberInfo = memberInfoMap.get(m);
if (CommonUtil.isNullOrZero(subordinateSystemMemberInfo.getCount())){
memberInfoMap.remove(m);
}
}
//查询出来的结果按照fyp进行排序 //查询出来的结果按照fyp进行排序
List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values()); List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values());
memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp)); memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp));
...@@ -2441,7 +2450,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2441,7 +2450,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
* @param time * @param time
*/ */
private void getMemberInfoForEGolden(Map<String, SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) { private void getMemberInfoForEGolden(Map<String, SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId)); List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,null));
List<String> mobileNoList = new ArrayList<>(); List<String> mobileNoList = new ArrayList<>();
for(AclPractitioner item : practitionerList){ for(AclPractitioner item : practitionerList){
mobileNoList.add(item.getMobileNo()); mobileNoList.add(item.getMobileNo());
...@@ -2548,7 +2557,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2548,7 +2557,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
*/ */
private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) { private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
//1、查询该团队长所在体系的所有成员 //1、查询该团队长所在体系的所有成员
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId)); List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,null));
if(!practitionerList.isEmpty() && practitionerList.get(0) != null){ if(!practitionerList.isEmpty() && practitionerList.get(0) != null){
Map<Long,Long> customerMap = new HashMap<>(); Map<Long,Long> customerMap = new HashMap<>();
Map<Long,String> practitionerIdMobileNoMap = new HashMap<>(); Map<Long,String> practitionerIdMobileNoMap = new HashMap<>();
......
...@@ -297,7 +297,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -297,7 +297,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Date weekOne = cal2.getTime(); Date weekOne = cal2.getTime();
// 获取团队成员或被辅导人的practitionerId // 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId); List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,null);
// 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC // 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC
List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList); List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList);
......
...@@ -67,7 +67,7 @@ public interface AclPractitionerMapper { ...@@ -67,7 +67,7 @@ public interface AclPractitionerMapper {
int isTeamLeader(Long practitionerId); int isTeamLeader(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId); List<Long> queryTeamAllPractitionerId(@Param("practitionerId")Long practitionerId,@Param("isActive")Integer isActive);
List<Long> queryMentoredByPractitionerId(Long practitionerId); List<Long> queryMentoredByPractitionerId(Long practitionerId);
...@@ -76,4 +76,6 @@ public interface AclPractitionerMapper { ...@@ -76,4 +76,6 @@ public interface AclPractitionerMapper {
AclPractitioner selectByMobileNo(String mobileNo); AclPractitioner selectByMobileNo(String mobileNo);
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList); List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList);
List<String> findLeaveOfficeByPractitionerId(Long practitionerId);
} }
\ No newline at end of file
...@@ -179,7 +179,7 @@ public interface AclPractitionerDALService { ...@@ -179,7 +179,7 @@ public interface AclPractitionerDALService {
int isTeamLeader(Long practitionerId); int isTeamLeader(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId); List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive);
List<Long> queryMentoredByPractitionerId(Long practitionerId); List<Long> queryMentoredByPractitionerId(Long practitionerId);
...@@ -188,4 +188,6 @@ public interface AclPractitionerDALService { ...@@ -188,4 +188,6 @@ public interface AclPractitionerDALService {
PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId); PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId);
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList); List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList);
List<String> findLeaveOfficeByPractitionerId(Long practitionerId);
} }
...@@ -19,6 +19,7 @@ import org.apache.log4j.Logger; ...@@ -19,6 +19,7 @@ import org.apache.log4j.Logger;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service("aclPractitionerDALService") @Service("aclPractitionerDALService")
public class AclPractitionerDALServiceImpl implements AclPractitionerDALService { public class AclPractitionerDALServiceImpl implements AclPractitionerDALService {
...@@ -173,8 +174,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService ...@@ -173,8 +174,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
} }
@Override @Override
public List<Long> queryTeamAllPractitionerId(Long practitionerId) { public List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive) {
return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId); return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId, isActive);
} }
@Override @Override
...@@ -196,4 +197,13 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService ...@@ -196,4 +197,13 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList) { public List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList) {
return aclPractitionerMapper.queryTeamMemberDetailList(practitionerIdList); return aclPractitionerMapper.queryTeamMemberDetailList(practitionerIdList);
} }
@Override
public List<String> findLeaveOfficeByPractitionerId(Long practitionerId) {
DESTypeHandler jpaCryptoConverter = new DESTypeHandler();
List<String> mobileNos = aclPractitionerMapper.findLeaveOfficeByPractitionerId(practitionerId);
List<String> mobileNoList = new ArrayList<>(mobileNos.size());
mobileNos.forEach(m -> mobileNoList.add(jpaCryptoConverter.decode(m)));
return mobileNoList;
}
} }
...@@ -1607,6 +1607,10 @@ ...@@ -1607,6 +1607,10 @@
SELECT id from ag_acl_practitioner SELECT id from ag_acl_practitioner
where subordinate_system_id = where subordinate_system_id =
(select subordinate_system_id from ag_acl_practitioner where id = #{practitionerId,jdbcType=BIGINT}) (select subordinate_system_id from ag_acl_practitioner where id = #{practitionerId,jdbcType=BIGINT})
<if test="isActive != null">
and is_active = #{isActive,jdbcType=INTEGER}
</if>
</select> </select>
<select id="findPractitionerInfoByPractitionerId" resultMap="practitioner_info_map"> <select id="findPractitionerInfoByPractitionerId" resultMap="practitioner_info_map">
...@@ -1700,4 +1704,7 @@ ...@@ -1700,4 +1704,7 @@
left join (select * from ag_md_code where code_type = 'EducationLevel') c on p.education_level = c.code_code left join (select * from ag_md_code where code_type = 'EducationLevel') c on p.education_level = c.code_code
</select> </select>
<select id="findLeaveOfficeByPractitionerId" resultType="string">
select mobile_no from ag_acl_practitioner where is_active = 0 and subordinate_system_id = #{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