/// <summary> /// 获取最新初始化入库任务目的区域 /// </summary> /// <returns></returns> public static string GetInAreaWMS(string from, string code, out string taskid) { try { string area = CommonSQL.GetToArea(code, out taskid); if (string.IsNullOrEmpty(area)) { // 请求WMS任务 WmsModel wms = mHttp.DoBarcodeScanTask(from, code); if (wms != null && !string.IsNullOrEmpty(wms.Task_UID)) { // 写入数据库 CommonSQL.InsertTaskInfo(wms.Task_UID, (int)wms.Task_type, wms.Barcode, wms.W_S_Loc, wms.W_D_Loc, ""); area = wms.W_D_Loc; } } return(area); } catch (Exception ex) { throw ex; } }