maven
18 小时以前 926371b9919b5197886aa44af43cbdbe9e6dee99
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
@@ -22,9 +22,11 @@
import com.ruoyi.sales.mapper.InvoiceRegistrationProductMapper;
import com.ruoyi.sales.mapper.SalesLedgerMapper;
import com.ruoyi.sales.mapper.SalesLedgerProductMapper;
import com.ruoyi.sales.mapper.ShippingInfoMapper;
import com.ruoyi.sales.pojo.InvoiceRegistrationProduct;
import com.ruoyi.sales.pojo.SalesLedger;
import com.ruoyi.sales.pojo.SalesLedgerProduct;
import com.ruoyi.sales.pojo.ShippingInfo;
import com.ruoyi.sales.service.ISalesLedgerProductService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
@@ -74,6 +76,7 @@
    private ProductionProductOutputMapper productionProductOutputMapper;
    private ProductionProductInputMapper productionProductInputMapper;
    private QualityInspectMapper qualityInspectMapper;
    private ShippingInfoMapper shippingInfoMapper;
    private StockUtils stockUtils;
@@ -117,6 +120,17 @@
                    ledgerProduct.setInvoiceAmount(invoiceAmount);
                    ledgerProduct.setNoInvoiceNum(noInvoiceNum);
                    ledgerProduct.setNoInvoiceAmount(noInvoiceAmount);
                    // 发货信息
                    ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>()
                            .eq(ShippingInfo::getSalesLedgerProductId, ledgerProduct.getId())
                            .orderByDesc(ShippingInfo::getCreateTime)
                            .last("limit 1"));
                    if(shippingInfo != null){
                        ledgerProduct.setShippingDate(shippingInfo.getShippingDate());
                        ledgerProduct.setShippingCarNumber(shippingInfo.getShippingCarNumber());
                        ledgerProduct.setShippingStatus(shippingInfo.getStatus());
                    }
                }
            }