|  |  |  | @ -91,14 +91,14 @@ public class InvRemindMsgServiceImpl implements InvRemindMsgService { | 
			
		
	
		
			
				
					|  |  |  |  |                     invRemindMsgRequest.setSupId(invProductEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     //根据预警设置,添加类型参数
 | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getLowStock() && null != udiRelevanceEntity.getLowStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getLowStock() && null != invRemindSetEntity.getLowStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         //开启低库存预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         invRemindMsgRequest.setType("1"); //库存不足预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvRemindMsgEntity msgEntity = getInvRemindMsgEntity(invRemindMsgRequest, invProductEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //判断是否需要生成/刷新库存预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if ((null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() <= new Date().getTime()) && udiRelevanceEntity.getLowStockNum() > invProductEntity.getReCount()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if ((null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() <= new Date().getTime()) && invRemindSetEntity.getLowStockNum() > invProductEntity.getReCount()) { | 
			
		
	
		
			
				
					|  |  |  |  |                             //设置预警消息
 | 
			
		
	
		
			
				
					|  |  |  |  |                             msgEntity.setMsg(StrUtil.format("库存数量已不足:{},当前库存数量:{} ", udiRelevanceEntity.getLowStockNum(), invProductEntity.getReCount())); | 
			
		
	
		
			
				
					|  |  |  |  |                             msgEntity.setMsg(StrUtil.format("库存数量已不足:{},当前库存数量:{} ", invRemindSetEntity.getLowStockNum(), invProductEntity.getReCount())); | 
			
		
	
		
			
				
					|  |  |  |  |                             saveMsg(msgEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
	
		
			
				
					|  |  |  | @ -119,12 +119,12 @@ public class InvRemindMsgServiceImpl implements InvRemindMsgService { | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getOverStock() && null != udiRelevanceEntity.getOverStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getOverStock() && null != invRemindSetEntity.getOverStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         //开启库存积压预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         invRemindMsgRequest.setType("3"); //库存积压预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvRemindMsgEntity msgEntity = getInvRemindMsgEntity(invRemindMsgRequest, invProductEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //判断是否需要生成/刷新库存预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if ((null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() <= new Date().getTime()) && invProductEntity.getReCount() > udiRelevanceEntity.getOverStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if ((null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() <= new Date().getTime()) && invProductEntity.getReCount() > invRemindSetEntity.getOverStockNum()) { | 
			
		
	
		
			
				
					|  |  |  |  |                             //设置预警消息
 | 
			
		
	
		
			
				
					|  |  |  |  |                             msgEntity.setMsg(StrUtil.format("库存积压,当前库存数量:{}", invProductEntity.getReCount())); | 
			
		
	
		
			
				
					|  |  |  |  |                             saveMsg(msgEntity); | 
			
		
	
	
		
			
				
					|  |  |  | @ -146,14 +146,14 @@ public class InvRemindMsgServiceImpl implements InvRemindMsgService { | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getRecentDate() && null != udiRelevanceEntity.getRecentDateTime()) { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (invRemindSetEntity.getRecentDate() && null != invRemindSetEntity.getRecentDateTime()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         //开启库存近效期预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         invRemindMsgRequest.setType("5"); //库存近效期预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvRemindMsgEntity msgEntity = getInvRemindMsgEntity(invRemindMsgRequest, invProductEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //判断是否需要生成/刷新库存预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if ((null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() <= new Date().getTime()) && StrUtil.isNotBlank(invProductEntity.getExpireDate())) { | 
			
		
	
		
			
				
					|  |  |  |  |                             //当前时间 - 近效期预警时间 > 产品失效日期,则进行预警
 | 
			
		
	
		
			
				
					|  |  |  |  |                             DateTime dateTime = cn.hutool.core.date.DateUtil.offsetHour(new Date(), udiRelevanceEntity.getRecentDateTime()); | 
			
		
	
		
			
				
					|  |  |  |  |                             DateTime dateTime = cn.hutool.core.date.DateUtil.offsetHour(new Date(), invRemindSetEntity.getRecentDateTime()); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             if (Long.parseLong(dateTime.toString("yyMMdd")) > Long.parseLong(invProductEntity.getExpireDate())) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 //设置预警消息
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |