|
|
|
@ -300,25 +300,41 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa |
|
|
|
task.setQtyPerRoll(BigDecimal.valueOf(row.getCell(3).getNumericCellValue())); |
|
|
|
task.setRollsPerCarton(BigDecimal.valueOf(1)); |
|
|
|
|
|
|
|
|
|
|
|
if (row.getCell(6) == null) { |
|
|
|
task.setPackingWeight(null); // 包装重量 |
|
|
|
} else { |
|
|
|
task.setPackingWeight(BigDecimal.valueOf(row.getCell(6).getNumericCellValue())); // 包装重量 |
|
|
|
} |
|
|
|
|
|
|
|
Integer weightUmId = null; |
|
|
|
if (getStringCellValue(row, 7) != null && !getStringCellValue(row, 7).equals("")) { |
|
|
|
Integer weightUmId =null; |
|
|
|
if (row.getCell(7) == null) { |
|
|
|
task.setWeightUmId(null); // 重量单位 |
|
|
|
} |
|
|
|
else if (getStringCellValue(row, 7) != null && !getStringCellValue(row, 7).equals("")) { |
|
|
|
weightUmId = partMapper.selectUmId(getStringCellValue(row, 7)); |
|
|
|
if (weightUmId == null) { |
|
|
|
throw new RuntimeException("Weight UM does not exist!(line:" + j + ")"); |
|
|
|
} |
|
|
|
} |
|
|
|
task.setWeightUmId(weightUmId); // 重量单位 |
|
|
|
} |
|
|
|
|
|
|
|
if (row.getCell(8) == null) { |
|
|
|
task.setMoldCode(null); // 模具编码 |
|
|
|
} else { |
|
|
|
task.setMoldCode(getStringCellValue(row, 8)); // 模具编码 |
|
|
|
|
|
|
|
} |
|
|
|
// try { |
|
|
|
// row.getCell(7).getStringCellValue(); // RevNo |
|
|
|
// } catch (Exception e) { |
|
|
|
// throw new RuntimeException("The Part RevNo format is incorrect and should be text type!"); |
|
|
|
// } |
|
|
|
|
|
|
|
if (row.getCell(9) == null) { |
|
|
|
task.setRev(null);// RevNo |
|
|
|
}else { |
|
|
|
task.setRev(getStringCellValue(row, 9));// RevNo |
|
|
|
} |
|
|
|
|
|
|
|
if (row.getCell(10) == null || getStringCellValue(row, 10).equals("")) { |
|
|
|
task.setTradingMark("N"); // 商标 |
|
|
|
|