|
@@ -16,9 +16,11 @@ import com.dragoninfo.dcuc.auth.auth.enumresources.WokrFlowPermissionTypeEnum;
|
|
|
import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowStatusEnum;
|
|
|
import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowTypeEnum;
|
|
|
import com.dragoninfo.dcuc.auth.auth.po.ServiceAuthResultPO;
|
|
|
+import com.dragoninfo.dcuc.auth.auth.service.IAuthFlowService;
|
|
|
import com.dragoninfo.dcuc.auth.auth.service.IServiceAuthResultService;
|
|
|
import com.dragoninfo.dcuc.auth.auth.vo.ServiceAuthenticationResVO;
|
|
|
import com.dragoninfo.dcuc.auth.util.DcucConstantsUtil;
|
|
|
+import com.dragoninfo.dcuc.user.user.facade.IUserInfoFacade;
|
|
|
import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
|
|
|
import com.dragonsoft.duceap.base.enums.BooleanEnum;
|
|
|
import com.dragonsoft.duceap.commons.util.collections.CollectionUtils;
|
|
@@ -68,6 +70,12 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
|
@Autowired
|
|
|
private IServiceResourceFacade serviceResourceFacade;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IAuthFlowService authFlowService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IUserInfoFacade userInfoFacade;
|
|
|
+
|
|
|
@Override
|
|
|
public ServiceAuthResult saveAuthResult(ServiceAuthResult serviceAuthResult) {
|
|
|
serviceAuthResult.setCreateTime(new Date());
|
|
@@ -169,7 +177,7 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
|
//新增授权
|
|
|
for (String serviceCode : map.keySet()) {
|
|
|
//已经存在的更新
|
|
|
- if (allAuthResultMap.keySet().contains(serviceCode)) {
|
|
|
+ if (allAuthResultMap.containsKey(serviceCode)) {
|
|
|
ServiceAuthResult serviceAuthResult = allAuthResultMap.get(serviceCode);
|
|
|
serviceAuthResult.setStartTime(startTime);
|
|
|
serviceAuthResult.setEndTime(endTime);
|
|
@@ -362,11 +370,42 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
|
dto.setAuthStatus(item.getServiceStatus());
|
|
|
dtos.add(dto);
|
|
|
});
|
|
|
+ //补全查询申请人电话和申请人单位
|
|
|
+ constructApplicantInfo(dtos);
|
|
|
Pageable newPageable = new PageRequest(paging.getNumber(), paging.getSize());
|
|
|
PageImpl<ServiceAuthResultDTO> pageResult = new PageImpl<>(dtos, newPageable, paging.getTotalElements());
|
|
|
return pageResult;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 补全查询申请人电话和申请人单位
|
|
|
+ */
|
|
|
+ private void constructApplicantInfo(List<ServiceAuthResultDTO> dtos) {
|
|
|
+ List<String> flowIds = dtos.stream().filter(item -> StringUtils.isNotBlank(item.getFlowId()))
|
|
|
+ .map(item -> item.getFlowId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isEmpty(flowIds)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<ServiceAuthFlow> authFlows = authFlowService.getByFlowIds(flowIds);
|
|
|
+ Map<String, ServiceAuthFlow> authFlowMap = authFlows.stream()
|
|
|
+ .collect(Collectors.toMap(item -> item.getFlowId(), item -> item, (oldKey, newKey) -> newKey));
|
|
|
+ dtos.stream()
|
|
|
+ .filter(item -> StringUtils.isNotBlank(item.getFlowId()))
|
|
|
+ .forEach(item -> {
|
|
|
+ String flowId = item.getFlowId();
|
|
|
+ ServiceAuthFlow serviceAuthFlow = authFlowMap.get(flowId);
|
|
|
+ if (serviceAuthFlow == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ item.setApplicantIdcard(serviceAuthFlow.getApplicantIdcard());
|
|
|
+ item.setApplicantName(serviceAuthFlow.getApplicantName());
|
|
|
+ item.setApplicantOrgName(serviceAuthFlow.getApplicantOrgName());
|
|
|
+ item.setApplicantPhoneNo(serviceAuthFlow.getApplicantPhoneNo());
|
|
|
+ item.setApplicantOrgCode(serviceAuthFlow.getApplicantOrgCode());
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public ServiceAuthResultDTO getDetail(String id) {
|
|
|
ServiceAuthResult result = serviceAuthResultBPO.get(id);
|