| | |
| | | public int parse_result = ConstantDefined.PARSE_RESULT_NULL; |
| | | |
| | | public void readFBSFile(String filePath) { |
| | | Locale.setDefault(Locale.ENGLISH); |
| | | //Locale.setDefault(Locale.ENGLISH); |
| | | //int Data_Type = -1; |
| | | FileInputStream fis = null; |
| | | try { |
| | | File f = new File(filePath); |
| | | if(filePath.toUpperCase().endsWith(".DDF")) { |
| | | if(filePath.toUpperCase(Locale.ENGLISH).endsWith(".DDF")) { |
| | | //放电数据文件 |
| | | fbsDataStart = new ABEDisDataHeadStart(); |
| | | fbsDataStop = new ABETestDataHeadStop(); |
| | | //Data_Type = ConstantDefined.DATA_TYPE_DIS; |
| | | }else if(filePath.toUpperCase().endsWith(".CCF")) { |
| | | }else if(filePath.toUpperCase(Locale.ENGLISH).endsWith(".CCF")) { |
| | | //充电数据文件 |
| | | fbsDataStart = new ABEChrDataHeadStart(); |
| | | fbsDataStop = new ABETestDataHeadStop(); |
| | |
| | | public int parse_result = ConstantDefined.PARSE_RESULT_NULL;*/ |
| | | |
| | | public static ABEDataParase readFBSFile(MultipartFile multipartFile) throws IOException { |
| | | Locale.setDefault(Locale.ENGLISH); |
| | | //Locale.setDefault(Locale.ENGLISH); |
| | | List<ABEFBSData> fbsData = null; |
| | | ABEDataHeadStart fbsDataStart = null; |
| | | ABEDataHeadStop fbsDataStop = null; |
| | |
| | | try { |
| | | //File f = new File(filePath); |
| | | fis = (FileInputStream) multipartFile.getInputStream(); |
| | | if(multipartFile.getOriginalFilename().toUpperCase().endsWith(".DDF")) { |
| | | if(multipartFile.getOriginalFilename().toUpperCase(Locale.ENGLISH).endsWith(".DDF")) { |
| | | //放电数据文件 |
| | | fbsDataStart = new ABEDisDataHeadStart(); |
| | | fbsDataStop = new ABETestDataHeadStop(); |
| | | //Data_Type = ConstantDefined.DATA_TYPE_DIS; |
| | | }else if(multipartFile.getOriginalFilename().toUpperCase().endsWith(".CCF")) { |
| | | }else if(multipartFile.getOriginalFilename().toUpperCase(Locale.ENGLISH).endsWith(".CCF")) { |
| | | //充电数据文件 |
| | | fbsDataStart = new ABEChrDataHeadStart(); |
| | | fbsDataStop = new ABETestDataHeadStop(); |
| | |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
| | | Locale.setDefault(Locale.ENGLISH); |
| | | //Locale.setDefault(Locale.ENGLISH); |
| | | HttpServletRequest request = (HttpServletRequest) servletRequest; |
| | | HttpServletResponse response = (HttpServletResponse) servletResponse; |
| | | //加入接口防重放功能 |
| | |
| | | //WebSocket-签名所需时间戳 |
| | | || requestURI.contains("server") |
| | | //options请求 |
| | | || request.getMethod().toUpperCase().equals("OPTIONS") |
| | | || request.getMethod().toUpperCase(Locale.ENGLISH).equals("OPTIONS") |
| | | ))) { |
| | | if (user == null) { |
| | | //越权访问 |
| | |
| | | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
| | | HttpServletRequest request = (HttpServletRequest) servletRequest; |
| | | HttpServletResponse response = (HttpServletResponse) servletResponse; |
| | | Locale.setDefault(Locale.ENGLISH); |
| | | //Locale.setDefault(Locale.ENGLISH); |
| | | //严格要求 |
| | | if(2 == YamlProperties.systemType) { |
| | | String requestURI = request.getRequestURI(); |
| | |
| | | //paramValue = paramValue.replace(String.valueOf(LDAP_FILTER_ESCAPE_SEQUENCE[charIndex]), LDAP_FILTER_ESCAPE_SEQUENCE_CHARACTER[charIndex]); |
| | | //这个里面是允许*的,可以放过 |
| | | if ( |
| | | (requestURI.contains("user/") && c == '*' && (request.getMethod().toUpperCase().equals(RequestMethod.POST.name()) || request.getMethod().toUpperCase().equals(RequestMethod.PUT.name()))) |
| | | (requestURI.contains("user/") && c == '*' && (request.getMethod().toUpperCase(Locale.ENGLISH).equals(RequestMethod.POST.name()) || request.getMethod().toUpperCase(Locale.ENGLISH).equals(RequestMethod.PUT.name()))) |
| | | ) { |
| | | continue; |
| | | } else if ((requestURI.contains(".servlet") || requestURI.contains("menu/menuList")) && c == '/') { |
| | |
| | | if (index != -1) { |
| | | //这个里面是允许*的,可以放过 |
| | | if ( |
| | | (requestURI.contains("user/") && c == '*' && (request.getMethod().toUpperCase().equals(RequestMethod.POST.name()) || request.getMethod().toUpperCase().equals(RequestMethod.PUT.name()))) |
| | | (requestURI.contains("user/") && c == '*' && (request.getMethod().toUpperCase(Locale.ENGLISH).equals(RequestMethod.POST.name()) || request.getMethod().toUpperCase(Locale.ENGLISH).equals(RequestMethod.PUT.name()))) |
| | | |
| | | ) { |
| | | continue; |
| | |
| | | |
| | | public Response loginByRSA(String userName, String pwd,String deliveredCode, HttpServletRequest request) { |
| | | Response<Object> response = new Response<>(); |
| | | Locale.setDefault(Locale.ENGLISH); |
| | | deliveredCode = deliveredCode.toUpperCase(); |
| | | //Locale.setDefault(Locale.ENGLISH); |
| | | deliveredCode = deliveredCode.toUpperCase(Locale.ENGLISH); |
| | | if(YamlProperties.fontDynamicCodeSwitch.toLowerCase().equals("true")) { |
| | | String fontDynamicCode = (String) ActionUtil.getSession().getAttribute("fontDynamicCode"); |
| | | if (fontDynamicCode == null || "".equals(fontDynamicCode)) { |
| | | return response.set(1, false, MessageUtils.getMessage("RefreshVerification")); |
| | | } |
| | | if (!deliveredCode.equals(fontDynamicCode.toUpperCase())) { |
| | | if (!deliveredCode.equals(fontDynamicCode.toUpperCase(Locale.ENGLISH))) { |
| | | return response.set(1, false, MessageUtils.getMessage("VerificationError")); |
| | | } |
| | | } |
| | |
| | | //获取当前系统的语言环境 |
| | | public static String getLang() { |
| | | Locale locale = Locale.getDefault();//对Locale类实例化定义 |
| | | //String lang = locale.getLanguage(); |
| | | String lang = "zh"; |
| | | String lang = locale.getLanguage(); |
| | | //String lang = "zh"; |
| | | String str = (String) ActionUtil.getSession().getAttribute("lang"); |
| | | if (str != null) { |
| | | lang = str; |