diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/MaterailLabelOutput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/MaterailLabelOutput.cs
new file mode 100644
index 00000000..556560e8
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/MaterailLabelOutput.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.WarehouseMgr.Entities.Dto.Outputs
+{
+ ///
+ /// 物料标签查询返回结果
+ ///
+ public class MaterailLabelOutput
+ {
+ ///
+ /// 物料ID
+ ///
+ public string material_id { get; set; }
+ ///
+ /// 物料编号
+ ///
+ public string material_code { get; set; }
+ ///
+ /// 批次
+ ///
+ public string code_batch { get; set;}
+ ///
+ /// 采购单号
+ ///
+ public string purchase_code { get; set; }
+ ///
+ /// 供应商
+ ///
+ public string supplier_id { get; set; }
+ ///
+ /// 条码数量
+ ///
+ public decimal barcode_qty { get; set; }
+ ///
+ /// 单位ID
+ ///
+ public string unit_id { get; set; }
+ ///
+ /// 入库单号
+ ///
+ public string in_bill_code { get; set; }
+ ///
+ /// 入库时间
+ ///
+ public DateTime instock_time { get; set; }
+ ///
+ /// 出库单号
+ ///
+ public string out_bill_code { get; set; }
+ ///
+ /// 出库时间
+ ///
+ public DateTime? outstock_time { get; set; }
+ ///
+ /// 仓库ID
+ ///
+ public string warehouse_id { get; set; }
+ ///
+ /// 仓库名称
+ ///
+ public string warehouse_name { get; set; }
+ ///
+ /// 库位ID
+ ///
+ public string location_id { get; set; }
+ ///
+ /// 库位编号
+ ///
+ public string location_code { get; set; }
+
+ }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/MaterialLabelQuery.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/MaterialLabelQuery.cs
new file mode 100644
index 00000000..96cc6a27
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Queries/MaterialLabelQuery.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using JNPF.Common.Filter;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace Tnb.WarehouseMgr.Entities.Dto.Queries
+{
+ ///
+ /// 物料标签查询输入参数
+ ///
+ public class MaterialLabelQuery : PageInputBase
+ {
+ ///
+ /// 所属组织Id
+ ///
+ public string org_id { get; set; }
+ ///
+ /// 条码编号
+ ///
+ public List barcode { get; set; }
+ }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs
index d02387a1..352e4b5f 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs
@@ -72,7 +72,6 @@ namespace Tnb.WarehouseMgr
var carry = await _db.Queryable().FirstAsync(a => a.carry_code == input.carry_code && a.status == 1);
if (carry.IsNull()) throw new AppFriendlyException($"编号{input.carry_code},对应载具不存在或被禁用", 500);
var mCarryIdDic = await _db.Queryable().Where(it => it.carry_id == carry.id).ToDictionaryAsync(x => x.membercarry_id, x => x.membercarry_code);
- //var mCarryIdDic = carryDsLst.ToDictionary(x => x.membercarry_id, x => x.membercarry_code);
Expression> whereExp = carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID && mCarryIdDic.Keys?.Count > 0
? a => mCarryIdDic.Keys.Contains(a.carry_id)
: a => a.carry_id == carry.id;
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
index 040507a4..90ac7754 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
@@ -7,6 +7,7 @@ using Aop.Api.Domain;
using JNPF.Common.Core.Manager;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Extension;
+using JNPF.Common.Filter;
using JNPF.Common.Security;
using JNPF.FriendlyException;
using JNPF.Logging;
@@ -26,6 +27,8 @@ using Tnb.WarehouseMgr.Entities.Attributes;
using Tnb.WarehouseMgr.Entities.Consts;
using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
+using Tnb.WarehouseMgr.Entities.Dto.Outputs;
+using Tnb.WarehouseMgr.Entities.Dto.Queries;
using Tnb.WarehouseMgr.Entities.Enums;
using Tnb.WarehouseMgr.Interfaces;
@@ -481,5 +484,31 @@ namespace Tnb.WarehouseMgr
}
return isSuccessFul;
}
+ ///
+ /// 物料标签查询
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task MesFetchInOutStockInfoByBarCode(MaterialLabelQuery input)
+ {
+ var pagedList = await _db.Queryable().InnerJoin((a, b) => a.id == b.bill_id)
+ .LeftJoin((a, b, c) => b.barcode == c.barcode)
+ .WhereIF(!string.IsNullOrEmpty(input.org_id), (a, b, c) => a.org_id == input.org_id)
+ .Where((a, b, c) => input.barcode.Contains(b.barcode))
+ .Select((a, b, c) => new MaterailLabelOutput
+ {
+ barcode_qty = b.codeqty,
+ in_bill_code = a.bill_code,
+ out_bill_code = SqlFunc.Subqueryable().Where(it => it.id == c.bill_id).Select(it => it.bill_code),
+ instock_time = a.create_time,
+ outstock_time = SqlFunc.Subqueryable().Where(it => it.id == c.bill_id).Select(it => it.create_time),
+ }, true)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+
+ return PageResult.SqlSugarPageResult(pagedList); ;
+
+
+ }
}
}
diff --git a/apihost/Tnb.API.Entry/Startup.cs b/apihost/Tnb.API.Entry/Startup.cs
index 2d5ed531..d050ad18 100644
--- a/apihost/Tnb.API.Entry/Startup.cs
+++ b/apihost/Tnb.API.Entry/Startup.cs
@@ -116,7 +116,7 @@ public class Startup : AppStartup
SnowflakeIdHelper.InitYitIdWorker();
bool isStartTimeJob = App.GetConfig("IsStartTimeJob");
- if (isStartTimeJob)
- serviceProvider.GetRequiredService().StartTimerJob();
+ //if (isStartTimeJob)
+ // serviceProvider.GetRequiredService().StartTimerJob();
}
}
\ No newline at end of file