فهرست منبع

质量符合提交。
送审当天日期>=工作开始日期 && 送审当天日期<= 工作结束日期

user5 2 سال پیش
والد
کامیت
b5001a03f1

+ 29 - 27
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -2647,33 +2647,35 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 	public List<ProjectTemplateInfo> disposeDataAttachment(List<ProjectTemplateInfo> fileAttachmentList){
 		List<ProjectTemplateInfo> list = Lists.newArrayList();
-		for (ProjectTemplateInfo info: fileAttachmentList) {
-			info.getParent().setId("0");
-			info.setParentIds("0,");
-			info.setFlag(0);
-			list.add(info);
-			//处理附件信息
-			if(null != info.getWorkAttachments()){
-				for (WorkClientAttachment attachment: info.getWorkAttachments()) {
-					ProjectTemplateInfo attach = new ProjectTemplateInfo();
-					ProjectTemplateInfo parent = new ProjectTemplateInfo();
-					parent.setId(info.getId());
-					attach.setId(attachment.getId());
-					attach.setParent(parent);
-					attach.setMustFlag(0);
-					attach.setParentIds("0,"+info.getId()+",");
-					attach.setFlag(1);
-					attach.setAttachName(attachment.getAttachmentName());
-					attach.setUrl(attachment.getUrl());
-					attach.setAttachTypes(attachment.getType());
-					attach.setCollectFlag(attachment.getCollectFlag());
-					attach.setCreateBy(UserUtils.getUser());
-					attach.setCreateDate(attachment.getCreateDate());
-					attach.setFileSize(attachment.getFileSize());
-					attach.setDescription(attachment.getDescription());
-					//添加临时查看url(阿里云)
-					attach.setTemporaryUrl(attachment.getTemporaryUrl());
-					list.add(attach);
+		if(null != fileAttachmentList){
+			for (ProjectTemplateInfo info: fileAttachmentList) {
+				info.getParent().setId("0");
+				info.setParentIds("0,");
+				info.setFlag(0);
+				list.add(info);
+				//处理附件信息
+				if(null != info.getWorkAttachments()){
+					for (WorkClientAttachment attachment: info.getWorkAttachments()) {
+						ProjectTemplateInfo attach = new ProjectTemplateInfo();
+						ProjectTemplateInfo parent = new ProjectTemplateInfo();
+						parent.setId(info.getId());
+						attach.setId(attachment.getId());
+						attach.setParent(parent);
+						attach.setMustFlag(0);
+						attach.setParentIds("0,"+info.getId()+",");
+						attach.setFlag(1);
+						attach.setAttachName(attachment.getAttachmentName());
+						attach.setUrl(attachment.getUrl());
+						attach.setAttachTypes(attachment.getType());
+						attach.setCollectFlag(attachment.getCollectFlag());
+						attach.setCreateBy(UserUtils.getUser());
+						attach.setCreateDate(attachment.getCreateDate());
+						attach.setFileSize(attachment.getFileSize());
+						attach.setDescription(attachment.getDescription());
+						//添加临时查看url(阿里云)
+						attach.setTemporaryUrl(attachment.getTemporaryUrl());
+						list.add(attach);
+					}
 				}
 			}
 		}

+ 13 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -53,6 +53,19 @@
 							parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 							return false;
 						}
+						var newDate =  new Date()
+						if(startDate.getTime() > newDate.getTime()){
+							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+							return false;
+						}
+						if(endingDate.getTime() < newDate.getTime()){
+							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+							return false;
+						}
+
+
+
+
 						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
 							if(startDate.getTime() > projectStartDate.getTime()){
 								parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});

+ 9 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportModify.jsp

@@ -46,6 +46,15 @@
 					parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 					return false;
 				}
+				var newDate =  new Date()
+				if(startDate.getTime() > newDate.getTime()){
+					parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+					return false;
+				}
+				if(endingDate.getTime() < newDate.getTime()){
+					parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+					return false;
+				}
 				if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
 					if(startDate.getTime() > projectStartDate.getTime()){
 						parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});

+ 19 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -53,6 +53,25 @@
 							parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 							return false;
 						}
+
+						var newDate =  new Date()
+						if(startDate.getTime() > newDate.getTime()){
+							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+							return false;
+						}
+						if(endingDate.getTime() < newDate.getTime()){
+							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+							return false;
+						}
+						var newDate =  new Date()
+						if(startDate.getTime() > newDate.getTime()){
+							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+							return false;
+						}
+						if(endingDate.getTime() < newDate.getTime()){
+							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+							return false;
+						}
 						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
 							if(startDate.getTime() > projectStartDate.getTime()){
 								parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});

+ 9 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp

@@ -39,6 +39,15 @@
                     parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                     return false;
                 }
+                var newDate =  new Date()
+                if(startDate.getTime() > newDate.getTime()){
+                    parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+                    return false;
+                }
+                if(endingDate.getTime() < newDate.getTime()){
+                    parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+                    return false;
+                }
                 if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
                     if(startDate.getTime() > projectStartDate.getTime()){
                         parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});

+ 9 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageModify.jsp

@@ -39,6 +39,15 @@
                     parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                     return false;
                 }
+                var newDate =  new Date()
+                if(startDate.getTime() > newDate.getTime()){
+                    parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+                    return false;
+                }
+                if(endingDate.getTime() < newDate.getTime()){
+                    parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+                    return false;
+                }
                 if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
                     if(startDate.getTime() > projectStartDate.getTime()){
                         parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});

+ 9 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp

@@ -45,6 +45,15 @@
 							parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 							return false;
 						}
+						var newDate =  new Date()
+						if(startDate.getTime() > newDate.getTime()){
+							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
+							return false;
+						}
+						if(endingDate.getTime() < newDate.getTime()){
+							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
+							return false;
+						}
 						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
 							if(startDate.getTime() > projectStartDate.getTime()){
 								parent.layer.msg("工作开始日期不得大于工作计划最早结束时间!", {icon: 5});