Commit 08650e0249e1d1d06098c4593e30777e862adeb3
Merge remote-tracking branch 'origin/master_sample_order' into master_sample_order
Showing
4 changed files
with
21 additions
and
8 deletions
| ... | ... | @@ -355,12 +355,15 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 355 | 355 | purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); |
| 356 | 356 | } |
| 357 | 357 | //新增订单明细 |
| 358 | - QueryOrderDetailReportVo vo2 = new QueryOrderDetailReportVo(); | |
| 359 | - vo2.setPurchaseOrderLineId(purchaseOrderRevokeLine.getPurchaseOrderLineId()); | |
| 360 | - List<OrderDetailReport> detailReports = orderDetailReportService.query(vo2); | |
| 361 | - if (CollectionUtils.isNotEmpty(detailReports)) { | |
| 362 | - OrderDetailReport orderDetailReport = detailReports.get(0); | |
| 363 | - createOrderDetailReport(purchaseOrderRevokeLine.getId(), revokeQuantity.negate(), orderDetailReport); | |
| 358 | + if (purchaseOrderRevokeLine.getRevokeQuantity() != null) { | |
| 359 | + QueryOrderDetailReportVo vo2 = new QueryOrderDetailReportVo(); | |
| 360 | + vo2.setPurchaseOrderLineId(purchaseOrderRevokeLine.getPurchaseOrderLineId()); | |
| 361 | + vo2.setShowOrder(0); | |
| 362 | + List<OrderDetailReport> detailReports = orderDetailReportService.query(vo2); | |
| 363 | + if (CollectionUtils.isNotEmpty(detailReports)) { | |
| 364 | + OrderDetailReport orderDetailReport = detailReports.get(0); | |
| 365 | + createOrderDetailReport(revokeQuantity.negate(), orderDetailReport); | |
| 366 | + } | |
| 364 | 367 | } |
| 365 | 368 | } |
| 366 | 369 | //更新总数量 |
| ... | ... | @@ -896,9 +899,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 896 | 899 | } |
| 897 | 900 | } |
| 898 | 901 | |
| 899 | - private void createOrderDetailReport(String id, BigDecimal quantity, OrderDetailReport orderDetailReport) { | |
| 902 | + private void createOrderDetailReport(BigDecimal quantity, OrderDetailReport orderDetailReport) { | |
| 900 | 903 | CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); |
| 901 | - vo.setPurchaseOrderLineId(id); | |
| 904 | + vo.setPurchaseOrderLineId(orderDetailReport.getPurchaseOrderLineId()); | |
| 902 | 905 | vo.setOrderNo(orderDetailReport.getOrderNo()); |
| 903 | 906 | vo.setOrderDate(orderDetailReport.getOrderDate()); |
| 904 | 907 | vo.setWorkshopId(orderDetailReport.getWorkshopId()); | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/statistics/OrderDetailReportServiceImpl.java
| ... | ... | @@ -253,6 +253,7 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR |
| 253 | 253 | .set(OrderDetailReport::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks()) |
| 254 | 254 | .set(OrderDetailReport::getShippingCost, StringUtil.isBlank(vo.getShippingCost()) ? null : vo.getShippingCost()) |
| 255 | 255 | .set(OrderDetailReport::getSuggestedPrice, StringUtil.isBlank(vo.getSuggestedPrice()) ? null : vo.getSuggestedPrice()) |
| 256 | + .eq(OrderDetailReport::getShowOrder, 0) | |
| 256 | 257 | .eq(OrderDetailReport::getPurchaseOrderLineId, vo.getPurchaseOrderLineId()); |
| 257 | 258 | |
| 258 | 259 | getBaseMapper().update(updateWrapper); | ... | ... |
| ... | ... | @@ -211,6 +211,9 @@ |
| 211 | 211 | <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> |
| 212 | 212 | AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%') |
| 213 | 213 | </if> |
| 214 | + <if test="vo.showOrder != null"> | |
| 215 | + AND tb.show_order = #{vo.showOrder} | |
| 216 | + </if> | |
| 214 | 217 | </where> |
| 215 | 218 | ) t |
| 216 | 219 | ORDER BY | ... | ... |