From 68f270c47bffe9c7611bd37c5b9c814856e4b417 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Wed, 16 Oct 2024 10:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E6=9D=90=E6=96=99=E8=B4=A8=E6=A3=80?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Consts/ModuleConsts.cs | 6 ++ .../Consts/WmsWareHouseConst.cs | 6 ++ .../Tnb.WarehouseMgr/WareHouseService.cs | 6 +- .../WmsCarryStockReportService.cs | 4 +- .../WmsPurchaseQcrecordService.cs | 56 +++++++++++++++++++ 5 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/ModuleConsts.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/ModuleConsts.cs index 05e30c47..edf3e1c3 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/ModuleConsts.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/ModuleConsts.cs @@ -144,6 +144,12 @@ public class ModuleConsts /// 模块标识-材料出库单 todo /// public const string MODULE_WmsRawmatOutstock_ID = "MODULE_WmsRawmatOutstock_ID"; + /// + /// 模块标识-材料出库单 todo + /// + public const string MODULE_WmsPurchaseQcrecord_ID = "MODULE_WmsPurchaseQcrecord_ID"; + + /// /// 模块标识-物料签收记录 todo /// diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs index a516d14b..35894a7b 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs @@ -387,6 +387,12 @@ namespace Tnb.WarehouseMgr.Entities.Consts /// 预任务生成业务类型-原材料仓材料出库单 /// public const string BIZTYPE_WmsRawmatOutstock_ID = "36340105558037"; + + /// + /// 预任务生成业务类型-原材料仓质检记录 + /// + public const string BIZTYPE_WmsPurchaseQcrecord_ID = "BIZTYPE_WmsPurchaseQcrecord_ID"; + /// /// 预任务生成业务类型-生产退料单 /// diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index dff11fea..302fff30 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -3637,7 +3637,7 @@ namespace Tnb.WarehouseMgr points.Add(wmsPointHs.Where(r => r.point_code == $"DT-01-0{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.point_code == $"DT-1-{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.point_code == $"DT-4-{elevatorSno}").First()); - points.Add(wmsPointHs.Where(r => r.point_code == $"DT-04-0{elevatorSno}").First()); + points.Add(wmsPointHs.Where(r => r.point_code == $"DT-R-04-0{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.id == pEndId).First()); } // 2-4 @@ -3686,10 +3686,10 @@ namespace Tnb.WarehouseMgr string elevatorSno = wmsElevatorH.elevator_code.Replace("Elevator", ""); points.Add(wmsPointHs.Where(r => r.id == pStartId).First()); - points.Add(wmsPointHs.Where(r => r.point_code == $"DT-04-0{elevatorSno}").First()); + points.Add(wmsPointHs.Where(r => r.point_code == $"DT-C-04-0{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.point_code == $"DT-4-{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.point_code == $"DT-3-{elevatorSno}").First()); - points.Add(wmsPointHs.Where(r => r.point_code == $"DT-03-0{elevatorSno}").First()); + points.Add(wmsPointHs.Where(r => r.point_code == $"DT-R-03-0{elevatorSno}").First()); points.Add(wmsPointHs.Where(r => r.id == pEndId).First()); } else diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs index b71c4689..caa1bae0 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryStockReportService.cs @@ -61,7 +61,7 @@ namespace Tnb.WarehouseMgr .LeftJoin((a, b, c, d, e) => e.carry_id == b.id) .LeftJoin((a, b, c, d, e, f) => f.id == e.material_id) .LeftJoin((a, b, c, d, e, f, g) => g.EnCode == f.unit_id && g.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID) - .Where((a, b, c, d, e) => ((!string.IsNullOrEmpty(b.carry_code) && b.carry_status != "0" && b.carry_status != "6") || string.IsNullOrEmpty(b.carry_code))) + .Where((a, b, c, d, e) => ((!string.IsNullOrEmpty(b.carry_code) && b.carry_status != "6") || string.IsNullOrEmpty(b.carry_code))) .WhereIF(!string.IsNullOrEmpty(warehouse_id), (a, b, c, d) => c.id == warehouse_id) .WhereIF(!string.IsNullOrEmpty(carry_code), (a, b, c, d) => b.carry_code.Contains(carry_code)) .WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f) => f.code.Contains(material_code)) @@ -108,7 +108,7 @@ namespace Tnb.WarehouseMgr .InnerJoin((a, b, c, d, e, f, g) => g.id == f.material_id) .InnerJoin((a, b, c, d, e, f, g, h) => h.id == e.membercarry_id) .LeftJoin((a, b, c, d, e, f, g,h,i) => i.EnCode == f.unit_id && i.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID) - .Where((a, b, c, d, e) => b.carry_status != "0" && b.carry_status != "6") + .Where((a, b, c, d, e) => b.carry_status != "6") .WhereIF(!string.IsNullOrEmpty(warehouse_id), (a, b, c, d) => c.id == warehouse_id) .WhereIF(!string.IsNullOrEmpty(carry_code), (a, b, c, d, e, f, g, h) => b.carry_code.Contains(carry_code) || h.carry_code.Contains(carry_code)) .WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e, f, g) => g.code.Contains(material_code)) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs new file mode 100644 index 00000000..ef8d49d3 --- /dev/null +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseQcrecordService.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using JNPF.Common.Core.Manager; +using JNPF.Systems.Interfaces.System; +using JNPF.VisualDev; +using JNPF.VisualDev.Interfaces; +using SqlSugar; +using Tnb.BasicData.Interfaces; +using Tnb.WarehouseMgr.Entities; +using Tnb.WarehouseMgr.Entities.Attributes; +using Tnb.WarehouseMgr.Entities.Consts; +using Tnb.WarehouseMgr.Entities.Entity; +using Tnb.WarehouseMgr.Interfaces; + +namespace Tnb.WarehouseMgr +{ + [OverideVisualDev(ModuleConsts.MODULE_WmsPurchaseQcrecord_ID)] + [ServiceModule(BizTypeId)] + public class WmsPurchaseQcrecordService + { + private const string BizTypeId = WmsWareHouseConst.BIZTYPE_WmsPurchaseQcrecord_ID; + private readonly ISqlSugarClient _db; + private readonly IUserManager _userManager; + private readonly IBillRullService _billRullService; + private readonly IRunService _runService; + private readonly IVisualDevService _visualDevService; + private readonly IWmsPDAScanInStockService _wmsPDAScanInStock; + private readonly IWareHouseService _wareHouseService; + private readonly IThirdApiRecordService _thirdApiRecordService; + + public WmsPurchaseQcrecordService( + ISqlSugarRepository repository, + IUserManager userManager, + IBillRullService billRullService, + IRunService runService, + IVisualDevService visualDevService, + IWmsPDAScanInStockService wmsPDAScanInStock, + IThirdApiRecordService thirdApiRecordService, + IWareHouseService wareHouseService) + { + _db = repository.AsSugarClient(); + _userManager = userManager; + _billRullService = billRullService; + _runService = runService; + _visualDevService = visualDevService; + _wmsPDAScanInStock = wmsPDAScanInStock; + _wareHouseService = wareHouseService; + _thirdApiRecordService = thirdApiRecordService; + } + + + } +}