| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R excelImport(MultipartFile file, Map<String, Object> hashMap, Long loginUserId) throws Exception { |
| | | ExcelImportResult result = ExcelImportUtil.importExcelMore(file.getInputStream(), DeliveryTemplate.class, ExcelUtil.getDefaultImportParams()); |
| | | if (result.getList().isEmpty()) { |
| | |
| | | sbFaild.append(orderTemplate.getMatnrCode()).append("物料不存在"); |
| | | throw new CoolException(sbFaild.toString()); |
| | | } |
| | | if (!matnr.getName().equals(orderTemplate.getMaktx())) { |
| | | throw new CoolException("导入物料名称与库内名称不一致!!"); |
| | | } |
| | | orderItem.setDeliveryId(order.getId()) |
| | | .setDeliveryCode(order.getCode()) |
| | | .setSplrBatch(orderTemplate.getSplrBatch()) |