投料保存 领料记录

This commit is contained in:
2023-11-07 16:56:05 +08:00
parent 64bb0ff680
commit d5eefbf9d5
13 changed files with 252 additions and 15 deletions

View File

@@ -42,13 +42,15 @@ namespace Tnb.ProductionMgr
private readonly IDictionaryDataService _dictionaryDataService;
private readonly IOrganizeService _organizeService;
private readonly IUserManager _userManager;
private readonly IBillRullService _billRullService;
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
public PrdOutstockService(ISqlSugarRepository<PrdOutstockH> repository, IOrganizeService organizeService, IRunService runService, IUserManager userManager, IVisualDevService visualDevService, IDictionaryDataService dictionaryDataService)
public PrdOutstockService(ISqlSugarRepository<PrdOutstockH> repository, IOrganizeService organizeService, IBillRullService billRullService,IRunService runService, IUserManager userManager, IVisualDevService visualDevService, IDictionaryDataService dictionaryDataService)
{
_db = repository.AsSugarClient();
_runService = runService;
_visualDevService = visualDevService;
_billRullService = billRullService;
_dictionaryDataService = dictionaryDataService;
_repository = repository;
_userManager = userManager;
@@ -195,12 +197,15 @@ namespace Tnb.ProductionMgr
{
PrdOutstockH prdOutstockH = new()
{
bill_code = await _billRullService.GetBillNumber(CodeTemplateConst.PRDOUTSTOCK_CODE),
bill_type = DictConst.SHENGCHANLINGLIAO,
type = "1",
warehouse_id = warehouse_id,
location_code = generalOutstockInput.location_code,
create_id = _userManager.UserId,
org_id = _userManager.GetUserInfo().Result.organizeId,
bill_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
create_time = DateTime.Now,
workstation = generalOutstockInput.workstation_id,
workline = workline?.Id ?? ""
};
@@ -311,12 +316,15 @@ namespace Tnb.ProductionMgr
else
{
PrdOutstockH prdOutstockH = new PrdOutstockH();
prdOutstockH.bill_code = await _billRullService.GetBillNumber(CodeTemplateConst.PRDOUTSTOCK_CODE);
prdOutstockH.bill_type = DictConst.SHENGCHANLINGLIAO;
prdOutstockH.type = "2";
prdOutstockH.warehouse_id = warehouse_id;
prdOutstockH.location_code = materialOutstockInput.location_code;
prdOutstockH.create_id = _userManager.UserId;
prdOutstockH.org_id = _userManager.GetUserInfo().Result.organizeId;
prdOutstockH.bill_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
prdOutstockH.create_time = DateTime.Now;
prdOutstockH.workstation = materialOutstockInput.workstation_id;
prdOutstockH.workline = workline?.Id ?? "";