|
|
@ -8,10 +8,7 @@ import com.epmet.dto.CustomerStaffDTO; |
|
|
|
import com.epmet.dto.form.StaffInfoFromDTO; |
|
|
|
import com.epmet.dto.form.StaffSubmitFromDTO; |
|
|
|
import com.epmet.dto.form.StaffsInAgencyFromDTO; |
|
|
|
import com.epmet.dto.result.StaffDetailResultDTO; |
|
|
|
import com.epmet.dto.result.StaffInfoResultDTO; |
|
|
|
import com.epmet.dto.result.StaffInitResultDTO; |
|
|
|
import com.epmet.dto.result.StaffsInAgencyResultDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.CustomerAgencyEntity; |
|
|
|
import com.epmet.entity.CustomerStaffAgencyEntity; |
|
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
@ -53,7 +50,7 @@ public class StaffServiceImpl implements StaffService { |
|
|
|
resultDTO.setStaffCount(0); |
|
|
|
return new Result<StaffsInAgencyResultDTO>().ok(resultDTO); |
|
|
|
} |
|
|
|
resultDTO.setStaffCount(customerAgencyEntity.getTotalUser()); |
|
|
|
resultDTO.setStaffCount(customerAgencyEntity.getTotalUser() == null ? 0 : customerAgencyEntity.getTotalUser()); |
|
|
|
fromDTO.setCustomerId(customerAgencyEntity.getCustomerId()); |
|
|
|
List<CustomerStaffAgencyDTO> customerStaffAgencyList = customerStaffAgencyService.getCustomerStaffAgencyList(fromDTO).getData(); |
|
|
|
if (null == customerStaffAgencyList || customerStaffAgencyList.size() == 0) { |
|
|
@ -89,7 +86,7 @@ public class StaffServiceImpl implements StaffService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<StaffInitResultDTO> addStaffInit(StaffInfoFromDTO fromDTO) { |
|
|
|
public Result<List<StaffRoleResultDTO>> addStaffInit(StaffInfoFromDTO fromDTO) { |
|
|
|
CustomerAgencyEntity customerAgencyEntity = customerAgencyService.selectById(fromDTO.getAgencyId()); |
|
|
|
fromDTO.setCustomerId(customerAgencyEntity.getCustomerId()); |
|
|
|
return epmetUserFeignClient.addStaffInit(fromDTO); |
|
|
|