| | |
| | | /// </summary> |
| | | public partial class MESService |
| | | { |
| | | public WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo) |
| | | public WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo, string palletCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | } |
| | | var wmsIpAddress = wmsBase + ipAddress; |
| | | |
| | | var MESrespon = HttpHelper.PostAsync(wmsIpAddress, characterInfo.ToJson()).Result; |
| | | |
| | | IssuedCharacterRespon characterRespon = JsonConvert.DeserializeObject<IssuedCharacterRespon>(MESrespon); |
| | | if (!characterRespon.success) |
| | | var MESrespon = HttpHelper.PostAsync(wmsIpAddress, characterInfo.ToJson(), contentType, headers).Result; |
| | | Console.WriteLine(MESrespon); |
| | | WebResponseContent webResponse = JsonConvert.DeserializeObject<WebResponseContent>(MESrespon.ToString()); |
| | | if (webResponse.Code != 200) |
| | | { |
| | | throw new Exception($"{characterRespon}"); |
| | | throw new Exception($"{webResponse.Message}"); |
| | | } |
| | | |
| | | Dt_CarBody CarBody = new Dt_CarBody() |
| | | IssuedCharacterRespon characterRespon = JsonConvert.DeserializeObject<IssuedCharacterRespon>(webResponse.Data.ToJson()); |
| | | |
| | | Dt_CarBodyInfo CarBody = new Dt_CarBodyInfo() |
| | | { |
| | | biwInPassTime = characterRespon.biwInPassTime, |
| | | biwMaterialCode = characterRespon.biwMaterialCode, |
| | | skylightCharacteristic = characterRespon.skylightCharacteristic, |
| | | vehicleCharacteristic = characterRespon.vehicleCharacteristic, |
| | | workOrderNo = characterRespon.workOrderNo, |
| | | workOrderType = characterRespon.workOrderType, |
| | | BodyStatus = "", |
| | | CarType = 1, |
| | | CreateDate = DateTime.Now, |
| | | Creater = "system", |
| | | Description = "", |
| | | PalletCode = rfidPrint, |
| | | PVI = characterRespon.rfidPrint |
| | | PalletCode = palletCode, |
| | | PVI = characterRespon.pvi |
| | | }; |
| | | |
| | | _carBodyRepository.AddData(CarBody); |