bug
This commit is contained in:
@@ -96,27 +96,18 @@ namespace Tnb.ProductionMgr
|
||||
item.id = SnowflakeIdHelper.NextId();
|
||||
item.mo_source = "1";
|
||||
item.mo_type = moTypeDic[item.mo_type];
|
||||
item.mo_code = item.mo_code+"-"+item.erp_lineno;
|
||||
item.mo_code = item.mo_code;
|
||||
item.create_id = WmsWareHouseConst.AdministratorUserId;
|
||||
item.create_time = DateTime.Now;
|
||||
item.mo_status = DictConst.ToBeScheduledId;
|
||||
item.erp_mo_pk = item.erp_mo_pk;
|
||||
item.erp_lineno = item.erp_lineno;
|
||||
|
||||
moList.Add(item);
|
||||
extendFieldList.Add(new ErpExtendField()
|
||||
{
|
||||
org_id =WmsWareHouseConst.AdministratorOrgId,
|
||||
table_name = "prd_mo",
|
||||
table_id = item.id,
|
||||
erp_lineno = item.erp_lineno,
|
||||
erp_line_pk = item.erp_line_pk,
|
||||
erp_mo_pk = item.erp_mo_pk,
|
||||
create_time = DateTime.Now
|
||||
});
|
||||
}
|
||||
DbResult<bool> result = await _db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
await _db.Insertable(moList).ExecuteCommandAsync();
|
||||
await _db.Insertable(extendFieldList).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
return !result.IsSuccess ? result.ErrorMessage : "保存成功";
|
||||
|
||||
Reference in New Issue
Block a user