| | |
| | | if (!pictureRowSet.isEmpty() && pictureRowSet.contains(k)) { |
| | | |
| | | PictureData pictureData = pictureDataMap.get(k); |
| | | //判断物料型号是否包含非法字符(图片会转化为路径) |
| | | if(bom.getSubModel()!=null) { |
| | | String regexStr = "[\\/*?\"|:<>\t]"; |
| | | boolean matches = Pattern.compile(regexStr).matcher(bom.getSubModel()).find(); |
| | | if (matches) { |
| | | return response.set(1, false, "型号为"+bom.getSubModel()+"的物料包含非法字符:\\/*?\"|:<>或前置空格"); |
| | | } |
| | | } |
| | | //图片存储 product_submit/username/2022-07/ |
| | | String approvingPath = rootFile + File.separator + "product_submit" + File.separator + user.getName() + File.separator + dateFormat + File.separator + timeStamp; |
| | | File provingFile = new File(approvingPath); |