| 
					
				 | 
			
			
				@@ -24,6 +24,7 @@ import com.gree.mall.miniapp.utils.RedisUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.gree.mall.miniapp.utils.StringUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.gree.mall.miniapp.utils.ocr.OCRUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.http.client.utils.DateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.util.CollectionUtils; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -450,12 +451,19 @@ public class WorkerLogic { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RemoteServiceException("已拥有对应时间的保险"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int month = DateUtil.month(startTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Mailbox mailbox = mailboxService.getById("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Date endTime = DateUtil.parseDateTime(DateUtils.formatDate(new Date(),"yyyy-MM-dd") +" "+ mailbox.getSendTime()+":00"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (new Date().after(endTime) && DateUtil.offsetDay(startTime,22).month() != DateUtil.month(startTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            month = month+1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int month2 = DateUtil.month(policy.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int year = DateUtil.year(startTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int year2 = DateUtil.year(policy.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Integer integer =(year2-year)*12+( month2-month+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer integer =(year2-year)*12+(month2-month+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (integer > 12 || integer < 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RemoteServiceException("保险配置错误"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |