| | |
| | | String powerStationId = row.getCell(18).getStringCellValue(); |
| | | |
| | | // 终端编码 |
| | | if (row.getCell(20 )== null){ |
| | | throw new ServiceException("第" + i + "行电站id为空", 500); |
| | | if (row.getCell(19 )== null){ |
| | | throw new ServiceException("第" + i + "行终端编码为空", 500); |
| | | } |
| | | row.getCell(20).setCellType(CellType.STRING); |
| | | String terminalCode = row.getCell(20).getStringCellValue(); |
| | | row.getCell(19).setCellType(CellType.STRING); |
| | | String terminalCode = row.getCell(19).getStringCellValue(); |
| | | |
| | | // 车牌号 |
| | | if (row.getCell(26 )== null){ |
| | | if (row.getCell(20 )== null){ |
| | | throw new ServiceException("第" + i + "行车牌号为空", 500); |
| | | } |
| | | row.getCell(26).setCellType(CellType.STRING); |
| | | row.getCell(20).setCellType(CellType.STRING); |
| | | String plateNumber = row.getCell(26).getStringCellValue(); |
| | | |
| | | // 电站价电费金额 |
| | | if (row.getCell(73 )== null){ |
| | | if (row.getCell(21 )== null){ |
| | | throw new ServiceException("第" + i + "行电站价电费金额为空", 500); |
| | | } |
| | | row.getCell(73).setCellType(CellType.STRING); |
| | | String electricityAmount = row.getCell(73).getStringCellValue(); |
| | | row.getCell(21).setCellType(CellType.STRING); |
| | | String electricityAmount = row.getCell(21).getStringCellValue(); |
| | | |
| | | // 电站价服务费金额 |
| | | if (row.getCell(74 )== null){ |
| | | if (row.getCell(22 )== null){ |
| | | throw new ServiceException("第" + i + "行电站价服务费金额为空", 500); |
| | | } |
| | | row.getCell(74).setCellType(CellType.STRING); |
| | | String serviceAmount = row.getCell(74).getStringCellValue(); |
| | | row.getCell(22).setCellType(CellType.STRING); |
| | | String serviceAmount = row.getCell(22).getStringCellValue(); |
| | | |
| | | // 电站价总金额 |
| | | if (row.getCell(75 )== null){ |
| | | throw new ServiceException("第" + i + "行电站价服务费金额为空", 500); |
| | | if (row.getCell(23 )== null){ |
| | | throw new ServiceException("第" + i + "行电站价总金额为空", 500); |
| | | } |
| | | row.getCell(75).setCellType(CellType.STRING); |
| | | String totalAmount = row.getCell(75).getStringCellValue(); |
| | | row.getCell(23).setCellType(CellType.STRING); |
| | | String totalAmount = row.getCell(23).getStringCellValue(); |
| | | // 绿电分 |
| | | if (row.getCell(24 )== null){ |
| | | throw new ServiceException("第" + i + "行绿电分为空", 500); |
| | | } |
| | | row.getCell(24).setCellType(CellType.STRING); |
| | | String point = row.getCell(24).getStringCellValue(); |
| | | |
| | | |
| | | //检查订单号是否重复 |
| | |
| | | chargeOrder.setElectricityAmount(new BigDecimal(electricityAmount)); |
| | | chargeOrder.setServiceAmount(new BigDecimal(serviceAmount)); |
| | | chargeOrder.setTotalAmount(new BigDecimal(totalAmount)); |
| | | chargeOrder.setPoint(Integer.valueOf(point)); |
| | | |
| | | R r = importData(chargeOrder); |
| | | if (R.isError(r)) { |