From c08901d578c3be9f15d4fca28405faffea2af033 Mon Sep 17 00:00:00 2001 From: wushukun <18860363876@163.com> Date: Thu, 6 Dec 2018 14:16:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=92=E5=B2=9B=E4=B8=87=E7=A6=8F=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=9A=E5=8A=A1=E9=80=BB=E8=BE=91=20?= =?UTF-8?q?=E8=AF=A6=E8=A7=81=E9=9C=80=E6=B1=82=E5=8D=95=20141760?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLActions/SaleForecastBLAction.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/B3QingDaoWanFu/BLActions/SaleForecastBLAction.cs b/B3QingDaoWanFu/BLActions/SaleForecastBLAction.cs index 69fb177..79f9fa7 100644 --- a/B3QingDaoWanFu/BLActions/SaleForecastBLAction.cs +++ b/B3QingDaoWanFu/BLActions/SaleForecastBLAction.cs @@ -10,7 +10,32 @@ namespace BWP.B3QingDaoWanFu.BLActions { public class SaleForecastBLAction : IBLMethodAction { + + //需求单 141760 修改业务逻辑 public void Execute(IDmoContext context, object dmo, object parameter) + { + //时 分 + var bill = dmo as SaleForecast; + var shi = Convert.ToInt32(parameter.ToString().Split(',')[0]); + var fen = Convert.ToInt32(parameter.ToString().Split(',')[1]); + + var 接货日期 = bill.DeliveryTime.Value.Date; + var 审核日期 = DateTime.Today; + var 审核时间 = DateTime.Now; + if (审核日期 == 接货日期) + { + if (审核日期 > new DateTime(接货日期.Year, 接货日期.Month, 接货日期.Day, shi, fen, 0)) + { + throw new Exception(string.Format("审核失败,超出订货时间{0}时,{1}分不允许订货", shi, fen)); + } + } + else if (审核日期 > 接货日期) + { + throw new Exception("提货日期不符,请修改提货日期"); + } + + } + public void Execute111(IDmoContext context, object dmo, object parameter) { //时 分 var bill = dmo as SaleForecast;