| | |
| | | |
| | | @Component |
| | | public class WorkstationCache { |
| | | public static final String COLLECT_WORKSTATION = "collect:workstation"; |
| | | private static final String WORKSTATION_ID = "workstation:id:"; |
| | | private static final String CALENDAR_DATE = ":calendar:date:"; |
| | | private static final String WORKSTATION_ALL = "workstation:all"; |
| | |
| | | |
| | | |
| | | public Map<Long, WorkstationDTO> getWorkstations() { |
| | | String redisKey = "posting:workstation".concat("::").concat(WORKSTATION_ALL); |
| | | String redisKey = COLLECT_WORKSTATION.concat("::").concat(WORKSTATION_ALL); |
| | | /*Map<String, WorkstationDTO> map = bladeRedis.hGetAll(redisKey); |
| | | |
| | | |
| | |
| | | |
| | | private Map<Long, WorkstationDTO> setWorkstations() { |
| | | List<Workstation> list = workstationService.list(); |
| | | String redisKey = "posting:workstation".concat("::").concat(WORKSTATION_ALL); |
| | | String redisKey = COLLECT_WORKSTATION.concat("::").concat(WORKSTATION_ALL); |
| | | |
| | | list.forEach(ws -> { |
| | | /* |
| | |
| | | * @return |
| | | */ |
| | | public String getWorkstationCalendarCodeForDate(Long workstationId, String date) { |
| | | String redisKey = "posting:workstation".concat("::").concat(WORKSTATION_ID).concat(workstationId.toString().concat(CALENDAR_DATE)).concat(date); |
| | | String redisKey = COLLECT_WORKSTATION.concat("::").concat(WORKSTATION_ID).concat(workstationId.toString().concat(CALENDAR_DATE)).concat(date); |
| | | //String calendarCode = (String) bladeRedis.get(redisKey); |
| | | String calendarCode = (String) redisUtil.get(redisKey); |
| | | if (ObjectUtil.isEmpty(calendarCode)) { |
| | |
| | | } |
| | | |
| | | public GlobalWcsOfRps getWorkstationWcsSetting(Long workstationId, String code) { |
| | | String redisKey = "posting:workstation".concat("::").concat(WORKSTATION_ID).concat(workstationId.toString() |
| | | String redisKey = COLLECT_WORKSTATION.concat("::").concat(WORKSTATION_ID).concat(workstationId.toString() |
| | | .concat(WCS_SETTING)); |
| | | |
| | | //GlobalWcsOfRps wcsSetting = (GlobalWcsOfRps)redisUtil.hGet(redisKey, code); |
| | |
| | | */ |
| | | public Long getBelongToEmployeeForWorkstation(Long workstationId, Date timePoint) { |
| | | Long employeeId = null; |
| | | String redisKey = "posting:workstation".concat("::").concat("workstation:id:") |
| | | String redisKey = COLLECT_WORKSTATION.concat("::").concat("workstation:id:") |
| | | .concat(workstationId.toString().concat(EMPLOYEE)); |
| | | // Set<EmployeeOnOffWork> employeeOnOffWorks = bladeRedis.sMembers(redisKey); |
| | | |