|
|
|
@ -17,7 +17,9 @@ |
|
|
|
|
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.api.R; |
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
|
@ -32,10 +34,13 @@ import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.excel.CustomerAgencyExcel; |
|
|
|
import com.epmet.service.CustomerAgencyService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.validation.constraints.NotBlank; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@ -242,4 +247,19 @@ public class CustomerAgencyController { |
|
|
|
public Result<StaffInAgencyListResultDTO> staffInAgencyList(@LoginUser TokenDto tokenDTO) { |
|
|
|
return new Result<StaffInAgencyListResultDTO>().ok(customerAgencyService.staffInAgencyList(tokenDTO.getUserId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 对外接口,根据customerId返回Element UI中Tree结构的agency列表 |
|
|
|
* @param customerId |
|
|
|
* @return com.epmet.commons.tools.utils.Result |
|
|
|
* @Author liushaowen |
|
|
|
* @Date 2020/11/6 13:51 |
|
|
|
*/ |
|
|
|
@PostMapping("getAgencyElementTree") |
|
|
|
public Result<AgencyElementTreeResultDTO> getAgencyElementTree(String customerId){ |
|
|
|
if (StringUtils.isBlank(customerId)){ |
|
|
|
throw new RenException("customerId不能为空"); |
|
|
|
} |
|
|
|
return new Result<AgencyElementTreeResultDTO>().ok(customerAgencyService.getAgencyElementTree(customerId)); |
|
|
|
} |
|
|
|
} |
|
|
|
|