diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs index 6934e942..fd30d137 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs @@ -125,6 +125,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro int data = 0; if (proWorkorder != null) { + proWorkorder.Id = DateTime.Now.ToString("yyyyMMddHHmmss"); string workPlanId = proWorkorder.FkProPlanId; string workorderId = proWorkorder.Id; diff --git a/ZR.Service/mes/pro/ProWorkplanService.cs b/ZR.Service/mes/pro/ProWorkplanService.cs index dea10e53..7cd723ad 100644 --- a/ZR.Service/mes/pro/ProWorkplanService.cs +++ b/ZR.Service/mes/pro/ProWorkplanService.cs @@ -61,7 +61,7 @@ namespace ZR.Service.mes.pro public int AddWorkorder(ProWorkorder proWorkorder) { - proWorkorder.Id = DateTime.Now.ToString("yyyyMMddHHmmss"); + return Context.Insertable(proWorkorder).ExecuteCommand(); }