Commit b99e1d4671eea272a3523d65e68c56e62b1f5874
1 parent
5bc4c7df
详情页面修改
Showing
1 changed file
with
10 additions
and
2 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
| @@ -114,7 +114,15 @@ public class MainInfoController { | @@ -114,7 +114,15 @@ public class MainInfoController { | ||
| 114 | )); | 114 | )); |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | - DeptDO dept = deptService.getDept(mainInfo.getCompanyId()); | 117 | + |
| 118 | + String companyName = ""; | ||
| 119 | + if (mainInfo.getWorkerCompanyId() != null) { | ||
| 120 | + DeptDO dept = deptService.getDept(mainInfo.getWorkerCompanyId()); | ||
| 121 | + if (dept != null) { | ||
| 122 | + companyName = dept.getName(); | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + | ||
| 118 | Set<Long> userIds = new HashSet<>(); | 126 | Set<Long> userIds = new HashSet<>(); |
| 119 | if (mainInfo.getCoHandlers() != null) { | 127 | if (mainInfo.getCoHandlers() != null) { |
| 120 | mainInfo.getCoHandlers().stream() | 128 | mainInfo.getCoHandlers().stream() |
| @@ -123,7 +131,7 @@ public class MainInfoController { | @@ -123,7 +131,7 @@ public class MainInfoController { | ||
| 123 | } | 131 | } |
| 124 | userIds.add(mainInfo.getUserId()); | 132 | userIds.add(mainInfo.getUserId()); |
| 125 | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userIds); | 133 | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userIds); |
| 126 | - return success(MainInfoConvert.INSTANCE.buildMainInfo(mainInfo, attachmentMap, dept.getName(), userMap)); | 134 | + return success(MainInfoConvert.INSTANCE.buildMainInfo(mainInfo, attachmentMap, companyName, userMap)); |
| 127 | } | 135 | } |
| 128 | 136 | ||
| 129 | @GetMapping("/page") | 137 | @GetMapping("/page") |