Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -4,6 +4,11 @@ namespace Tnb.ProductionMgr.Entities.Dto
|
||||
{
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 签收单号
|
||||
/// </summary>
|
||||
public string code { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 工位id
|
||||
/// </summary>
|
||||
|
||||
@@ -27,7 +27,7 @@ public partial class PrdMaterialReceiptD : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public int num { get; set; }
|
||||
public decimal num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
|
||||
@@ -14,6 +14,12 @@ public partial class PrdMaterialReceiptH : BaseEntity<string>
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 签收单号
|
||||
/// </summary>
|
||||
public string code { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 工位id
|
||||
/// </summary>
|
||||
|
||||
@@ -4,6 +4,7 @@ using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.ClearScript.Util.Web;
|
||||
using SqlSugar;
|
||||
@@ -14,6 +15,7 @@ using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
||||
using Tnb.ProductionMgr.Interfaces;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
|
||||
namespace Tnb.ProductionMgr
|
||||
{
|
||||
@@ -26,15 +28,18 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
private readonly ISqlSugarRepository<PrdMo> _repository;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IBillRullService _billRullService;
|
||||
|
||||
|
||||
public PrdMaterialReceiptService(
|
||||
ISqlSugarRepository<PrdMo> repository,
|
||||
IBillRullService billRullService,
|
||||
IUserManager userManager
|
||||
)
|
||||
{
|
||||
_repository = repository;
|
||||
_userManager = userManager;
|
||||
_billRullService = billRullService;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +80,11 @@ namespace Tnb.ProductionMgr
|
||||
.Where(x => x.mbom_id == moTask.bom_id && x.mbom_process_id == input.mbom_process_id)
|
||||
.Select(x=>x.material_id)
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
string code = await _billRullService.GetBillNumber(WmsCarryConst.MATERIAL_RECEIPT_CODE);
|
||||
PrdMaterialReceiptH prdMaterialReceiptH = new PrdMaterialReceiptH()
|
||||
{
|
||||
code = code,
|
||||
station_id = input.station_id,
|
||||
mo_task_id = input.mo_task_id,
|
||||
process_id = input.process_id,
|
||||
@@ -105,7 +112,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
material_receipt_id = prdMaterialReceiptH.id,
|
||||
material_id = item["material_id"],
|
||||
num = Convert.ToInt32(item["num"]),
|
||||
num = Convert.ToDecimal(item["num"]),
|
||||
batch = item["batch"],
|
||||
unit_id = item["unit_id"],
|
||||
});
|
||||
|
||||
@@ -12,5 +12,12 @@ namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
/// 载具更换EnCode业务编码
|
||||
/// </summary>
|
||||
public const string WMS_CARRY_REPLACE_ENCODE = "WmsCarryReplace";
|
||||
|
||||
/// <summary>
|
||||
/// 物料签收编码
|
||||
/// </summary>
|
||||
public const string MATERIAL_RECEIPT_CODE = "MaterialReceipt";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user