|
|
|
@ -61,32 +61,32 @@ public class PartCostHistServiceImpl extends ServiceImpl<PartCostHistMapper, Par |
|
|
|
// 为对象赋值 |
|
|
|
task.setSite(data.getSite()); // site |
|
|
|
if (row.getCell(0) == null) { |
|
|
|
throw new RuntimeException("BU不能为空!"); |
|
|
|
} |
|
|
|
task.setBuNo(row.getCell(0).getStringCellValue()); // BU |
|
|
|
if (row.getCell(1) == null) { |
|
|
|
throw new RuntimeException("物料编码不能为空!"); |
|
|
|
} |
|
|
|
task.setPartNo(row.getCell(1).getStringCellValue()); // 物料编码 |
|
|
|
if (row.getCell(2) == null || row.getCell(2).getStringCellValue().equals("")) { |
|
|
|
task.setPartNo(row.getCell(0).getStringCellValue()); // 物料编码 |
|
|
|
|
|
|
|
if (row.getCell(1) == null || row.getCell(1).getStringCellValue().equals("")) { |
|
|
|
task.setStandardCost(BigDecimal.valueOf(0)); |
|
|
|
} else { |
|
|
|
task.setStandardCost(BigDecimal.valueOf(Long.parseLong(row.getCell(2).getStringCellValue()))); //单位标准成本 |
|
|
|
task.setStandardCost(BigDecimal.valueOf(Long.parseLong(row.getCell(1).getStringCellValue()))); //单位标准成本 |
|
|
|
} |
|
|
|
if (row.getCell(3) == null) { |
|
|
|
|
|
|
|
if (row.getCell(2) == null) { |
|
|
|
task.setStandardCostCurrency(""); |
|
|
|
} else { |
|
|
|
task.setStandardCostCurrency(row.getCell(3).getStringCellValue()); // 标准成本货币 |
|
|
|
task.setStandardCostCurrency(row.getCell(2).getStringCellValue()); // 标准成本货币 |
|
|
|
} |
|
|
|
|
|
|
|
if (row.getCell(3) == null || row.getCell(3).getStringCellValue().equals("")) { |
|
|
|
task.setActualCost(BigDecimal.valueOf(0)); |
|
|
|
} else { |
|
|
|
task.setActualCost(BigDecimal.valueOf(Long.parseLong(row.getCell(4).getStringCellValue()))); // 单位报价成本 |
|
|
|
task.setActualCost(BigDecimal.valueOf(Long.parseLong(row.getCell(3).getStringCellValue()))); // 单位报价成本 |
|
|
|
} |
|
|
|
|
|
|
|
if (row.getCell(4) == null) { |
|
|
|
task.setActualCostCurrency(""); |
|
|
|
} else { |
|
|
|
task.setActualCostCurrency(row.getCell(5).getStringCellValue()); // 报价成本货币 |
|
|
|
task.setActualCostCurrency(row.getCell(4).getStringCellValue()); // 报价成本货币 |
|
|
|
} |
|
|
|
task.setUpdateBy(data.getUpdateBy()); |
|
|
|
task.setUpdateDate(new Date()); |
|
|
|
|