| | |
| | | return entity; |
| | | } |
| | | |
| | | public MesInvItemIns GetMesInvItemIns(decimal? id) |
| | | public MesInvItemIns GetMesInvItemIns(decimal id) |
| | | { |
| | | return Db.Queryable<MesInvItemIns>() |
| | | .Where(s => s.Id == id).Single(); |
| | | } |
| | | |
| | | public List<MesInvItemInCDetails> GetMesInvItemInCDetailsList(decimal? id) |
| | | public List<MesInvItemInCDetails> GetMesInvItemInCDetailsList(decimal id) |
| | | { |
| | | return Db.Queryable<MesInvItemInCDetails, MesUnit>((a, b) => |
| | | new JoinQueryInfos(JoinType.Inner, a.Unit == b.Id.ToString())) |
| | |
| | | CbillNo = barcodeInfo.BillNo, |
| | | UrgentFlag = barcodeInfo.UrgentFlag, |
| | | BoardStyle = barcodeInfo.BoardStyle, |
| | | TaskNo = barcodeInfo.TaskNo, |
| | | ItemId = barcodeInfo.ItemId, |
| | | TaskNo = barcodeInfo.TaskNo |
| | | }).ExecuteCommand(); |
| | | |
| | | if (executeCommand <= 0) throw new Exception("写入失败"); |
| | |
| | | private int CheckBarcodeAlreadyReceived(string itemBarcode) |
| | | { |
| | | // Check if the barcode is already received |
| | | return Db.Queryable<MesInvItemIns, MesInvItemInCDetails>( |
| | | (ins, details) => new JoinQueryInfos(JoinType.Inner, |
| | | return Db |
| | | .Queryable<MesInvItemIns, MesInvItemInCDetails>((ins, details) => |
| | | new JoinQueryInfos(JoinType.Inner, |
| | | ins.Id == details.ItemInId)) |
| | | .Where((ins, details) => details.ItemBarcode == itemBarcode) |
| | | .Count(); |
| | |
| | | BoardStyle = barcodeInfo.BoardStyle, |
| | | WorkNo = barcodeInfo.WorkNo, |
| | | WorkLine = barcodeInfo.WorkLine, |
| | | SuppNo = barcodeInfo.SuppNo, |
| | | ItemId = barcodeInfo.ItemId, |
| | | SuppNo = barcodeInfo.SuppNo |
| | | }).ExecuteCommand(); |
| | | |
| | | if (executeCommand <= 0) throw new Exception("写入失败"); |
| | |
| | | BillNo = billNo, |
| | | WorkNo = barcodeInfo.WorkNo, |
| | | WorkLine = barcodeInfo.WorkLine, |
| | | SuppNo = barcodeInfo.SuppNo, |
| | | ItemId = barcodeInfo.ItemId, |
| | | SuppNo = barcodeInfo.SuppNo |
| | | }).ExecuteCommand(); |
| | | |
| | | if (executeCommand <= 0) throw new Exception("写入失败"); |