feat 完善表格数据接口
This commit is contained in:
parent
75144dc8e4
commit
34e8101b8c
@ -15,12 +15,9 @@ namespace ARW.Model.Dto.Api.TableDataManage.TableDatas
|
|||||||
public class TableDataQueryDtoApi : PagerInfo
|
public class TableDataQueryDtoApi : PagerInfo
|
||||||
{
|
{
|
||||||
public string Search { get; set; }
|
public string Search { get; set; }
|
||||||
public string TableDataProcurementContent { get; set; }
|
public int Type { get; set; }
|
||||||
public string TableDataProcurementUnit { get; set; }
|
public string Order { get; set; }
|
||||||
public DateTime? BeginTableDataDate { get; set; }
|
public long CustomerGuid { get; set; }
|
||||||
public DateTime? EndTableDataDate { get; set; }
|
|
||||||
public DateTime? BeginTableDataDeadline { get; set; }
|
|
||||||
public DateTime? EndTableDataDeadline { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -34,6 +31,10 @@ namespace ARW.Model.Dto.Api.TableDataManage.TableDatas
|
|||||||
{
|
{
|
||||||
[Required(ErrorMessage = "TableDataId不能为空")]
|
[Required(ErrorMessage = "TableDataId不能为空")]
|
||||||
public int TableDataId { get; set; }
|
public int TableDataId { get; set; }
|
||||||
|
|
||||||
|
public long TableDataGuid { get; set; }
|
||||||
|
|
||||||
|
public long CustomerGuid { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
|
||||||
|
namespace ARW.Model.Dto.Business.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注输入对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
public class CustomerFollowDto
|
||||||
|
{
|
||||||
|
|
||||||
|
public int CustomerFollowId { get; set; }
|
||||||
|
|
||||||
|
public long CustomerFollowGuid { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "客户Guid不能为空")]
|
||||||
|
public long CustomerGuid { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "表格数据Guid不能为空")]
|
||||||
|
public long TableDataGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注查询对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
public class CustomerFollowQueryDto : PagerInfo
|
||||||
|
{
|
||||||
|
public string CustomerName { get; set; }
|
||||||
|
public string CustomerPhone { get; set; }
|
||||||
|
|
||||||
|
public string TableDataProcurementContent { get; set; }
|
||||||
|
public string ids { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using SqlSugar;
|
||||||
|
using OfficeOpenXml.Attributes;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace ARW.Model.Models.Business.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注,数据实体对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("tb_customer_follow")]
|
||||||
|
public class CustomerFollow : BusinessBase
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "customer_follow_id")]
|
||||||
|
public int CustomerFollowId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "customer_follow_guid")]
|
||||||
|
public long CustomerFollowGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :客户Guid
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
[SugarColumn(ColumnName = "customer_guid")]
|
||||||
|
public long CustomerGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :表格数据Guid
|
||||||
|
/// 空值 : false
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
[SugarColumn(ColumnName = "table_data_guid")]
|
||||||
|
public long TableDataGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OfficeOpenXml.Attributes;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace ARW.Model.Vo.Api.TableDataManage.TableDatas
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 涉及产品列表展示对象Api
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
public class ProductsInvolvedListApiVo
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 : 文本
|
||||||
|
/// </summary>
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 : 值
|
||||||
|
/// </summary>
|
||||||
|
public int Value { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -105,7 +105,7 @@ namespace ARW.Model.Vo.Api.TableDataManage.TableDatas
|
|||||||
public string TableDataSingleSource { get; set; }
|
public string TableDataSingleSource { get; set; }
|
||||||
[EpplusIgnore]
|
[EpplusIgnore]
|
||||||
public string TableDataDetails { get; set; }
|
public string TableDataDetails { get; set; }
|
||||||
|
public bool IsFollow { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OfficeOpenXml.Attributes;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ARW.Model.Vo.Business.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注展示对象
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
public class CustomerFollowVo
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
public int CustomerFollowId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
public long CustomerFollowGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :客户Guid
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
public long CustomerGuid { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :表格数据Guid
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
|
public long TableDataGuid { get; set; }
|
||||||
|
|
||||||
|
public string CustomerName { get; set; }
|
||||||
|
public string CustomerPhone { get; set; }
|
||||||
|
public string TableDataName { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -43,10 +43,10 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
public List<int> ProductsInvolvedGuid { get; set; }
|
public List<int> ProductsInvolvedGuid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :采购内容
|
/// 描述 :日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EpplusTableColumn(Header = "采购内容")]
|
[EpplusTableColumn(Header = "日期")]
|
||||||
public string TableDataProcurementContent { get; set; }
|
public DateTime TableDataDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -56,59 +56,6 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
public string TableDataProcurementUnit { get; set; }
|
public string TableDataProcurementUnit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :采购方式
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "采购方式")]
|
|
||||||
public string TableDataProcurementMethod { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :供应商名称
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "供应商名称")]
|
|
||||||
public string TableDataSupplierName { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :供应商的对应报价
|
|
||||||
/// </summary>
|
|
||||||
[EpplusIgnore]
|
|
||||||
public decimal TableDataSupplierOffer { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :项目计价形式
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "项目计价形式")]
|
|
||||||
public string TableDataProjectPricingForm { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :链接
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "链接")]
|
|
||||||
public string TableDataLink { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :日期
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "日期", NumberFormat = "yyyy/m/d")]
|
|
||||||
public DateTime TableDataDate { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
[EpplusIgnore]
|
|
||||||
public string TableDataDateName { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 描述 :截止日期
|
|
||||||
/// </summary>
|
|
||||||
[EpplusTableColumn(Header = "截止日期", NumberFormat = "yyyy/m/d")]
|
|
||||||
public DateTime TableDataDeadline { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :中标人或候选人
|
/// 描述 :中标人或候选人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -117,17 +64,17 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :中标金额
|
/// 描述 :采购内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EpplusTableColumn(Header = "中标金额")]
|
[EpplusTableColumn(Header = "采购内容")]
|
||||||
public decimal TableDataBidWinningPrice { get; set; }
|
public string TableDataProcurementContent { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :是否为中标公告
|
/// 描述 :采购方式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EpplusIgnore]
|
[EpplusTableColumn(Header = "采购方式")]
|
||||||
public int TableDataIsBidAnnouncement { get; set; }
|
public string TableDataProcurementMethod { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[EpplusTableColumn(Header = "是否为中标公告")]
|
[EpplusTableColumn(Header = "是否为中标公告")]
|
||||||
@ -163,11 +110,6 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
public int TableDataIsOnlyBidder { get; set; }
|
public int TableDataIsOnlyBidder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[EpplusTableColumn(Header = "是否仅有一个中标人")]
|
|
||||||
public string TableDataIsOnlyBidderName { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :单一来源理由(如有)
|
/// 描述 :单一来源理由(如有)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -175,6 +117,45 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
public string TableDataSingleSource { get; set; }
|
public string TableDataSingleSource { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[EpplusTableColumn(Header = "是否仅有一个中标人")]
|
||||||
|
public string TableDataIsOnlyBidderName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :中标金额
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "中标金额")]
|
||||||
|
public decimal TableDataBidWinningPrice { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :供应商名称
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "供应商名称")]
|
||||||
|
public string TableDataSupplierName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :供应商的对应报价
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "供应商的对应报价")]
|
||||||
|
public decimal TableDataSupplierOffer { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :项目计价形式
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "项目计价形式")]
|
||||||
|
public string TableDataProjectPricingForm { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :链接
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "链接")]
|
||||||
|
public string TableDataLink { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :详情
|
/// 描述 :详情
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -182,6 +163,23 @@ namespace ARW.Model.Vo.Business.TableDataManage.TableDatas
|
|||||||
public string TableDataDetails { get; set; }
|
public string TableDataDetails { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[EpplusIgnore]
|
||||||
|
public string TableDataDateName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :截止日期
|
||||||
|
/// </summary>
|
||||||
|
[EpplusTableColumn(Header = "截止日期")]
|
||||||
|
public DateTime TableDataDeadline { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述 :是否为中标公告
|
||||||
|
/// </summary>
|
||||||
|
[EpplusIgnore]
|
||||||
|
public int TableDataIsBidAnnouncement { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述 :排序
|
/// 描述 :排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using Infrastructure.Attribute;
|
||||||
|
using ARW.Repository.System;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
|
||||||
|
namespace ARW.Repository.Business.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注仓储
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
[AppService(ServiceLifetime = LifeTime.Transient)]
|
||||||
|
public class CustomerFollowRepository : BaseRepository<CustomerFollow>
|
||||||
|
{
|
||||||
|
#region 业务逻辑代码
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -22,6 +22,11 @@ using ARW.Repository.Business.Custom.GoodsCollections;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Senparc.CO2NET.Extensions;
|
using Senparc.CO2NET.Extensions;
|
||||||
using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson;
|
using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson;
|
||||||
|
using ARW.Repository.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
using Infrastructure;
|
||||||
|
using ARW.Repository.Business.SubscribeTasks;
|
||||||
|
using ARW.Model.Vo.Api.ProductsInvolveds;
|
||||||
|
|
||||||
namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
||||||
{
|
{
|
||||||
@ -37,12 +42,14 @@ namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
|||||||
private readonly TableDataRepository _TableDataRepository;
|
private readonly TableDataRepository _TableDataRepository;
|
||||||
private readonly TableDataProductsInvolveRepository _TableDataProductsInvolveRepository;
|
private readonly TableDataProductsInvolveRepository _TableDataProductsInvolveRepository;
|
||||||
private readonly ProductsInvolvedRepository _ProductsInvolvedRepository;
|
private readonly ProductsInvolvedRepository _ProductsInvolvedRepository;
|
||||||
|
private readonly CustomerFollowRepository _CustomerFollowRepository;
|
||||||
|
|
||||||
public TableDataServiceImplApi(TableDataRepository TableDataRepository, TableDataProductsInvolveRepository tableDataProductsInvolveRepository, ProductsInvolvedRepository productsInvolveRepository)
|
public TableDataServiceImplApi(TableDataRepository TableDataRepository, TableDataProductsInvolveRepository tableDataProductsInvolveRepository, ProductsInvolvedRepository productsInvolveRepository, CustomerFollowRepository customerFollowRepository)
|
||||||
{
|
{
|
||||||
this._TableDataRepository = TableDataRepository;
|
this._TableDataRepository = TableDataRepository;
|
||||||
_TableDataProductsInvolveRepository = tableDataProductsInvolveRepository;
|
_TableDataProductsInvolveRepository = tableDataProductsInvolveRepository;
|
||||||
_ProductsInvolvedRepository = productsInvolveRepository;
|
_ProductsInvolvedRepository = productsInvolveRepository;
|
||||||
|
_CustomerFollowRepository = customerFollowRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Api接口代码
|
#region Api接口代码
|
||||||
@ -58,14 +65,24 @@ namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
|||||||
//开始拼装查询条件d
|
//开始拼装查询条件d
|
||||||
var predicate = Expressionable.Create<TableData>();
|
var predicate = Expressionable.Create<TableData>();
|
||||||
|
|
||||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.Search), s => s.TableDataProcurementContent.Contains(parm.TableDataProcurementContent));
|
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.Search), s => s.TableDataProcurementContent.Contains(parm.Search)
|
||||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.Search), s => s.TableDataProcurementUnit.Contains(parm.TableDataProcurementUnit));
|
|| s.TableDataProcurementUnit.Contains(parm.Search)
|
||||||
|
|| s.TableDataProcurementMethod.Contains(parm.Search)
|
||||||
|
|| s.TableDataProjectPricingForm.Contains(parm.Search)
|
||||||
|
|| s.TableDataWinningBidde.Contains(parm.Search)
|
||||||
|
|| s.TableDataSupplierName.Contains(parm.Search)
|
||||||
|
);
|
||||||
|
|
||||||
//predicate = predicate.AndIF(parm.BeginTableDataDeadline == null, it => it.TableDataDeadline >= DateTime.Now.AddDays(-1));
|
//predicate = predicate.AndIF(parm.BeginTableDataDeadline == null, it => it.TableDataDeadline >= DateTime.Now.AddDays(-1));
|
||||||
//predicate = predicate.AndIF(parm.BeginTableDataDeadline != null, it => it.TableDataDeadline >= parm.BeginTableDataDeadline && it.TableDataDeadline <= parm.EndTableDataDeadline);
|
//predicate = predicate.AndIF(parm.BeginTableDataDeadline != null, it => it.TableDataDeadline >= parm.BeginTableDataDeadline && it.TableDataDeadline <= parm.EndTableDataDeadline);
|
||||||
var query = _TableDataRepository
|
var query = _TableDataRepository
|
||||||
.Queryable()
|
.Queryable()
|
||||||
.Where(predicate.ToExpression())
|
.Where(predicate.ToExpression())
|
||||||
.OrderBy(s => s.TableDataSort, OrderByType.Desc)
|
.OrderByIF(parm.Order == "default", s => s.TableDataSort, OrderByType.Desc)
|
||||||
|
.OrderByIF(parm.Order == "date-down", s => s.TableDataDate, OrderByType.Desc)
|
||||||
|
.OrderByIF(parm.Order == "date-up", s => s.TableDataDate, OrderByType.Asc)
|
||||||
|
.OrderByIF(parm.Order == "price-up", s => s.TableDataBidWinningPrice, OrderByType.Desc)
|
||||||
|
.OrderByIF(parm.Order == "price-down", s => s.TableDataBidWinningPrice, OrderByType.Asc)
|
||||||
.Select(s => new TableDataVoApi
|
.Select(s => new TableDataVoApi
|
||||||
{
|
{
|
||||||
TableDataId = s.TableDataId,
|
TableDataId = s.TableDataId,
|
||||||
@ -75,25 +92,45 @@ namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
|||||||
TableDataDeadline = s.TableDataDeadline.ToString("yyyy-MM-dd"),
|
TableDataDeadline = s.TableDataDeadline.ToString("yyyy-MM-dd"),
|
||||||
TableDataBidWinningPrice = s.TableDataBidWinningPrice,
|
TableDataBidWinningPrice = s.TableDataBidWinningPrice,
|
||||||
});
|
});
|
||||||
|
|
||||||
var list = await query.ToPageAsync(parm);
|
var list = await query.ToPageAsync(parm);
|
||||||
|
|
||||||
foreach (var item in list.Result)
|
|
||||||
|
var prorelList = new List<TableDataVoApi>();
|
||||||
|
// 如果筛选了类型
|
||||||
|
if (parm.Type != 0)
|
||||||
{
|
{
|
||||||
var productsInvolvedList = await _TableDataProductsInvolveRepository.GetListAsync(s => s.TableGuid == item.TableDataGuid);
|
foreach (var item in list.Result)
|
||||||
if (productsInvolvedList.Count > 0)
|
|
||||||
{
|
{
|
||||||
List<string> stringName = new List<string>();
|
|
||||||
foreach (var item1 in productsInvolvedList)
|
// 找出当前表格数据所关联的涉及产品
|
||||||
|
var proList = await _TableDataProductsInvolveRepository.GetListAsync(s => s.TableGuid == item.TableDataGuid);
|
||||||
|
if (proList.Count > 0)
|
||||||
{
|
{
|
||||||
var productsInvolved = await _ProductsInvolvedRepository.GetFirstAsync(s => s.ProductsInvolvedId == item1.ProductsInvolvedId);
|
foreach (var prorel in proList)
|
||||||
if (productsInvolved != null)
|
|
||||||
{
|
{
|
||||||
stringName.Add(productsInvolved.ProductsInvolvedName);
|
if (prorel.ProductsInvolvedId == parm.Type)
|
||||||
|
{
|
||||||
|
prorelList.Add(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item.ProductsInvolvedName = stringName;
|
}
|
||||||
|
if (prorelList.Count > 0)
|
||||||
|
{
|
||||||
|
list.Result = await GetProName(prorelList); ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list.Result = new List<TableDataVoApi>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list.Result = await GetProName(list.Result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -163,6 +200,14 @@ namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
|||||||
data.ProductsInvolvedName = str;
|
data.ProductsInvolvedName = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 是否关注
|
||||||
|
var follow = await _CustomerFollowRepository.GetFirstAsync(s => s.TableDataGuid == data.TableDataGuid && s.CustomerGuid == parm.CustomerGuid);
|
||||||
|
if (follow != null)
|
||||||
|
{
|
||||||
|
data.IsFollow = true;
|
||||||
|
}
|
||||||
|
|
||||||
json = data.ToJson();
|
json = data.ToJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +215,84 @@ namespace ARW.Service.Api.BusinessService.TableDataManage.TableDatas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取涉及产品类别列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<ProductsInvolvedListApiVo>> GetProductsInvolvedList(TableDataQueryDtoApi parm)
|
||||||
|
{
|
||||||
|
var query = _ProductsInvolvedRepository
|
||||||
|
.Queryable()
|
||||||
|
.OrderBy(s => s.ProductsInvolvedSort, OrderByType.Asc)
|
||||||
|
.Select(s => new ProductsInvolvedListApiVo
|
||||||
|
{
|
||||||
|
Value = s.ProductsInvolvedId,
|
||||||
|
Label = s.ProductsInvolvedName
|
||||||
|
});
|
||||||
|
|
||||||
|
return await query.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> Follow(TableDataDtoApi parm)
|
||||||
|
{
|
||||||
|
var follow = await _CustomerFollowRepository.GetFirstAsync(s => s.TableDataGuid == parm.TableDataGuid && s.CustomerGuid == parm.CustomerGuid);
|
||||||
|
if (follow != null) throw new CustomException("请勿重复关注");
|
||||||
|
var model = new CustomerFollow
|
||||||
|
{
|
||||||
|
TableDataGuid = parm.TableDataGuid,
|
||||||
|
CustomerGuid = parm.CustomerGuid,
|
||||||
|
};
|
||||||
|
var res = await _CustomerFollowRepository.InsertReturnSnowflakeIdAsync(model);
|
||||||
|
return "关注成功";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取消关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> CancelFollow(TableDataDtoApi parm)
|
||||||
|
{
|
||||||
|
await _CustomerFollowRepository.DeleteAsync(s => s.TableDataGuid == parm.TableDataGuid && s.CustomerGuid == parm.CustomerGuid);
|
||||||
|
return "取消关注成功";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取涉及产品名称
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="prorelList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<TableDataVoApi>> GetProName(List<TableDataVoApi> prorelList)
|
||||||
|
{
|
||||||
|
foreach (var item in prorelList)
|
||||||
|
{
|
||||||
|
var productsInvolvedList = await _TableDataProductsInvolveRepository.GetListAsync(s => s.TableGuid == item.TableDataGuid);
|
||||||
|
if (productsInvolvedList.Count > 0)
|
||||||
|
{
|
||||||
|
List<string> stringName = new List<string>();
|
||||||
|
foreach (var item1 in productsInvolvedList)
|
||||||
|
{
|
||||||
|
var productsInvolved = await _ProductsInvolvedRepository.GetFirstAsync(s => s.ProductsInvolvedId == item1.ProductsInvolvedId);
|
||||||
|
if (productsInvolved != null)
|
||||||
|
{
|
||||||
|
stringName.Add(productsInvolved.ProductsInvolvedName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.ProductsInvolvedName = stringName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return prorelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -32,5 +32,27 @@ namespace ARW.Service.Api.IBusinessService.TableDataManage.TableDatas
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<string> GetTableDataDetails(TableDataDtoApi parm);
|
Task<string> GetTableDataDetails(TableDataDtoApi parm);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取涉及产品类别列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ProductsInvolvedListApiVo>> GetProductsInvolvedList(TableDataQueryDtoApi parm);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> Follow(TableDataDtoApi parm);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取消关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> CancelFollow(TableDataDtoApi parm);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,101 @@
|
|||||||
|
using Infrastructure.Attribute;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Infrastructure;
|
||||||
|
using ARW.Model;
|
||||||
|
using ARW.Repository;
|
||||||
|
using ARW.Repository.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Service.Business.IBusinessService.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Dto.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Vo.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Models.Business.Custom.Customers;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.TableDatas;
|
||||||
|
|
||||||
|
namespace ARW.Service.Business.BusinessService.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注接口实现类
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
[AppService(ServiceType = typeof(ICustomerFollowService), ServiceLifetime = LifeTime.Transient)]
|
||||||
|
public class CustomerFollowServiceImpl : BaseService<CustomerFollow>, ICustomerFollowService
|
||||||
|
{
|
||||||
|
private readonly CustomerFollowRepository _CustomerFollowRepository;
|
||||||
|
|
||||||
|
public CustomerFollowServiceImpl(CustomerFollowRepository CustomerFollowRepository)
|
||||||
|
{
|
||||||
|
this._CustomerFollowRepository = CustomerFollowRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 业务逻辑代码
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询客户关注分页列表
|
||||||
|
/// </summary>
|
||||||
|
public async Task<PagedInfo<CustomerFollowVo>> GetCustomerFollowList(CustomerFollowQueryDto parm)
|
||||||
|
{
|
||||||
|
//开始拼装查询条件d
|
||||||
|
var predicate = Expressionable.Create<CustomerFollow>();
|
||||||
|
|
||||||
|
var query = _CustomerFollowRepository
|
||||||
|
.Queryable()
|
||||||
|
.LeftJoin<Customer>((s, c) => s.CustomerGuid == c.CustomerGuid)
|
||||||
|
.LeftJoin<TableData>((s, c, d) => s.TableDataGuid == d.TableDataGuid)
|
||||||
|
.Where(predicate.ToExpression())
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(parm.CustomerName), (s, c, d) => c.CustomerNickname.Contains(parm.CustomerName))
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(parm.CustomerName), (s, c, d) => c.CustomerMobilePhoneNumber.Contains(parm.CustomerPhone))
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(parm.TableDataProcurementContent), (s, c, d) => d.TableDataProcurementContent.Contains(parm.TableDataProcurementContent))
|
||||||
|
.OrderBy(s => s.Create_time, OrderByType.Desc)
|
||||||
|
.Select((s, c, d) => new CustomerFollowVo
|
||||||
|
{
|
||||||
|
CustomerFollowId = s.CustomerFollowId,
|
||||||
|
CustomerFollowGuid = s.CustomerFollowGuid,
|
||||||
|
CustomerGuid = s.CustomerGuid,
|
||||||
|
TableDataGuid = s.TableDataGuid,
|
||||||
|
CustomerName = c.CustomerNickname,
|
||||||
|
CustomerPhone = c.CustomerMobilePhoneNumber,
|
||||||
|
TableDataName = d.TableDataProcurementContent
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return await query.ToPageAsync(parm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改客户关注
|
||||||
|
/// </summary>
|
||||||
|
public async Task<string> AddOrUpdateCustomerFollow(CustomerFollow model)
|
||||||
|
{
|
||||||
|
if (model.CustomerFollowId != 0)
|
||||||
|
{
|
||||||
|
var response = await _CustomerFollowRepository.UpdateAsync(model);
|
||||||
|
return "修改成功!";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var response = await _CustomerFollowRepository.InsertReturnSnowflakeIdAsync(model);
|
||||||
|
return "添加成功!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Excel处理
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using ARW.Model;
|
||||||
|
using ARW.Model.Dto.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Vo.Business.TableDataManage.CustomerFollows;
|
||||||
|
|
||||||
|
namespace ARW.Service.Business.IBusinessService.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注接口类
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
public interface ICustomerFollowService : IBaseService<CustomerFollow>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取客户关注分页列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedInfo<CustomerFollowVo>> GetCustomerFollowList(CustomerFollowQueryDto parm);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改客户关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> AddOrUpdateCustomerFollow(CustomerFollow parm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,7 @@ using ARW.Model.Models.Business.TableDataManage.TableDatas;
|
|||||||
using ARW.Model.Vo.Api.TableDataManage.TableDatas;
|
using ARW.Model.Vo.Api.TableDataManage.TableDatas;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Geocoding;
|
using Geocoding;
|
||||||
|
using ARW.Admin.WebApi.Framework;
|
||||||
|
|
||||||
namespace ARW.WebApi.Controllers.Api.TableDataManage.TableDatas
|
namespace ARW.WebApi.Controllers.Api.TableDataManage.TableDatas
|
||||||
{
|
{
|
||||||
@ -48,6 +49,7 @@ namespace ARW.WebApi.Controllers.Api.TableDataManage.TableDatas
|
|||||||
[HttpGet("getTableDataList")]
|
[HttpGet("getTableDataList")]
|
||||||
public async Task<IActionResult> GetTableDataListApi([FromQuery] TableDataQueryDtoApi parm)
|
public async Task<IActionResult> GetTableDataListApi([FromQuery] TableDataQueryDtoApi parm)
|
||||||
{
|
{
|
||||||
|
parm.CustomerGuid = JwtUtil.GetLoginUser(App.HttpContext).UserId;
|
||||||
var res = await _TableDataServiceApi.GetTableDataListApi(parm);
|
var res = await _TableDataServiceApi.GetTableDataListApi(parm);
|
||||||
return SUCCESS(res);
|
return SUCCESS(res);
|
||||||
}
|
}
|
||||||
@ -61,7 +63,7 @@ namespace ARW.WebApi.Controllers.Api.TableDataManage.TableDatas
|
|||||||
public async Task<IActionResult> GetTableDataDetails([FromQuery] TableDataDtoApi parm)
|
public async Task<IActionResult> GetTableDataDetails([FromQuery] TableDataDtoApi parm)
|
||||||
{
|
{
|
||||||
//if (parm == null) throw new CustomException("参数错误!");
|
//if (parm == null) throw new CustomException("参数错误!");
|
||||||
|
parm.CustomerGuid = JwtUtil.GetLoginUser(App.HttpContext).UserId;
|
||||||
var res = await _TableDataServiceApi.GetTableDataDetails(parm);
|
var res = await _TableDataServiceApi.GetTableDataDetails(parm);
|
||||||
|
|
||||||
if (res != "[]")
|
if (res != "[]")
|
||||||
@ -75,5 +77,46 @@ namespace ARW.WebApi.Controllers.Api.TableDataManage.TableDatas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取涉及产品类别列表(Api)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getProductsInvolvedList")]
|
||||||
|
public async Task<IActionResult> GetProductsInvolvedList([FromQuery] TableDataQueryDtoApi parm)
|
||||||
|
{
|
||||||
|
var res = await _TableDataServiceApi.GetProductsInvolvedList(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("follow")]
|
||||||
|
public async Task<IActionResult> Follow([FromBody] TableDataDtoApi parm)
|
||||||
|
{
|
||||||
|
//if (parm == null) throw new CustomException("参数错误!");
|
||||||
|
parm.CustomerGuid = JwtUtil.GetLoginUser(App.HttpContext).UserId;
|
||||||
|
var res = await _TableDataServiceApi.Follow(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取消关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("cancelfollow")]
|
||||||
|
public async Task<IActionResult> CancelFollow([FromBody] TableDataDtoApi parm)
|
||||||
|
{
|
||||||
|
//if (parm == null) throw new CustomException("参数错误!");
|
||||||
|
parm.CustomerGuid = JwtUtil.GetLoginUser(App.HttpContext).UserId;
|
||||||
|
var res = await _TableDataServiceApi.CancelFollow(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
using Infrastructure;
|
||||||
|
using Infrastructure.Attribute;
|
||||||
|
using Infrastructure.Enums;
|
||||||
|
using Infrastructure.Model;
|
||||||
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using ARW.Admin.WebApi.Extensions;
|
||||||
|
using ARW.Admin.WebApi.Filters;
|
||||||
|
using ARW.Common;
|
||||||
|
using ARW.Model.Dto.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Service.Business.IBusinessService.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Admin.WebApi.Controllers;
|
||||||
|
using ARW.Model.Models.Business.TableDataManage.CustomerFollows;
|
||||||
|
using ARW.Model.Vo.Business.TableDataManage.CustomerFollows;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using ARW.Admin.WebApi.Framework;
|
||||||
|
|
||||||
|
|
||||||
|
namespace ARW.WebApi.Controllers.Business.TableDataManage.CustomerFollows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 客户关注控制器
|
||||||
|
///
|
||||||
|
/// @author lwh
|
||||||
|
/// @date 2023-11-24
|
||||||
|
/// </summary>
|
||||||
|
[Verify]
|
||||||
|
[Route("business/[controller]")]
|
||||||
|
public class CustomerFollowController : BaseController
|
||||||
|
{
|
||||||
|
private readonly ICustomerFollowService _CustomerFollowService;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 依赖注入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="CustomerFollowService">客户关注服务</param>
|
||||||
|
public CustomerFollowController(ICustomerFollowService CustomerFollowService)
|
||||||
|
{
|
||||||
|
_CustomerFollowService = CustomerFollowService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取客户关注列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm">查询参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getCustomerFollowList")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:customerfollow:list")]
|
||||||
|
public async Task<IActionResult> GetCustomerFollowList([FromQuery] CustomerFollowQueryDto parm)
|
||||||
|
{
|
||||||
|
var res = await _CustomerFollowService.GetCustomerFollowList(parm);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或修改客户关注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("addOrUpdateCustomerFollow")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:customerfollow:addOrUpdate")]
|
||||||
|
[Log(Title = "添加或修改客户关注", BusinessType = BusinessType.ADDORUPDATE)]
|
||||||
|
public async Task<IActionResult> AddOrUpdateCustomerFollow([FromBody] CustomerFollowDto parm)
|
||||||
|
{
|
||||||
|
if (parm == null) { throw new CustomException("请求参数错误"); }
|
||||||
|
|
||||||
|
var modal = new CustomerFollow();
|
||||||
|
if (parm.CustomerFollowId != 0) modal = parm.Adapt<CustomerFollow>().ToUpdate(HttpContext);
|
||||||
|
else modal = parm.Adapt<CustomerFollow>().ToCreate(HttpContext);
|
||||||
|
|
||||||
|
var res = await _CustomerFollowService.AddOrUpdateCustomerFollow(modal);
|
||||||
|
return SUCCESS(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除客户关注
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpDelete("{ids}")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:customerfollow:delete")]
|
||||||
|
[Log(Title = "客户关注删除", BusinessType = BusinessType.DELETE)]
|
||||||
|
public IActionResult Delete(string ids)
|
||||||
|
{
|
||||||
|
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||||
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||||
|
var response = _CustomerFollowService.Delete(idsArr);
|
||||||
|
return SUCCESS("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -132,7 +132,7 @@ namespace ARW.WebApi.Controllers.Business.TableDataManage.TableDatas
|
|||||||
MemoryStream stream = new MemoryStream();
|
MemoryStream stream = new MemoryStream();
|
||||||
|
|
||||||
// 示例数据
|
// 示例数据
|
||||||
var values = new List<string>() { "房产,人工智能", "渤银理财理财分销对接代销系统采购项目", "渤银理财有限责任公司", "竞争性采购", "北京开科唯识技术股份有限公司", "总价", "https://www.jianyu360.cn/nologin/content/ABCY1xGZCkFAjg6RHt3cFxbCzMCEjJ3XGB1Kw4ZKDogcFFzcz9UCaI=.html", "22/11/2023", "23/11/2023", "北京开科唯识技术股份有限公司","31926", "是", "否", "是", "是", "", "渤银理财理财分销对接代销系统采购项目成交公示 受渤海银行股份有限公司委托,金采联合(北京)招标有限公司于2022年8月4日以竞争性采购方式,对渤银理财理财分销对接代销系统采购项目(项目编号:FUTC-2022-H031B)组织了采购。现将成交供应商公布如下:北京开科唯识技术股份有限公司为成交供应商。公示期限:自2022年8月22日至2022年8月24日采购代理机构:金采联合(北京)招标有限公司联系地址:北京市西城区佟麟阁路95号尚信大厦联系人:刘世平、刘松樵、谭永江代理机构联系方式:13682015217、16622986307、010-51813597特此公告金采联合(北京)招标有限公司2022年8月19日", "100" };
|
var values = new List<string>() { "房产,人工智能", "22/11/2023", "渤银理财有限责任公司", "北京开科唯识技术股份有限公司", "渤银理财理财分销对接代销系统采购项目", "竞争性采购", "是", "否", "是", "", "是", "31926", "北京开科唯识技术股份有限公司", "", "总价", "https://www.jianyu360.cn/nologin/content/ABCY1xGZCkFAjg6RHt3cFxbCzMCEjJ3XGB1Kw4ZKDogcFFzcz9UCaI=.html", "渤银理财理财分销对接代销系统采购项目成交公示 受渤海银行股份有限公司委托,金采联合(北京)招标有限公司于2022年8月4日以竞争性采购方式,对渤银理财理财分销对接代销系统采购项目(项目编号:FUTC-2022-H031B)组织了采购。现将成交供应商公布如下:北京开科唯识技术股份有限公司为成交供应商。公示期限:自2022年8月22日至2022年8月24日采购代理机构:金采联合(北京)招标有限公司联系地址:北京市西城区佟麟阁路95号尚信大厦联系人:刘世平、刘松樵、谭永江代理机构联系方式:13682015217、16622986307、010-51813597特此公告金采联合(北京)招标有限公司2022年8月19日", "30/11/2023", "100" };
|
||||||
string sFileName = DownloadImportTemplate(TableData, stream, "表格数据导入模板", values);
|
string sFileName = DownloadImportTemplate(TableData, stream, "表格数据导入模板", values);
|
||||||
|
|
||||||
return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}");
|
return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}");
|
||||||
|
Loading…
Reference in New Issue
Block a user