/// <summary>
 /// 初始化一个<see cref="SupBasedataOutputDto"/>类型的新实例
 /// </summary>
 public SupBasedataOutputDto(SupBasedata entity)
 {
     Id              = entity.Id;
     SupPhone        = entity.SupPhone;
     SupName         = entity.SupName;
     SupId           = entity.SupId;
     SupComStartTime = entity.SupComStartTime;
     SupComEndTime   = entity.SupComEndTime;
     SupState        = entity.SupState;
     SupRemark       = entity.SupRemark;
     CreatedTime     = entity.CreatedTime;
 }
Esempio n. 2
0
        /// <summary>
        /// 添加入库信息
        /// </summary>
        /// <param name="dtos">要添加的入库信息DTO信息</param>
        /// <returns>业务操作结果</returns>
        public virtual async Task <OperationResult> CreateInStors(params InStorInputDto[] dtos)
        {
            Check.Validate <InStorInputDto, int>(dtos, nameof(dtos));
            //通过ID新增Name

            foreach (InStorInputDto dto in dtos)
            {
                MatBasedata matdb = await MatBasedataRepository.GetAsync(dto.MatId);

                SupBasedata supdb = await SupBasedataRepository.GetAsync(dto.SupId);

                dto.MatName = matdb.MatName;
                dto.SupName = supdb.SupName;
            }

            return(await InStorRepository.InsertAsync(dtos));
        }