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