| | |
| | | |
| | | import com.ld.igds.constant.BizType; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.dto.InoutApiData; |
| | | import com.ld.igds.inout.dto.ApiInoutData; |
| | | import com.ld.igds.io.notify.NotifyLprService; |
| | | import com.ld.igds.util.ContextUtil; |
| | | import com.ld.igds.util.RedisUtil; |
| | |
| | | |
| | | @SuppressWarnings("static-access") |
| | | @Override |
| | | public void notify(InoutApiData plate) { |
| | | public void notify(ApiInoutData plate) { |
| | | if (null == plate) return; |
| | | WebSocketPacket packet = new WebSocketPacket(); |
| | | packet.setCompanyId(ContextUtil.getDefaultCompanyId()); |
| | | packet.setBizType(BizType.INOUT_IN.getCode()); |
| | | packet.setBizTag(plate.getInoutProgress()); |
| | | packet.setUserId(plate.getUserId()); |
| | | packet.setBizId("PLATE_NUM"); |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public InoutApiData getLpr(String key) { |
| | | public ApiInoutData getLpr(String key) { |
| | | key = RedisConst.buildKey(ContextUtil.getDefaultCompanyId(),KEY_LPR,key); |
| | | InoutApiData lprDto = (InoutApiData) redisUtil.get(key); |
| | | ApiInoutData lprDto = (ApiInoutData) redisUtil.get(key); |
| | | if(null == lprDto) return null; |
| | | return lprDto; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void setLpr(String sn, InoutApiData lprDto) { |
| | | public void setLpr(String sn, ApiInoutData lprDto) { |
| | | String key = RedisConst.buildKey(ContextUtil.getDefaultCompanyId(),KEY_LPR,sn); |
| | | redisUtil.set(key,lprDto, 60 * 60); |
| | | } |