Пример #1
0
 /// <summary>
 /// 客户寄件选择空闲格口
 /// </summary>
 /// <returns></returns>
 public string GetFreeMouthToCust()
 {
     return(JsonHelper.ToJson(localData.GetFreeMouthToCust()));
 }
Пример #2
0
 public string GetLogisticsCompanyConfig()
 {
     return(JsonHelper.ToJson(localData.GetLogisticsCompanyConfig()));
 }
Пример #3
0
        /// <summary>
        /// 获取空闲格口列表
        /// </summary>
        public string GetFreeMouthList()
        {
            string rst = JsonHelper.ToJson(localData.GetFreeMouth());

            return(rst);
        }
Пример #4
0
 public string GetCountyList(string cityNo)
 {
     return(JsonHelper.ToJson(localData.GetCountyList(cityNo)));
 }
Пример #5
0
 /// <summary>
 /// 获取派宝箱配置
 /// </summary>
 public string GetPBoxConfig()
 {
     return(JsonHelper.ToJson(localData.GetPBoxConfig()));
 }
Пример #6
0
 public string GetCityList(string provId)
 {
     return(JsonHelper.ToJson(localData.GetCityList(provId)));
 }
Пример #7
0
        public string GetProviceList()
        {
            var a = JsonHelper.ToJson(localData.GetProviceList());

            return(a);
        }
