Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
/// 中储仓ID
|
||||
/// </summary>
|
||||
public const string WAREHOUSE_ZC_ID = "2";
|
||||
/// <summary>
|
||||
/// 成品仓库ID
|
||||
/// </summary>
|
||||
public const string WAREHOUSE_CP_ID = "26103372441637";
|
||||
|
||||
/// <summary>
|
||||
/// 出入库单据状态TypeID
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
public int BllType { get; set; }
|
||||
|
||||
public int Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,5 +112,12 @@ public partial class WmsCarryCode : BaseEntity<string>, IWmsCarryEntity
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public string? warehouse_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -103,5 +103,13 @@ public partial class WmsCarryMat : BaseEntity<string>, IWmsCarryEntity
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -108,5 +108,13 @@ public partial class WmsDistaskCode : BaseEntity<string>
|
||||
/// 子载具编号
|
||||
/// </summary>
|
||||
public string? membercarry_code { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -94,4 +94,12 @@ public partial class WmsHandleCode : BaseEntity<string>
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -159,6 +159,14 @@ public partial class WmsInstockCode : BaseEntity<string>, IInOutStockCode
|
||||
/// 生产工单BOM明细Id
|
||||
/// </summary>
|
||||
public string? mo_bom_detail_id { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
|
||||
public void Create(string orgId)
|
||||
{
|
||||
|
||||
@@ -183,5 +183,12 @@ public partial class WmsInstockD : BaseEntity<string>
|
||||
/// 打印模板ID
|
||||
/// </summary>
|
||||
public string? print_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -108,5 +108,13 @@ public partial class WmsOutstockCode : BaseEntity<string>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -188,5 +188,12 @@ public partial class WmsOutstockD : BaseEntity<string>
|
||||
/// 载具编号
|
||||
/// </summary>
|
||||
public string? carry_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -104,5 +104,12 @@ public partial class WmsPretaskCode : BaseEntity<string>
|
||||
/// 子载具编号
|
||||
/// </summary>
|
||||
public string? membercarry_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -98,5 +98,12 @@ public partial class WmsPurchaseD : BaseEntity<string>
|
||||
/// 本次到货数量
|
||||
/// </summary>
|
||||
public decimal purchase_arriveqty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ public partial class WmsSaleD : BaseEntity<string>
|
||||
/// 流程引擎Id
|
||||
/// </summary>
|
||||
public string? f_flowid { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
}
|
||||
|
||||
@@ -103,5 +103,13 @@ public partial class WmsTempCode : BaseEntity<string>
|
||||
/// 时间戳
|
||||
/// </summary>
|
||||
public DateTime? time_stamp { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? container_no { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -196,6 +196,8 @@ namespace Tnb.WarehouseMgr
|
||||
.And((a, b, c) => c.wh_id == input.warehouse_id)
|
||||
.AndIF(!string.IsNullOrEmpty(input.material_id), (a, b, c) => b.material_id == input.material_id)
|
||||
.AndIF(!string.IsNullOrEmpty(input.code_batch), (a, b, c) => b.code_batch == input.code_batch)
|
||||
.AndIF(!string.IsNullOrEmpty(input.material_specification), (a, b, c) => b.material_specification == input.material_specification)
|
||||
.AndIF(!string.IsNullOrEmpty(input.container_no), (a, b, c) => b.container_no == input.container_no)
|
||||
.AndIF(!string.IsNullOrEmpty(input.carrystd_id), (a, b, c) => a.carrystd_id == input.carrystd_id);
|
||||
Expression<Func<WmsCarryH, WmsCarryCode, BasLocation, bool>> carryStatusFilterExp = !input.material_id.IsNullOrWhiteSpace()
|
||||
? (a, b, c) => a.carry_status == ((int)EnumCarryStatus.占用).ToString()
|
||||
|
||||
@@ -177,6 +177,8 @@ namespace Tnb.WarehouseMgr
|
||||
material_code = detail.material_code,
|
||||
barcode = code,
|
||||
code_batch = detail.code_batch,
|
||||
material_specification= detail.material_specification,
|
||||
container_no =detail.container_no,
|
||||
codeqty = detail.pr_qty!.Value,
|
||||
unit_id = detail.unit_id,
|
||||
is_lock = 0,
|
||||
@@ -335,12 +337,14 @@ namespace Tnb.WarehouseMgr
|
||||
instockcode.id = SnowflakeIdHelper.NextId();
|
||||
string materialCode = instockcode.material_code;
|
||||
string? codeBatch = instockcode.code_batch;
|
||||
WmsInstockCode? b = items.Find(x => x.material_code == materialCode && x.code_batch == codeBatch);
|
||||
string? materialSpecification = instockcode.material_specification;
|
||||
string? containerNo = instockcode.container_no;
|
||||
WmsInstockCode? b = items.Find(x => x.material_code == materialCode && x.code_batch == codeBatch && x.material_specification == materialSpecification && x.container_no == containerNo);
|
||||
if (b != null)
|
||||
{
|
||||
WmsInstockCode c = DeepCopyHelper<WmsInstockCode>.DeepCopy(b);
|
||||
c.id = SnowflakeIdHelper.NextId();
|
||||
c.bill_d_id = instockds?.Find(x => x.material_code == materialCode && x.code_batch == codeBatch)?.id ?? "";
|
||||
c.bill_d_id = instockds?.Find(x => x.material_code == materialCode && x.code_batch == codeBatch && x.material_specification == materialSpecification && x.container_no == containerNo)?.id ?? "";
|
||||
c.barcode = instockcode.barcode;
|
||||
c.codeqty = instockcode.codeqty;
|
||||
c.is_end = 0;// 未结束
|
||||
@@ -411,6 +415,8 @@ namespace Tnb.WarehouseMgr
|
||||
ptc.codeqty = jo.codeqty;
|
||||
ptc.unit_id = jo.unit_id!;
|
||||
ptc.code_batch = jo.code_batch;
|
||||
ptc.material_specification = jo.material_specification;
|
||||
ptc.container_no = jo.container_no;
|
||||
pretaskCodes.Add(ptc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace Tnb.WarehouseMgr
|
||||
if (carryMats.Count > 0)
|
||||
{
|
||||
carryMats.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||
carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch })
|
||||
carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch , g.material_specification,g.container_no })
|
||||
.Select(x =>
|
||||
{
|
||||
WmsCarryMat[] arr = x.ToArray();
|
||||
@@ -842,10 +842,10 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
outStockCodes.ForEach(x =>
|
||||
{
|
||||
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
|
||||
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch && xx.material_specification == x.material_specification && xx.container_no == x.container_no)?.id;
|
||||
if (billDId.IsNullOrEmpty())
|
||||
{
|
||||
billDId = otds?.Find(xx => xx.material_id == x.material_id)?.id;
|
||||
billDId = otds?.Find(xx => xx.material_id == x.material_id )?.id;
|
||||
}
|
||||
x.id = SnowflakeIdHelper.NextId();
|
||||
x.bill_id = input.requireId;
|
||||
@@ -891,7 +891,7 @@ namespace Tnb.WarehouseMgr
|
||||
List<WmsOutstockCode> osCodes = input.distaskCodes.Adapt<List<WmsOutstockCode>>();
|
||||
osCodes.ForEach(x =>
|
||||
{
|
||||
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
|
||||
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch && xx.material_specification == x.material_specification && xx.container_no == x.container_no )?.id;
|
||||
if (billDId.IsNullOrEmpty())
|
||||
{
|
||||
billDId = otds?.Find(xx => xx.material_id == x.material_id)?.id;
|
||||
|
||||
@@ -160,6 +160,8 @@ namespace Tnb.WarehouseMgr
|
||||
ptc.codeqty = jo.Value<int>(nameof(WmsPretaskCode.codeqty));
|
||||
ptc.unit_id = jo.Value<string>(nameof(WmsPretaskCode.unit_id))!;
|
||||
ptc.code_batch = jo.Value<string>(nameof(WmsPretaskCode.code_batch));
|
||||
ptc.material_specification = jo.Value<string>(nameof(WmsPretaskCode.material_specification))!;
|
||||
ptc.container_no = jo.Value<string>(nameof(WmsPretaskCode.container_no));
|
||||
pretaskCodes.Add(ptc);
|
||||
}
|
||||
}
|
||||
@@ -208,6 +210,8 @@ namespace Tnb.WarehouseMgr
|
||||
material_code = jo.Value<string>(nameof(WmsHandleCode.material_code))!,
|
||||
barcode = jo.Value<string>(nameof(WmsHandleCode.barcode))!,
|
||||
code_batch = jo.Value<string>(nameof(WmsHandleCode.code_batch)),
|
||||
material_specification = jo.Value<string>(nameof(WmsPretaskCode.material_specification))!,
|
||||
container_no = jo.Value<string>(nameof(WmsPretaskCode.container_no)),
|
||||
codeqty = jo.Value<int>(nameof(WmsHandleCode.codeqty)),
|
||||
unit_id = _db.Queryable<BasMaterial>().Single(it => it.id == materialId).unit_id,
|
||||
create_id = _userManager.UserId,
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace Tnb.WarehouseMgr
|
||||
bill_type = WmsWareHouseConst.BILLTYPE_MATERIALINSTOCK_ID,
|
||||
biz_type = WmsWareHouseConst.BIZTYPE_WMSINSTOCK_ID,
|
||||
bill_date = DateTime.Today,
|
||||
warehouse_id = whId?.ToString() ?? "26103372441637",
|
||||
warehouse_id = whId?.ToString() ?? WmsWareHouseConst.WAREHOUSE_CP_ID,
|
||||
status = WmsWareHouseConst.BILLSTATUS_ADD_ID,
|
||||
generate_type = "0",
|
||||
sync_status = WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC,
|
||||
@@ -130,7 +130,9 @@ namespace Tnb.WarehouseMgr
|
||||
pr_qty = item.codeqty,
|
||||
qty = 0,
|
||||
code_batch = item.code_batch,
|
||||
warehouse_id = "26103372441637",
|
||||
material_specification = item.material_specification,
|
||||
container_no = item.container_no,
|
||||
warehouse_id = WmsWareHouseConst.WAREHOUSE_CP_ID,
|
||||
print_qty = item.codeqty,
|
||||
scan_qty = item.codeqty,
|
||||
print_id = "",
|
||||
@@ -163,6 +165,8 @@ namespace Tnb.WarehouseMgr
|
||||
unit_id = mat.unit_id,
|
||||
barcode = carryCode,
|
||||
code_batch = item.code_batch,
|
||||
material_specification = item.material_specification,
|
||||
container_no = item.container_no,
|
||||
codeqty = item.codeqty,
|
||||
is_lock = 0,
|
||||
is_end = 0,
|
||||
@@ -179,7 +183,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
|
||||
InStockStrategyQuery inStockStrategyInput = new() { warehouse_id = "26103372441637", Size = 1 };
|
||||
InStockStrategyQuery inStockStrategyInput = new() { warehouse_id = WmsWareHouseConst.WAREHOUSE_CP_ID, Size = 1 };
|
||||
List<BasLocation> endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||
WmsPointH sPoint = new();
|
||||
WmsPointH ePoint = new();
|
||||
@@ -250,6 +254,8 @@ namespace Tnb.WarehouseMgr
|
||||
ptc.material_code = instockCode.material_code;
|
||||
ptc.barcode = instockCode.barcode;
|
||||
ptc.codeqty = instockCode.codeqty;
|
||||
ptc.material_specification = instockCode.material_specification;
|
||||
ptc.container_no = instockCode.container_no;
|
||||
ptc.unit_id = instockCode.unit_id;
|
||||
ptc.code_batch = instockCode.code_batch;
|
||||
pretaskCodes.Add(ptc);
|
||||
|
||||
@@ -9,6 +9,7 @@ using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -35,6 +36,7 @@ namespace Tnb.WarehouseMgr
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSPURCHASE_ID)]
|
||||
public class WmsPurchaseService : WmsPurchaseAndSaleCommonService<WmsPurchaseD>, IWmsPurchaseService
|
||||
{
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IUserManager _userManager;
|
||||
public WmsPurchaseService(ISqlSugarRepository<WmsPurchaseH> repo, IUserManager userManager, IQcCheckPlanService qcCheckPlanService)
|
||||
@@ -72,6 +74,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
instock = input.Adapt<WmsInstockH>();
|
||||
instock.id = SnowflakeIdHelper.NextId();
|
||||
instock.bill_code = await _billRullService.GetBillNumber(WmsWareHouseConst.WMS_INSTOCK_ENCODE);
|
||||
instock.create_id = _userManager.UserId;
|
||||
instock.create_time = DateTime.Now;
|
||||
instock.org_id = _userManager.User.OrganizeId;
|
||||
|
||||
Reference in New Issue
Block a user