Commit b99e1d4671eea272a3523d65e68c56e62b1f5874

Authored by wangqian
1 parent 5bc4c7df

详情页面修改

urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
... ... @@ -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 126 Set<Long> userIds = new HashSet<>();
119 127 if (mainInfo.getCoHandlers() != null) {
120 128 mainInfo.getCoHandlers().stream()
... ... @@ -123,7 +131,7 @@ public class MainInfoController {
123 131 }
124 132 userIds.add(mainInfo.getUserId());
125 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 137 @GetMapping("/page")
... ...