| | |
| | | 锘縰sing Newtonsoft.Json; |
| | | 锘縰sing Masuit.Tools; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | { |
| | | |
| | | if (string.IsNullOrEmpty(json.ToString())) throw new Exception("璇锋眰鍙傛暟涓虹┖"); |
| | | |
| | | var result = JsonConvert.DeserializeObject<SyncOrderFeatureInfo>(json.ToString()); |
| | | Console.WriteLine(json); |
| | | var result = JsonConvert.DeserializeObject<List<SyncOrderFeatureInfo>>(json.ToString()); //List<SyncOrderFeatureInfo> |
| | | |
| | | //todo 淇敼瀵瑰簲鏁版嵁 |
| | | |
| | | return content; |
| | | foreach (var item in result) |
| | | { |
| | | if (string.IsNullOrEmpty(item.workOrderNo)) throw new Exception($"鏈煡宸ュ崟鍙穥item.workOrderNo}"); |
| | | |
| | | var info = _assemblyOrderInfoRepository.QueryFirst(x => x.workOrderNo == item.workOrderNo); |
| | | if (info == null) throw new Exception($"鏈煡宸ュ崟鍙穥item.workOrderNo}"); |
| | | |
| | | } |
| | | |
| | | LogFactory.GetLog("璁㈠崟鐗瑰緛鍚屾").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("璁㈠崟鐗瑰緛鍚屾").Info(true, result.ToJsonString()); |
| | | return content.OK("鍚屾鎴愬姛"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(); |
| | | LogFactory.GetLog("璁㈠崟鐗瑰緛鍚屾").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("璁㈠崟鐗瑰緛鍚屾").Info(true, $"璁㈠崟鐗瑰緛鍚屾寮傚父锛歿ex.Message}"); |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | } |