长管投料不解绑父载具
This commit is contained in:
@@ -18,6 +18,7 @@ using Tnb.ProductionMgr.Entities.Dto;
|
|||||||
using Tnb.ProductionMgr.Interfaces;
|
using Tnb.ProductionMgr.Interfaces;
|
||||||
using Tnb.WarehouseMgr;
|
using Tnb.WarehouseMgr;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
using Tnb.WarehouseMgr.Entities.Enums;
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
@@ -511,8 +512,13 @@ namespace Tnb.ProductionMgr
|
|||||||
|
|
||||||
_ = await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
|
_ = await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
|
||||||
_ = await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
|
_ = await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
|
||||||
|
|
||||||
|
if (prdMaterialReceiptH == null)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("未找到投料记录");
|
||||||
|
}
|
||||||
|
|
||||||
if (prdMaterialReceiptH.first_feed)
|
if (prdMaterialReceiptH.first_feed && carry.carrystd_id==WmsWareHouseConst.CARRY_LXSTD_ID)
|
||||||
{
|
{
|
||||||
await db.Updateable<PrdMaterialReceiptH>()
|
await db.Updateable<PrdMaterialReceiptH>()
|
||||||
.SetColumns(x => x.first_feed == false)
|
.SetColumns(x => x.first_feed == false)
|
||||||
|
|||||||
@@ -1619,6 +1619,12 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
["30019971917589"] = "外包装箱码垛线"
|
["30019971917589"] = "外包装箱码垛线"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Dictionary<String, String> dic2 = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
[WmsWareHouseConst.XUELUGUAN1XIAN] = "WBZX_x1_Enquantity",
|
||||||
|
[WmsWareHouseConst.XUELUGUAN2XIAN] = "WBZX_x2_Enquantity"
|
||||||
|
};
|
||||||
string materialBoxCode = input.material_box_code;
|
string materialBoxCode = input.material_box_code;
|
||||||
BasLocation location = null;
|
BasLocation location = null;
|
||||||
try
|
try
|
||||||
@@ -1975,27 +1981,27 @@ namespace Tnb.ProductionMgr
|
|||||||
|
|
||||||
if (prdMoTask.schedule_type == 2)
|
if (prdMoTask.schedule_type == 2)
|
||||||
{
|
{
|
||||||
Dictionary<string, string> dicCommand2 = new(StringComparer.OrdinalIgnoreCase)
|
// Dictionary<string, string> dicCommand2 = new(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
// {
|
||||||
["DevName"] = dic[prdMoTask.workline_id],
|
// ["DevName"] = dic[prdMoTask.workline_id],
|
||||||
["token"] = _eleCtlCfg.token,
|
// ["token"] = _eleCtlCfg.token,
|
||||||
["TagName"] = "WBZX_x1_ok",
|
// ["TagName"] = "WBZX_x1_ok",
|
||||||
["Value"] = "true",
|
// ["Value"] = "true",
|
||||||
};
|
// };
|
||||||
Log.Information($"提拔确认完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
|
// Log.Information($"提拔确认完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
|
||||||
string responseresult = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2);
|
// string responseresult = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2);
|
||||||
Log.Information($"提拔确认完成参数成返回结果:{responseresult}");
|
// Log.Information($"提拔确认完成参数成返回结果:{responseresult}");
|
||||||
X2ServerResult x2ServerResult = JsonConvert.DeserializeObject<X2ServerResult>(responseresult);
|
// X2ServerResult x2ServerResult = JsonConvert.DeserializeObject<X2ServerResult>(responseresult);
|
||||||
if (x2ServerResult.Result != X2ServerResult.Ok)
|
// if (x2ServerResult.Result != X2ServerResult.Ok)
|
||||||
{
|
// {
|
||||||
throw Oops.Bah(x2ServerResult.Msg);
|
// throw Oops.Bah(x2ServerResult.Msg);
|
||||||
}
|
// }
|
||||||
|
|
||||||
Dictionary<string, string> dicCommand4 = new(StringComparer.OrdinalIgnoreCase)
|
Dictionary<string, string> dicCommand4 = new(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
{
|
||||||
["DevName"] = "外包装箱码垛线",
|
["DevName"] = "外包装箱码垛线",
|
||||||
["token"] = _eleCtlCfg.token,
|
["token"] = _eleCtlCfg.token,
|
||||||
["TagName"] = "WBZX_x1_Enquantity",
|
["TagName"] = dic2[prdMoTask.workline_id],
|
||||||
["Value"] = "0",
|
["Value"] = "0",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -355,9 +355,29 @@ namespace Tnb.ProductionMgr
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<String> AutoPrdReport()
|
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");
|
string carryCode = await _redisData.TryGetValueByKeyField<string>("外包装箱码垛线", "WBZX_x1_take_tp");
|
||||||
int num = await _redisData.TryGetValueByKeyField<int>("外包装箱码垛线", "WBZX_x1_Enquantity");
|
int num = await _redisData.TryGetValueByKeyField<int>("外包装箱码垛线", "WBZX_x1_Enquantity");
|
||||||
@@ -380,6 +400,32 @@ namespace Tnb.ProductionMgr
|
|||||||
await _prdMoTaskService.PrdReport(input);
|
await _prdMoTaskService.PrdReport(input);
|
||||||
return "true";
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -263,6 +263,10 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string CARRY_LJSTD_ID = "26037267399717";
|
public const string CARRY_LJSTD_ID = "26037267399717";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 载具规格-料箱
|
||||||
|
/// </summary>
|
||||||
|
public const string CARRY_LXSTD_ID = "26037262680357";
|
||||||
|
/// <summary>
|
||||||
/// 打印状态-未打印
|
/// 打印状态-未打印
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string PRINT_STATUS_NOTPRINTED = "26191366982437";
|
public const string PRINT_STATUS_NOTPRINTED = "26191366982437";
|
||||||
|
|||||||
Reference in New Issue
Block a user