Commit ec319629 authored by 王淑君's avatar 王淑君

修改

parent eda3f74e
......@@ -65,21 +65,23 @@ public class SysUserServiceImpl implements SysUserService {
mtUserGetsReqDTO.setIds(list);
List<MTUserInfoRspDTO> depart = mtCotactApiRequestClient.userGets(mtUserGetsReqDTO);
StringBuffer sb = new StringBuffer();
String position = "";
for (SysUser sysUser : users) {
for (MTUserInfoRspDTO mtUserInfoRspDTO : depart) {
if (sysUser.getBusinessId().equals(mtUserInfoRspDTO.getId())) {
for (MTUserInfoRspDTO.DeptsBean deptsBean : mtUserInfoRspDTO.getDepts()) {
for (MTUserInfoRspDTO.DeptsBean.PathBean pathBean : deptsBean.getPath()) {
if (null != pathBean)
sb.append(pathBean.getName() + "-");
if (depart!=null) {
StringBuffer sb = new StringBuffer();
String position = "";
for (SysUser sysUser : users) {
for (MTUserInfoRspDTO mtUserInfoRspDTO : depart) {
if (sysUser.getBusinessId().equals(mtUserInfoRspDTO.getId())) {
for (MTUserInfoRspDTO.DeptsBean deptsBean : mtUserInfoRspDTO.getDepts()) {
for (MTUserInfoRspDTO.DeptsBean.PathBean pathBean : deptsBean.getPath()) {
if (null != pathBean)
sb.append(pathBean.getName() + "-");
}
position = deptsBean.getPosition() == null ? "" : String.valueOf(deptsBean.getPosition());
}
position = deptsBean.getPosition() == null ? "" : String.valueOf(deptsBean.getPosition());
sysUser.setDepart(sb.toString().substring(0, sb.toString().length() - 1));
sb = new StringBuffer();
sysUser.setPosition(position);
}
sysUser.setDepart(sb.toString().substring(0, sb.toString().length() - 1));
sb = new StringBuffer();
sysUser.setPosition(position);
}
}
}
......@@ -281,14 +283,15 @@ public class SysUserServiceImpl implements SysUserService {
}
String updateTime = df.format(synchronizationTime.getSynchronizationTime());
List<GetAllRspDTO> userGetRspDTOList = mtCotactApiRequestClient.accountGetMyInfoList(corpId, updateTime);
if (null == userGetRspDTOList) {
throw new ServiceException(ResultServiceEnums.ZX_FAILED);
}
// if (null == userGetRspDTOList) {
// throw new ServiceException(ResultServiceEnums.ZX_FAILED);
// }
List<SysUser> personnelsList = new ArrayList<>();
int line = 0;
if (null != userGetRspDTOList) {
for (GetAllRspDTO userInfo : userGetRspDTOList) {
SysUser personnels = new SysUser();
UserUtil.setCurrentPersistOperation(personnels);
personnels.setCorpId(corpId);
personnels.setBusinessId(userInfo.getId()); //id
personnels.setName(userInfo.getName()); //姓名
......
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