Showing
1 changed file
with
59 additions
and
0 deletions
| @@ -39,6 +39,7 @@ import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService; | @@ -39,6 +39,7 @@ import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService; | ||
| 39 | import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; | 39 | import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; |
| 40 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; | 40 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; |
| 41 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; | 41 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; |
| 42 | +import com.lframework.xingyun.sc.service.statistics.OrderDetailReportService; | ||
| 42 | import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo; | 43 | import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo; |
| 43 | import com.lframework.xingyun.sc.vo.customer.credit.UpdateCustomerCreditVo; | 44 | import com.lframework.xingyun.sc.vo.customer.credit.UpdateCustomerCreditVo; |
| 44 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderInfoVo; | 45 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderInfoVo; |
| @@ -52,6 +53,8 @@ import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo; | @@ -52,6 +53,8 @@ import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo; | ||
| 52 | import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo; | 53 | import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo; |
| 53 | import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo; | 54 | import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo; |
| 54 | import com.lframework.xingyun.sc.vo.shipments.plan.QueryShipmentsPlanDetailVo; | 55 | import com.lframework.xingyun.sc.vo.shipments.plan.QueryShipmentsPlanDetailVo; |
| 56 | +import com.lframework.xingyun.sc.vo.statistics.orderDetail.CreateOrderDetailReportVo; | ||
| 57 | +import com.lframework.xingyun.sc.vo.statistics.orderDetail.QueryOrderDetailReportVo; | ||
| 55 | import lombok.extern.slf4j.Slf4j; | 58 | import lombok.extern.slf4j.Slf4j; |
| 56 | import org.apache.commons.collections.CollectionUtils; | 59 | import org.apache.commons.collections.CollectionUtils; |
| 57 | import org.apache.commons.collections4.MapUtils; | 60 | import org.apache.commons.collections4.MapUtils; |
| @@ -138,6 +141,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -138,6 +141,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 138 | private ProductSampleConfirmationSlipService productSampleConfirmationSlipService; | 141 | private ProductSampleConfirmationSlipService productSampleConfirmationSlipService; |
| 139 | @Resource | 142 | @Resource |
| 140 | private SampleResultTrackingService sampleResultTrackingService; | 143 | private SampleResultTrackingService sampleResultTrackingService; |
| 144 | + @Resource | ||
| 145 | + private OrderDetailReportService orderDetailReportService; | ||
| 141 | 146 | ||
| 142 | 147 | ||
| 143 | 148 | ||
| @@ -349,6 +354,14 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -349,6 +354,14 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 349 | totalQuantity = totalQuantity.add(result); | 354 | totalQuantity = totalQuantity.add(result); |
| 350 | purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); | 355 | purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); |
| 351 | } | 356 | } |
| 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); | ||
| 364 | + } | ||
| 352 | } | 365 | } |
| 353 | //更新总数量 | 366 | //更新总数量 |
| 354 | purchaseOrderInfoService.updateTotalQuantity(revoke.getPurchaseOrderId(), totalQuantity); | 367 | purchaseOrderInfoService.updateTotalQuantity(revoke.getPurchaseOrderId(), totalQuantity); |
| @@ -882,4 +895,50 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -882,4 +895,50 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 882 | sampleResultTrackingService.updateStatus(businessId, "REFUSE"); | 895 | sampleResultTrackingService.updateStatus(businessId, "REFUSE"); |
| 883 | } | 896 | } |
| 884 | } | 897 | } |
| 898 | + | ||
| 899 | + private void createOrderDetailReport(String id, BigDecimal quantity, OrderDetailReport orderDetailReport) { | ||
| 900 | + CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); | ||
| 901 | + vo.setPurchaseOrderLineId(id); | ||
| 902 | + vo.setOrderNo(orderDetailReport.getOrderNo()); | ||
| 903 | + vo.setOrderDate(orderDetailReport.getOrderDate()); | ||
| 904 | + vo.setWorkshopId(orderDetailReport.getWorkshopId()); | ||
| 905 | + vo.setDeptName(orderDetailReport.getDeptName()); | ||
| 906 | + vo.setRegionName(orderDetailReport.getRegionName()); | ||
| 907 | + vo.setOrderingUnitName(orderDetailReport.getOrderingUnitName()); | ||
| 908 | + vo.setIndustry(orderDetailReport.getIndustry()); | ||
| 909 | + vo.setBrand(orderDetailReport.getBrand()); | ||
| 910 | + vo.setThickness(orderDetailReport.getThickness()); | ||
| 911 | + vo.setThicknessTolPos(orderDetailReport.getThicknessTolPos()); | ||
| 912 | + vo.setThicknessTolNeg(orderDetailReport.getThicknessTolNeg()); | ||
| 913 | + vo.setWidth(orderDetailReport.getWidth()); | ||
| 914 | + vo.setWidthTolPos(orderDetailReport.getWidthTolPos()); | ||
| 915 | + vo.setWidthTolNeg(orderDetailReport.getWidthTolNeg()); | ||
| 916 | + vo.setLength(orderDetailReport.getLength()); | ||
| 917 | + vo.setLengthTolPos(orderDetailReport.getLengthTolPos()); | ||
| 918 | + vo.setLengthTolNeg(orderDetailReport.getLengthTolNeg()); | ||
| 919 | + vo.setStatus(orderDetailReport.getStatus()); | ||
| 920 | + vo.setQuantity(quantity); | ||
| 921 | + vo.setSuggestedPrice(orderDetailReport.getSuggestedPrice()); | ||
| 922 | + vo.setDeliveryDate(orderDetailReport.getDeliveryDate()); | ||
| 923 | + vo.setAssessmentExceedsAgreement(orderDetailReport.getAssessmentExceedsAgreement()); | ||
| 924 | + vo.setSalesPrice(orderDetailReport.getSalesPrice()); | ||
| 925 | + vo.setPriceListNo(orderDetailReport.getPriceListNo()); | ||
| 926 | + vo.setPackagingFee(orderDetailReport.getPackagingFee()); | ||
| 927 | + vo.setInvoicingStatus(orderDetailReport.getInvoicingStatus()); | ||
| 928 | + vo.setPieceWeightHeader(orderDetailReport.getPieceWeightHeader()); | ||
| 929 | + vo.setSurface(orderDetailReport.getSurface()); | ||
| 930 | + vo.setTolerance(orderDetailReport.getTolerance()); | ||
| 931 | + vo.setPerformance(orderDetailReport.getPerformance()); | ||
| 932 | + vo.setPackaging(orderDetailReport.getPackaging()); | ||
| 933 | + vo.setRemarks(orderDetailReport.getRemarks()); | ||
| 934 | + vo.setReturnShippingCost(orderDetailReport.getReturnShippingCost()); | ||
| 935 | + vo.setShippingCost(orderDetailReport.getShippingCost()); | ||
| 936 | + vo.setCustomerType(orderDetailReport.getCustomerType()); | ||
| 937 | + vo.setQuality(orderDetailReport.getQuality()); | ||
| 938 | + vo.setContractType(orderDetailReport.getContractType()); | ||
| 939 | + vo.setStockUpCompanyName(orderDetailReport.getStockUpCompanyName()); | ||
| 940 | + vo.setOrderType(orderDetailReport.getOrderType()); | ||
| 941 | + vo.setShowOrder(1); | ||
| 942 | + orderDetailReportService.create(vo); | ||
| 943 | + } | ||
| 885 | } | 944 | } |