|
@@ -8,6 +8,7 @@ import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CustomerInfoMapper;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.ICustomerInfoService;
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IPurchaseOrderService;
|
|
@@ -38,6 +39,8 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
private IPurchaseOrderService purchaseOrderService;
|
|
|
@Autowired
|
|
|
private ISaleOrderService saleOrderService;
|
|
|
+ @Autowired
|
|
|
+ private IContractManagementInfoService contractManagementInfoService;
|
|
|
|
|
|
/**
|
|
|
* 客户管理列表
|
|
@@ -224,4 +227,30 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
return customerInfoList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查看账户信息
|
|
|
+ * @param customerInfo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public CustomerInfo getPayeeInfo(CustomerInfo customerInfo) {
|
|
|
+ ContractManagementInfo contractManagementInfo=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("contract_no",customerInfo.getContractNo())
|
|
|
+ .eq("comp_id",customerInfo.getCompId()));
|
|
|
+ //查询客户信息
|
|
|
+ Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
|
|
|
+ customerInfoWrapper.eq("comp_id", customerInfo.getCompId());
|
|
|
+ //销售合同
|
|
|
+ if ("1".equals(contractManagementInfo.getContractType())){
|
|
|
+ customerInfoWrapper.andNew().eq("comp_name", contractManagementInfo.getBuyer()).or()
|
|
|
+ .eq("customer_name", contractManagementInfo.getBuyer());
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ customerInfoWrapper.andNew().eq("comp_name", contractManagementInfo.getSeller()).or()
|
|
|
+ .eq("customer_name", contractManagementInfo.getSeller());
|
|
|
+ }
|
|
|
+ CustomerInfo customerInfo1 = this.selectOne(customerInfoWrapper);
|
|
|
+ return customerInfo1;
|
|
|
+ }
|
|
|
+
|
|
|
}
|