From bca3485720ae6cbd84f7f0902e383c44c8409864 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期六, 07 十二月 2024 16:39:51 +0800
Subject: [PATCH] 当作废人为空时,作废时间也需要设置为空,而不是erp的1900年
---
MES.Service/service/BasicData/MesRohInManager.cs | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index b8853e7..c7ad1e9 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -1,4 +1,5 @@
-锘縰sing MES.Service.DB;
+锘縰sing Masuit.Tools;
+using MES.Service.DB;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
@@ -117,9 +118,14 @@
mesRohIn.CancellationPerson = rohIn.FCancellerId;
if (rohIn.FCancelDate != null)
- mesRohIn.CancellationDate =
- DateTime.ParseExact(rohIn.FCancelDate,
- "yyyy-MM-dd HH:mm:ss", null);
+ {
+ if (!mesRohIn.CancellationPerson.IsNullOrEmpty())
+ {
+ mesRohIn.CancellationDate =
+ DateTime.ParseExact(rohIn.FCancelDate,
+ "yyyy-MM-dd HH:mm:ss", null);
+ }
+ }
mesRohIn.CreateBy = rohIn.FCreatorId;
--
Gitblit v1.9.3