长管投料不解绑父载具
This commit is contained in:
@@ -355,9 +355,29 @@ namespace Tnb.ProductionMgr
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<String> AutoPrdReport()
|
||||
{
|
||||
BasFactoryConfig config = await _repository.AsSugarClient().Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
|
||||
bool qu1 = await _redisData.TryGetValueByKeyField<bool>("外包装箱码垛线", "WBZX_x1_AGV_qu");
|
||||
if (qu1)
|
||||
{
|
||||
HttpUtils.RequestGet($"{config.value}/api/production/time-work/x1-auto-prd-report");
|
||||
}
|
||||
|
||||
bool qu2 = await _redisData.TryGetValueByKeyField<bool>("外包装箱码垛线", "WBZX_x2_AGV_qu");
|
||||
if (qu2)
|
||||
{
|
||||
HttpUtils.RequestGet($"{config.value}/api/production/time-work/x2-auto-prd-report");
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
private async Task<string> X1AutoPrdReport()
|
||||
{
|
||||
string carryCode = await _redisData.TryGetValueByKeyField<string>("外包装箱码垛线", "WBZX_x1_take_tp");
|
||||
int num = await _redisData.TryGetValueByKeyField<int>("外包装箱码垛线", "WBZX_x1_Enquantity");
|
||||
@@ -380,6 +400,32 @@ namespace Tnb.ProductionMgr
|
||||
await _prdMoTaskService.PrdReport(input);
|
||||
return "true";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
private async Task<string> X2AutoPrdReport()
|
||||
{
|
||||
string carryCode = await _redisData.TryGetValueByKeyField<string>("外包装箱码垛线", "WBZX_x2_take_tp");
|
||||
int num = await _redisData.TryGetValueByKeyField<int>("外包装箱码垛线", "WBZX_x2_Enquantity");
|
||||
if (string.IsNullOrEmpty(carryCode) || num<=0)
|
||||
{
|
||||
return "无载具或数量为0";
|
||||
}
|
||||
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().Where(x => x.workline_id == WmsWareHouseConst.XUELUGUAN2XIAN && x.mo_task_status == DictConst.InProgressEnCode && x.parent_id != null).FirstAsync();
|
||||
if (prdMoTask == null)
|
||||
{
|
||||
return "血路管2线没有进行中的任务单";
|
||||
}
|
||||
|
||||
PrdReportCrInput input = new PrdReportCrInput();
|
||||
input.mo_task_code = prdMoTask.mo_task_code;
|
||||
input.mo_task_id = prdMoTask.id;
|
||||
input.reported_qty = num;
|
||||
input.station = "";
|
||||
input.material_box_code = carryCode;
|
||||
await _prdMoTaskService.PrdReport(input);
|
||||
return "true";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user