| | |
| | | if (workLasts.size() > 0) { |
| | | List<StaAssemblyWorkLast> userStationList = workLasts.stream().filter(item -> userId == item.getUserId()).collect(Collectors.toList()); |
| | | if (userStationList.size() == 0) { |
| | | throw new RuntimeException("员工(" + workLasts.get(0).getUserName() + ")编码:" + workLasts.get(0).getUserId() + "已经绑定该工站(" + workLasts.get(0).getStationName() + ")编码:" + workLasts.get(0).getStationId() + ".请先让其解绑"); |
| | | //删除工站登录信息 |
| | | for (int i = 0; i < workLasts.size(); i++) { |
| | | logout(workLasts.get(i).getId().toString()); |
| | | } |
| | | //throw new RuntimeException("员工(" +userInfo.getName() + ")编码:" + workLasts.get(0).getUserId() + "已经绑定该工站(" + stationInfo.getName() + ")编码:" + workLasts.get(0).getStationId() + ".请先让其解绑"); |
| | | } else { |
| | | BeanUtils.copyProperties(userStationList.get(0), result); |
| | | } |
| | | } else { |
| | | } |
| | | if (result.getId() == null) { |
| | | result.setUserId(userInfo.getId()); |
| | | result.setUserName(userInfo.getName()); |
| | | result.setStationId(stationInfo.getId()); |