|
@@ -523,18 +523,47 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
|
|
|
|
|
|
|
|
|
public List getFinanceTree(List<OfficeDTO> objects, String extId, String type, String showAll, String showMyOffice) {
|
|
|
+ UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ String id = userDTO.getTenantDTO().getId();
|
|
|
+
|
|
|
List<OfficeDTO> offices = Lists.newArrayList ();
|
|
|
// 获取到所有parent_id为‘0’的部门数据
|
|
|
List<Office> children = officeMapper.getChild(OfficeDTO.getRootId());
|
|
|
List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
|
|
|
- for (OfficeDTO root : rootTrees) {
|
|
|
- if (root.getName().equals("兴光会计师事务所")||root.getName().equals("综合管理公司")){
|
|
|
- if (this.isUseAble ( extId, type,root, showAll )){
|
|
|
- // 不是被排除节点的子节点
|
|
|
- List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
|
|
|
- offices.addAll (officeList);
|
|
|
+ switch (id){
|
|
|
+ case "10002": //综合管理部
|
|
|
+ for (OfficeDTO root : rootTrees) {
|
|
|
+ if (root.getId().equals("1588068195545808898")||root.getId().equals("1680778353809350658")){
|
|
|
+ if (this.isUseAble ( extId, type,root, showAll )){
|
|
|
+ // 不是被排除节点的子节点
|
|
|
+ List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
|
|
|
+ offices.addAll (officeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ break;
|
|
|
+ case "10005": //项目公司
|
|
|
+ for (OfficeDTO root : rootTrees) {
|
|
|
+ if (root.getId().equals("1588068195545808898")||root.getId().equals("1619953441268330498")){
|
|
|
+ if (this.isUseAble ( extId, type,root, showAll )){
|
|
|
+ // 不是被排除节点的子节点
|
|
|
+ List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
|
|
|
+ offices.addAll (officeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ for (OfficeDTO root : rootTrees) {
|
|
|
+ if (root.getId().equals("1588068195545808898")){
|
|
|
+ if (this.isUseAble ( extId, type,root, showAll )){
|
|
|
+ // 不是被排除节点的子节点
|
|
|
+ List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
|
|
|
+ offices.addAll (officeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(showMyOffice)) {
|
|
|
OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
|