Commit 5165b7d4 by huangZW

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents 2f18ecff a0e94505
......@@ -44,4 +44,6 @@ public interface StaffApiService {
StaffDepartmentRelatedDTO getDepartmentIdAndCode(String departmentId, String code);
void initWxUser(String corpid, String suiteid, String wxEnterpriseId, Integer wxDepartmentId);
public List<String> listUnBindClerk(String storeId);
}
......@@ -5,6 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.xpath.operations.Bool;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.github.pagehelper.Page;
......@@ -53,4 +54,6 @@ public interface DepartmentMapper {
int countSyncDepartmentByEnterpriseId(@Param("enterpriseId")String enterpriseId);
int countByDepartment(@Param("departmentId")String departmentId);
TabHaobanDepartment getByRelatedIdNotInRecycle(@Param("relatedId")String relatedId);
}
\ No newline at end of file
......@@ -42,4 +42,6 @@ public interface DepartmentService {
int countByDepartment(String departmentId);
DepartmentDTO getByRelatedIdNotInRecycle(String relatedId);
}
......@@ -159,4 +159,9 @@ public class DepartmentServiceImpl implements DepartmentService {
return mapper.countByDepartment(departmentId);
}
@Override
public DepartmentDTO getByRelatedIdNotInRecycle(String relatedId) {
return EntityUtil.changeEntityByJSON(DepartmentDTO.class,mapper.getByRelatedIdNotInRecycle(relatedId));
}
}
......@@ -351,7 +351,7 @@ public class MessageApiServiceImpl implements MessageApiService {
startIndex = len - 1;
}
for(int i = startIndex ; i>=0 && i< len; i--){
DepartmentDTO department = this.departmentService.getByRelatedId(arr[i]);
DepartmentDTO department = this.departmentService.getByRelatedIdNotInRecycle(arr[i]);
log.info("当前节点id:{}, {}", arr[i], JSON.toJSONString(department));
if(department != null){
return department;
......
package com.gic.haoban.manage.service.service.out.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
......@@ -615,4 +618,22 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public List<String> listUnBindClerk(String storeId) {
TabHaobanDepartment department = departmentService.selectByRelatedId(storeId);
if(department == null){
return Collections.EMPTY_LIST;
}
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedService.listByDepartmentId(department.getDepartmentId());
List<String> clerkCodes = list.stream().filter(s->s.getClerkCode()!=null).map(s->s.getClerkCode()).collect(Collectors.toList());
List<String> unBindList = new ArrayList<>();
if(CollectionUtil.isNotEmpty(clerkCodes)){
List<ClerkDTO> clerkList = clerkService.listClerk(storeId, clerkCodes, false);
for (ClerkDTO clerkDTO : clerkList) {
unBindList.add(clerkDTO.getClerkId());
}
}
return unBindList;
}
}
......@@ -377,6 +377,15 @@
and status_flag = 1
</select>
<select id="getByRelatedIdNotInRecycle" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_department
where related_id = #{relatedId}
and status_flag = 1
and recycle_flag != 1
</select>
<select id="pageByParentId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
......
......@@ -90,7 +90,7 @@ public class LoginController extends WebBaseController{
public HaobanResponse login() {
LoginVO loginVO = new LoginVO();
StaffDTO staff = staffApiService.selectById("1");
StaffDTO staff = staffApiService.selectById("2205f92cdb5f468cb996e91dded414c2");
logger.info("【好办登录】staff={}",JSON.toJSONString(staff));
loginVO.setWxEnterpriseId(staff.getWxEnterpriseId());
loginVO.setStaffDTO(staff);
......
......@@ -82,6 +82,7 @@ public class WxEnterpriseController extends WebBaseController{
return resultResponse(HaoBanErrCode.ERR_1);
}
EnterpriseAndUserDTO dto = enterpriseService.getEnterpriseAndUserByName(enterpriseName);
dto.setPhoneNumber("15055988053");
return resultResponse(HaoBanErrCode.ERR_1,dto);
}
......
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