Merge branch 'v1.0.5' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api into v1.0.5
This commit is contained in:
97
src/WMS.Web.Domain/Entitys/SubscribeNotification.cs
Normal file
97
src/WMS.Web.Domain/Entitys/SubscribeNotification.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
|
||||
namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 订阅通知信息
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[Table("t_wms_subscribe_notification")]
|
||||
public class SubscribeNotification : EntityBase
|
||||
{
|
||||
public SubscribeNotification() { }
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column("Id")]
|
||||
public override int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 客户名称
|
||||
/// </summary>
|
||||
[Column("CustomerName")]
|
||||
public string CustomerName { get; set; }
|
||||
/// <summary>
|
||||
/// 客户编码
|
||||
/// </summary>
|
||||
[Column("CustomerNumber")]
|
||||
public string CustomerNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
[Column("Telephones")]
|
||||
public List<string> Telephones { get; set; }
|
||||
/// <summary>
|
||||
/// 邮件
|
||||
/// </summary>
|
||||
[Column("Emails")]
|
||||
public List<string> Emails { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
/// </summary>
|
||||
[Column("IsDelete")]
|
||||
public bool IsDelete { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Column("CreatorId")]
|
||||
public int CreatorId { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
[Column("OperateId")]
|
||||
public int OperateId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column("CreateTime")]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
/// <summary>
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
[Column("OperateTime")]
|
||||
public DateTime OperateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// </summary>
|
||||
/// <param name="creatorId"></param>
|
||||
public void Create(int creatorId)
|
||||
{
|
||||
this.CreatorId = creatorId;
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="operateId"></param>
|
||||
public void Edit(int operateId)
|
||||
{
|
||||
this.OperateId = operateId;
|
||||
this.OperateTime = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="operateId"></param>
|
||||
public void Delete(int operateId)
|
||||
{
|
||||
this.IsDelete = true;
|
||||
this.OperateId = operateId;
|
||||
this.OperateTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto.SubscribeNotification;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
|
||||
namespace WMS.Web.Domain.Infrastructure
|
||||
{
|
||||
/// <summary>
|
||||
/// 订阅通知
|
||||
/// </summary>
|
||||
public interface ISubscribeNotificationRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据客户名称和客户编码验重
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="number"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> IsExist(string name, string number);
|
||||
/// <summary>
|
||||
/// 获取订阅通知
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<SubscribeNotification> Get(int id);
|
||||
/// <summary>
|
||||
/// 获取订阅通知
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SubscribeNotification>> GetList(List<int> ids = null);
|
||||
// 新增
|
||||
Task<SubscribeNotification> Add(SubscribeNotification entity, bool isTransaction = true);
|
||||
// 修改
|
||||
Task<SubscribeNotification> Edit(SubscribeNotification entity, bool isTransaction = true);
|
||||
// 批量修改
|
||||
Task<bool> EditList(List<SubscribeNotification> entitys, bool isTransaction = true);
|
||||
// 获取列表
|
||||
Task<(List<SubscribeNotificationQueryInfoResponse> list, int total)> GetListAsync(SubscribeNotificationQueryRequest dto, int companyId = 0);
|
||||
}
|
||||
}
|
||||
22
src/WMS.Web.Domain/Mappers/SubscribeNotificationMapper.cs
Normal file
22
src/WMS.Web.Domain/Mappers/SubscribeNotificationMapper.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using WMS.Web.Core.Dto.SubscribeNotification;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
|
||||
namespace WMS.Web.Domain.Mappers
|
||||
{
|
||||
/// <summary>
|
||||
/// 订阅通知
|
||||
/// </summary>
|
||||
public class SubscribeNotificationMapper : Profile
|
||||
{
|
||||
public SubscribeNotificationMapper()
|
||||
{
|
||||
CreateMap<SubscribeNotification, SubscribeNotification>();
|
||||
CreateMap<SaveSubscribeNotificationRequest, SubscribeNotification>();
|
||||
CreateMap<EditSubscribeNotificationRequest, SubscribeNotification>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,5 +85,7 @@ namespace WMS.Web.Domain.Values
|
||||
public static ValueTuple<int, string> TakeStockStockError = (610001, "一次不能盘多个仓库");
|
||||
public static ValueTuple<int, string> TakeStockErpSubStockError = (610005, "HD或GD仓时子仓库必填");
|
||||
public static ValueTuple<int, string> TakeStockBoxError = (610004, "一次只能盘一个箱");
|
||||
|
||||
public static ValueTuple<int, string> SubscribeNotificationNoData = (700001, "订阅通知信息不存在");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user