Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -1612,10 +1612,10 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah("载具不能为空");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty((input.location_code)))
|
||||
{
|
||||
throw Oops.Bah("入库库位不能为空");
|
||||
}
|
||||
// if (string.IsNullOrEmpty((input.location_code)))
|
||||
// {
|
||||
// throw Oops.Bah("入库库位不能为空");
|
||||
// }
|
||||
|
||||
if (input.reported_qty<=0)
|
||||
{
|
||||
@@ -1649,16 +1649,16 @@ namespace Tnb.ProductionMgr
|
||||
else
|
||||
{
|
||||
report.warehouse_id = equip.instock_warehouse_id;
|
||||
if (equip.as_location_id == null || equip.as_location_id.IsEmpty())
|
||||
if (equip.downmat_location_id == null || equip.downmat_location_id.IsEmpty())
|
||||
{
|
||||
throw Oops.Bah("设备未绑定入库库位");
|
||||
throw Oops.Bah("设备未绑定下料库位");
|
||||
}
|
||||
location = await db.Queryable<BasLocation>().SingleAsync(x=>x.id==equip.as_location_id);
|
||||
location = await db.Queryable<BasLocation>().SingleAsync(x=>x.id==equip.downmat_location_id);
|
||||
report.location_code = location.location_code;
|
||||
}
|
||||
|
||||
|
||||
report.location_code = input.location_code;
|
||||
// report.location_code = input.location_code;
|
||||
report.create_id = _userManager.UserId;
|
||||
report.create_time = DateTime.Now;
|
||||
// report.batch = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Tnb.ProductionMgr
|
||||
BasFactoryConfig config = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
|
||||
foreach (var equipment in equipments)
|
||||
{
|
||||
EqpDaq eqpDaq = eqpDaqs.First(x => x.equip_id == equipment.id);
|
||||
EqpDaq eqpDaq = eqpDaqs.FirstOrDefault(x => x.equip_id==equipment.id);
|
||||
if (eqpDaq == null)
|
||||
{
|
||||
Log.Error($"{equipment.name}没配置允许入空箱");
|
||||
|
||||
Reference in New Issue
Block a user