Commit 44842a75 by 徐高华

离职在职继承

parent 4a03ff23
package com.gic.haoban.manage.api.dto.handover;
import java.io.Serializable;
public class StaffNumDTO implements Serializable {
/**
* 在职成员数
*/
private Integer staffNum ;
/**
* 离职成员数
*/
private Integer handoverStaffNum ;
/**
* 离职成员好友数
*/
private Integer handoverExternalNum ;
public Integer getStaffNum() {
return staffNum;
}
public void setStaffNum(Integer staffNum) {
this.staffNum = staffNum;
}
public Integer getHandoverStaffNum() {
return handoverStaffNum;
}
public void setHandoverStaffNum(Integer handoverStaffNum) {
this.handoverStaffNum = handoverStaffNum;
}
public Integer getHandoverExternalNum() {
return handoverExternalNum;
}
public void setHandoverExternalNum(Integer handoverExternalNum) {
this.handoverExternalNum = handoverExternalNum;
}
}
......@@ -3,10 +3,7 @@ package com.gic.haoban.manage.api.service;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverListDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverSaveDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverStaffDTO;
import com.gic.haoban.manage.api.dto.handover.MemberTransferDTO;
import com.gic.haoban.manage.api.dto.handover.*;
import com.gic.haoban.manage.api.qdto.handover.HandoverListQDTO;
import com.gic.haoban.manage.api.qdto.handover.MemberTransferQDTO;
import com.gic.haoban.manage.api.qdto.handover.StaffListQDTO;
......@@ -55,4 +52,6 @@ public interface HandoverApiService {
Page<HandoverExternalDTO> pageHandoverFriend(String staffId , String storeId , String externalName , BasePageInfo pageInfo) ;
StaffNumDTO staffHandoverNum(String wxEnterpriseId , String enterpriseId , String storeId) ;
}
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.handover.StaffNumDTO;
import com.gic.haoban.manage.service.entity.TabHandoverStaff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -45,4 +46,6 @@ public interface HandoverStaffMapper {
List<TabHandoverStaff> listByHandover(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("storeId")String storeId) ;
StaffNumDTO getNum(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("storeId")String storeId) ;
}
\ No newline at end of file
......@@ -3,10 +3,7 @@ package com.gic.haoban.manage.service.service;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverListDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverSaveDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverStaffDTO;
import com.gic.haoban.manage.api.dto.handover.MemberTransferDTO;
import com.gic.haoban.manage.api.dto.handover.*;
import com.gic.haoban.manage.api.qdto.handover.HandoverListQDTO;
import com.gic.haoban.manage.api.qdto.handover.MemberTransferQDTO;
import com.gic.haoban.manage.api.qdto.handover.StaffListQDTO;
......@@ -49,4 +46,6 @@ public interface HaobanHandoverService {
List<HandoverExternalDTO> listAllHandoverFriend(String staffId, String storeId, String externalName);
Page<HandoverExternalDTO> pageHandoverFriend(String staffId, String storeId, String externalName, BasePageInfo pageInfo);
StaffNumDTO staffHandoverNum(String wxEnterpriseId, String enterpriseId, String storeId);
}
......@@ -8,10 +8,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverListDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverSaveDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverStaffDTO;
import com.gic.haoban.manage.api.dto.handover.MemberTransferDTO;
import com.gic.haoban.manage.api.dto.handover.*;
import com.gic.haoban.manage.api.qdto.handover.HandoverListQDTO;
import com.gic.haoban.manage.api.qdto.handover.MemberTransferQDTO;
import com.gic.haoban.manage.api.qdto.handover.StaffListQDTO;
......@@ -122,4 +119,16 @@ public class HaobanHandoverServiceImpl implements HaobanHandoverService {
Page<HandoverExternalDTO> retPage = PageUtil.changePageHelperToCurrentPage(new PageInfo<>(externalList), HandoverExternalDTO.class);
return retPage;
}
@Override
public StaffNumDTO staffHandoverNum(String wxEnterpriseId, String enterpriseId, String storeId) {
// 在职成员数
int staffNum = this.staffClerkRelationMapper.listByStoreIds(wxEnterpriseId, Arrays.asList(storeId)).size() ;
StaffNumDTO dto = this.handoverStaffMapper.getNum(wxEnterpriseId, storeId) ;
if(null == dto) {
dto = new StaffNumDTO() ;
}
dto.setStaffNum(staffNum);
return dto;
}
}
......@@ -3,10 +3,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverListDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverSaveDTO;
import com.gic.haoban.manage.api.dto.handover.HandoverStaffDTO;
import com.gic.haoban.manage.api.dto.handover.MemberTransferDTO;
import com.gic.haoban.manage.api.dto.handover.*;
import com.gic.haoban.manage.api.qdto.handover.HandoverListQDTO;
import com.gic.haoban.manage.api.qdto.handover.MemberTransferQDTO;
import com.gic.haoban.manage.api.qdto.handover.StaffListQDTO;
......@@ -58,4 +55,8 @@ public class HandoverApiServiceImpl implements HandoverApiService {
public Page<HandoverExternalDTO> pageHandoverFriend(String staffId, String storeId, String externalName, BasePageInfo pageInfo) {
return this.haobanHandoverService.pageHandoverFriend(staffId, storeId, externalName, pageInfo);
}
@Override
public StaffNumDTO staffHandoverNum(String wxEnterpriseId, String enterpriseId, String storeId) {
return this.haobanHandoverService.staffHandoverNum(wxEnterpriseId, enterpriseId, storeId);
}
}
......@@ -162,6 +162,15 @@
where wx_enterprise_id = #{wxEnterpriseId} and status_flag=1 and store_id = #{storeId}
</select>
<select id="getNum" resultType="com.gic.haoban.manage.api.dto.handover.StaffNumDTO">
select
count(1) handoverStaffNum ,
sum(friend_count) handoverExternalNum
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId} and status_flag=1 and store_id = #{storeId}
group by store_id
</select>
<update id="delByUserIds">
update tab_haoban_handover_staff
set
......
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