Exemple #1
0
 public IHttpActionResult GetSaleRmaByPack([FromUri] PackageReceiveRequest dto, [UserId] int uid = 0)
 {
     return(DoFunction(() =>
     {
         _saleRmaService.UserId = uid;
         return _saleRmaService.GetByPack(dto);
     }, "查询退货收货单信息失败!"));
 }
        /// <summary>
        /// Gets all pack verify.
        /// </summary>
        /// <param name="dto">The dto.</param>
        /// <returns>PageResult{RMADto}.</returns>
        public PageResult <RMADto> GetAllPackVerify(PackageReceiveRequest dto)
        {
            dto.StartDate = dto.StartDate.Date;
            dto.EndDate   = dto.EndDate.Date.AddDays(1);
            var rep = (IRMARepository)_repository;

            rep.SetCurrentUser(_accountService.GetByUserID(UserId));
            PageResult <RMADto> lst = rep.GetAll(dto.OrderNo, dto.SaleOrderNo, dto.StartDate, dto.EndDate, EnumRMAStatus.ShipReceive.AsId(), EnumReturnGoodsStatus.NoProcess, dto.pageIndex, dto.pageSize);

            return(lst);
        }
Exemple #3
0
        public IHttpActionResult GetRmaByPack([FromUri] PackageReceiveRequest dto, [UserId] int uid, [UserProfile] UserProfile userProfile)
        {
            _rmaService.UserId = uid;
            return(DoFunction(() => { return _rmaService.GetAll(dto); }, "查询退货单失败!"));
            // 注意 LEFT JOIN
            //var request = Mapper.Map<PackageReceiveRequest, RmaQueryRequest>(dto);
            //request.Status = EnumRMAStatus.ShipNoReceive.AsId();
            //request.ReturnGoodsStatus = EnumReturnGoodsStatus.NoProcess;

            //return GetRmaList4PageResult(request, userProfile);
        }
Exemple #4
0
        public PageResult <SaleRmaDto> GetByPack(PackageReceiveRequest dto)
        {
            dto.StartDate = dto.StartDate.Date;
            dto.EndDate   = dto.EndDate.Date.AddDays(1);

            var rep = _repository as ISaleRMARepository;
            var lst = rep.GetAll(dto.OrderNo, dto.SaleOrderNo, "", "", dto.StartDate, dto.EndDate,
                                 EnumRMAStatus.ShipNoReceive.AsId(), null, EnumReturnGoodsStatus.NoProcess, dto.pageIndex, dto.pageSize);

            return(lst);
        }
        public void TestGetByPack_PackageReceiveDto()
        {
            PackageReceiveRequest dto = new PackageReceiveRequest();

            dto.StartDate   = new DateTime(2014, 4, 1);
            dto.EndDate     = DateTime.Now.Date;
            dto.OrderNo     = "114";
            dto.SaleOrderNo = "114";

            var lst = Service.GetByPack(dto);

            Assert.IsNotNull(lst);
            Assert.AreNotEqual(0, lst.TotalCount);
        }
        public void TestGetAll_PackageReceiveDto()
        {
            //IList<RMADto> GetAll(PackageReceiveDto dto);
            PackageReceiveRequest dto = new PackageReceiveRequest();

            dto.StartDate = new DateTime(2014, 1, 1);
            dto.EndDate   = DateTime.Now.Date;
            //dto.OrderNo = "114";
            //dto.SaleOrderNo = "114";

            var lst = Service.GetAll(dto);

            AssertList <RMADto>(lst);
        }
Exemple #7
0
        public IHttpActionResult GetRmaPackVerifyByPack([FromUri] PackageReceiveRequest request, [UserId] int uid, [UserProfile] UserProfile userProfile)
        {
            return(DoFunction(() =>
            {
                _rmaService.UserId = uid;
                return _rmaService.GetAllPackVerify(request);
            }, "查询退货单信息失败"));

            //left
            //var rmarequest = Mapper.Map<PackageReceiveRequest, RmaQueryRequest>(request);
            //rmarequest.Status = EnumRMAStatus.ShipReceive.AsId();
            //rmarequest.ReturnGoodsStatus = EnumReturnGoodsStatus.NoProcess;

            //return GetPagedList4RmaPagedResult(rmarequest, userProfile);
        }