Exemple #1
0
        /// <summary>
        /// 保存JdJournal信息
        /// </summary>
        /// <param name="VatInvoiceProof"></param>
        /// <returns></returns>
        public ResultDTO SaveJdJournalExt(Jinher.AMP.BTP.Deploy.JdJournalDTO model)
        {
            ResultDTO dto    = null;
            JdJournal entity = new JdJournal();

            try
            {
                ContextSession contextSession = ContextFactory.CurrentThreadContext;
                entity             = CommonUtil.ReadObjectExchange(entity, model);
                entity.EntityState = EntityState.Added;
                contextSession.SaveObject(entity);
                contextSession.SaveChanges();
                dto = new ResultDTO {
                    ResultCode = 0, Message = "保存成功", isSuccess = true
                };
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("JdOrderItem保存异常。JdOrderItem:{0}", ex.Message));
                dto = new ResultDTO {
                    ResultCode = 1, Message = ex.Message, isSuccess = false
                };
            }
            return(dto);
        }
Exemple #2
0
        /// <summary>
        /// 查询JdJournal信息
        /// </summary>
        /// <param name="search">查询类</param>
        /// <returns>结果</returns>

        public List <Jinher.AMP.BTP.Deploy.JdJournalDTO> GetJdJournalListExt(Jinher.AMP.BTP.Deploy.JdJournalDTO search)
        {
            List <Jinher.AMP.BTP.Deploy.JdJournalDTO> JdOrderItemlist = new List <Jinher.AMP.BTP.Deploy.JdJournalDTO>();
            var searchlist = JdJournal.ObjectSet().AsQueryable();

            if (!string.IsNullOrWhiteSpace(search.JdPorderId))
            {
                searchlist = searchlist.Where(p => p.JdPorderId == search.JdPorderId);
            }
            if (search.TempId != Guid.Empty)
            {
                searchlist = searchlist.Where(p => p.TempId == search.TempId);
            }
            if (!string.IsNullOrWhiteSpace(search.JdOrderId) && search.JdOrderId != "00000000-0000-0000-0000-000000000000")
            {
                searchlist = searchlist.Where(p => p.JdOrderId == search.JdOrderId);
            }
            if (!string.IsNullOrWhiteSpace(search.MainOrderId) && search.MainOrderId != "00000000-0000-0000-0000-000000000000")
            {
                searchlist = searchlist.Where(p => p.MainOrderId == search.MainOrderId);
            }
            if (!string.IsNullOrWhiteSpace(search.CommodityOrderId))
            {
                searchlist = searchlist.Where(p => p.CommodityOrderId == search.CommodityOrderId);
            }
            if (!string.IsNullOrEmpty(search.Name))
            {
                searchlist = searchlist.Where(p => p.Name.Contains(search.Name));
            }
            if (!string.IsNullOrEmpty(search.Details))
            {
                searchlist = searchlist.Where(p => p.Details.Contains(search.Details));
            }
            foreach (var item in searchlist.ToList())
            {
                Jinher.AMP.BTP.Deploy.JdJournalDTO model = new Jinher.AMP.BTP.Deploy.JdJournalDTO();
                model = CommonUtil.ReadObjectExchange(model, item);
                JdOrderItemlist.Add(model);
            }
            return(JdOrderItemlist);
        }
Exemple #3
0
 /// <summary>
 /// 保存JdJournal信息
 /// </summary>
 /// <param name="VatInvoiceProof"></param>
 /// <returns></returns>
 public ResultDTO SaveJdJournal(Jinher.AMP.BTP.Deploy.JdJournalDTO model)
 {
     base.Do(false);
     return(this.SaveJdJournalExt(model));
 }
Exemple #4
0
        /// <summary>
        /// 查询JdJournal信息
        /// </summary>
        /// <param name="search">查询类</param>
        /// <returns>结果</returns>

        public List <Jinher.AMP.BTP.Deploy.JdJournalDTO> GetJdJournalList(Jinher.AMP.BTP.Deploy.JdJournalDTO search)
        {
            base.Do(false);
            return(this.GetJdJournalListExt(search));
        }
Exemple #5
0
 /// <summary>
 /// 保存JdJournal信息
 /// </summary>
 /// <param name="VatInvoiceProof"></param>
 /// <returns></returns>
 public ResultDTO SaveJdJournal(Jinher.AMP.BTP.Deploy.JdJournalDTO model)
 {
     base.Do();
     return(this.Command.SaveJdJournal(model));
 }
Exemple #6
0
        /// <summary>
        /// 查询JdJournal信息
        /// </summary>
        /// <param name="search">查询类</param>
        /// <returns>结果</returns>

        public List <Jinher.AMP.BTP.Deploy.JdJournalDTO> GetJdJournalList(Jinher.AMP.BTP.Deploy.JdJournalDTO search)
        {
            base.Do();
            return(this.Command.GetJdJournalList(search));
        }