| | |
| | | using StackExchange.Profiling.Internal; |
| | | using Mapster; |
| | | using StackExchange.Profiling.Internal; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.MES; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_StorageBasicRepository; |
| | | |
| | | namespace WIDESEA_StoragIntegrationServices |
| | | { |
| | |
| | | //æ¥æ¾å¯¹åºçPVIç è½¦èº«ä¿¡æ¯ |
| | | var carinfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI); |
| | | if (carinfo == null) throw new Exception($"{json.PVI}è½¦èº«ä¿¡æ¯æªæ¾å°"); |
| | | |
| | | Dt_CarBodyInfo_hty carInfo_Hty = carinfo.Adapt<Dt_CarBodyInfo_hty>(); |
| | | carInfo_Hty.FinishTime = DateTime.Now; |
| | | carInfo_Hty.FinishType = (int)OperateTypeEnum.èªå¨å®æ; |
| | | carInfo_Hty.sourceID = carinfo.Id; |
| | | |
| | | VINRespon respon = new VINRespon(); |
| | | if (!string.IsNullOrEmpty(carinfo.VIN)) |
| | | { |
| | |
| | | SkyLight = carinfo.skylightCharacteristic, |
| | | VechicleModel = carinfo.vehicleCharacteristic, |
| | | }; |
| | | |
| | | _carBodyInfo_HtyRepository.AddData(carInfo_Hty); |
| | | _carBodyInfoRepository.DeleteData(carinfo); |
| | | |
| | | return content.OK(data: respon); |
| | | } |
| | | |
| | |
| | | |
| | | //è¿ç¹ä¿¡æ¯ |
| | | WebResponseContent content1 = _mesService.PassPoint(json); |
| | | if (!content1.Status) throw new Exception($"è¿ç¹å¤±è´¥ï¼{content1.msg},请æ±ä¿¡æ¯:{{json.ToJson()"); |
| | | if (!content1.Status) throw new Exception($"è¿ç¹å¤±è´¥ï¼{content1.msg},请æ±ä¿¡æ¯:{json.ToJson()}"); |
| | | |
| | | //è·åVINå· |
| | | WebResponseContent responseContent = _mesService.getCharacteristic(json); |
| | |
| | | VechicleModel = carinfo.vehicleCharacteristic, |
| | | }; |
| | | |
| | | var mesLock = _mesLockInfoRepository.QueryFirst(x => x.carBodyID == carinfo.Id); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | //å é¤è½¦èº«ä¿¡æ¯ |
| | | carInfo_Hty.VIN = respon.VIN; |
| | | _carBodyInfo_HtyRepository.AddData(carInfo_Hty); |
| | | _carBodyInfoRepository.DeleteData(carinfo); |
| | | if (mesLock != null) |
| | | { |
| | | mesLock.LockStatue = 2; |
| | | _mesLockInfoRepository.UpdateData(mesLock); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK(data: respon); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |