|
|
@ -28,6 +28,7 @@ import com.epmet.dto.result.CustomerGridByUserIdResultDTO; |
|
|
|
import com.epmet.dto.result.LatestCustomerResultDTO; |
|
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
|
import com.epmet.service.AccessService; |
|
|
|
import com.epmet.service.StaffAgencyService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
@ -36,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
/** |
|
|
|
* 机关单位信息表 |
|
|
@ -49,7 +51,8 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { |
|
|
|
private GovOrgFeignClient govOrgFeignClient; |
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private AccessService accessService; |
|
|
|
/** |
|
|
|
* @param tokenDTO |
|
|
|
* @return |
|
|
@ -91,16 +94,17 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<List<String>> switchGrid(SwitchGridFormDTO switchGridFormDTO) { |
|
|
|
public Result<Set<String>> switchGrid(SwitchGridFormDTO switchGridFormDTO) { |
|
|
|
//记录网格访问记录
|
|
|
|
StaffGridVisitedFormDTO staffGridVisitedFormDTO = ConvertUtils.sourceToTarget(switchGridFormDTO, StaffGridVisitedFormDTO.class); |
|
|
|
Result saveStaffGridVisitedRecord = epmetUserFeignClient.saveStaffGridVisitedRecord(staffGridVisitedFormDTO); |
|
|
|
if (!saveStaffGridVisitedRecord.success()) { |
|
|
|
logger.error("保存网格访问记录失败"); |
|
|
|
return new Result<List<String>>().error(); |
|
|
|
return new Result<Set<String>>().error(); |
|
|
|
} |
|
|
|
//查询网格的权限
|
|
|
|
return new Result<>(); |
|
|
|
Set<String> opeKeys = accessService.listOpeKeysByStaffId(switchGridFormDTO.getStaffId(), null, switchGridFormDTO.getGridId()); |
|
|
|
return new Result<Set<String>>().ok(opeKeys); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|