From 41dc50d7fd0084caed7295f9d2d690091dc918a3 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 9 Mar 2022 17:30:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=BA=93--=E6=AF=94=E8=BE=83?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=97=A5=E6=9C=9F=E5=92=8C=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=AE=9E=E6=96=BD=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BussDocumentLibraryEOController.java | 5 ++-- .../BussDocumentLibraryEOServiceImpl.java | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/controller/BussDocumentLibraryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/controller/BussDocumentLibraryEOController.java index 0cf6b1327..9f9de0e6f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/controller/BussDocumentLibraryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/controller/BussDocumentLibraryEOController.java @@ -260,8 +260,7 @@ public class BussDocumentLibraryEOController extends JeroController map) { + try { + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + String implementTime = (String)map.get("implement_time"); + String issueTime = (String)map.get("issue_time"); + Date implementTimeDate=df.parse(implementTime); + Date issueTimeDate=df.parse(issueTime); + if(issueTimeDate.after(implementTimeDate)){ + throw new JeroBootException("发布日期不能大于标准实施日期"); + } + } catch (ParseException e) { + throw new JeroBootException("新增失败"); + } if (ObjectUtils.isNotEmpty(map.get("replace_standard_id"))) { map.put("replace_standard", map.get("replace_standard_id")); } @@ -718,6 +730,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl map) { + try { + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + String implementTime = (String)map.get("implement_time"); + String issueTime = (String)map.get("issue_time"); + Date implementTimeDate=df.parse(implementTime); + Date issueTimeDate=df.parse(issueTime); + if(issueTimeDate.after(implementTimeDate)){ + throw new JeroBootException("发布日期不能大于标准实施日期") ; + } + } catch (ParseException e) { + throw new JeroBootException("编辑失败") ; + } String cut = (String) map.get("cut"); if (ObjectUtils.isNotEmpty(map.get("replace_standard_id"))) { map.put("replace_standard", map.get("replace_standard_id")); @@ -842,8 +866,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl