From cceb0384b1b76a0aa6072d7d10fab67b4772bc8d Mon Sep 17 00:00:00 2001 From: "xiaowei.song" Date: Wed, 15 Nov 2023 17:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=20=E6=B5=81=E6=B0=B4=E5=8F=B7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs | 1 + ZR.Service/mes/pro/ProWorkplanService.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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(); }