|
@ -58,8 +58,6 @@ import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Maps; |
|
|
import com.google.common.collect.Maps; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.data.geo.Point; |
|
|
import org.springframework.data.geo.Point; |
|
|
import org.springframework.data.mongodb.core.MongoTemplate; |
|
|
import org.springframework.data.mongodb.core.MongoTemplate; |
|
@ -129,8 +127,6 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
@Autowired |
|
|
@Autowired |
|
|
private MongoTemplate mongoTemplate; |
|
|
private MongoTemplate mongoTemplate; |
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(SysDeptServiceImpl.class); |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<SysDeptDTO> list(Map<String, Object> params) { |
|
|
public List<SysDeptDTO> list(Map<String, Object> params) { |
|
|
//普通管理员,只能查询所属部门及子部门的数据
|
|
|
//普通管理员,只能查询所属部门及子部门的数据
|
|
@ -289,6 +285,8 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
|
|
|
|
|
|
// 发送消息
|
|
|
// 发送消息
|
|
|
this.baseDao.updateById(entity); |
|
|
this.baseDao.updateById(entity); |
|
|
|
|
|
//更新redis
|
|
|
|
|
|
packgeAllDeptOption(); |
|
|
//查询字典获取customer_id
|
|
|
//查询字典获取customer_id
|
|
|
SysDictEntity sysDictEntity = sysDictDao.selectDcp(); |
|
|
SysDictEntity sysDictEntity = sysDictDao.selectDcp(); |
|
|
if (deptEntity.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY)) { |
|
|
if (deptEntity.getTypeKey().equals(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY)) { |
|
@ -1051,6 +1049,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
node = new JSONObject(); |
|
|
node = new JSONObject(); |
|
|
node.put("value", deptItemDto.getId()); |
|
|
node.put("value", deptItemDto.getId()); |
|
|
node.put("label", deptItemDto.getName()); |
|
|
node.put("label", deptItemDto.getName()); |
|
|
|
|
|
node.put("sort", deptItemDto.getSort()); |
|
|
headNodes.add(node); |
|
|
headNodes.add(node); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1074,11 +1073,13 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
childNode = new JSONObject(); |
|
|
childNode = new JSONObject(); |
|
|
childNode.put("value", categoryTreeDto.getId()); |
|
|
childNode.put("value", categoryTreeDto.getId()); |
|
|
childNode.put("label", categoryTreeDto.getName()); |
|
|
childNode.put("label", categoryTreeDto.getName()); |
|
|
|
|
|
childNode.put("sort", categoryTreeDto.getSort()); |
|
|
children.add(childNode); |
|
|
children.add(childNode); |
|
|
allChildren.add(childNode); |
|
|
allChildren.add(childNode); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!children.isEmpty()) { |
|
|
if (!children.isEmpty()) { |
|
|
|
|
|
children.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("sort")).reversed().reversed()); |
|
|
node.put("children", children); |
|
|
node.put("children", children); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|