Commit 2084d142 by 徐高华

查询离职成员关联的导购列表

parent 288d88a1
...@@ -212,4 +212,11 @@ public interface StaffClerkRelationApiService { ...@@ -212,4 +212,11 @@ public interface StaffClerkRelationApiService {
*/ */
List<StaffClerkRelationDTO> listManageBindByStaffId(String staffId); List<StaffClerkRelationDTO> listManageBindByStaffId(String staffId);
/**
* 查询离职成员的关联的导购记录
* @param staffIdList
* @return
*/
List<String> getTakeoverClerkIdList(List<String> staffIdList) ;
} }
...@@ -5,6 +5,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; ...@@ -5,6 +5,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO; import com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -135,4 +136,12 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -135,4 +136,12 @@ public interface TabHaobanStaffClerkRelationMapper {
List<StaffClerkRelationDTO> listByStaffIdsForClerk(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIdList") Set<String> staffIdList); List<StaffClerkRelationDTO> listByStaffIdsForClerk(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIdList") Set<String> staffIdList);
List<String> listAllStaffIdByEnterpriseId(@Param("enterpriseId") String enterpriseId,@Param("wxEnterpriseId") String wxEnterpriseId); List<String> listAllStaffIdByEnterpriseId(@Param("enterpriseId") String enterpriseId,@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 查询成员离职是关联的导购
* @param staffId
* @param delTime
* @return
*/
List<String> taskoverClerkIdList(@Param("staffId")String staffId, @Param("delTime") Date delTime) ;
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ import com.gic.api.base.commons.Page; ...@@ -7,6 +7,7 @@ import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.clerk.api.dto.ClerkDTO; import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GICMQClientUtil; import com.gic.commons.util.GICMQClientUtil;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
...@@ -608,4 +609,23 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -608,4 +609,23 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
public List<StaffClerkRelationDTO> listManageBindByStaffId(String staffId) { public List<StaffClerkRelationDTO> listManageBindByStaffId(String staffId) {
return staffClerkRelationService.listManageBindByStaffId(staffId); return staffClerkRelationService.listManageBindByStaffId(staffId);
} }
@Override
public List<String> getTakeoverClerkIdList(List<String> staffIdList) {
List<String> takeoverClerkIdList = new ArrayList<>() ;
if(CollectionUtils.isNotEmpty(staffIdList)) {
for(int i=0;i<staffIdList.size();i++) {
String staffId = staffIdList.get(i) ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKeyNoStatus(staffId) ;
if(null != staff && null!= staff.getDelTime()) {
Date delTime = DateUtil.addNumForMinute(staff.getDelTime(),-5);
List<String> clerkIdList = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdList(staffId,delTime) ;
if(CollectionUtils.isNotEmpty(clerkIdList)) {
takeoverClerkIdList.addAll(clerkIdList);
}
}
}
}
return takeoverClerkIdList;
}
} }
...@@ -483,4 +483,8 @@ ...@@ -483,4 +483,8 @@
order by a.update_time desc limit 1 order by a.update_time desc limit 1
</select> </select>
<select id="taskoverClerkIdList" resultType="java.lang.String" parameterType="java.lang.String">
select clerk_id from tab_haoban_staff_clerk_relation where staff_id =#{staffId} and status_flag = 0 and update_time >= #{delTime}
</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