Exemple #1
0
        /// <summary>
        /// 通过采购订单 查询采购详细
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Result <stockapplydetails> StockapplyQueny(string Appid)
        {
            //模拟数据
            var list = new List <stockapplydetails>();

            list.Add(new stockapplydetails()
            {
                Apddemanddate    = DateTime.Now,
                Apdintomoney     = 999,
                Apdmateridlid    = "A01",
                Apdmateridlname  = "物料mingz",
                Apdmodel         = "",
                Apdnotnum        = 10,
                Apdnum           = 10,
                Apdoriginid      = "",
                Apdorigintype    = "",
                Apdprice         = 999,
                Apdremark        = "备注",
                Apdstandardmoney = 999,
                Apdstandardprice = 999,
                Apdstockdate     = DateTime.Now,
                Apdunit          = "个",
                Appid            = "A01",
                Enables          = 1
            });
            list.Add(new stockapplydetails()
            {
                Apddemanddate    = DateTime.Now,
                Apdintomoney     = 999,
                Apdmateridlid    = "A01",
                Apdmateridlname  = "物料mingz",
                Apdmodel         = "",
                Apdnotnum        = 10,
                Apdnum           = 10,
                Apdoriginid      = "",
                Apdorigintype    = "",
                Apdprice         = 999,
                Apdremark        = "备注",
                Apdstandardmoney = 999,
                Apdstandardprice = 999,
                Apdstockdate     = DateTime.Now,
                Apdunit          = "个",
                Appid            = "A01",
                Enables          = 1
            });


            var list2 = _StockapplyDetailsService.ListModels(s => s.Appid
                                                             == Appid).ToList();

            return(new Result <stockapplydetails>()
            {
                errorInfo = "",
                errorNo = 0,
                results = new FsData <stockapplydetails>()
                {
                    data = list2
                }
            });
        }
Exemple #2
0
        /// <summary>
        /// 通过采购请购单 获取 转单采购订单详细
        /// </summary>
        /// <param name="Appid"></param>
        /// <returns></returns>
        public Result <Api_View_stockorderdetails> ZDStockorder(string Appid)
        {
            //采购请购单的物料
            var list = _StockapplyDetailsService.ListModels(s => s.Appid == Appid).ToList();

            //采购订单转单后物料集合
            var list2 = new List <Api_View_stockorderdetails>();


            list.ForEach(s =>
            {
                var stockorderdetails = new Api_View_stockorderdetails()
                {
                    Sodmaterielid       = s.Apdmateridlid,
                    Sodamount           = s.Apdnum.Value,
                    Sodmatid            = s.Apdmateridlname,
                    Sodorigin           = Appid,
                    Sodagio             = 100,
                    Sodcess             = 17,
                    Sodpreincomestorage = s.Apdstockdate.Value,
                    Sodsumprice         = 0,
                    Sodsumcess          = 0,
                    Sodspec             = s.Apdmodel,
                    Sodprice            = s.Apdstandardprice.Value,
                    Sodpresent          = "否",
                    Sodpreprice         = s.Apdstandardprice.Value,
                    Sodsum        = s.Apdstandardprice.Value * s.Apdnum.Value,
                    Sodorigintype = "采购请购单",
                    NoRuku        = s.Apdnum.Value,
                    Extend0       = s.TockapplyDetails
                };

                list2.Add(stockorderdetails);
            });

            return(new Result <Api_View_stockorderdetails>()
            {
                errorInfo = "",
                errorNo = 0,
                results = new FsData <Api_View_stockorderdetails>()
                {
                    data = list2
                }
            });
        }