From 8ac082441213b39fabac9a2d0c4db06e5564a01e Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Mon, 21 Oct 2024 17:08:14 +0800 Subject: [PATCH 1/2] 1 --- WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 1 - WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs | 4 ++-- WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index f62f0dfe..d9428c15 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -507,7 +507,6 @@ namespace Tnb.WarehouseMgr { cyDb = _db.CopyNew(); } - List> items = cyDb.Queryable().LeftJoin((a, b) => a.id == b.carry_id) .LeftJoin((a, b, c) => a.location_id == c.id) .Where(whereExpr) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs index a3b6f300..9f873e19 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs @@ -317,13 +317,13 @@ namespace Tnb.WarehouseMgr item.actual_quantity += outsource_arriveqty; if (item.actual_quantity > item.outsource_quantity) { - throw Oops.Bah($"委外收货单明细行物料{item.matcode} 批次{item.code_batch} 到货数量不能超过采购数量!"); + //throw Oops.Bah($"委外收货单明细行物料{item.matcode} 批次{item.code_batch} 到货数量不能超过采购数量!"); } WmsOutsourceOrderD wmsOutsourceOrderD = wmsOutsourceOrderDs.Where(r => r.erp_line_pk == item.erp_outsource_order_d_pk).First(); wmsOutsourceOrderD.actual_quantity += outsource_arriveqty; if (wmsOutsourceOrderD.actual_quantity > wmsOutsourceOrderD.outsource_quantity) { - throw Oops.Bah($"采购订单明细行物料{wmsOutsourceOrderD.matcode} 批次{wmsOutsourceOrderD.code_batch} 到货数量不能超过采购数量!"); + //throw Oops.Bah($"采购订单明细行物料{wmsOutsourceOrderD.matcode} 批次{wmsOutsourceOrderD.code_batch} 到货数量不能超过采购数量!"); } } await _db.Updateable(dList).UpdateColumns(r => r.actual_quantity).ExecuteCommandAsync(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs index c3d62f60..5f2c1be3 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs @@ -222,7 +222,7 @@ namespace Tnb.WarehouseMgr item.purchase_prqty += purchase_arriveqty; if (item.purchase_prqty > item.purchase_qty) { - throw Oops.Bah($"采购收货单明细行物料{item.material_code} 批次{item.code_batch} 到货数量不能超过采购数量!"); + //throw Oops.Bah($"采购收货单明细行物料{item.material_code} 批次{item.code_batch} 到货数量不能超过采购数量!"); } if (wmsPurchaseOrderDs.Count > 0) @@ -231,7 +231,7 @@ namespace Tnb.WarehouseMgr wmsPurchaseOrderD.actual_quantity += purchase_arriveqty; if (wmsPurchaseOrderD.actual_quantity > wmsPurchaseOrderD.purchase_quantity) { - throw Oops.Bah($"采购订单明细行物料{wmsPurchaseOrderD.matcode} 批次{wmsPurchaseOrderD.code_batch} 到货数量不能超过采购数量!"); + //throw Oops.Bah($"采购订单明细行物料{wmsPurchaseOrderD.matcode} 批次{wmsPurchaseOrderD.code_batch} 到货数量不能超过采购数量!"); } } 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 2/2] =?UTF-8?q?=E8=B4=A8=E6=A3=80=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=AE=8C=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;