| | |
| | | File dwgFile; |
| | | if (subModel != null) { |
| | | dwgFile = new File(materialDir + File.separator + subCode + "-" + subModel + File.separator + dwgName + "_" + dateStr + ".dwg"); |
| | | File dwgDir = new File(materialDir + File.separator + subCode + "-" + subModel); |
| | | if(!dwgDir.exists()){ |
| | | dwgDir.mkdirs(); |
| | | } |
| | | } else { |
| | | dwgFile = new File(materialDir + File.separator + dwgName + "_" + dateStr + ".dwg"); |
| | | } |
| | |
| | | String subCode = null; |
| | | for (ProductBom bom : bomList) { |
| | | String bomSubMode = bom.getSubModel(); |
| | | if (bomSubMode.toUpperCase().equals(picSubModel.toUpperCase())) { |
| | | if ((bomSubMode + "-bom").toUpperCase().equals(picSubModel.toUpperCase())) { |
| | | subModel = bomSubMode; |
| | | subCode = bom.getSubCode(); |
| | | break; |
| | |
| | | File picFile; |
| | | if (subModel != null) { |
| | | picFile = new File(materialDir + File.separator + subCode + "-" + subModel + File.separator + picSubModel + "_" + dateStr + picSuffix); |
| | | File picDir = new File(materialDir + File.separator + subCode + "-" + subModel); |
| | | if(!picDir.exists()){ |
| | | picDir.mkdirs(); |
| | | } |
| | | } else { |
| | | picFile = new File(materialDir + File.separator + picSubModel + "_" + dateStr + picSuffix); |
| | | } |