public IHttpActionResult AddCusAddress(List <CusAddress> listCusAddress)
        {
            var  cusAddressService = new CusAddressService();
            bool isResult          = true;

            try
            {
                listCusAddress.ForEach(item => {
                    var maxSnNum = cusAddressService.GetAll().Select(getNum => getNum.SnNum).LastOrDefault();
                    int maxSn    = Int32.Parse(maxSnNum);
                    maxSn++;
                    item.SnNum      = maxSn.ToString().PadLeft(6, '0');
                    item.CreateTime = DateTime.Now;
                    item.IsDelete   = 0;
                    cusAddressService.Add(item);
                });
            }
            catch (Exception)
            {
                isResult = false;
                throw;
            }
            var result = new
            {
                Result = isResult,
                Msg    = isResult ? "添加成功" : "添加失败"
            };

            return(Json(result));
        }
        /// <summary>
        /// 添加地址单个
        /// </summary>
        /// <param name="cusAddress"></param>
        /// <returns></returns>
        public IHttpActionResult AddEditAddRess(CusAddress cusAddress)
        {
            var cusAddressService = new CusAddressService();
            var maxSnNum          = cusAddressService.GetAll().Select(getNum => getNum.SnNum).LastOrDefault();
            int maxSn             = Int32.Parse(maxSnNum);

            maxSn++;
            cusAddress.SnNum      = maxSn.ToString().PadLeft(6, '0');
            cusAddress.CreateTime = DateTime.Now;
            cusAddress.IsDelete   = 0;
            var add    = cusAddressService.Add(cusAddress);
            var result = new
            {
                Count = add?"添加成功":"添加失败"
            };

            return(Json(result));
        }