调整注塑满箱到位后入库申请接口 领料记录工位刷选

This commit is contained in:
2023-11-07 17:28:01 +08:00
parent e33d369c0d
commit f16f89e86a
4 changed files with 19 additions and 1 deletions

View File

@@ -29,6 +29,11 @@ namespace Tnb.BasicData
/// 生产齐套领料
/// </summary>
public const string PRDKITTINGOUTSTOCK_CODE = "PrdKittingOutStocK";
/// <summary>
/// 生产领料
/// </summary>
public const string PRDOUTSTOCK_CODE = "PrdOutstock";
/// <summary>
/// 设备维修单

View File

@@ -3,6 +3,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
public class InstockInput
{
public string equip_code { get; set; }
public string label_code { get; set; }
public string as_location_code { get; set; }
}
}

View File

@@ -530,6 +530,7 @@ namespace Tnb.ProductionMgr
var queryable1 = db.Queryable<PrdKittingOutH>()
.LeftJoin<UserEntity>((a, b) => a.create_id == b.Id)
.Where((a,b)=>a.workstation_id==input.stationId)
.Select((a, b) => new FeedingRecordListOutput()
{
id = a.id,
@@ -543,6 +544,7 @@ namespace Tnb.ProductionMgr
var queryable2 = db.Queryable<PrdOutstockH>()
.LeftJoin<UserEntity>((a, b) => a.create_id == b.Id)
.Where((a,b)=>a.workstation==input.stationId)
.Select((a, b) => new FeedingRecordListOutput()
{
id = a.id,

View File

@@ -262,15 +262,25 @@ namespace Tnb.ProductionMgr
public async Task<dynamic> InstockTypeOne(InstockInput inut)
{
string equip_code = inut.equip_code;
string label_code = inut.label_code;
string as_location_code = inut.as_location_code;
string warehouse_id = "2";
if (!string.IsNullOrEmpty(equip_code))
{
throw Oops.Bah("请传机台号");
}
if (!string.IsNullOrEmpty(label_code))
{
throw Oops.Bah("请传标签号");
}
ISqlSugarClient db = _repository.AsSugarClient();
EqpEquipment equipment = await db.Queryable<EqpEquipment>().Where(x => x.code == equip_code).FirstAsync();
EqpEquipment equipment = await db.Queryable<EqpEquipment>()
.LeftJoin<EqpDaq>((x,y)=>x.id==y.equip_id)
.Where((x,y) => y.equip_code==equip_code && y.label_name==label_code && y.label_point=="提报装箱称重点位")
.Select((x,y)=>x)
.FirstAsync();
if (equipment == null)
{
throw Oops.Bah("未找到机台");