|
@@ -32,9 +32,11 @@ import com.fjhx.tenant.entity.dict.dto.DictTenantDataSelectDto;
|
|
|
import com.fjhx.tenant.entity.dict.vo.DictTenantDataVo;
|
|
|
import com.fjhx.tenant.service.dict.DictTenantDataService;
|
|
|
import com.ruoyi.common.core.domain.BaseSelectDto;
|
|
|
+import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.system.service.ISysDeptService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -72,6 +74,8 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
|
|
|
|
|
|
@Autowired
|
|
|
private AccountService accountService;
|
|
|
+ @Autowired
|
|
|
+ private ISysDeptService deptService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -143,10 +147,19 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
|
|
|
QueryWrapper<Object> wrapper = getPageWrapper(dto);
|
|
|
Page<AccountRunningWaterVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
List<AccountRunningWaterVo> records = page.getRecords();
|
|
|
- //赋值归属公司名称
|
|
|
- corporationService.attributeAssign(records, AccountRunningWaterVo::getCorporationId, (item, corporation) -> {
|
|
|
- item.setCorporationName(corporation.getName());
|
|
|
- });
|
|
|
+// //赋值归属公司名称
|
|
|
+// corporationService.attributeAssign(records, AccountRunningWaterVo::getCorporationId, (item, corporation) -> {
|
|
|
+// item.setCorporationName(corporation.getName());
|
|
|
+// });
|
|
|
+
|
|
|
+ // 查询部门信息
|
|
|
+ List<SysDept> sysDeptList = deptService.list();
|
|
|
+ Map<Long, String> sysDeptMap = sysDeptList.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
|
|
+
|
|
|
+ for (AccountRunningWaterVo record : records) {
|
|
|
+ record.setCorporationName(sysDeptMap.get(record.getCompanyId()));
|
|
|
+ }
|
|
|
+
|
|
|
return page;
|
|
|
}
|
|
|
|