Controllers/base/MessageCenterController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Dto/service/Material.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
entity/MessageCenter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
service/Warehouse/MesInvItemInCDetailsManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Controllers/base/MessageCenterController.cs
@@ -81,13 +81,28 @@ [HttpPost("GetByPid")] public ResponseResult ResetUpdate([FromBody] JObject data) { var pid = Convert.ToDecimal(data["pid"].ToString()); var pid = data["pid"].ToString(); try { dynamic resultInfos = new ExpandoObject(); var parsedGuid = Guid.Empty; if (string.IsNullOrEmpty(pid)) { return new ResponseResult { status = 0, message = "OK", data = resultInfos }; } bool isValid = Guid.TryParse(pid, out parsedGuid); if (!isValid) throw new ApplicationException("GUID转换错误"); var messageCenter = m.GetById(pid); var messageCenters = m.GetList(it => it.Pid == pid); var messageCenters = m.GetList(it => it.Pid == parsedGuid); messageCenters.Add(messageCenter); resultInfos.tbBillList = messageCenters; return new ResponseResult Dto/service/Material.cs
@@ -6,15 +6,15 @@ public string? FUintId { get; set; } public decimal? FActReceiveQty { get; set; } public string? FStockId { get; set; } public DateTime? FPreDeliveryDate { get; set; } public Guid? F_MES_ENTRYID { get; set; } public int? FSRCENTRYID { get; set; } public Guid? FSRCENTRYGuid { get; set; } public string? FsrcEntryId { get; set; } public string? FLot { get; set; } public string? FMATERIALID { get; set; } public string? FRMREALQTY { get; set; } public string? FSTOCKID { get; set; } public string? FUINT { get; set; } public string? FRealQty { get; set; } public string? FUnitID { get; set; } public string? FMesEntryid { get; set; } } entity/MessageCenter.cs
@@ -87,7 +87,7 @@ /// ///</summary> [SugarColumn(ColumnName = "pid")] public int? Pid { get; set; } public Guid? Pid { get; set; } /// <summary> /// service/Warehouse/MesInvItemInCDetailsManager.cs
@@ -886,8 +886,12 @@ } var ErpUrl = AppsettingsUtility.Settings.ProductionErpUrl; var newGuid = Guid.NewGuid(); var message = new MessageCenter { Guid = newGuid, //Pid = newGuid, TableName = tableName, Url = ErpUrl, Status = 1, @@ -911,11 +915,10 @@ var message = MesToErpParam(query); var executeReturnIdentity = Db.Insertable(message).ExecuteReturnIdentity(); Db.Insertable(message).ExecuteCommand(); if (executeReturnIdentity > 0) { // message.Guid = executeReturnIdentity; message.Pid = executeReturnIdentity; message.Pid = message.Guid; return message; } @@ -959,24 +962,20 @@ MesInvItemArnDetail>( (g, c, d, a) => new JoinQueryInfos( JoinType.Left, g.ItemNo == c.ItemNo && g.Company == c.Company && g.Factory == c.Factory, JoinType.Inner, g.ItemId == c.Id , JoinType.Inner, d.Id == Convert.ToDecimal(c.ItemUnit), JoinType.Inner, a.Ebeln == g.WorkNo && a.WorkLine == g.EbelnLineNo && g.CbillNo == a.CbillNo JoinType.Inner, a.Ebeln == g.WorkNo && g.CbillNo == a.CbillNo ) ).Where((g, c, d, a) => g.BillNo == billNo).Select<Material>( (g, c, d, a) => new Material { // FstockId = g.DepotCode, // FuintId = d.Fnumber, // FsrcEntryId = a.Id, // FmesEntryId = g.Id, // FmaterialId = a.ItemNo, // DepotSectionCode = g.DepotSectionCode, // WorkNo = g.WorkNo, // Frealqty = g.Quantity FMaterialId = c.ItemNo, FRealQty = g.Quantity.ToString(), FStockId = g.DepotCode, FLot = a.CbillNo, FUnitID = d.Fnumber, FsrcEntryId = a.Guid.ToString(), FMesEntryid = g.Guid.ToString() }).ToList(); @@ -986,12 +985,13 @@ var jsonEntries = materials.Select(d => new { // FMaterialId = d.FmaterialId, // FUintId = d.FuintId, // FRealQty = d.Frealqty, // FStockId = d.FstockId, // FSRCENTRYID = d.FsrcEntryId.ToString(), // F_MES_ENTRYID = d.FmesEntryId.ToString() FMaterialId = d.FMaterialId, FRealQty = d.FRealQty, FStockId = d.FStockId, FLot = d.FLot, FUnitID = d.FUnitID, FsrcEntryId = d.FsrcEntryId, FMesEntryid = d.FMesEntryid }).ToList(); var fdate = DateTime.Now.ToString("yyyy-MM-dd");