123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- using FluentValidation;
- using OASystem.Domain.Dtos.System;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Globalization;
- using OASystem.Domain.ViewModels.Groups;
- namespace OASystem.Domain.Dtos.Statistics
- {
- public class MarketingSalesUserPageFuncDtoBase
- {
- /// <summary>
- /// 请求端口分类
- /// 1 Web 2 Android 3 IOS
- /// </summary>
- public int PortType { get; set; } = 1;
- /// <summary>
- /// 用户Id
- /// </summary>
- public int UserId { get; set; }
- /// <summary>
- /// 页面Id
- /// </summary>
- public int PageId { get; set; } = 180;
- }
- public class MarketingSalesUserPageFuncDtoBaseFoalidator : AbstractValidator<MarketingSalesUserPageFuncDtoBase>
- {
- public MarketingSalesUserPageFuncDtoBaseFoalidator()
- {
- RuleFor(it => it.PortType).InclusiveBetween(1,3).WithMessage(MsgTips.Port);
- RuleFor(it => it.UserId).GreaterThan(1).WithMessage(MsgTips.UserId);
- RuleFor(it => it.PageId).GreaterThan(1).WithMessage(MsgTips.PageId);
- }
- }
- /// <summary>
- /// 市场部销售额 Dto
- /// </summary>
- public class MarketingSalesDto { }
- /// <summary>
- /// 市场部销售额
- /// 市场部人员列表
- /// Dto
- /// </summary>
- public class MarketingSalesInitDataDto : MarketingSalesUserPageFuncDtoBase { }
- public class MarketingSalesInitDataDtoFoalidator : AbstractValidator<MarketingSalesInitDataDto>
- {
- public MarketingSalesInitDataDtoFoalidator()
- {
- Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
- }
- }
- /// <summary>
- /// 市场部销售额
- /// 年度/季度/月度 报表
- /// </summary>
- public class MarketingSalesStatisticsDto : MarketingSalesUserPageFuncDtoBase
- {
- /// <summary>
- /// 公司Id
- /// </summary>
- public int CompanyId { get; set; }
- /// <summary>
- /// 接团人Id
- /// </summary>
- public int GroupPickupUserId { get; set; }
- public string BeginDt { get; set; }
- public string EndDt { get; set; }
- }
- public class MarketingSalesStatisticsDtoFoalidator : AbstractValidator<MarketingSalesStatisticsDto>
- {
- public MarketingSalesStatisticsDtoFoalidator()
- {
- Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
- RuleFor(it => it.BeginDt)
- .Must(dateString => DateTime.TryParse(dateString, out _))
- .WithMessage("请输入有效开始的日期");
- RuleFor(it => it.EndDt)
- .Must(dateString => DateTime.TryParse(dateString, out _))
- .WithMessage("请输入有效结束的日期");
- }
- }
- /// <summary>
- /// 市场部销售额
- /// 团组列表
- /// </summary>
- public class MarketingSalesGroupListDto : MarketingSalesStatisticsDto {
- public int PageIndex { get; set; } = 1;
- public int PageSize { get; set; } = 10;
- public string SearchCriteria { get; set; }
- }
- /// <summary>
- /// 市场部销售额
- /// 客户类型、客户等级 统计
- /// </summary>
- public class MarketingSalesGroupStatisticsDto : MarketingSalesStatisticsDto
- {
- /// <summary>
- /// 图形统计类型
- /// 1 客户类型 2 客户等级
- /// </summary>
- public int StatisticsType { get; set; } = 1;
- }
- /// <summary>
- /// 市场部销售额
- /// 接单排名
- /// </summary>
- public class MarketingSalesOrderRankingDto : MarketingSalesStatisticsDto
- {
- public int PageIndex { get; set; } = 1;
- public int PageSize { get; set; } = 5;
- }
- public class MarketingSalesVCListDto: MarketingSalesUserPageFuncDtoBase
- {
- public int PageIndex { get; set; } = 1;
- public int PageSize { get; set; } = 10;
- public int DiId { get; set; }
- public string Search { get; set; }
- }
- public class MarketingSalesVCOperrateDto : MarketingSalesUserPageFuncDtoBase
- {
- /// <summary>
- /// opearate 时
- /// Id > 0 修改
- /// Id < 1 添加
- /// </summary>
- public int Id { get; set; }
- /// <summary>diid
- /// </summary>
- public int DiId { get; set; }
- /// <summary>
- /// 拜访时间 - 开始
- /// </summary>
- public string BeginDt { get; set; }
- /// <summary>
- /// 拜访时间 - 结束
- /// </summary>
- public string EndDt { get; set; }
- /// <summary>
- /// 客户单位
- /// </summary>
- public string CustomerUnit { get; set; }
- /// <summary>
- /// 客户工作
- /// </summary>
- public string CustomerJob { get; set; }
- /// <summary>
- /// 客户姓名
- /// </summary>
- public string CustomerName { get; set; }
- /// <summary>
- /// 客户联系方式
- /// </summary>
- public string CustomerContact { get; set; }
- /// <summary>
- /// 拜访内容
- /// </summary>
- public string Remark { get; set; }
- }
- public class MarketingSalesVCSaveDto: MarketingSalesUserPageFuncDtoBase
- {
- public int DiId { get; set; }
- public List<VisitingClientsListView> Items { get; set; }
- }
- public class MarketingSalesVCDelDto
- {
- public int UserId { get; set; }
- public int Id { get; set; }
- }
- #region YOY-Dto
- public class YOYDto
- {
- public int Year { get; set; }
- }
- #endregion
- public class StatisticsOPDto
- {
- public int Year { get; set; }
- /// <summary>
- /// 1 年、2 月
- /// </summary>
- public int Type { get; set; }
- }
- public class StatisticsBRCostDto : DtoBase
- {
- public int Year { get; set; }
- public string Search { get; set; }
- }
- public class StatisticsNowCityOfGroupDto : PortDtoBase
- {
- /// <summary>
- /// 当前时间
- /// </summary>
- public string Now { get; set; }
- }
- }
|