生产投料

This commit is contained in:
2023-06-16 16:59:53 +08:00
parent 3d60c3b912
commit 3cb377cb86
9 changed files with 352 additions and 11 deletions

View File

@@ -6,16 +6,14 @@ using JNPF.DynamicApiController;
using JNPF.FriendlyException;
using JNPF.Systems.Interfaces.System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.ClearScript.Util.Web;
using SqlSugar;
using Tnb.BasicData.Entities;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.ProductionMgr.Interfaces;
using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Consts;
using Tnb.ProductionMgr.Entities.Consts;
namespace Tnb.ProductionMgr
{
@@ -26,13 +24,13 @@ namespace Tnb.ProductionMgr
[Route("api/[area]/[controller]/[action]")]
public class PrdMaterialReceiptService : IPrdMaterialReceiptService, IDynamicApiController, ITransient
{
private readonly ISqlSugarRepository<PrdMo> _repository;
private readonly ISqlSugarRepository<PrdMaterialReceiptH> _repository;
private readonly IUserManager _userManager;
private readonly IBillRullService _billRullService;
public PrdMaterialReceiptService(
ISqlSugarRepository<PrdMo> repository,
ISqlSugarRepository<PrdMaterialReceiptH> repository,
IBillRullService billRullService,
IUserManager userManager
)
@@ -81,7 +79,7 @@ namespace Tnb.ProductionMgr
.Select(x=>x.material_id)
.ToListAsync();
string code = await _billRullService.GetBillNumber(WmsCarryConst.MATERIAL_RECEIPT_CODE);
string code = await _billRullService.GetBillNumber(MoStatus.MATERIAL_RECEIPT_CODE);
PrdMaterialReceiptH prdMaterialReceiptH = new PrdMaterialReceiptH()
{
code = code,
@@ -115,6 +113,9 @@ namespace Tnb.ProductionMgr
num = Convert.ToDecimal(item["num"]),
batch = item["batch"],
unit_id = item["unit_id"],
carry_id = input.carry_id,
is_all_feeding = 0,
feeding_num = 0,
});
}
}