Ejemplo n.º 1
0
        public HttpResponseMessage GetAllRecommonOrders(EnumOrderType type, int page = 1, int pageSize = 10, bool isDes = true, EnumOrderSearchOrderBy orderByAll = EnumOrderSearchOrderBy.OrderById)
        {
            OrderSearchCondition OSC = new OrderSearchCondition()
            {
                IsDescending = isDes,
                Ordertype    = type,
                OrderBy      = orderByAll,
                Page         = page,
                PageCount    = pageSize
            };
            var list = _orderService.GetOrdersByCondition(OSC).Select(p => new
            {
                p.Ordercode,
                p.Ordertype,
                p.Status,
                p.Shipstatus,
                p.Agentname,
                p.Agenttel,
                p.Busname,
                p.OrderDetail.Price,
                p.OrderDetail.RecCommission,
                p.OrderDetail.Commission,
                p.OrderDetail.Dealcommission
            }).ToList();
            var totalCount1 = _orderService.GetOrderCount(OSC);

            return(PageHelper.toJson(new { List = list, Condition = OSC, totalCount = totalCount1 }));
        }
Ejemplo n.º 2
0
        private static bool CreatePutawayManageListTask(string manageID, EnumOrderType orderType, string palletCode, ref string restr)
        {
            List <View_StockListModel> stockList = bllViewStockList.GetModelListByPalletCode(palletCode, EnumCellType.配盘工位.ToString());

            if (stockList == null)
            {
                restr = "储存为空!";
                return(false);
            }


            foreach (View_StockListModel stock in stockList)
            {
                Manage_ListModel manageListModel = new Manage_ListModel();
                if (orderType == EnumOrderType.计划)
                {
                    Plan_ListModel planList = bllPlanList.GetModel(stock.Plan_List_ID);

                    planList.Plan_List_Ordered_Quantity = stock.Stock_List_Quantity;
                    bllPlanList.Update(planList);
                }



                manageListModel.Manage_List_ID       = Guid.NewGuid().ToString();
                manageListModel.Manage_List_Quantity = stock.Stock_List_Quantity;
                manageListModel.Mange_ID             = manageID;
                manageListModel.Stock_List_ID        = stock.Stock_List_ID;
                bllManageList.Add(manageListModel);
            }
            return(true);
        }
