Showing
8 changed files
with
22 additions
and
0 deletions
| ... | ... | @@ -826,6 +826,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 826 | 826 | list.add(createPurchaseOrderLineVo); |
| 827 | 827 | |
| 828 | 828 | totalQuantity = totalQuantity.add(purchaseOrderLine.getQuantity()); |
| 829 | + orderDetailReportService.updateQuantityByPurchaseOrderLineId(purchaseOrderLine.getId(), BigDecimal.ZERO); | |
| 829 | 830 | //删除原来的关联关系 |
| 830 | 831 | purchaseOrderLineService.deleteById(purchaseOrderLine.getId()); |
| 831 | 832 | } | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/statistics/OrderDetailReportServiceImpl.java
| ... | ... | @@ -273,6 +273,19 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | @Override |
| 276 | + @Transactional(rollbackFor = Exception.class) | |
| 277 | + public void updateQuantityByPurchaseOrderLineId(String purchaseOrderLineId, BigDecimal quantity) { | |
| 278 | + if (StringUtils.isBlank(purchaseOrderLineId)) { | |
| 279 | + return; | |
| 280 | + } | |
| 281 | + LambdaUpdateWrapper<OrderDetailReport> updateWrapper = Wrappers.lambdaUpdate(OrderDetailReport.class) | |
| 282 | + .set(OrderDetailReport::getQuantity, quantity == null ? BigDecimal.ZERO : quantity) | |
| 283 | + .eq(OrderDetailReport::getShowOrder, 0) | |
| 284 | + .eq(OrderDetailReport::getPurchaseOrderLineId, purchaseOrderLineId); | |
| 285 | + getBaseMapper().update(updateWrapper); | |
| 286 | + } | |
| 287 | + | |
| 288 | + @Override | |
| 276 | 289 | public void processHistoricalData() { |
| 277 | 290 | QueryPurchaseOrderInfoVo vo2 = new QueryPurchaseOrderInfoVo(); |
| 278 | 291 | List<PurchaseOrderInfo> query = purchaseOrderInfoService.query(vo2); | ... | ... |
| ... | ... | @@ -7,6 +7,7 @@ import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailRepo |
| 7 | 7 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.QueryOrderDetailReportVo; |
| 8 | 8 | import com.lframework.xingyun.sc.vo.statistics.orderDetail.UpdateOrderDetailReportVo; |
| 9 | 9 | |
| 10 | +import java.math.BigDecimal; | |
| 10 | 11 | import java.util.List; |
| 11 | 12 | |
| 12 | 13 | /** |
| ... | ... | @@ -48,6 +49,13 @@ public interface OrderDetailReportService extends BaseMpService<OrderDetailRepor |
| 48 | 49 | void update(UpdateOrderDetailReportVo vo); |
| 49 | 50 | |
| 50 | 51 | /** |
| 52 | + * 更新订单明细数量(订货单) | |
| 53 | + * @param purchaseOrderLineId 订货单物料行ID | |
| 54 | + * @param quantity 数量 | |
| 55 | + */ | |
| 56 | + void updateQuantityByPurchaseOrderLineId(String purchaseOrderLineId, BigDecimal quantity); | |
| 57 | + | |
| 58 | + /** | |
| 51 | 59 | * 处理历史数据 |
| 52 | 60 | */ |
| 53 | 61 | void processHistoricalData(); | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type