| | |
| | | |
| | | //DataTable dt = JsonConvert.DeserializeObject<DataTable>(paras.ToString()); |
| | | List<smtWoTableIn> currentList = new List<smtWoTableIn>(); |
| | | if (paras.Count > 0) |
| | | if (paras?.Count > 0) |
| | | { |
| | | //var duplicateWo = paras.GroupBy(p => p.关联工单号) |
| | | // .Where(g => g.Count() > 1) |
| | |
| | | item.原因 += $"站位号为空!"; |
| | | } |
| | | currentList.Add(item); |
| | | if (await Db.Queryable<SMT_WO_TABLE>().AnyAsync(x => x.WORK_ORDER == item.关联工单号 && x.ITEM_CODE == item.物料编码 && x.SLOT_NO==item.站位号)) |
| | | if (await Db.Queryable<SMT_WO_TABLE>().AnyAsync(x => x.WORK_ORDER == item.关联工单号 && x.ITEM_CODE == item.物料编码 && x.SLOT_NO==item.站位号&&x.SMT_CODE==item.贴片机编码)) |
| | | { |
| | | item.处理方式 = "修改"; |
| | | item.原因 += $"工单{item.关联工单号},物料编码{item.物料编码},站位号{item.站位号}与数据库重复!"; |
| | | item.原因 += $"工单{item.关联工单号},物料编码{item.物料编码},站位号{item.站位号},贴片机编码{item.贴片机编码}与数据库重复!"; |
| | | } |
| | | } |
| | | //for (int i = 0; i < item..Count; i++) |
| | |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | result.IsSuccessed = false; |
| | | result.Message = $"导入的物料不能为空"; |
| | | } |
| | | result.Data = currentList; |
| | | |
| | | } |