Commit 820f2540c8ea3852486bd0e7cd479c1863b92dff

Authored by 房远帅
1 parent 0ae458cf

统计报表:订单详情

@@ -358,10 +358,11 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -358,10 +358,11 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
358 if (purchaseOrderRevokeLine.getRevokeQuantity() != null) { 358 if (purchaseOrderRevokeLine.getRevokeQuantity() != null) {
359 QueryOrderDetailReportVo vo2 = new QueryOrderDetailReportVo(); 359 QueryOrderDetailReportVo vo2 = new QueryOrderDetailReportVo();
360 vo2.setPurchaseOrderLineId(purchaseOrderRevokeLine.getPurchaseOrderLineId()); 360 vo2.setPurchaseOrderLineId(purchaseOrderRevokeLine.getPurchaseOrderLineId());
  361 + vo2.setShowOrder(0);
361 List<OrderDetailReport> detailReports = orderDetailReportService.query(vo2); 362 List<OrderDetailReport> detailReports = orderDetailReportService.query(vo2);
362 if (CollectionUtils.isNotEmpty(detailReports)) { 363 if (CollectionUtils.isNotEmpty(detailReports)) {
363 OrderDetailReport orderDetailReport = detailReports.get(0); 364 OrderDetailReport orderDetailReport = detailReports.get(0);
364 - createOrderDetailReport(purchaseOrderRevokeLine.getId(), revokeQuantity.negate(), orderDetailReport); 365 + createOrderDetailReport(revokeQuantity.negate(), orderDetailReport);
365 } 366 }
366 } 367 }
367 } 368 }
@@ -898,9 +899,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -898,9 +899,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
898 } 899 }
899 } 900 }
900 901
901 - private void createOrderDetailReport(String id, BigDecimal quantity, OrderDetailReport orderDetailReport) { 902 + private void createOrderDetailReport(BigDecimal quantity, OrderDetailReport orderDetailReport) {
902 CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); 903 CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo();
903 - vo.setPurchaseOrderLineId(id); 904 + vo.setPurchaseOrderLineId(orderDetailReport.getPurchaseOrderLineId());
904 vo.setOrderNo(orderDetailReport.getOrderNo()); 905 vo.setOrderNo(orderDetailReport.getOrderNo());
905 vo.setOrderDate(orderDetailReport.getOrderDate()); 906 vo.setOrderDate(orderDetailReport.getOrderDate());
906 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 and vo.showOrder != ''">
  215 + AND tb.show_order = #{vo.showOrder}
  216 + </if>
214 </where> 217 </where>
215 ) t 218 ) t
216 ORDER BY 219 ORDER BY