| | |
| | | /// <summary> |
| | | /// 时间戳 |
| | | /// </summary> |
| | | public int timeStamp { get; set; } |
| | | public string timeStamp { get; set; } |
| | | /// <summary> |
| | | /// 照片url |
| | | /// </summary> |
| | |
| | | model.trayCode = trayCode; |
| | | model.endArea = endArea; |
| | | //将数据插入中间表 |
| | | ERPService.senderpTaskDG(startBit, trayCode); |
| | | if(!ERPService.senderpTaskDG(startBit, trayCode)) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | else if (ItemCode == "time" || ItemCode == "拆盘变更" || ItemCode == "打包下线") |
| | | { |
| | | CMMLog.Info($"{trayCode}"); |
| | | var time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoCom>(Query.EQ("timeStamp", int.Parse(trayCode)), "TimeCuoInfoCom"); |
| | | TimeCuoInfoCom time = new TimeCuoInfoCom { }; |
| | | if (trayCode.Contains("MES")) |
| | | { |
| | | time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoCom>(Query.EQ("timeStampMES", trayCode), "TimeCuoInfoCom"); |
| | | } |
| | | else |
| | | { |
| | | time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoCom>(Query.EQ("timeStamp", int.Parse(trayCode)), "TimeCuoInfoCom"); |
| | | } |
| | | if (ItemCode == "time" && time != null) |
| | | { |
| | | int TimeStamp = string.IsNullOrEmpty(timeStamp) ? time.timeStamp : int.Parse(timeStamp); |
| | | string TimeStamp = string.IsNullOrEmpty(timeStamp) ? time.timeStamp.ToString() : timeStamp; |
| | | CMMLog.Info($"time获取时间戳数据,获取信息!"); |
| | | model.data.Add(new ItemData() |
| | | { |
| | |
| | | |
| | | foldingbag = "1", |
| | | //totalWeight = time.totalWeight, |
| | | timeStamp = 1, |
| | | timeStamp = "1", |
| | | photoURL = "1", |
| | | //productType = time.productModel, |
| | | //bagNumber = time.bagNumber, |
| | |
| | | } |
| | | else if (ItemCode == "打包下线") |
| | | { |
| | | int TimeStamp = string.IsNullOrEmpty(trayCode) ? time.timeStamp : int.Parse(trayCode); |
| | | string TimeStamp = string.IsNullOrEmpty(trayCode) ? time.timeStamp.ToString() : trayCode; |
| | | //List<string> batchList = time.batchNumber.Split('-').ToList(); |
| | | //string batch = ""; |
| | | //for(int i = 0; i < 1; i++) |
| | |
| | | var wmsResponse = JsonConvert.DeserializeObject<WMSResponseModel>(feedback); |
| | | //var res = feedback.Replace("{", "").Replace("}", "").Replace(":", "=").Replace(",", ";").Replace('"', ' '); |
| | | if (wmsResponse.Success == true) { |
| | | if(ItemCode == "打包下线") MongoDBSingleton.Instance.Remove<TimeCuoInfoCom>(Query.EQ("timeStamp", int.Parse(trayCode)), RemoveFlags.Single); |
| | | if (ItemCode == "打包下线") |
| | | { |
| | | if (trayCode.Contains("MES")) |
| | | { |
| | | MongoDBSingleton.Instance.Remove<TimeCuoInfoCom>(Query.EQ("timeStampMES", trayCode), RemoveFlags.Single); |
| | | } |
| | | else |
| | | { |
| | | MongoDBSingleton.Instance.Remove<TimeCuoInfoCom>(Query.EQ("timeStamp", int.Parse(trayCode)), RemoveFlags.Single); |
| | | } |
| | | } |
| | | msg = $"WMSIn-{startBit}:【调用wms获取入库货位】成功!返回结果=" + wmsResponse.Success + ";调用WebUrl=" + url + ";输入参数=" + msgData; |
| | | } |
| | | else { |