Commit 10bb2c5e by 徐高华

离职继承查询

parent 03a98631
...@@ -63,6 +63,9 @@ public interface HandoverOperationApiService { ...@@ -63,6 +63,9 @@ public interface HandoverOperationApiService {
*/ */
public Page<HandoverExternalDTO> pageHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds, List<String> transferIds, BasePageInfo pageInfo); public Page<HandoverExternalDTO> pageHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds, List<String> transferIds, BasePageInfo pageInfo);
List<HandoverExternalDTO> listAllHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds);
/** /**
* 分配的客户列表 * 分配的客户列表
* *
......
package com.gic.haoban.manage.service.dao.mapper; package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO; import com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO;
import com.gic.haoban.manage.service.entity.TabHandoverExternal; import com.gic.haoban.manage.service.entity.TabHandoverExternal;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -76,4 +77,6 @@ public interface HandoverExternalMapper { ...@@ -76,4 +77,6 @@ public interface HandoverExternalMapper {
* @return * @return
*/ */
List<HandoverStaffFriendCountDTO> listPreCountByStaffIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds); List<HandoverStaffFriendCountDTO> listPreCountByStaffIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds);
List<HandoverExternalDTO> listAllByStaffIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds, @Param("search") String search, @Param("status") Integer status);
} }
\ No newline at end of file
...@@ -123,4 +123,6 @@ public interface HandoverService { ...@@ -123,4 +123,6 @@ public interface HandoverService {
Boolean filterHandoverStaff(String wxEnterpriseId, String wxUserId); Boolean filterHandoverStaff(String wxEnterpriseId, String wxUserId);
public void delHandoverStaff(String wxEnterpriseId, List<String> wxUserIds) ; public void delHandoverStaff(String wxEnterpriseId, List<String> wxUserIds) ;
List<HandoverExternalDTO> listAllByStaffIds(String wxEnterpriseId, String search, List<String> staffIds);
} }
...@@ -244,6 +244,12 @@ public class HandoverServiceImpl implements HandoverService { ...@@ -244,6 +244,12 @@ public class HandoverServiceImpl implements HandoverService {
} }
@Override @Override
public List<HandoverExternalDTO> listAllByStaffIds(String wxEnterpriseId, String search, List<String> staffIds) {
List<HandoverExternalDTO> retList = handoverExternalMapper.listAllByStaffIds(wxEnterpriseId, staffIds , search , 1);
return retList;
}
@Override
public List<TabHandoverExternal> listByIds(String wxEnterpriseId, List<String> ids) { public List<TabHandoverExternal> listByIds(String wxEnterpriseId, List<String> ids) {
return handoverExternalMapper.listByIds(wxEnterpriseId, ids); return handoverExternalMapper.listByIds(wxEnterpriseId, ids);
} }
......
...@@ -238,6 +238,21 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ ...@@ -238,6 +238,21 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
} }
@Override @Override
public List<HandoverExternalDTO> listAllHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds) {
List<HandoverExternalDTO> retList = handoverService.listAllByStaffIds(wxEnterpriseId, search, staffIds);
if(CollectionUtils.isEmpty(retList)) {
return retList ;
}
List<TabHaobanStaff> haobanStaffs = staffService.listNoStatusByStaffIds(wxEnterpriseId, staffIds);
Map<String, String> staffNameMap = haobanStaffs.stream().collect(Collectors.toMap(dto -> dto.getStaffId(), dto -> dto.getStaffName(), (o, n) -> o));
retList.forEach(dto -> {
String staffName = staffNameMap.get(dto.getStaffId());
dto.setStaffName(staffName);
});
return retList;
}
@Override
public Page<ExternalInfoDTO> pageHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds, List<String> transferIds, BasePageInfo pageInfo, int status) { public Page<ExternalInfoDTO> pageHandoverFriend(String wxEnterpriseId, String search, List<String> staffIds, List<String> transferIds, BasePageInfo pageInfo, int status) {
Page<HandoverExternalDTO> retPage = handoverService.pageByStaffIds(wxEnterpriseId, search, staffIds, transferIds, pageInfo, status); Page<HandoverExternalDTO> retPage = handoverService.pageByStaffIds(wxEnterpriseId, search, staffIds, transferIds, pageInfo, status);
if (CollectionUtils.isEmpty(retPage.getResult())) { if (CollectionUtils.isEmpty(retPage.getResult())) {
......
...@@ -125,6 +125,24 @@ ...@@ -125,6 +125,24 @@
order by create_time desc order by create_time desc
</select> </select>
<select id="listAllByStaffIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in
<foreach collection="staffIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
and status_flag = #{status}
<if test="search!=null and search!=''">
and external_user_name like CONCAT('%',#{search},'%')
</if>
limit 0 , 5000
</select>
<select id="listIdByStaffIds" resultMap="BaseResultMap"> <select id="listIdByStaffIds" resultMap="BaseResultMap">
select select
handover_external_id handover_external_id
......
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