Commit eb599e97 authored by wzxco's avatar wzxco
Browse files

服务类型接口字段格式调整

1 merge request!31服务类型接口字段格式调整
Pipeline #9627 passed with stage
in 3 minutes and 15 seconds
......@@ -35,6 +35,23 @@ namespace Business
{
var query = _billService.QueryStudioBills(param);
var pagedresult = await query.OrderByDescending(q => q.SettleTime).ToSDPagerAsync(param.PageIndex, param.PageSize);
if (pagedresult.Items?.Any() ?? false)
{
var contents = _billService.GetContents(pagedresult.Items.Select(i => i.GroupID).ToList());
foreach (var item in pagedresult.Items)
{
item.ServiceContent = contents
.Where(e => e.GroupID == item.GroupID)
.Select(e => new ServiceBilldetailDTO
{
GroupID = e.GroupID,
BillDetail = e.BillDetail ?? "",
BillDetailID = e.BillDetailID ?? 0,
Money = e.SettlementMoney,
ServiceType = e.ServiceType,
}).ToList();
}
}
return pagedresult;
}
......
......@@ -50,6 +50,7 @@ namespace Context
public DbSet<Msg_Notify> Msg_Notify { get; set; }
public DbSet<CPM_Settle> CPM_Settle { get; set; }
public DbSet<CPM_SettleDetail> CPM_SettleDetail { get; set; }
public DbSet<CPM_SettleContent> CPM_SettleContent { get; set; }
public DbSet<AreaConfig> AreaConfig { get; set; }
public DbSet<TB_FDDSign> TB_FDDSign { get; set; }
#endregion
......
......@@ -25,6 +25,10 @@ namespace Entity
/// </summary>
public string Name { get; set; }
/// <summary>
/// 结算订单数
/// </summary>
public int Count { get; set; }
/// <summary>
/// 0待发 1已发
/// </summary>
public int Status { get; set; }
......@@ -37,9 +41,17 @@ namespace Entity
/// </summary>
public string ClientID { get; set; }
/// <summary>
/// 服务类型
/// </summary>
public string ServiceTypes { get; set; }
/// <summary>
/// 结算状态回调通知地址
/// </summary>
public string NotifyUrl { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
[Table("cpm_settledetail")]
public class CPM_SettleDetail : AuditEntityBase
......@@ -69,42 +81,106 @@ namespace Entity
/// 工作室名
/// </summary>
public string PersonCompanyName { get; set; }
#region 服务类型不固定 根据settlecontent中内容判断
///// <summary>
///// 客户服务金额
///// </summary>
//public decimal CustomerServiceMoney { get; set; }
///// <summary>
///// 客户服务开票科目ID
///// </summary>
//public int CustomerServiceBillDetailID { get; set; }
///// <summary>
///// 客户服务开票科目
///// </summary>
//public string CustomerServiceBillDetail { get; set; }
///// <summary>
///// 营销服务金额
///// </summary>
//public decimal MarketingServiceMoney { get; set; }
///// <summary>
///// 营销服务开票科目ID
///// </summary>
//public int MarketingServiceBillDetailID { get; set; }
///// <summary>
///// 营销服务开票科目
///// </summary>
//public string MarketingServiceBillDetail { get; set; }
///// <summary>
///// 市场推广服务金额
///// </summary>
//public decimal MarketingExpansionMoney { get; set; }
///// <summary>
///// 市场推广服务开票科目ID
///// </summary>
//public int MarketingExpansionBillDetailID { get; set; }
///// <summary>
///// 市场推广服务开票科目
///// </summary>
//public string MarketingExpansionBillDetail { get; set; }
#endregion
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
/// <summary>
/// 结算确认的内容
/// </summary>
[Table("cpm_settlecontent")]
public class CPM_SettleContent
{
/// <summary>
/// 客户服务金额
/// ID
/// </summary>
public decimal CustomerServiceMoney { get; set; }
[Key]
public string ID { get; set; }
/// <summary>
/// cpm结算单id
/// </summary>
public string GroupID { get; set; }
/// <summary>
/// 客户服务开票科目ID
/// 客户
/// </summary>
public int CustomerServiceBillDetailID { get; set; }
public string CustomerName { get; set; }
/// <summary>
/// 客户服务开票科目
/// 服务时间
/// </summary>
public string CustomerServiceBillDetail { get; set; }
public string ServiceTime { get; set; }
/// <summary>
/// 营销服务金额
/// 服务项目
/// </summary>
public decimal MarketingServiceMoney { get; set; }
public string ServiceProject { get; set; }
/// <summary>
/// 营销服务开票科目ID
/// 业绩金额
/// </summary>
public int MarketingServiceBillDetailID { get; set; }
public decimal BusinessMoney { get; set; }
/// <summary>
/// 营销服务开票科目
/// 医院名
/// </summary>
public string MarketingServiceBillDetail { get; set; }
public string HospitalName { get; set; }
/// <summary>
/// 市场推广服务金额
/// 服务类型
/// </summary>
public decimal MarketingExpansionMoney { get; set; }
public string ServiceType { get; set; }
/// <summary>
/// 市场推广服务开票科目ID
/// 结算金额
/// </summary>
public int MarketingExpansionBillDetailID { get; set; }
public decimal SettlementMoney { get; set; }
/// <summary>
/// 市场推广服务开票科目
/// 开票科目ID
/// </summary>
public string MarketingExpansionBillDetail { get; set; }
public int? BillDetailID { get; set; }
/// <summary>
/// 开票科目
/// </summary>
public string BillDetail { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}
......@@ -25,11 +25,13 @@ namespace Entity
/// <summary>
/// 订单号(增值费用为需求编号、其它为报名编号),多个逗号隔开
/// </summary>
[Required]
public string OrderID { get; set; }
/// <summary>
/// 用户编号
/// </summary>
[Required]
public string UserID { get; set; }
/// <summary>
/// 预约服务的工作室ID
......@@ -43,11 +45,16 @@ namespace Entity
/// 申请模式.单张0,组合申请1
/// </summary>
public int ApplyType { get; set; }
/// <summary>
/// 发票抬头
/// </summary>
public string LetterHead { get; set; }
/// <summary>
/// 是否多科目
/// </summary>
public bool IsMultiBillDetail { get; set; }
/// <summary>
/// 开票科目编号
/// </summary>
public int BillDetailID { get; set; }
......@@ -131,6 +138,10 @@ namespace Entity
/// </summary>
public string BillNo { get; set; }
/// <summary>
/// 发票数
/// </summary>
public int BillCount { get; set; }
/// <summary>
/// 公司名称
/// </summary>
public string CompanyName { get; set; }
......@@ -190,7 +201,7 @@ namespace Entity
/// <summary>
/// 税收缴款书国现编号
/// </summary>
public string NTaxNo { get; set; }
public string NTaxNo { get; set; }
/// <summary>
/// 金额
/// </summary>
......@@ -310,7 +321,7 @@ namespace Entity
/// <summary>
/// 完税凭证快递公司
/// </summary>
public string ZkTrackingCompany { get; set; }
public string ZkTrackingCompany { get; set; }
/// <summary>
/// 完税凭证快递单号
/// </summary>
......@@ -348,6 +359,52 @@ namespace Entity
/// 付款凭证通过时间
/// </summary>
public DateTime? CredCheckedTime { get; set; }
public string OpenRemark { get; set; }
public string ExamineRemark { get; set; }
public string OANumber { get; set; }
/// <summary>
/// 开票状态 0全部(默认),1正常,2自动开票中,3自动开票失败,4暂停中,5延期中
/// </summary>
public int BillKpState { get; set; }
/// <summary>
/// 延期到期时间
/// </summary>
public string StopTime { get; set; }
/// <summary>
/// 需求编号/服务编号
/// </summary>
public string XqID { get; set; }
/// <summary>
/// 需求名称/服务名称 匹配XqID
/// </summary>
public string XQTitle { get; set; }
/// <summary>
/// 订单生成源(合作模式).0-优客宝、1-优财宝派发、2-智客服务、3-优财宝长期、4-平台宝、5-企业智客宝、6-智客宝、7-畅通宝
/// </summary>
public int BuiltFrom { get; set; }
/// <summary>
/// 智客姓名
/// </summary>
public string ZKName { get; set; }
/// <summary>
/// 工作室名
/// </summary>
public string PCName { get; set; }
/// <summary>
/// 取消开票待处理
/// </summary>
public bool CancelBillWaitProcess { get; set; }
/// <summary>
/// 发票是否下载
/// </summary>
public bool IsInvoiceDL { get; set; }
/// <summary>
/// BY定制——超免税额度开专票
/// </summary>
public bool? BYzp { get; set; }
}
......
......@@ -295,10 +295,6 @@ namespace Entity
/// </summary>
public string PCID { get; set; }
/// <summary>
/// 工作室名
/// </summary>
public string PCName { get; set; }
/// <summary>
/// 开票时间
/// </summary>
public DateTime? BillTime { get; set; }
......@@ -323,6 +319,10 @@ namespace Entity
/// </summary>
public int? BillProperty { get; set; }
/// <summary>
/// 是否多科目
/// </summary>
public bool IsMultiBillDetail { get; set; }
/// <summary>
/// 开票科目编号
/// </summary>
public int BillDetailID { get; set; }
......@@ -359,6 +359,10 @@ namespace Entity
/// </summary>
public int IsApprovalPayment { get; set; }
/// <summary>
/// 是否需要生成新的合同
/// </summary>
public int IsNeedNewHetong { get; set; }
/// <summary>
/// 是否审核通过工作成果 票务宝使用
/// </summary>
public int IsApprovalWorkFile { get; set; }
......@@ -505,10 +509,37 @@ namespace Entity
/// </summary>
public int? RiskSendMsg { get; set; }
/// <summary>
/// 智客姓名
/// </summary>
public string ZKName { get; set; }
/// <summary>
/// 工作室名
/// </summary>
public string PCName { get; set; }
/// <summary>
/// 需求名称/服务名称 匹配XqID
/// </summary>
public string XQTitle { get; set; }
/// <summary>
/// 派发批次号,标识同批次处理的派发
/// </summary>
public string XQBatchNo { get; set; }
/// <summary>
/// 派发批次号,标识同批次处理的派发(备注)
/// </summary>
public string XQBatchNoRemark { get; set; }
/// <summary>
/// 关闭原因
/// </summary>
public string CloseReason { get; set; }
/// <summary>
/// 详见SignUpCloseStatus枚举
/// </summary>
public string CloseReasonStatus { get; set; }
/// <summary>
/// CPM/美稻AI结算名单ID
/// </summary>
public string SettleDetailID { get; set; }
}
[Table("tb_signupwaittransfer")]
......
......@@ -2185,54 +2185,64 @@
开票金额
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.CustomerServiceMoney">
<member name="P:Model.Params.GetStudioBillsResult.BillStatus">
<summary>
客户服务金额
发票状态 1未开票 2已开票
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.CustomerServiceBillDetail">
<member name="P:Model.Params.GetStudioBillsResult.BillType">
<summary>
客户服务开票科目
发票类型1普票 2专票
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.MarketingServiceMoney">
<member name="P:Model.Params.GetStudioBillsResult.SettleTime">
<summary>
营销服务金额
开票时间
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.MarketingServiceBillDetail">
<member name="P:Model.Params.GetStudioBillsResult.BillPic">
<summary>
营销服务开票科目
发票文件
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.MarketingExpansionMoney">
<member name="P:Model.Params.GetStudioBillsResult.GroupID">
<summary>
市场推广服务金额
结算对象ID
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.MarketingExpansionBillDetail">
<member name="P:Model.Params.GetStudioBillsResult.ServiceContent">
<summary>
市场推广服务开票科目
服务内容
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.BillStatus">
<member name="T:Model.Params.ServiceBilldetailDTO">
<summary>
发票状态 1未开票 2已开票
服务类型对应开票科目
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.BillType">
<member name="P:Model.Params.ServiceBilldetailDTO.GroupID">
<summary>
发票类型1普票 2专票
结算对象ID
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.SettleTime">
<member name="P:Model.Params.ServiceBilldetailDTO.ServiceType">
<summary>
开票时间
服务类型
</summary>
</member>
<member name="P:Model.Params.GetStudioBillsResult.BillPic">
<member name="P:Model.Params.ServiceBilldetailDTO.BillDetailID">
<summary>
发票文件
开票科目ID
</summary>
</member>
<member name="P:Model.Params.ServiceBilldetailDTO.BillDetail">
<summary>
开票科目
</summary>
</member>
<member name="P:Model.Params.ServiceBilldetailDTO.Money">
<summary>
金额
</summary>
</member>
<member name="P:Model.Params.PersonCompanyDetailsParam.CompanyId">
......
......@@ -30,7 +30,7 @@
"AllowedHosts": "*",
"ConnectionStrings": {
"X3": "data source=rm-uf6mi8fs754vdbvx9.mysql.rds.aliyuncs.com;port=3306;Initial Catalog=x3_testnew;uid=shoudao;pwd=606f778bUl4l6I#buy;Charset=utf8mb4",
"X3": "data source=rm-uf6mi8fs754vdbvx9go.mysql.rds.aliyuncs.com;port=3306;Initial Catalog=x3_testnew;uid=shoudao;pwd=606f778bUl4l6I#buy;Charset=utf8mb4",
"RedisServers": "r-uf60440coh2nh66ryi.redis.rds.aliyuncs.com:6379,password=b=@Su2dra53fp4_#k$0n,defaultDatabase=9,connectTimeout=1000,connectRetry=1,syncTimeout=10000"
},
......
......@@ -74,51 +74,83 @@ namespace Model.Params
/// </summary>
public decimal Money { get; set; }
///// <summary>
///// 客户服务金额
///// </summary>
//public decimal CustomerServiceMoney { get; set; }
///// <summary>
///// 客户服务开票科目
///// </summary>
//public string CustomerServiceBillDetail { get; set; }
///// <summary>
///// 营销服务金额
///// </summary>
//public decimal MarketingServiceMoney { get; set; }
///// <summary>
///// 营销服务开票科目
///// </summary>
//public string MarketingServiceBillDetail { get; set; }
///// <summary>
///// 市场推广服务金额
///// </summary>
//public decimal MarketingExpansionMoney { get; set; }
///// <summary>
///// 市场推广服务开票科目
///// </summary>
//public string MarketingExpansionBillDetail { get; set; }
/// <summary>
/// 客户服务金额
/// 发票状态 1未开票 2已开票
/// </summary>
public decimal CustomerServiceMoney { get; set; }
public int BillStatus { get; set; }
/// <summary>
/// 客户服务开票科目
/// 发票类型1普票 2专票
/// </summary>
public string CustomerServiceBillDetail { get; set; }
public int? BillType { get; set; }
/// <summary>
/// 营销服务金额
/// 开票时间
/// </summary>
public decimal MarketingServiceMoney { get; set; }
public DateTime? SettleTime { get; set; }
/// <summary>
/// 营销服务开票科目
/// 发票文件
/// </summary>
public string MarketingServiceBillDetail { get; set; }
public string BillPic { get; set; }
/// <summary>
/// 市场推广服务金额
/// 结算对象ID
/// </summary>
public decimal MarketingExpansionMoney { get; set; }
public string GroupID { get; set; }
/// <summary>
/// 市场推广服务开票科目
/// 服务内容
/// </summary>
public string MarketingExpansionBillDetail { get; set; }
public List<ServiceBilldetailDTO> ServiceContent { get; set; }
}
/// <summary>
/// 服务类型对应开票科目
/// </summary>
public class ServiceBilldetailDTO
{
/// <summary>
/// 发票状态 1未开票 2已开票
/// 结算对象ID
/// </summary>
public int BillStatus { get; set; }
public string GroupID { get; set; }
/// <summary>
/// 发票类型1普票 2专票
/// 服务类型
/// </summary>
public int? BillType { get; set; }
public string ServiceType { get; set; }
/// <summary>
/// 开票时间
/// 开票科目ID
/// </summary>
public DateTime? SettleTime { get; set; }
public int BillDetailID { get; set; }
/// <summary>
/// 发票文件
/// 开票科目
/// </summary>
public string BillPic { get; set; }
public string BillDetail { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Money { get; set; }
}
}
......@@ -18,8 +18,10 @@ namespace Service
private IRepository<TB_BillDetail> _billDetailRepository;
private IRepository<TB_Xq_BatchList> _xqbatchlistRepository;
private IRepository<CPM_SettleDetail> _settledetailRepository;
private IRepository<CPM_SettleContent> _settlecontentRepository;
public BillService(IUnitOfWork unitOfWork, IRepository<TB_Bill> billRepository, IRepository<TB_BillDetail> billDetailRepository,
IRepository<TB_Xq_BatchList> xqbatchlistRepository, IRepository<TB_SignUp> signupRepository, IRepository<CPM_SettleDetail> settledetailRepository)
IRepository<TB_Xq_BatchList> xqbatchlistRepository, IRepository<TB_SignUp> signupRepository,
IRepository<CPM_SettleDetail> settledetailRepository, IRepository<CPM_SettleContent> settlecontentRepository)
{
_unitOfWork = unitOfWork;
_billRepository = billRepository;
......@@ -27,6 +29,7 @@ namespace Service
_xqbatchlistRepository = xqbatchlistRepository;
_signupRepository = signupRepository;
_settledetailRepository = settledetailRepository;
_settlecontentRepository = settlecontentRepository;
}
public async Task<TB_Bill?> GetBill(string orderid)
......@@ -77,13 +80,16 @@ namespace Service
BillType = b.BillType,
CompanyName = s.CompanyName,
CompanyUserID = s.CompanyId,
CustomerServiceBillDetail = sd.CustomerServiceBillDetail,
CustomerServiceMoney = sd.CustomerServiceMoney,
MarketingExpansionBillDetail = sd.MarketingExpansionBillDetail,
MarketingExpansionMoney = sd.MarketingExpansionMoney,
MarketingServiceBillDetail = sd.MarketingServiceBillDetail,
MarketingServiceMoney = sd.MarketingServiceMoney,
////CustomerServiceBillDetail = sd.CustomerServiceBillDetail,
////CustomerServiceMoney = sd.CustomerServiceMoney,
////MarketingExpansionBillDetail = sd.MarketingExpansionBillDetail,
////MarketingExpansionMoney = sd.MarketingExpansionMoney,
////MarketingServiceBillDetail = sd.MarketingServiceBillDetail,
////MarketingServiceMoney = sd.MarketingServiceMoney,
Money = b.Money,
GroupID = sd.GroupID
};
if (param.CompanyUserIDs != null && param.CompanyUserIDs.Any())
{
......@@ -121,5 +127,15 @@ namespace Service
return query;
}
/// <summary>
/// 查询服务内容
/// </summary>
/// <param name="groupids"></param>
/// <returns></returns>
public List<CPM_SettleContent> GetContents(List<string> groupids)
{
return _settlecontentRepository.Entities.Where(c => groupids.Contains(c.GroupID)).ToList();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment