| | |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = {RuntimeException.class,Exception.class}) |
| | | public Response add(Product product) throws IOException { |
| | | String parentCode = product.getParentCode(); |
| | | String customCode = product.getCustomCode(); |
| | |
| | | newTemp.setQuantity(bom.getQuantity()); |
| | | //2323-09-08 与杨红兰微信确认<就按照我上传清单的时间,系统里最新的是啥型号,就取什么型号> |
| | | Material relatedMaterial = mService.getLastByCode(related); |
| | | if(relatedMaterial == null){ |
| | | throw new RuntimeException("当前替料"+related+",编码在平台中不存在,无法关联替代"); |
| | | } |
| | | newTemp.setMaterialId(relatedMaterial.getId()); |
| | | newTemp.setCreateTime(date); |
| | | newAddedList.add(newTemp); |
| | |
| | | newTemp.setQuantity(bom.getQuantity()); |
| | | //2323-09-08 与杨红兰微信确认<就按照我上传清单的时间,系统里最新的是啥型号,就取什么型号> |
| | | Material relatedMaterial = mService.getLastByCode(related); |
| | | if(relatedMaterial == null){ |
| | | throw new RuntimeException("当前替料"+related+",编码在平台中不存在,无法关联替代"); |
| | | } |
| | | newTemp.setMaterialId(relatedMaterial.getId()); |
| | | newTemp.setCreateTime(date); |
| | | newAddedList.add(newTemp); |