| | |
| | | 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(); |
| | |
| | | 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(); |