pc端生产领料 齐套出库 物料签收 生产入库 的工位由用户选择的工位带出来导致的逻辑变更
This commit is contained in:
@@ -8,6 +8,8 @@ using JNPF.Extras.CollectiveOAuth.Models;
|
||||
using JNPF.Extras.CollectiveOAuth.Utils;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Interfaces.Permission;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
@@ -38,17 +40,20 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
private readonly ISqlSugarRepository<PrdMaterialReceiptH> _repository;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IOrganizeService _organizeService;
|
||||
private readonly IBillRullService _billRullService;
|
||||
|
||||
|
||||
public PrdMaterialReceiptService(
|
||||
ISqlSugarRepository<PrdMaterialReceiptH> repository,
|
||||
IBillRullService billRullService,
|
||||
IOrganizeService organizeService,
|
||||
IUserManager userManager
|
||||
)
|
||||
{
|
||||
_repository = repository;
|
||||
_userManager = userManager;
|
||||
_organizeService = organizeService;
|
||||
_billRullService = billRullService;
|
||||
}
|
||||
|
||||
@@ -148,6 +153,9 @@ namespace Tnb.ProductionMgr
|
||||
.ToListAsync();
|
||||
|
||||
string code = await _billRullService.GetBillNumber(Tnb.BasicData.CodeTemplateConst.MATERIAL_RECEIPT_CODE);
|
||||
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorklineCode);
|
||||
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorkshopCode);
|
||||
|
||||
prdMaterialReceiptH = new PrdMaterialReceiptH()
|
||||
{
|
||||
code = code,
|
||||
@@ -155,9 +163,9 @@ namespace Tnb.ProductionMgr
|
||||
mo_task_id = input.mo_task_id,
|
||||
process_id = input.process_id,
|
||||
equip_id = input.equip_id,
|
||||
workshop_id = input.workshop_id,
|
||||
workshop_id = workshop?.Id ?? "",
|
||||
carry_id = input.carry_id,
|
||||
workline_id = input.workline_id,
|
||||
workline_id = workline?.Id ?? "",
|
||||
carry_code = input.carry_code,
|
||||
remark = input.remark,
|
||||
mbom_process_id = input.mbom_process_id,
|
||||
@@ -186,9 +194,9 @@ namespace Tnb.ProductionMgr
|
||||
member_carry_id = item["member_carry_id"]?.ToString(),
|
||||
member_carry_code = item["member_carry_code"]?.ToString(),
|
||||
feeding_num = 0,
|
||||
supplier_id = item["supplier_id"]?.ToString(),
|
||||
instock_time = (DateTime)item["instock_time"],
|
||||
check_conclusion = item["check_conclusion"]?.ToString()
|
||||
supplier_id = item.ContainsKey("supplier_id") ? item["supplier_id"]?.ToString() : "",
|
||||
instock_time = item.ContainsKey("instock_time") ? (DateTime)item["instock_time"] : DateTime.Now,
|
||||
check_conclusion = item.ContainsKey("check_conclusion") ? item["check_conclusion"]?.ToString() : "",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user