From a96bdb4091f5420ceef2770af547327389da5720 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Mon, 21 Oct 2024 18:01:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E6=A3=80=E6=8A=A5=E8=A1=A8=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/WmsPurchaseQcrecord.cs | 10 ++++++++++ WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs | 2 ++ WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs | 2 ++ .../Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs | 10 +++++++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseQcrecord.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseQcrecord.cs index e0dbe939..81bbbe32 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseQcrecord.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsPurchaseQcrecord.cs @@ -103,6 +103,16 @@ public partial class WmsPurchaseQcrecord : BaseEntity /// 批次 /// public string? batchno { get; set; } + + /// + /// 质检人 + /// + public string? checker { get; set; } + + /// + /// 质检时间 + /// + public DateTime? check_time { get; set; } /// /// /// diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs index db87532b..cc70b442 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs @@ -108,6 +108,8 @@ namespace Tnb.WarehouseMgr wmsPurchaseQcrecord.purchase_prqty = wmsOutsourceD.actual_quantity; wmsPurchaseQcrecord.purchase_arriveqty = wmsOutsourceD.actual_quantity; wmsPurchaseQcrecord.result = qcRes; + wmsPurchaseQcrecord.checker = create_id; + wmsPurchaseQcrecord.check_time = DateTime.Now; await _db.Insertable(wmsPurchaseQcrecord).ExecuteCommandAsync(); } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs index d2ff9b4a..97f5181a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs @@ -108,6 +108,8 @@ namespace Tnb.WarehouseMgr wmsPurchaseQcrecord.purchase_prqty = wmsPurchaseD.purchase_prqty; wmsPurchaseQcrecord.purchase_arriveqty = wmsPurchaseD.purchase_arriveqty; wmsPurchaseQcrecord.result = qcRes; + wmsPurchaseQcrecord.checker = create_id; + wmsPurchaseQcrecord.check_time = DateTime.Now; await _db.Insertable(wmsPurchaseQcrecord).ExecuteCommandAsync(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs index ca411ba8..c0318539 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using JNPF.Common.Core.Manager; using JNPF.Common.Filter; +using JNPF.Systems.Entitys.Permission; using JNPF.Systems.Entitys.System; using JNPF.Systems.Interfaces.System; using JNPF.VisualDev; @@ -76,7 +77,7 @@ namespace Tnb.WarehouseMgr { type = JObject.Parse(input.queryJson).Value("type"); material_code = JObject.Parse(input.queryJson).Value(nameof(WmsCarryCode.material_code)); - batchno = JObject.Parse(input.queryJson).Value("batchno"); + batchno = JObject.Parse(input.queryJson).Value("code_batch"); material_specification = JObject.Parse(input.queryJson).Value(nameof(WmsCarryCode.material_specification)); container_no = JObject.Parse(input.queryJson).Value(nameof(WmsCarryCode.container_no)); if (JObject.Parse(input.queryJson).ContainsKey("time")) @@ -100,6 +101,7 @@ namespace Tnb.WarehouseMgr .InnerJoin((a, b) => a.material_id == b.id) .LeftJoin((a, b, c) => c.EnCode == b.unit_id && c.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID) .LeftJoin((a, b, c, d) => d.id == a.ori_detail_id) + .LeftJoin((a, b, c, d, e) => e.Id == a.checker) .WhereIF(!string.IsNullOrEmpty(material_specification), (a, b, c, d) => b.material_specification.Contains(material_specification)) .WhereIF(!string.IsNullOrEmpty(batchno), (a, b, c, d) => a.batchno.Contains(batchno)) .WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d) => b.material_standard.Contains(container_no)) @@ -107,7 +109,7 @@ namespace Tnb.WarehouseMgr .WhereIF(!string.IsNullOrEmpty(type), (a, b, c, d) => a.type == type) .WhereIF(_start_time != 0, (a, b, c, d) => a.create_time >= start_time) .WhereIF(_end_time != 0, (a, b, c, d) => a.create_time <= end_time) - .Select((a, b, c, d) => new WmsPurchaseQcrecord + .Select((a, b, c, d, e) => new WmsPurchaseQcrecord { material_id = a.material_id, material_code = a.material_code, @@ -122,7 +124,9 @@ namespace Tnb.WarehouseMgr result = SqlFunc.IF(a.result.Equals("await") || string.IsNullOrEmpty(a.result)).Return("待检") .ElseIF(a.result.Equals("vergeOk")).Return("让步接收").ElseIF(a.result.Equals("ok")).Return("合格") .ElseIF(a.result.Equals("no")).Return("不合格").End(""), - create_time = d.create_time + create_time = d.create_time, + checker = e.RealName, + check_time = a.check_time }).ToListAsync(); total_qty = data.Count;