| | |
| | | product.setParentCode(sheet.getRow(2).getCell(1).getStringCellValue()); |
| | | product.setParentName(sheet.getRow(2).getCell(2).getStringCellValue()); |
| | | String parentModel = sheet.getRow(2).getCell(3).getStringCellValue(); |
| | | String regexStr = "[\\/*?\"|:<>\\\\ \t]"; |
| | | parentModel = parentModel.trim(); |
| | | String regexStr = "[\\/*?\"|:<>\t]"; |
| | | boolean matches = Pattern.compile(regexStr).matcher(parentModel).find(); |
| | | if(!matches) { |
| | | product.setParentModel(parentModel); |
| | | }else{ |
| | | return response.set(1,false,"母料型号包含非法字符:\\/*?\"|:<>或空格"); |
| | | return response.set(1,false,"母料型号包含非法字符:\\/*?\"|:<>或前置空格"); |
| | | } |
| | | } |
| | | ProductBom bom = new ProductBom(); |