生产提报获取下料库位
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();
|
||||
|
||||
Reference in New Issue
Block a user