Prechádzať zdrojové kódy

采购订单列表客户信息

zhangyuewww 3 rokov pred
rodič
commit
789af742aa

+ 3 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/PurchaseOrder.java

@@ -252,6 +252,9 @@ public class PurchaseOrder extends BaseModel<PurchaseOrder> {
     //平仓记录
     @TableField(exist = false)
     private List<TransactionRecord> closePositionList;
+    //客户信息
+    @TableField(exist = false)
+    private CustomerInfo customerInfo;
 
 
 

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

@@ -1,6 +1,7 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
 
+import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.winsea.svc.base.workflow.entity.Workflow;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.base.service.ICommonBillOperateHisService;
@@ -57,6 +58,8 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
     private IPurchaseClosingReportService purchaseClosingReportService;
     @Autowired
     private IProcurementPlanInfoService procurementPlanInfoService;
+    @Autowired
+    private ICustomerInfoService customerInfoService;
     /**
      * 成交
      */
@@ -259,6 +262,15 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
                         .eq("order_id",purchaseOrdera.getId())
                         .eq("record_flag","1")
                         .eq("delete_flag","0"));
+                //查询客户信息
+                Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
+                customerInfoWrapper.andNew().eq("comp_name",purchaseOrdera.getCustomer()).or()
+                        .eq("customer_name",purchaseOrdera.getCustomer());
+                customerInfoWrapper.eq("delete_flag","0");
+                CustomerInfo customerInfo=customerInfoService.selectOne(customerInfoWrapper);
+                if (customerInfo!=null){
+                    purchaseOrdera.setCustomerInfo(customerInfo);
+                }
                 purchaseOrdera.setStockInQuantityList(warehouseInOutInfoList);
                 purchaseOrdera.setTransactionRecordList(transactionRecordList);
                 purchaseOrdera.setClosePositionList(closePositionList);