| | |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(ProductBom productBom) { |
| | | // 查询出产品模型信息 |
| | | if (productBom.getProductModelId() == null) { |
| | |
| | | route.setProductModelId(productBom.getProductModelId()); |
| | | productProcessRouteMapper.updateById(route); |
| | | } |
| | | } |
| | | |
| | | // 查询关联的工艺路线 |
| | | List<ProcessRoute> processRoutes = processRouteMapper.selectList(new LambdaQueryWrapper<ProcessRoute>() |
| | | .eq(ProcessRoute::getBomId, oldBom.getId())); |
| | | if (!processRoutes.isEmpty()) { |
| | | // 修改关联工艺路线的产品信息 |
| | | for (ProcessRoute route : processRoutes) { |
| | | route.setProductModelId(productBom.getProductModelId()); |
| | | processRouteMapper.updateById(route); |
| | | } |
| | | // 查询关联的工艺路线 |
| | | List<ProcessRoute> processRoutes = processRouteMapper.selectList(new LambdaQueryWrapper<ProcessRoute>() |
| | | .eq(ProcessRoute::getBomId, oldBom.getId())); |
| | | if (!processRoutes.isEmpty()) { |
| | | // 修改关联工艺路线的产品信息 |
| | | for (ProcessRoute route : processRoutes) { |
| | | route.setProductModelId(productBom.getProductModelId()); |
| | | processRouteMapper.updateById(route); |
| | | } |
| | | } |
| | | |
| | |
| | | .eq(ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | if (shippingInfo != null) { |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | } |