/// <summary>
        /// 清除当天主表数据和明细表数据
        /// </summary>
        public string deleteData()
        {
            string tag = "true";

            try
            {
                DateTime dateTime = DateTime.Now;
                string   date     = Convert.ToString(dateTime.ToString("yyyyMMdd"));
                using (PersistentManager persistentManager = new PersistentManager())
                {
                    SortingOrderDao       dao     = new SortingOrderDao();
                    SortingOrderDetailBll bll     = new SortingOrderDetailBll();
                    DataTable             orderdt = dao.QueryDate(date);
                    string orderidList            = UtinString.StringMake(orderdt, "ORDER_ID");
                    string orderid = UtinString.StringMake(orderidList);
                    dao.deleteOrderDate(date);
                    bll.DeleteOrderId(orderid);
                }
            }
            catch (Exception e)
            {
                tag = e.Message;
            }
            return(tag);
        }
        /// <summary>
        /// 确认线路分配
        /// </summary>
        /// <returns></returns>
        public string UpdateOrderSoringGroupInfo(string SortingCode, string RouteCode, string orderDate)
        {
            string tag = "true";

            using (PersistentManager persistentManager = new PersistentManager())
            {
                RouteCode = RouteCode.Substring(3, RouteCode.Length - 3);
                DataTable orderTable = this.QueryOrderId(RouteCode, orderDate);//查询主表Id
                if (orderTable.Rows.Count > 0)
                {
                    string orderIdList = UtinString.StringMake(orderTable, "ORDER_ID");
                    orderIdList = UtinString.StringMake(orderIdList);//取得截取后的主表Id字符
                    SortingOrderDetailBll orderDetail = new SortingOrderDetailBll();
                    SortingRouteBll       bll         = new SortingRouteBll();
                    string str = orderDetail.UpdateOrderDeatil(SortingCode, orderIdList);//根据主表ID修改明细表分拣分配状态
                    if (str == "true")
                    {
                        this.UpdateOrderMaster(SortingCode, RouteCode, orderDate);//修改主表分拣线编号
                        //bll.UpdateRouteAllotState(RouteCode, "1");//修改线路表id
                    }
                    else
                    {
                        tag = str;
                    }
                }
                else
                {
                    tag = "选择的线路没有主订单";
                }
            }
            return(tag);
        }
        /// <summary>
        /// 取消线路分配
        /// </summary>
        /// <param name="RouteCode"></param>
        /// <returns></returns>
        public string CancelAllotOrder(string RouteCode, string orderDate)
        {
            string tag = "true";

            using (PersistentManager persistentManager = new PersistentManager())
            {
                RouteCode = RouteCode.Substring(3, RouteCode.Length - 3);
                DataTable orderTable = this.QueryOrderId(RouteCode, orderDate);//查询主表Id
                if (orderTable.Rows.Count > 0)
                {
                    string orderIdList = UtinString.StringMake(orderTable, "ORDER_ID");
                    orderIdList = UtinString.StringMake(orderIdList);//取得截取后的主表Id字符
                    SortingOrderDetailBll orderDetail = new SortingOrderDetailBll();
                    SortingRouteBll       bll         = new SortingRouteBll();
                    // bll.UpdateRouteAllotState(RouteCode, "0");
                    this.UpdateOrderMaster("", RouteCode, orderDate);
                    tag = orderDetail.UpdateOrderDeatil("", orderIdList);
                }
                else
                {
                    tag = "选择取消的线路没有订单!";
                }
            }
            return(tag);
        }