| 
					
				 | 
			
			
				@@ -4026,6 +4026,14 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //项目属性 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> projectAttributes = planEnums.get("projectAttributes"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //提前或延后*天进行提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysDictData> alertTime = dictTypeService.selectDictDataByType("alert_time_setting"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        HashMap<String, String> alertTimeMap = new LinkedHashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //根据时间类别设定的提醒时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (SysDictData dictData : alertTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //    字段名称----阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            alertTimeMap.put(dictData.getDictLabel(), dictData.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (PmDemand pmDemand1 : pmDemandList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             PmDemandResVo vo = new PmDemandResVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BeanUtils.copyProperties(pmDemand1, vo); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4108,7 +4116,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                vo.setTipsMessage(pmDemandGetTips(vo.getPlanDeliverTime())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                vo.setTipsMessage(pmDemandGetTips(vo, alertTimeMap)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (vo.getTipsMessage().contains("超过")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     vo.setIsExceedProject("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (ObjectUtils.isEmpty(pmDemand1.getDelayReason())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4129,12 +4137,45 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public String pmDemandGetTips(Date planDeliverTime) throws ParseException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!ObjectUtils.isEmpty(planDeliverTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //提示信息:定义距离结束时间一周内提示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Integer remindTine = 1000 * 60 * 60 * 24 * 7; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //少于一周便提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            double surplus = planDeliverTime.getTime() - System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String pmDemandGetTips(PmDemandResVo vo, HashMap<String, String> alertTimeMap) throws ParseException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //首页待办事项--计划完成采购时间提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ObjectUtils.isEmpty(vo.getRealDemandCommitTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int alertDay2 = Integer.parseInt(alertTimeMap.get("计划提报时间")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Integer alertTime = 1000 * 60 * 60 * 24 * alertDay2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            double surplusTwo = vo.getPlanDemandSubTime().getTime() - System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //少于设定阈值便提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (surplusTwo < alertTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //剩余天数(向上取整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                int i = (int) Math.ceil(surplusTwo / 1000 / 60 / 60 / 24); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (i > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return "距离计划提报时间不足" + i + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return "已超过计划提报时间" + Math.abs(i) + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //首页待办事项--计划完成采购时间提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ObjectUtils.isEmpty(vo.getRealPurchaseFinishTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int alertDay2 = Integer.parseInt(alertTimeMap.get("计划完成时间")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Integer alertTime = 1000 * 60 * 60 * 24 * alertDay2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            double surplusTwo = vo.getPlanPurchaseFinishTime().getTime() - System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //少于设定阈值便提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (surplusTwo < alertTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //剩余天数(向上取整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                int i = (int) Math.ceil(surplusTwo / 1000 / 60 / 60 / 24); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (i > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return "距离计划完成采购时间不足" + i + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return "已超过计划完成采购时间" + Math.abs(i) + "天"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //首页待办事项--计划交付时间提醒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ObjectUtils.isEmpty(vo.getRealDeliverTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Date deliverTime = vo.getPlanDeliverTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int alertDay = Integer.parseInt(alertTimeMap.get("计划交付(实施)时间")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Integer remindTine = 1000 * 60 * 60 * 24 * alertDay; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            double surplus = deliverTime.getTime() - System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (surplus < remindTine) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //剩余天数(向上取整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 int i = (int) Math.ceil(surplus / 1000 / 60 / 60 / 24); 
			 |