Пример #8
0
        /// <summary>
        /// 用户在页面上输入手机号码和验证码,点击确定,调用CustQuJian方法,容器调用本地数据库获取用户快件数据,将取件数据保存到快件全局变量中
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        ///
        public string CustQuJian(string phone, string code)
        {
            try
            {
                //初始化一下逾期费用
                uiData.ExceptionExpressFee = 0;
                //初始化一下逾期时间
                uiData.ExceptionOverTime = 0;
                //var orderNo = service.userToTake(phone, code);
                var    money   = 0.0;
                double fee     = 0.00;
                var    intcode = 0L;
                long.TryParse(code, out intcode);
                var overTimeDay = "";

                var exp = localData.GetExpressInfo3(phone, intcode);
                uiData.QuJianSendPhone = exp.EITAKEUSERPHONE;
                //自定义一个值给exp

                uiData.Phone = phone;
                if (exp != null)
                {
                    if (exp.TFBUZSTATUS.ToString() == "4" || exp.TFBUZSTATUS.ToString() == "8")
                    {
                        return(JsonHelper.ToJson(new { success = false }));
                    }
                    if (Convert.ToDouble(exp.EIPAYMENTMONEY) > 0)
                    {
                        money = Convert.ToDouble(exp.EIPAYMENTMONEY);
                    }
                    if (contrastDateIsOverdue(exp.ELOVERTIME))
                    {
                        LogHelper.Log("快件已经逾期,将在本地自行计算逾期金额");
                        exp = localData.changeExpressToOverdue(exp, 0);
                    }

                    eiOrderNo          = exp.EIORDERNO;
                    pickupPhoneNumber  = phone;
                    pickupIntcode      = intcode;
                    uiData.QuJianOrder = exp;
                    LogHelper.Log("CustQuJian:code:" + exp.EIVALIDATECODE + ",tf_buzstatus:" + exp.TFBUZSTATUS + ",ei_barcode" + exp.EIBARCODE + ",ei_takeuserphone:" + exp.EITAKEUSERPHONE);



                    if (exp.TFBUZSTATUS == 3 || exp.TFBUZSTATUS == 7)
                    {
                        //有其他费用要支付
                        if (money > 0)
                        {
                            var ee = localData.getExceptionExpress(exp.EIORDERNO, exp.EIID);
                            LogHelper.Log("expressException:" + JsonHelper.ToJson(ee));
                            JsonHelper jh = new JsonHelper();
                            if (null != ee)
                            {
                                uiData.ExceptionExpressId  = ee.EOID;
                                uiData.ExceptionExpressFee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                                uiData.ExceptionOverTime   = Convert.ToInt32(ee.EOOVERTIMEDAY);
                                fee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                                //是逾期件
                                if (fee > 0)
                                {
                                    uiData.ExceptionPayMoney = money;
                                    return(JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), substatus = ee.TFBUZSTATUS, status = exp.TFBUZSTATUS.ToString(), paymoney = money }));
                                }
                            }
                            uiData.ExceptionPayMoney = money;
                            return(JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString(), paymoney = money }));
                        }
                        //没有其他费用要支付
                        else if (money <= 0)
                        {
                            var ee = localData.getExceptionExpress(exp.EIORDERNO, exp.EIID);
                            LogHelper.Log("expressException:" + JsonHelper.ToJson(ee));
                            JsonHelper jh = new JsonHelper();
                            if (null != ee)
                            {
                                uiData.ExceptionExpressId  = ee.EOID;
                                uiData.ExceptionExpressFee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                                uiData.ExceptionOverTime   = Convert.ToInt32(ee.EOOVERTIMEDAY);
                                fee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                                //是逾期件
                                if (fee > 0)
                                {
                                    uiData.ExceptionPayMoney = money;

                                    return(JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), substatus = ee.TFBUZSTATUS, status = exp.TFBUZSTATUS.ToString(), paymoney = money }));
                                }
                            }

                            uiData.ExceptionPayMoney = money;
                            return(JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString(), paymoney = money }));
                        }
                        return(JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString() }));
                    }
                }
                else
                {
                    LogHelper.Log("exp == null! JiJian.cs 28");
                    return(JsonHelper.ToJson(new { success = false, type = 0 }));
                }
                //    if (exp.TFBUZSTATUS == 3 && money <= 0)
                //    {
                //        return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString() });
                //    }
                //    //有其他费用要支付
                //    else if (money > 0)
                //    {
                //        var ee = localData.getExceptionExpress(exp.EIORDERNO, exp.EIID);
                //        LogHelper.Log("expressException:" + JsonHelper.ToJson(ee));
                //        JsonHelper jh = new JsonHelper();
                //        if (null != ee)
                //        {
                //            uiData.ExceptionExpressId = ee.EOID;
                //            uiData.ExceptionExpressFee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                //            fee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                //            //是逾期件
                //            if (fee > 0)
                //            {

                //                uiData.ExceptionExpressFee = fee;
                //                uiData.ExceptionPayMoney = money;
                //                return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), substatus = ee.TFBUZSTATUS, status = exp.TFBUZSTATUS.ToString(), paymoney = money });
                //            }
                //            else
                //            { //不是逾期件
                //                uiData.ExceptionExpressFee = fee;
                //                uiData.ExceptionPayMoney = money;
                //                return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), substatus = ee.TFBUZSTATUS, status = exp.TFBUZSTATUS.ToString(), paymoney = money });
                //            }

                //        }
                //        uiData.ExceptionExpressFee = fee;
                //        uiData.ExceptionPayMoney = money;
                //        return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString(), paymoney = money });



                //    }
                //    //没有其他费用要支付
                //    else if (money <= 0)
                //    {
                //        var ee = localData.getExceptionExpress(exp.EIORDERNO, exp.EIID);
                //        LogHelper.Log("expressException:" + JsonHelper.ToJson(ee));
                //        JsonHelper jh = new JsonHelper();
                //        if (null != ee)
                //        {
                //            uiData.ExceptionExpressId = ee.EOID;
                //            uiData.ExceptionExpressFee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                //            fee = Convert.ToDouble(ee.EOOVERTIMEFEE == null ? 0 : ee.EOOVERTIMEFEE);
                //            //是逾期件
                //            if (fee > 0)
                //            {
                //                uiData.ExceptionPayMoney = money;
                //                uiData.ExceptionExpressFee = fee;
                //                return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), substatus = ee.TFBUZSTATUS, status = exp.TFBUZSTATUS.ToString(), paymoney = money });
                //            }
                //        }
                //        uiData.ExceptionExpressFee = fee;
                //        uiData.ExceptionPayMoney = money;
                //        return JsonHelper.ToJson(new { success = true, type = (exp.EIPAYMENTMODE ?? 0).ToString(), status = exp.TFBUZSTATUS.ToString(), paymoney = money });

                //    }

                //}
            }
            catch (Exception e)
            {
                LogHelper.Log("" + e.StackTrace);
            }
            return(JsonHelper.ToJson(new { success = false, type = 0 }));
        }
Пример #9
0
 public string paymentOvertimeExpress(double money)
 {
     service.coinsRecharge(money, uiData.Phone);
     return(JsonHelper.ToJson(new { success = true }));
 }
Пример #10
0
 public string isConnected()
 {
     return(JsonHelper.ToJson(new { isConnected = TcpClientHelper.Instance.IsConnected }));
 }