任务单调整 更换设备模具产线 任务单操作记录
This commit is contained in:
@@ -23,6 +23,7 @@ using Tnb.ProductionMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
|
||||
namespace Tnb.ProductionMgr
|
||||
{
|
||||
@@ -141,9 +142,29 @@ namespace Tnb.ProductionMgr
|
||||
throw new Exception("没有签收物料");
|
||||
}
|
||||
|
||||
var mo = await db.Queryable<PrdMo>().SingleAsync(x => x.id == moTask.mo_id);
|
||||
var material = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == moTask.material_id);
|
||||
var station = await db.Queryable<OrganizeEntity>().SingleAsync(x => x.Id == input.station_id);
|
||||
var process = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == input.process_id);
|
||||
var taskLog = new PrdTaskLog();
|
||||
taskLog.id = SnowflakeIdHelper.NextId();
|
||||
taskLog.mo_code = mo?.mo_code!;
|
||||
taskLog.eqp_code = (await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == input.equip_id))?.code!;
|
||||
taskLog.mold_code = "";
|
||||
taskLog.item_code = material?.code!;
|
||||
taskLog.item_standard = material?.material_standard!;
|
||||
taskLog.status = "生产投料";
|
||||
taskLog.operator_name = _userManager.RealName;
|
||||
taskLog.create_id = _userManager.UserId;
|
||||
taskLog.create_time = DateTime.Now;
|
||||
taskLog.mo_task_id = moTask.id;
|
||||
taskLog.mo_task_code = moTask.mo_task_code;
|
||||
taskLog.station_code = station?.EnCode;
|
||||
taskLog.process_code = process.code;
|
||||
|
||||
await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
|
||||
await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
|
||||
await db.Insertable<PrdTaskLog>(taskLog).ExecuteCommandAsync();
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user