Browse Source

完善代码

yuansh 1 month ago
parent
commit
59cbbd96e7

+ 25 - 1
srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleInvoiceController.java

@@ -711,7 +711,31 @@ public class SaleInvoiceController {
                         saleInvoice.setProductionClass(classEnt.getName());
                     }
                 }
-                saleInvoice.setContacts(saleOrder.getLiaisonInfo());
+
+                if(saleOrder != null){
+                    saleInvoice.setContacts(saleOrder.getSalesmanName());
+                }
+
+//                if (StringUtils.isNotBlank(orderCode)) {
+//                    LambdaQueryWrapper<SaleDelivery> saleDeliveryQueryWrapper = new LambdaQueryWrapper<>();
+//                    saleDeliveryQueryWrapper.eq(SaleDelivery::getBillCode,orderCode);
+//                    List<SaleDelivery> list = saleDeliveryService.list(saleDeliveryQueryWrapper);
+//                    if(list.size() > 0){
+//                        SaleDelivery saleDeliveryEntity = list.get(0);
+//                        String saleOrderCode = saleDeliveryEntity.getSourceCode();
+//                        if (StringUtils.isNotBlank(saleOrderCode)) {
+//                            LambdaQueryWrapper<SaleOrder> saleOrderQueryWrapper = new LambdaQueryWrapper<>();
+//                            saleOrderQueryWrapper.eq(SaleOrder::getBillCode,saleOrderCode);
+//                            List<SaleOrder> listSaleOrder = saleOrderService.list(saleOrderQueryWrapper);
+//                            if(listSaleOrder.size() > 0){
+////                                saleInvoice.setContacts(saleOrder.getLiaisonInfo());
+//                                saleInvoice.setContacts(saleOrder.getLiaisonInfo());
+//                            }
+//                        }
+//
+//                    }
+//                }
+
                 /*
                 String customerId = saleInvoice.getCustomer();
                 if (StringUtils.isNotBlank(customerId)) {