| | |
| | | import com.vci.ubcs.system.vo.DeptVO; |
| | | import com.vci.ubcs.system.vo.RoleVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import javax.annotation.Resource; |
| | | import javax.jws.WebMethod; |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.ws.rs.core.Context; |
| | | import javax.xml.ws.WebServiceContext; |
| | | import javax.xml.ws.handler.MessageContext; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | |
| | | */ |
| | | @Resource |
| | | private IDockingLogeService dockingLogeService; |
| | | @Resource |
| | | private IPasswordFreeLoginService passwordFreeLoginService; |
| | | |
| | | private static String separator="##VCI##"; |
| | | private String errorid="0"; |
| | | private String msg="成功"; |
| | | private String objerrorCode="0"; |
| | | private String objerrorMsg="成功"; |
| | | |
| | | @Resource |
| | | private WebServiceContext webServiceContext; |
| | | |
| | | @WebMethod |
| | | public HttpServletRequest getRequest() { |
| | | // 获取HttpServletRequest对象 |
| | | HttpServletRequest request = (HttpServletRequest) webServiceContext.getMessageContext().get(MessageContext.SERVLET_REQUEST); |
| | | return request; |
| | | } |
| | | |
| | | /*** |
| | | * 申请编码接口 |
| | | * @param data 传递的数据参数 |
| | |
| | | ClassfysVO classfysVO = interParameterVO.getData().getClassifys(); |
| | | systemId = interParameterVO.getData().getSystemId(); |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | //免密登录申请token,header往token中添加 |
| | | passwordFreeLoginService.passwordFreeLogin(userVo.getUserName(),this.getRequest()); |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | |
| | | //这是账号信息 |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId(userVo.getUserName()); |
| | |
| | | } |
| | | log.info(libId); |
| | | }else if(secType.equals("codelevelsec")) {//层级码段 |
| | | int level = codeBasicSecVO.getCodeLevelValue(); |
| | | CodeClassifyVO levelCodeClassifyVO = new CodeClassifyVO(); |
| | | CodeClassifyFullInfoBO classifyFullInfoBO = this.classifyService.getClassifyFullInfo(codeClassifyDO.getOid()); |
| | | if(codeBasicSecVO.getCodeLevelType().equals("code_level_special")){//指定层级 |
| | | int level = codeBasicSecVO.getCodeLevelValue(); |
| | | List<CodeClassifyVO> classifyVOS = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList()); |
| | | if (classifyVOS.size() >= level && level > 0) { |
| | | levelCodeClassifyVO = classifyVOS.get(level - 1); |
| | |
| | | if(StringUtils.isNotBlank(classOid)){ |
| | | queryWrapper.in(DockingSystemConfig::getClassifyOid,classOid); |
| | | } |
| | | List<DockingSystemConfig> dockingSystemConfigList= dockingSystemConfigList=dockingSystemConfigService.list(queryWrapper); |
| | | List<DockingSystemConfig> dockingSystemConfigList=new ArrayList<>(); |
| | | dockingSystemConfigList= dockingSystemConfigList=dockingSystemConfigService.list(queryWrapper); |
| | | if(!CollectionUtils.isEmpty(dockingSystemConfigList)){ |
| | | return dockingSystemConfigList.get(0); |
| | | }else{ |
| | |
| | | return checkIspass(systemId, type, operationType, codeClassifyVO.getParentCodeClassifyOid()); |
| | | } |
| | | } |
| | | return dockingSystemConfigList.get(0); |
| | | if(dockingSystemConfigList.size()>0){ |
| | | return dockingSystemConfigList.get(0); |
| | | }else{ |
| | | return new DockingSystemConfig(); |
| | | } |
| | | } |
| | | } |