Browse Source

增加树状列表逻辑

dev_power_axis
HAHA 3 years ago
parent
commit
fc9d39ae4e
  1. 12
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java

12
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java

@ -1,9 +1,12 @@
package com.epmet.plugin.power.modules.axis.controller;
import com.alibaba.excel.util.StringUtils;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
@ -97,7 +100,14 @@ public class PowerAxisStructController {
* @date 2022/4/19/0019 14:17
*/
@PostMapping("list4Tree")
public Result<List<PowerAxisStructLeaderResultDTO>> selectAllForTree(@RequestBody PowerAxisStructLeaderFormDTO formDto) {
public Result<List<PowerAxisStructLeaderResultDTO>> selectAllForTree(@RequestBody PowerAxisStructLeaderFormDTO formDto,@LoginUser TokenDto tokenDto) {
String agencyId = formDto.getAgencyId();
if (StringUtils.isBlank(agencyId)) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null != staffInfo && StringUtils.isNotBlank(staffInfo.getAgencyId())) {
formDto.setAgencyId(staffInfo.getAgencyId());
}
}
return new Result().ok(powerAxisStructService.selectAllForTree(formDto));
}

Loading…
Cancel
Save