| | |
| | | using Admin.NET.Application; |
| | | using iWareCC.Common.Helper; |
| | | using iWareCC.StationService; |
| | | using iWareCommon.Common.Globle; |
| | | using iWareCommon.Utils; |
| | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{result}æ²¡ææ¾å°å¯¹è±¡ "; |
| | | continue; |
| | | } |
| | | string upi = "LS070700101B0001GS"; |
| | | //è°ç¨åºçº¸æºæ¥å£ |
| | | var res =new HTTPService("http://172.17.1.22:44374/api/LuLi/").getContent<Respone>("cartons-machine?PackageCode="+upi, Guid.NewGuid(),10000); |
| | | if (res.iState == 0) |
| | | { |
| | | var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | if (papertable != null) |
| | | { |
| | | papertable.PushStatus = (int)PushStatusEnum.PushSuccess; |
| | | papertable.ApiMessage = res.message; |
| | | papertable.PushNum++; |
| | | } |
| | | else |
| | | { |
| | | var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); |
| | | papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | papercut.ApiMessage = res.message; |
| | | papercut.PushNum = 0; |
| | | papercut.PushStatus = (int)PushStatusEnum.PushSuccess; |
| | | wmsDB.mes_push_papercut.Add(papercut); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | if (papertable != null) |
| | | { |
| | | papertable.PushStatus = (int)PushStatusEnum.PushFail; |
| | | papertable.ApiMessage = res.message; |
| | | papertable.PushNum++; |
| | | } |
| | | else |
| | | { |
| | | var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); |
| | | papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | papercut.ApiMessage = res.message; |
| | | papercut.PushNum = 0; |
| | | papercut.PushStatus = (int)PushStatusEnum.PushFail; |
| | | wmsDB.mes_push_papercut.Add(papercut); |
| | | } |
| | | continue; |
| | | } |
| | | //string upi = "LS070700101B0001GS"; |
| | | ////è°ç¨åºçº¸æºæ¥å£ |
| | | //var res =new HTTPService("http://172.17.1.22:44374/api/LuLi/").getContent<Respone>("cartons-machine?PackageCode="+upi, Guid.NewGuid(),10000); |
| | | //if (res.iState == 0) |
| | | //{ |
| | | // var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | // if (papertable != null) |
| | | // { |
| | | // papertable.PushStatus = (int)PushStatusEnum.PushSuccess; |
| | | // papertable.ApiMessage = res.message; |
| | | // papertable.PushNum++; |
| | | // } |
| | | // else |
| | | // { |
| | | // var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); |
| | | // papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | // papercut.ApiMessage = res.message; |
| | | // papercut.PushNum = 0; |
| | | // papercut.PushStatus = (int)PushStatusEnum.PushSuccess; |
| | | // wmsDB.mes_push_papercut.Add(papercut); |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); |
| | | // if (papertable != null) |
| | | // { |
| | | // papertable.PushStatus = (int)PushStatusEnum.PushFail; |
| | | // papertable.ApiMessage = res.message; |
| | | // papertable.PushNum++; |
| | | // } |
| | | // else |
| | | // { |
| | | // var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); |
| | | // papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | // papercut.ApiMessage = res.message; |
| | | // papercut.PushNum = 0; |
| | | // papercut.PushStatus = (int)PushStatusEnum.PushFail; |
| | | // wmsDB.mes_push_papercut.Add(papercut); |
| | | // } |
| | | // continue; |
| | | //} |
| | | //æ´æ°è¡¨ |
| | | var mesgather = wmsDB.mes_package_gather.Where(x => x.PackageCode == upiObj.PackageCode).FirstOrDefault(); |
| | | if (mesgather != null) |
| | |
| | | print.PrintNum= 0; |
| | | print.PrintStatus = (int)PrintStatuEnum.æªæå°; |
| | | print.IsAllowPrint= true; |
| | | print.CreateTime = print.UpdateTime = DateTime.Now; |
| | | wmsDB.wms_record_print.Add(print); |
| | | wms_record_print printtwo = print; |
| | | printtwo.Id= Yitter.IdGenerator.YitIdHelper.NextId(); |
| | |
| | | //å¤ç表 mes_order_gather |
| | | var errmsg = ""; |
| | | var package = wmsDB.mes_package_gather.Where(x => x.PackageCode == upiObj.PackageCode).FirstOrDefault(); |
| | | var resultAlert = DataProcess_ValidateQiTao.HandlerOrderGather(wmsDB, package, "", "", out errmsg); |
| | | var resultAlert = MyExtendHelper.HandlerOrderGather(wmsDB, package, "", "", out errmsg); |
| | | if (resultAlert == false) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ21 = errmsg; |