| | |
| | | public WebResponseContent ReceiveWeightResultFromWCS(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | |
| | | try |
| | | { |
| | | string barcode = saveModel.MainData["barcode"].ToString(); |
| | | string weight = saveModel.MainData["weight"].ToString(); |
| | | |
| | | if (weight == null || weight == "0") |
| | | { |
| | | throw new Exception($"æçå·ï¼ã{barcode}ãï¼ééä¸å¯¹ä¸ç¬¦åè§å®"); |
| | | } |
| | | |
| | | Dt_taskinfo taskInfo = Dt_taskinfoRepository.Instance.FindFirst(x => x.task_barcode == barcode); |
| | | if (null == taskInfo) |
| | |
| | | //没æç»çä¿¡æ¯ï¼è¯´æè¯¥ééæ¯ç©ºæççéé |
| | | if (null == boxHead) |
| | | { |
| | | Dt_EmptyPallet dt_Empty= Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode); |
| | | Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode); |
| | | if (null == dt_Empty) |
| | | { |
| | | Dt_EmptyPallet dt_Empty1=new Dt_EmptyPallet(); |
| | | Dt_EmptyPallet dt_Empty1 = new Dt_EmptyPallet(); |
| | | dt_Empty1.EmptyPallet_name = barcode; |
| | | dt_Empty1.EmptyPallet_palletweight = weight; |
| | | dt_Empty1.EmptyPallet_creator = "WMS"; |
| | |
| | | dt_Empty1.EmptyPallet_modifier = "WMS"; |
| | | dt_Empty1.EmptyPallet_modifiertime = DateTime.Now; |
| | | Dt_EmptyPalletRepository.Instance.Add(dt_Empty1,true); |
| | | taskInfo.task_weight = weight; |
| | | } |
| | | else |
| | | { |
| | | taskInfo.task_weight = dt_Empty.EmptyPallet_palletweight; |
| | | } |
| | | |
| | | |
| | | Dt_taskinfoRepository.Instance.Update(taskInfo, true); |
| | | } |
| | | else//æç»çä¿¡æ¯ï¼è¯´æè¯¥ééæ¯è½´æ¿å®æçéé |
| | |
| | | } |
| | | Logger.AddLog(Core.Enums.LoggerType.Edit, saveModel, content, content); |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå
¥åºåºåååºåºåºåçæ¨¡å¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetInorOutMODELS(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | return content; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() => |
| | | { |
| | | //è·åç©ºè´§ä½ |
| | | Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(); |
| | | Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(2); |
| | | LogRecord.WriteLog((int)LogEnum.InBound, $"æçæ¡ç ï¼{barcode},åé
çè´§ä½å·{emptyLocation.location_id}ï¼è´§ä½ç¶æï¼{emptyLocation.location_state}"); |
| | | VV_ContainerInfo_EmptyPallet SelectLocation = VV_ContainerInfo_EmptyPalletRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id); |
| | | VV_ContainerInfo conInfohw = VV_ContainerInfoRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id); |
| | | if (SelectLocation != null || conInfohw != null) |
| | | { |
| | | LogRecord.WriteLog((int)LogEnum.InBound, $"åé
çè´§ä½å·²æè´§,è´§ä½å·{emptyLocation.location_id}"); |
| | | throw new Exception($"åé
çè´§ä½å·²æè´§,è´§ä½å·{SelectLocation.location_id}"); |
| | | } |
| | | |
| | | Dt_taskinfo taskinfo = new Dt_taskinfo(); |
| | | taskinfo.task_id = Guid.NewGuid(); |