原材料质检记录接口

This commit is contained in:
2024-10-16 10:26:12 +08:00
parent 4ef60c8c7c
commit 68f270c47b
5 changed files with 73 additions and 5 deletions

View File

@@ -144,6 +144,12 @@ public class ModuleConsts
/// 模块标识-材料出库单 todo
/// </summary>
public const string MODULE_WmsRawmatOutstock_ID = "MODULE_WmsRawmatOutstock_ID";
/// <summary>
/// 模块标识-材料出库单 todo
/// </summary>
public const string MODULE_WmsPurchaseQcrecord_ID = "MODULE_WmsPurchaseQcrecord_ID";
/// <summary>
/// 模块标识-物料签收记录 todo
/// </summary>

View File

@@ -387,6 +387,12 @@ namespace Tnb.WarehouseMgr.Entities.Consts
/// 预任务生成业务类型-原材料仓材料出库单
/// </summary>
public const string BIZTYPE_WmsRawmatOutstock_ID = "36340105558037";
/// <summary>
/// 预任务生成业务类型-原材料仓质检记录
/// </summary>
public const string BIZTYPE_WmsPurchaseQcrecord_ID = "BIZTYPE_WmsPurchaseQcrecord_ID";
/// <summary>
/// 预任务生成业务类型-生产退料单
/// </summary>

View File

@@ -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

View File

@@ -61,7 +61,7 @@ namespace Tnb.WarehouseMgr
.LeftJoin<WmsCarryCode>((a, b, c, d, e) => e.carry_id == b.id)
.LeftJoin<BasMaterial>((a, b, c, d, e, f) => f.id == e.material_id)
.LeftJoin<DictionaryDataEntity>((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<BasMaterial>((a, b, c, d, e, f, g) => g.id == f.material_id)
.InnerJoin<WmsCarryH>((a, b, c, d, e, f, g, h) => h.id == e.membercarry_id)
.LeftJoin<DictionaryDataEntity>((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))

View File

@@ -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<WmsPurchaseQcrecord> 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;
}
}
}