| | |
| | | cBillNo = BillNo.GetBillNo("IN(入库单)"); |
| | | |
| | | var suppNo = db.Queryable<MesSupplier>() |
| | | .Where(s => s.Id.ToString() == inventory.SuppId) |
| | | .Select(s => s.SuppNo).First(); |
| | | .Where(s => s.Id.ToString() == inventory.SuppId).First(); |
| | | |
| | | db.Insertable(new MesInvItemIns |
| | | { |
| | |
| | | BillNo = cBillNo, |
| | | BillTypeId = billTypeId, |
| | | InsDate = DateTime.Now, |
| | | DepotsId = mesDepost.DepotId, |
| | | DepotsCode = mesDepost.DepotCode, |
| | | TransctionNo = transactionNo, |
| | | SuppNo = suppNo, |
| | | SuppId = suppNo.Id.ToString(), |
| | | SuppNo = suppNo.SuppNo, |
| | | CreateBy = user, |
| | | CreateDate = DateTime.Now, |
| | | LastupdateBy = user, |
| | | LastupdateDate = DateTime.Now, |
| | | UrgentFlag = itemBarcodeDetails.UrgentFlag.Value ? 1 : 0, |
| | | UrgentFlag = itemBarcodeDetails.UrgentFlag.Value |
| | | ? (byte)1 |
| | | : (byte)0, |
| | | CbillNo = itemBarcodeDetails.BillNo, |
| | | Fstatus = 0, |
| | | Status = 0 |
| | |
| | | WorkNo = detail.WorkNo, |
| | | CbillNo = detail.CbillNo, |
| | | WorkLine = detail.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | Remark = itemBarcodeDetails.Memo, |
| | | EbelnK3id = detail.EbelnK3id, |
| | |
| | | EpFlag = true, |
| | | WorkType = 1, |
| | | ItemNo = detail.ItemNo, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | DepotCode = mesDepost.DepotCode, |
| | | DepotSectionCode = sectionCode, |
| | |
| | | EbelnLineNo = detail.EbelnLine, |
| | | CbillNo = detail.CbillNo, |
| | | WorkLine = detail.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | Remark = itemBarcodeDetails.Memo, |
| | | EbelnK3id = detail.EbelnK3id, |
| | |
| | | EpFlag = true, |
| | | WorkType = 1, |
| | | ItemNo = detail.ItemNo, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | DepotCode = mesDepost.DepotCode, |
| | | DepotSectionCode = sectionCode, |
| | |
| | | BillNo = cBillNo, |
| | | WorkNo = itemBarcodeDetails.WorkNo, |
| | | WorkLine = itemBarcodeDetails.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | EbelnK3id = itemBarcodeDetails.EbelnK3id, |
| | | LineK3id = itemBarcodeDetails.LineK3id, |
| | |
| | | EbelnLineNo = itemBarcodeDetails.WorkLine, |
| | | CbillNo = itemBarcodeDetails.BillNo, |
| | | WorkLine = itemBarcodeDetails.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | Remark = itemBarcodeDetails.Memo, |
| | | EbelnK3id = itemBarcodeDetails.EbelnK3id, |
| | |
| | | WorkType = 1, |
| | | ItemNo = itemBarcodeDetails.ItemNo, |
| | | LotNo = itemBarcodeDetails.LotNo, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | DepotCode = mesDepost.DepotCode, |
| | | DepotSectionCode = sectionCode, |
| | |
| | | BillNo = cBillNo, |
| | | WorkNo = itemBarcodeDetails.WorkNo, |
| | | WorkLine = itemBarcodeDetails.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | EbelnK3id = itemBarcodeDetails.EbelnK3id, |
| | | LineK3id = itemBarcodeDetails.LineK3id, |
| | |
| | | BoardStyle = itemBarcodeDetails.BoardStyle, |
| | | WorkNo = itemBarcodeDetails.WorkNo, |
| | | WorkLine = itemBarcodeDetails.WorkLine, |
| | | SuppId = itemBarcodeDetails.SuppId, |
| | | SuppNo = itemBarcodeDetails.SuppNo, |
| | | EbelnK3id = itemBarcodeDetails.EbelnK3id, |
| | | LineK3id = itemBarcodeDetails.LineK3id, |
| | |
| | | throw new ApplicationException("GUID转换错误"); |
| | | |
| | | var result = Db.Queryable<MesInvItemInCDetails, MesItems, MesUnit>( |
| | | (g, c,d) => new JoinQueryInfos( |
| | | JoinType.Left,g.ItemId == c.Id, |
| | | JoinType.Inner,d.Id == Convert.ToDecimal(g.Unit) |
| | | ) |
| | | ).WhereIF(UtilityHelper.CheckGuid(parsedGuid), |
| | | (g, c,d) => g.ItemInId == parsedGuid) |
| | | .Select((g, c,d)=> new MesInvItemInCItems |
| | | { |
| | | Guid = g.Guid, |
| | | WorkNo = g.WorkNo, |
| | | ItemNo = c.ItemNo, |
| | | ItemSname = g.ItemSname, |
| | | Quantity = g.Quantity, |
| | | Unit = d.Fname, |
| | | }) |
| | | (g, c, d) => new JoinQueryInfos( |
| | | JoinType.Left, g.ItemId == c.Id, |
| | | JoinType.Inner, d.Id == Convert.ToDecimal(g.Unit) |
| | | ) |
| | | ).WhereIF(UtilityHelper.CheckGuid(parsedGuid), |
| | | (g, c, d) => g.ItemInId == parsedGuid) |
| | | .Select((g, c, d) => new MesInvItemInCItems |
| | | { |
| | | Guid = g.Guid, |
| | | WorkNo = g.WorkNo, |
| | | ItemNo = c.ItemNo, |
| | | ItemSname = g.ItemSname, |
| | | Quantity = g.Quantity, |
| | | Unit = d.Fname, |
| | | }) |
| | | .ToList(); |
| | | |
| | | return result; |
| | |
| | | Db.Insertable(message).ExecuteReturnIdentity(); |
| | | if (executeReturnIdentity > 0) |
| | | { |
| | | //message.Guid = executeReturnIdentity; |
| | | // message.Guid = executeReturnIdentity; |
| | | message.Pid = executeReturnIdentity; |
| | | return message; |
| | | } |