Ejemplo n.º 3
0
        public async Task <List <ApplyProcess> > GetApplyedLogByOrderSnAsync(EnumOrderType _ot, string order_sn, int _depart, int _start_position)
        {
            string             sql            = g_sqlMaker.Select <t_apply_log>().Where("order_sn", "=", "@order_sn").OrderByAsc("add_time").ToSQL();
            List <t_apply_log> apply_log_list = await g_dbHelper.QueryListAsync <t_apply_log>(sql, new { order_sn });

            IPositionServer     positionServer = new PositionServerImpl(g_dbHelper, g_logServer);
            IUserServer         userServer     = new UserServerImpl(g_dbHelper, g_logServer);
            List <ApplyProcess> apply_list     = new List <ApplyProcess>();

            foreach (var item in apply_log_list)
            {
                t_position position_model = await positionServer.GetPosition(s => new { s.position_name }, item.position_id);

                t_user user_model = await userServer.GetUserById(s => new { s.real_name }, item.user_id);

                apply_list.Add(new ApplyProcess
                {
                    audit_status      = item.apply_status,
                    audit_status_desc = ((EnumAuditStatus)item.apply_status).GetDesc(),
                    audit_time        = item.add_time.Value.ToString("yyyy-MM-dd hh:mm") ?? "",
                    remark            = item.remark,
                    position_name     = position_model.position_name,
                    auditer           = user_model.real_name,
                });
            }

            return(apply_list);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 新增阿里订单下载日志
        /// </summary>
        /// <param name="orderType"></param>
        /// <param name="isSuccess">下载结果 1:成功;0:失败</param>
        /// <param name="downType">下载类型 1:自动;2手动</param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="totalCount"></param>
        /// <param name="successCount"></param>
        /// <param name="clientID"></param>
        /// <returns></returns>
        public bool AddAliOrderDownloadLog(EnumOrderType orderType, bool isSuccess, AlibabaSdk.AliOrderDownType downType, DateTime startTime, DateTime endTime, int successCount, int totalCount, string remark, string clientID)
        {
            bool flag = AliOrderDAL.BaseProvider.AddAliOrderUpdateLog((int)orderType, isSuccess?1:0, (int)downType,
                                                                      startTime, endTime, successCount, totalCount, remark, clientID);

            return(flag);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// @xis 获取下一个审批者
        /// </summary>
        /// <param name="_ot">订单类型</param>
        /// <param name="_depart">申请部门</param>
        /// <param name="_cur_position">当前已审批的职位</param>
        /// <returns>
        /// null:获取失败
        /// -1:已达末尾
        /// </returns>
        public int?GetNextApplyer(EnumOrderType _ot, int _depart, int _cur_position)
        {
            JObject process_json = CommonConfig.ProcessConfig[_ot.ToString()] as JObject;

            if (process_json == null)
            {
                return(null);
            }

            List <int> process_list = JsonConvert.DeserializeObject <List <int> >(process_json[$"d_{_depart}"].ToString());//流程列表

            if (process_list == null)
            {
                return(null);
            }

            int cur_index = process_list.IndexOf(_cur_position);

            //不存在或达末尾
            if (cur_index == -1 || cur_index + 1 >= process_list.Count)
            {
                return(null);
            }

            return(process_list[cur_index + 1]);
        }
Ejemplo n.º 6
0
        public static EnumTaskType MapToTaskType(EnumOrderType orderType)
        {
            switch (orderType)
            {
            case EnumOrderType.处置:
            case EnumOrderType.护理:
            case EnumOrderType.麻醉:
            case EnumOrderType.膳食:
            case EnumOrderType.药疗:
                return(EnumTaskType.医嘱);

            case EnumOrderType.检查:
                return(EnumTaskType.检查);

            case EnumOrderType.检验:
                return(EnumTaskType.检验);

            case EnumOrderType.诊疗工作:
            case EnumOrderType.护理工作:
                return(EnumTaskType.诊疗工作);

            case EnumOrderType.手术:
                return(EnumTaskType.手术);
            }

            return(EnumTaskType.医嘱);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="id"></param>
 /// <param name="db"></param>
 /// <param name="key"></param>
 /// <param name="displayText"></param>
 /// <param name="nodeType"></param>
 /// <param name="order"></param>
 public Node(int id, int db, string key,
             string displayText, EnumNodeType nodeType, EnumOrderType order)
 {
     Id          = id;
     Db          = db;
     Key         = key;
     DisplayText = displayText;
     NodeType    = nodeType;
     Order       = order;
 }
Ejemplo n.º 8
0
        public string GetEnumOrderType(EnumOrderType orderType)
        {
            switch (orderType)
            {
            case EnumOrderType.CKD:
                return("1F0A100C42484454BAEA211D4C14B80F");

            default:
                throw new Exception("");
            }
        }
Ejemplo n.º 9
0
        public int GetApplyIndex(EnumOrderType _ot, int _depart, int _start_position, int _cur_audited_position)
        {
            JObject process_json = CommonConfig.ProcessConfig[_ot.ToString()] as JObject;

            if (process_json == null)
            {
                return(-1);
            }
            List <int> process_list = GetApplyList(_ot, _depart, _start_position).ToList();//流程列表

            int index = process_list.IndexOf(_cur_audited_position);

            return(index);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获取订单更新日志列表
        /// </summary>
        /// <param name="orderType">订单类型</param>
        /// <param name="clientID"></param>
        /// <returns></returns>
        public List <AliOrderUpdateLog> GetAliOrderUpdateLogs(EnumOrderType orderType, string clientID)
        {
            List <AliOrderUpdateLog> list = new List <AliOrderUpdateLog>();
            DataTable dt = AliOrderDAL.BaseProvider.GetAliOrderUpdateLogs((int)orderType, clientID);

            foreach (DataRow dr in dt.Rows)
            {
                AliOrderUpdateLog item = new AliOrderUpdateLog();
                item.FillData(dr);

                list.Add(item);
            }
            return(list);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// @xis 审批进度 开始/进行中/末尾 EnumApplyStepFlag
        /// </summary>
        /// <returns></returns>
        public EnumApplyStepFlag GetApplyStepFlag(EnumOrderType _ot, int _depart, int _cur_position)
        {
            List <int> process_list = JsonConvert.DeserializeObject <List <int> >(CommonConfig.ProcessConfig[_ot.ToString()][$"d_{_depart}"].ToString());
            int        cur_index    = process_list.IndexOf(_cur_position);

            if (cur_index == 0)
            {
                return(EnumApplyStepFlag.Start);
            }
            if (cur_index + 1 != process_list.Count)
            {
                return(EnumApplyStepFlag.Progress);
            }

            return(EnumApplyStepFlag.End);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 根据订单编号查询 某一笔委托单的所有成交记录
        /// </summary>
        /// <param name="_orderId">订单ID</param>
        /// <param name="_type">订单类型</param>
        /// <returns>返回查询结果---Json 格式</returns>
        public static List <Trade> QureyReturnTrade(string _orderId, EnumOrderType _type)
        {
            string URL = "exchange/order/{orderId}/{orderType}";

            try
            {
                string ordt = request_OrderType.orderType_BUY;  //默认查询购买信息
                if (_type == EnumOrderType.抢购)
                {
                    ordt = request_OrderType.orderType_RUSH;
                }
                else if (_type == EnumOrderType.转让)
                {
                    ordt = request_OrderType.orderType_SELL;
                }
                else if (_type == EnumOrderType.兑换)
                {
                    ordt = request_OrderType.orderType_REDEEM;
                }
                else if (_type == EnumOrderType.增发)
                {
                    ordt = request_OrderType.orderType_ADD;
                }

                var r = new RestRequest(URL, Method.GET);
                r.AddUrlSegment("orderId", _orderId);
                r.AddUrlSegment("orderType", ordt);
                IRestResponse response = HttpRestQurey(r);
                if (response == null)
                {
                    return(null);
                }

                string         json = response.Content;
                response_Trade rt   = JsonConvert.DeserializeObject <response_Trade>(json);

                if (rt != null && rt.code == 0 && rt.data != null)
                {
                    return(rt.data);
                }
                return(null);
            }catch
            {
                return(null);
            }
        }
Ejemplo n.º 13
0
        public IEnumerable <int> GetApplyList(EnumOrderType _ot, int _depart, int _start_position)
        {
            JObject process_json = CommonConfig.ProcessConfig[_ot.ToString()] as JObject;

            if (process_json == null)
            {
                return(null);
            }
            List <int> process_list = JsonConvert.DeserializeObject <List <int> >(process_json[$"d_{_depart}"].ToString());//流程列表

            List <int> result_list = new List <int>();

            for (int i = process_list.IndexOf(_start_position) + 1; i < process_list.Count; i++)
            {
                result_list.Add(process_list[i]);
            }
            return(result_list);
        }
Ejemplo n.º 14
0
 public async Task <HaasonlineClientResponse <StopTakeProfitOrder> > AddTakeProfitOrder(string name, string accountGuid, string primaryCoin, string secondaryCoin,
                                                                                        EnumOrderType direction, string executingTemplateGuid, decimal triggerPrice, decimal executionPrice, decimal amount,
                                                                                        bool startOrderOnActivation, decimal startOrderPrice, string startTemplateGuid, bool activate)
 {
     return(await ExecuteAsync <StopTakeProfitOrder>("/AddTakeProfitOrder", new Dictionary <string, string>
     {
         { "name", name },
         { "accountGuid", accountGuid },
         { "primaryCoin", primaryCoin },
         { "secondaryCoin", secondaryCoin },
         { "leverage", "0" },
         { "orderDirection", ((int)direction).ToString() },
         { "executingTemplateGuid", executingTemplateGuid },
         { "triggerPrice", triggerPrice.ToString(CultureInfo.InvariantCulture) },
         { "executionPrice", executionPrice.ToString(CultureInfo.InvariantCulture) },
         { "amount", amount.ToString(CultureInfo.InvariantCulture) },
         { "startOrderOnActivation", startOrderOnActivation.ToString() },
         { "startOrderPrice", startOrderPrice.ToString(CultureInfo.InvariantCulture) },
         { "startTemplateGuid", startTemplateGuid },
         { "activate", activate.ToString() },
     }));
 }
Ejemplo n.º 15
0
        public static OrderbooksResponse GetOrderbooks(String mareket, OrderType type)
        {
            string path = Resources.GetorderbookPath + "?market=" + mareket + "&type=" + EnumOrderType.GetString(type);

            return((OrderbooksResponse)GetResponse(path, typeof(OrderbooksResponse)));
        }
Ejemplo n.º 16
0
 public async Task <HaasonlineClientResponse <OrderBot> > OrderBotEditOrder(string botGuid, string orderGuid, string dependsOn, string dependsOnNotExecuted, decimal amount, decimal price, EnumOrderType direction, string templateGuid, EnumOrderBotTriggerType triggerType, decimal triggerPrice)
 {
     return(await ExecuteAsync <OrderBot>("/OrderBotEditOrder", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "orderGuid", orderGuid },
         { "dependsOn", dependsOn },
         { "dependsOnNotExecuted", dependsOnNotExecuted },
         { "amount", amount.ToString(CultureInfo.InvariantCulture) },
         { "price", price.ToString(CultureInfo.InvariantCulture) },
         { "triggerPrice", triggerPrice.ToString(CultureInfo.InvariantCulture) },
         { "orderTemplate", templateGuid },
         { "orderType", direction.ToString() },
         { "triggerType", triggerType.ToString() },
     }));
 }
Ejemplo n.º 17
0
        public async Task <HaasonlineClientResponse <AccumulationBot> > SetupAccumulationBot(string botName, string botGuid, string accountGuid, string primairyCoin, string secondairyCoin, EnumAccumulationBotStopType stopType, decimal stopTypeValue, decimal randomOrderSizeX, decimal randomOrderSizeY, int randomOrderTimeX, int randomOrderTimeY, EnumOrderType direction, bool triggerOnPrice, bool triggerWhenHiger, decimal triggerValue)
        {
            return(await ExecuteAsync <AccumulationBot>("/SetupAccumulationBot", new Dictionary <string, string>()
            {
                { "botName", botName },
                { "botGuid", botGuid },
                { "accountGuid", accountGuid },
                { "primaryCoin", primairyCoin },
                { "secondaryCoin", secondairyCoin },
                { "stopTypeValue", stopTypeValue.ToString() },

                { "randomOrderSizeX", randomOrderSizeX.ToString(CultureInfo.InvariantCulture) },
                { "randomOrderSizeY", randomOrderSizeY.ToString(CultureInfo.InvariantCulture) },
                { "randomOrderTimeX", randomOrderTimeX.ToString(CultureInfo.InvariantCulture) },
                { "randomOrderTimeY", randomOrderTimeY.ToString(CultureInfo.InvariantCulture) },
                { "triggerValue", triggerValue.ToString(CultureInfo.InvariantCulture) },
                { "triggerWhenHigher", triggerWhenHiger.ToString() },
                { "triggerOnPrice", triggerOnPrice.ToString() },
                { "stopType", stopType.ToString() },
                { "direction", direction.ToString() },
            }));
        }
Ejemplo n.º 18
0
 public HttpResponseMessage GetAllRecommonOrders(EnumOrderType type, int page = 1, int pageSize = 10, bool isDes = true, EnumOrderSearchOrderBy orderByAll = EnumOrderSearchOrderBy.OrderById)
 {
     OrderSearchCondition OSC = new OrderSearchCondition()
     {
         IsDescending = isDes,
         Ordertype = type,
         OrderBy = orderByAll,
         Page = page,
         PageCount = pageSize
     };          
     var list = _orderService.GetOrdersByCondition(OSC).Select(p => new 
     {
         p.Ordercode,
         p.Ordertype,
         p.Status,
         p.Shipstatus,
         p.Agentname,
         p.Agenttel,
         p.Busname,
         p.OrderDetail.Price,
         p.OrderDetail.RecCommission,
         p.OrderDetail.Commission,
         p.OrderDetail.Dealcommission
     }).ToList();
     var totalCount1 = _orderService.GetOrderCount(OSC);
     return PageHelper.toJson(new { List = list, Condition = OSC, totalCount = totalCount1 });
 }
Ejemplo n.º 19
0
        public bool UpdateAliOrderDownloadPlanSuccessTime(string clientID, EnumOrderType orderType, DateTime successTime)
        {
            bool flag = AliOrderDAL.BaseProvider.UpdateAliOrderDownloadPlanSuccessTime(clientID, (int)orderType, successTime);

            return(flag);
        }
Ejemplo n.º 20
0
        public string CreateOrder(string customerid, string goodscode, string title, string name, string mobile, EnumOrderSourceType sourceType, EnumOrderType ordertype,
                                  string bigcategoryid, string categoryid, string price, int quantity, DateTime planTime, string orderimgs, string citycode, 
                                  string address, string expressCode, string remark, string operateid, string agentid, string clientid, string aliOrderCode = "")
        {
            string id = Guid.NewGuid().ToString();
            string code = DateTime.Now.ToString("yyyyMMddHHmmssfff");
            string firstimg = "", allimgs = "";

            if (sourceType == EnumOrderSourceType.AliOrder)
            {
                if (!string.IsNullOrEmpty(orderimgs))
                {
                    firstimg = orderimgs.Trim(',').Split(',')[0];
                    allimgs = orderimgs;
                }
            }
            else
            {
                orderimgs = orderimgs.Trim(',');
                if (orderimgs.Length > 0)
                {
                    allimgs = orderimgs;
                    firstimg = allimgs.Split(',')[0];
                }
            }

            bool bl = OrdersDAL.BaseProvider.CreateOrder(id, code, aliOrderCode, goodscode, title, customerid, name, mobile, (int)sourceType, (int)ordertype, bigcategoryid, categoryid, price, quantity, planTime < DateTime.Now ? DateTime.Now.AddDays(7).ToString() : planTime.ToString(),
                                                        firstimg, allimgs, citycode, address, expressCode, remark, operateid, agentid, clientid);
            if (!bl)
            {
                return "";
            }
            else if (sourceType == EnumOrderSourceType.FactoryOrder)
            {
                //日志
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.Orders, EnumLogType.Create, "", operateid, agentid, clientid);
            }
            return id;
        }
Ejemplo n.º 21
0
        public HttpResponseMessage GetByCondition(int? page = 1,
                                                    int? pageCount = 10,
                                                    string ids ="",
                                                    bool isDescending = false,
                                                    string orderNum = "",
                                                    EnumOrderStatus? status = null,
                                                    string deliveryAddress = "",
                                                    bool? isPrint = null,
                                                    string phoneNumber = "",
                                                    EnumOrderType? type = null,
                                                    EnumPayType? payType = null,
                                                    decimal? locationX = null,
                                                    decimal? locationY = null,
                                                    DateTime? addTimeBegin = null,
                                                    DateTime? addTimeEnd = null,
                                                    EnumOrderSearchOrderBy orderBy = EnumOrderSearchOrderBy.OrderById)
        {
            var condition = new OrderSearchCondition
            {
                AddTimeBegin = addTimeBegin,
                AddTimeEnd = addTimeEnd,
                DeliveryAddress = deliveryAddress,
                Ids = string.IsNullOrEmpty(ids)?null:ids.Split(',').Select(int.Parse).ToArray(),
                IsDescending = isDescending,
                IsPrint = isPrint,
                LocationX = locationX,
                LocationY = locationY,
                OrderBy = orderBy,
                OrderNum = orderNum,
                Page = page,
                PageCount = pageCount,
                PayType = payType,
                PhoneNumber = phoneNumber,
                Type = type,
                Status = status
            };
            var model = _OrderService.GetOrdersByCondition(condition).Select(c => new OrderModel
            {

                Id = c.Id,

                OrderNum = c.OrderNum,

                TotalPrice = c.TotalPrice,

                TransCost = c.TransCost,

                ProductCost = c.ProductCost,

                Discount = c.Discount,

                Status = c.Status,

                DeliveryAddress = c.DeliveryAddress,

                IsPrint = c.IsPrint,

                PhoneNumber = c.PhoneNumber,

                Adduser = new UserModel{Id = c.Adduser.Id,UserName = c.Adduser.UserName},

                Addtime = c.Addtime,

                Upduser = new UserModel { Id = c.Upduser.Id, UserName = c.Upduser.UserName },

                Updtime = c.Updtime,

                //				Details = c.Details,

                //				Coupon = c.Coupon,

                Type = c.Type,

                PayType = c.PayType,

                LocationX = c.LocationX,

                LocationY = c.LocationY,
                Details = c.Details.Select(d => new OrderDetailModel()
                {
                    Count = d.Count,
                    Id = d.Id,
                    ProductId = d.Product.Id,
                    ProductName = d.Product.Name,
                    TotalPrice = d.TotalPrice,
                    UnitPrice = d.Product.Price,
                    Remark=d.Remark
                }).ToList()

            }).ToList();
            return PageHelper.toJson(new { List = model });
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 获取订单更新日志列表
        /// </summary>
        /// <param name="orderType">订单类型</param>
        /// <param name="clientID"></param>
        /// <returns></returns>
        public List<AliOrderUpdateLog> GetAliOrderUpdateLogs(EnumOrderType orderType, string clientID)
        {
            List<AliOrderUpdateLog> list = new List<AliOrderUpdateLog>();
            DataTable dt = AliOrderDAL.BaseProvider.GetAliOrderUpdateLogs((int)orderType, clientID);

            foreach (DataRow dr in dt.Rows)
            {
                AliOrderUpdateLog item = new AliOrderUpdateLog();
                item.FillData(dr);

                list.Add(item);
            }
            return list;
        }
Ejemplo n.º 23
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="palletCode"></param>
        /// <param name="houseName"></param>
        /// <param name="putawayStationName"></param>
        /// <param name="isAssign"></param>
        /// <param name="targetStation"></param>
        /// <param name="taskType">任务类型</param>
        /// <param name="manageID"></param>
        /// <param name="restr"></param>
        /// <returns></returns>
        public static bool CreatePutawayManageTask(string palletCode, string houseName, string putawayStationName,
                                                   bool isAssign, string targetStation, EnumManageTaskType taskType, ref string manageID, ref string restr)
        {
            ManageModel manage = new ManageModel();

            manage.Mange_CreateTime = DateTime.Now;
            WH_WareHouseModel house = bllWareHouse.GetModelByName(houseName);

            if (house == null)
            {
                restr = "库房对象为空!";
                return(false);
            }
            WH_Station_LogicModel stationCell = bllStationLogic.GetStationByName(house.WareHouse_ID, putawayStationName);

            if (stationCell == null)
            {
                restr = "上架站台不存在!";
                return(false);
            }
            WH_WareHouseModel wareHouse = bllWareHouse.GetModelByName(houseName);

            if (wareHouse == null)
            {
                restr = "库房名称错误!";
                return(false);
            }
            View_StockListModel stock = bllViewStockList.GetModelByPalletCode(palletCode, EnumCellType.货位.ToString());

            if (stock != null)
            {
                restr = "库存中已经有此托盘条码!";
                return(false);
            }
            View_CellModel targetCell = null;

            if (isAssign == true)//分配货位要做校验
            {
                string[] targetPos = targetStation.Split('-');
                if (targetPos == null || targetPos.Length != 2)
                {
                    restr = "指定货位格式错误!";
                    return(false);
                }
                string cellName = targetPos[0];
                string cellPos  = targetPos[1];
                targetCell = bllViewCell.GetCell(wareHouse.WareHouse_ID, cellName, cellPos);
                if (targetCell == null || targetCell.Cell_Child_Status != EnumCellStatus.空闲.ToString() || targetCell.Cell_Child_Run_Status != EnumGSTaskStatus.完成.ToString())
                {
                    restr = "当前货位不可用!";
                    return(false);
                }
            }
            else
            {
                targetCell = bllViewCell.ApplyCell(wareHouse.WareHouse_ID);
            }

            if (targetCell == null)
            {
                restr = "库房已满,没有货位可以申请了!";
                return(false);
            }
            if (targetCell.Shelf_Type == EnumShelfType.双深.ToString() && targetCell.Cell_Chlid_Position == EnumCellPos.前.ToString())//双深工位如果选中前面的工位要判断后面是否有料
            {
                View_CellModel backCell = bllViewCell.GetCell(wareHouse.WareHouse_ID, targetCell.Cell_Name, EnumCellPos.后.ToString());


                if (backCell != null && backCell.Cell_Child_Run_Status == EnumGSTaskStatus.完成.ToString() && backCell.Cell_Child_Status == EnumCellStatus.空闲.ToString())
                {
                    restr = "此货位为双深工位 ,需要先送入后面的货位再入前面的货位!";
                    return(false);
                }
                if (backCell != null && backCell.Cell_Child_Run_Status == EnumGSTaskStatus.锁定.ToString())
                {
                    restr = "此货位为双深工位 ,需要先送入后面的货位再入前面的货位,后面的工位处于锁定状态!";
                    return(false);
                }
            }
            if (targetCell.Cell_Child_Run_Status != EnumGSTaskStatus.完成.ToString() && targetCell.Cell_Child_Status != EnumCellStatus.空闲.ToString())
            {
                restr = "指定货位已经被占用!";
                return(false);
            }

            manage.Mange_ID = Guid.NewGuid().ToString();

            manage.Mange_Start_Cell_ID     = stationCell.Cell_Child_ID;
            manage.Mange_End_Cell_ID       = targetCell.Cell_Chlid_ID;
            manage.Mange_Status            = EnumManageTaskStatus.待执行.ToString();
            manage.Manage_BreakDown_Status = "待分解";
            manage.Mange_Stock_Barcode     = palletCode;
            if (taskType == EnumManageTaskType.空托盘上架)
            {
                manage.Mange_Type_ID = "7";// EnumManageTaskType.空托盘上架.ToString();
            }
            else if (taskType == EnumManageTaskType.架)
            {
                manage.Mange_Type_ID = "6";//上架
            }
            else
            {
                restr = "任务类型错误!";
                return(false);
            }
            View_StockListModel vslm = bllViewStockList.GetModelByPalletCode(palletCode, EnumCellType.配盘工位.ToString());//

            if (vslm == null)
            {
                restr = "没有配盘,请查看!";
                return(false);
            }
            EnumOrderType orderType = EnumOrderType.计划;

            if (vslm.Plan_List_ID == "-1")//无计划的
            {
                manage.Plan_ID = "-1";
                orderType      = EnumOrderType.非计划;
            }
            else
            {
                orderType = EnumOrderType.计划;
                View_Plan_StockListModel plan = bllViewPalnStockList.GetModelByPalletCode(palletCode);
                if (plan == null)
                {
                    restr = "当前库存没有对应计划!";
                    return(false);
                }
                manage.Plan_ID = plan.Plan_ID;
            }
            manageID = manage.Mange_ID;
            bllManage.Add(manage);
            bool status = CreatePutawayManageListTask(manage.Mange_ID, orderType, palletCode, ref restr);

            if (status == true)
            {
                restr += "生成托盘[" + palletCode + "]上架任务成功:终点:" + houseName + targetCell.Cell_Name + targetCell.Cell_Chlid_Position;
                UpdateCellStatus(targetCell.Cell_Chlid_ID, EnumCellStatus.空闲, EnumGSTaskStatus.锁定, EnumGSOperate.入库);
                return(true);
            }
            else
            {
                restr += "生成托盘[" + palletCode + "]上架任务失败:终点:" + houseName + targetCell.Cell_Name + targetCell.Cell_Chlid_Position;
                return(false);
            }
        }
Ejemplo n.º 24
0
 public HttpResponseMessage GetCount(int? page = 1,
     int? pageCount = 10,
     string ids = "",
     bool isDescending = false,
     string orderNum = "",
     EnumOrderStatus? status = null,
     string deliveryAddress = "",
     bool? isPrint = null,
     string phoneNumber = "",
     EnumOrderType? type = null,
     EnumPayType? payType = null,
     decimal? locationX = null,
     decimal? locationY = null,
     DateTime? addTimeBegin = null,
     DateTime? addTimeEnd = null,
     EnumOrderSearchOrderBy orderBy = EnumOrderSearchOrderBy.OrderById)
 {
     var condition = new OrderSearchCondition
     {
         AddTimeBegin = addTimeBegin,
         AddTimeEnd = addTimeEnd,
         DeliveryAddress = deliveryAddress,
         Ids = string.IsNullOrEmpty(ids) ? null : ids.Split(',').Select(int.Parse).ToArray(),
         IsDescending = isDescending,
         IsPrint = isPrint,
         LocationX = locationX,
         LocationY = locationY,
         OrderBy = orderBy,
         OrderNum = orderNum,
         Page = page,
         PageCount = pageCount,
         PayType = payType,
         PhoneNumber = phoneNumber,
         Type = type,
         Status = status
     };
     var count = _OrderService.GetOrderCount(condition);
     return PageHelper.toJson(new { TotalCount = count, Condition = condition });
 }
Ejemplo n.º 25
0
        /// <summary>
        /// 获取阿里订单下载日志列表
        /// </summary>
        /// <param name="orderType"></param>
        /// <param name="isSuccess">下载结果 1:成功;0:失败</param>
        /// <param name="downType">下载类型 1:自动;2手动</param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="totalCount"></param>
        /// <param name="pageCount"></param>
        /// <param name="agentid"></param>
        /// <param name="clientid"></param>
        /// <returns></returns>
        public List<AliOrderUpdateLog> GetAliOrderDownloadLogs(EnumOrderType orderType, int isSuccess, int downType, DateTime startTime, DateTime endTime, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string agentID, string clientID)
        {
            List<AliOrderUpdateLog> list = new List<AliOrderUpdateLog>();
            DataTable dt = AliOrderDAL.BaseProvider.GetAliOrderUpdateLogs((int)orderType, isSuccess, downType,
                startTime, endTime, pageSize,
                pageIndex, ref totalCount, ref pageCount, agentID, clientID);

            return list;
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 新增阿里订单下载日志
        /// </summary>
        /// <param name="orderType"></param>
        /// <param name="isSuccess">下载结果 1:成功;0:失败</param>
        /// <param name="downType">下载类型 1:自动;2手动</param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="totalCount"></param>
        /// <param name="successCount"></param>
        /// <param name="agentID"></param>
        /// <param name="clientID"></param>
        /// <returns></returns>
        public bool AddAliOrderDownloadLog(EnumOrderType orderType, bool isSuccess,AlibabaSdk.AliOrderDownType downType, DateTime startTime, DateTime endTime, int successCount, int totalCount,string remark, string agentID, string clientID)
        {
            bool flag = AliOrderDAL.BaseProvider.AddAliOrderUpdateLog((int)orderType, isSuccess?1:0,(int)downType,
                startTime, endTime, successCount, totalCount,remark,
                agentID, clientID);

            return flag;
        }
Ejemplo n.º 27
0
 private void CloseLongPosition(double price, int volume, int slipPoint, double priceTick, EnumOrderType orderType = EnumOrderType.限价单)
 {
     CloseFuturesPositions(SYMBOL, EnumDirectionType.Buy, price, volume, slipPoint, orderType, EnumHedgeFlag.投机);
 }
Ejemplo n.º 28
0
        public bool UpdateAliOrderDownloadPlanSuccessTime(string clientID, EnumOrderType orderType, DateTime successTime)
        {
            bool flag = AliOrderDAL.BaseProvider.UpdateAliOrderDownloadPlanSuccessTime(clientID, (int)orderType, successTime);

            return flag;
        }