| | |
| | | if (StringUtils.isEmpty(param.getCompanyId())) { |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | } |
| | | |
| | | // 首先从缓存中获取,如果没有则从数据库获取 |
| | | InoutData result = this.getFromInoutCache(param); |
| | | if (null != result) { |
| | | return result; |
| | | } |
| | | |
| | | |
| | | List<InoutData> list = inoutMapper.inoutProgressQuery(param); |
| | | if (null == list || list.size() == 0) |
| | | return null; |
| | |
| | | if (StringUtils.isEmpty(param.getDeptId())) { |
| | | param.setDeptId(ContextUtil.subDeptId(null)); |
| | | } |
| | | |
| | | List<InoutData> list = getListInoutCache(param.getDeptId()); |
| | | if (null == list || list.isEmpty()) |
| | | return null; |
| | |
| | | * @param data |
| | | */ |
| | | private void setInoutCache(String deptId, InoutData data) { |
| | | String key = this.buildInoutKey(deptId, |
| | | InoutConstant.KEY_INOUT_LIST, data.getType(), data.getId()); |
| | | |
| | | String key = this.buildInoutKey(deptId, InoutConstant.KEY_INOUT_LIST, data.getType(), data.getId()); |
| | | redisUtil.set(key, data, InoutConstant.KEY_INOUT_LIST_TIME); |
| | | } |
| | | |