lss
3 天以前 553f7744bedee0685635ed070a4a0e18b796238f
HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs
@@ -37,9 +37,9 @@
        #region 佳通合肥接口业务
        public static object _lockCreateTask = new object();
        public static object _lockCreateItem = new object();
        public static object _lockCreateTask = new object();
        /// <summary>
        /// 立库任务下发=》创建任务
        /// </summary>
@@ -146,6 +146,19 @@
                                    AddErrorInfo("寻找出库货位失败", result.msg, Source);
                                    return result;
                                }
                                //endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First();
                                //if (endloc != null)
                                //{
                                //    End = taskData.dropStation;
                                //}
                                //else
                                //{
                                //    result.code = "1";
                                //    result.msg = $"根据终点{End},找不到对应货位,请检查货位表";
                                //    AddErrorInfo("货位查找失败", result.msg, Source);
                                //    return result;
                                //}
                            }
                            else
                            {
@@ -154,6 +167,8 @@
                                AddErrorInfo("创建托盘失败", result.msg, Source);
                                return result;
                            }
                        }
                        else
                        {
@@ -213,7 +228,7 @@
                    }
                    else if (taskData.taskType == 3)//移库流程,直接使用起点货位和终点货位生成任务,
                    {
                        note = "出库";
                        note = "入库";
                        //创建托盘物料绑定信息,并计算终点货位
                        startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First();
                        if (startloc != null)
@@ -832,7 +847,7 @@
                    type = "平库空工装呼叫";
                    break;
                case "4":
                    type = "平库余料回库";
                    type = "余料返回";
                    break;
                case "5":
                    type = "粉料空托返回";
@@ -858,25 +873,7 @@
                        AddErrorInfo("货位查找失败", result.msg, Source);
                        return result;
                    }
                    else
                    {
                        //判断起点是否绑定其他托盘
                        var CntrRel = LocationHelper.GetLocCntrRel(startloc.S_CODE).OrderBy(a => a.T_CREATE).FirstOrDefault();
                        if (CntrRel != null)
                        {
                            if (CntrRel.S_CNTR_CODE != model.Rfid)
                            {
                                result.code = "1";
                                result.msg = $"根据起点:{model.InitialLocation}获取托盘:{CntrRel.S_CNTR_CODE}与下发托盘:{model.Rfid}不一致,请检查托盘码是否正确";
                                AddErrorInfo("托盘码校检失败", result.msg, Source);
                                return result;
                            }
                        }
                        else
                        {
                            LocationHelper.BindingLoc(startloc.S_CODE, new List<string> { model.Rfid });
                        }
                    }
                    endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.TargetLocation).First();
                    if (endloc == null)
                    {
@@ -934,8 +931,7 @@
                                }
                            }
                            LocationHelper.LockLoc(startloc.S_CODE, 2);
                            LocationHelper.LockLoc(endloc.S_CODE, 1);
                            LogHelper.Info("创建任务成功");
                        }
                        else