Commit 08650e0249e1d1d06098c4593e30777e862adeb3

Authored by yeqianyong
2 parents 4be7358a 22c88b01

Merge remote-tracking branch 'origin/master_sample_order' into master_sample_order

@@ -355,12 +355,15 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -355,12 +355,15 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
355 purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); 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,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 CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); 903 CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo();
901 - vo.setPurchaseOrderLineId(id); 904 + vo.setPurchaseOrderLineId(orderDetailReport.getPurchaseOrderLineId());
902 vo.setOrderNo(orderDetailReport.getOrderNo()); 905 vo.setOrderNo(orderDetailReport.getOrderNo());
903 vo.setOrderDate(orderDetailReport.getOrderDate()); 906 vo.setOrderDate(orderDetailReport.getOrderDate());
904 vo.setWorkshopId(orderDetailReport.getWorkshopId()); 907 vo.setWorkshopId(orderDetailReport.getWorkshopId());
@@ -253,6 +253,7 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR @@ -253,6 +253,7 @@ public class OrderDetailReportServiceImpl extends BaseMpServiceImpl<OrderDetailR
253 .set(OrderDetailReport::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks()) 253 .set(OrderDetailReport::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks())
254 .set(OrderDetailReport::getShippingCost, StringUtil.isBlank(vo.getShippingCost()) ? null : vo.getShippingCost()) 254 .set(OrderDetailReport::getShippingCost, StringUtil.isBlank(vo.getShippingCost()) ? null : vo.getShippingCost())
255 .set(OrderDetailReport::getSuggestedPrice, StringUtil.isBlank(vo.getSuggestedPrice()) ? null : vo.getSuggestedPrice()) 255 .set(OrderDetailReport::getSuggestedPrice, StringUtil.isBlank(vo.getSuggestedPrice()) ? null : vo.getSuggestedPrice())
  256 + .eq(OrderDetailReport::getShowOrder, 0)
256 .eq(OrderDetailReport::getPurchaseOrderLineId, vo.getPurchaseOrderLineId()); 257 .eq(OrderDetailReport::getPurchaseOrderLineId, vo.getPurchaseOrderLineId());
257 258
258 getBaseMapper().update(updateWrapper); 259 getBaseMapper().update(updateWrapper);
@@ -47,4 +47,10 @@ public class QueryOrderDetailReportVo extends PageVo implements BaseVo, Serializ @@ -47,4 +47,10 @@ public class QueryOrderDetailReportVo extends PageVo implements BaseVo, Serializ
47 @ApiModelProperty("导出类型") 47 @ApiModelProperty("导出类型")
48 private String exportType; 48 private String exportType;
49 49
  50 + /**
  51 + * 排序
  52 + */
  53 + @ApiModelProperty("排序")
  54 + private Integer showOrder;
  55 +
50 } 56 }
@@ -211,6 +211,9 @@ @@ -211,6 +211,9 @@
211 <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> 211 <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''">
212 AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%') 212 AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%')
213 </if> 213 </if>
  214 + <if test="vo.showOrder != null">
  215 + AND tb.show_order = #{vo.showOrder}
  216 + </if>
214 </where> 217 </where>
215 ) t 218 ) t
216 ORDER BY 219 ORDER BY