From 9e75186cd0325bc128ae45aaab5816ad9ddcc143 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Wed, 6 Jan 2021 10:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_PLAN_CONTROLLER.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Controller/SCP_PLAN_CONTROLLER.cs b/Controller/SCP_PLAN_CONTROLLER.cs index 7598f01..d16706a 100644 --- a/Controller/SCP_PLAN_CONTROLLER.cs +++ b/Controller/SCP_PLAN_CONTROLLER.cs @@ -877,8 +877,8 @@ namespace CK.SCP.Controller } } if (column.ColumnName == "计划天数") - { - if (dr["计划天数"] != null) + { + if (dr["计划天数"] != null) { _dayList.Add(dr["计划天数"].ToString().Trim()); } @@ -922,6 +922,10 @@ namespace CK.SCP.Controller { _ret.MessageList.Add("版本号、计划天数、零件编码、订单编号、行号、供应商编码、域、单位为必填列"); } + if (string.IsNullOrEmpty(_dayList.FirstOrDefault().ToString())) + { + _ret.MessageList.Add("计划天数不能为空!"); + } #endregion if (_ret.MessageList.Count == 0) { @@ -1023,6 +1027,8 @@ namespace CK.SCP.Controller { if (_dayList.Count > 0) { + + var _askday = int.Parse(_dayList.FirstOrDefault()); var _planDayList = _ls.Select(p => p.EndTime).Distinct(); if (_askday > _planDayList.Count())