| | |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | Dt_container_head head = Dt_container_headRepository.Instance.FindFirst(r => r.containerhead_barcode == barcode); |
| | | if (null != head) |
| | | return content.Error("å½åæçå·å·²åå¨åºé,è¯·æ£æ¥:" + barcode); |
| | | Dt_container_head_hty container_Head_Hty = Dt_container_head_htyRepository.Instance.Find(x => x.containerhead_barcode == barcode |
| | | && x.containerhead_operatetype == "empty" && x.containerhead_creator != "WCS") |
| | | |
| | | .OrderByDescending(x => x.containerhead_finishtime).First(); |
| | | Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == barcode).FirstOrDefault(); |
| | | decimal weight = 0; |
| | | if (null != container_Head_Hty) |
| | | if (null != dt_Empty) |
| | | { |
| | | weight = string.IsNullOrEmpty(container_Head_Hty.containerhead_palletweight) ? 0 : decimal.Parse(container_Head_Hty.containerhead_palletweight); |
| | | weight = string.IsNullOrEmpty(dt_Empty.EmptyPallet_palletweight) ? 0 : decimal.Parse(dt_Empty.EmptyPallet_palletweight); |
| | | } |
| | | content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() => |
| | | { |