Explorar o código

订单管理客户信息

zhangyuewww %!s(int64=3) %!d(string=hai) anos
pai
achega
015650113d

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseOrderServiceImpl.java

@@ -625,6 +625,15 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
         ProcurementPlanInfo procurementPlanInfo = procurementPlanInfoService.selectById(purchaseOrder.getPlanId());
         if (procurementPlanInfo != null) {
             purchaseOrder.setProcurementPlanType(procurementPlanInfo.getProcurementPlanType());
+            //查询客户信息
+            Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
+            customerInfoWrapper.andNew().eq("comp_name", purchaseOrder.getCustomer()).or()
+                    .eq("customer_name", purchaseOrder.getCustomer());
+            customerInfoWrapper.eq("delete_flag", "0");
+            CustomerInfo customerInfo = customerInfoService.selectOne(customerInfoWrapper);
+            if (customerInfo != null) {
+                purchaseOrder.setCustomerInfo(customerInfo);
+            }
         }
         String taskId = "";
         // 只有待审核状态才有taskId

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SaleOrderServiceImpl.java

@@ -664,6 +664,15 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
         SalePlanInfo salePlanInfo = salePlanInfoService.selectById(saleOrder.getPlanId());
         if (salePlanInfo != null) {
             saleOrder.setSalePlanType(salePlanInfo.getSalePlanType());
+            //查询客户信息
+            Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
+            customerInfoWrapper.andNew().eq("comp_name", saleOrder.getCustomer()).or()
+                    .eq("customer_name", saleOrder.getCustomer());
+            customerInfoWrapper.eq("delete_flag", "0");
+            CustomerInfo customerInfo = customerInfoService.selectOne(customerInfoWrapper);
+            if (customerInfo != null) {
+                saleOrder.setCustomerInfo(customerInfo);
+            }
         }
         String taskId = "";
         // 只有待审核状态才有taskId