| | |
| | | import com.example.client.utils.GBC; |
| | | import com.example.server.user.model.SysUser; |
| | | import com.example.server.user.service.UserService; |
| | | import com.example.server.utils.CacheUtils; |
| | | import com.example.server.utils.UserAndSiteUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | user = userService.login(name, str); |
| | | exist = user.getExist(); |
| | | Boolean exit2 = true; |
| | | Boolean exit3 = true; |
| | | if (StringUtils.isNotBlank(user.getTeamgroup())) { |
| | | if (StringUtils.isNotBlank(finalTeamGroup1) && !finalTeamGroup1.equals("null")) { |
| | | if (!finalTeamGroup1.contains(user.getTeamgroup())) { |
| | |
| | | } |
| | | } |
| | | } |
| | | if (user.getNickName().equals("工作组")){ |
| | | if(!"工作组".equals(finalSite)){ |
| | | exit3 = false; |
| | | } |
| | | } |
| | | |
| | | if (exist) { |
| | | if (!exit2) { |
| | | JOptionPane.showMessageDialog(null, "当前机器不支持该专业用户登录", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | if (!exit3) { |
| | | JOptionPane.showMessageDialog(null, "当前机器不支持工作组用户登录", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | try { |
| | |
| | | } catch (IOException ep) { |
| | | ep.printStackTrace(); |
| | | } |
| | | user.setBoatfleet(finalTeam); |
| | | CacheUtils.put("user", "user", user); |
| | | CacheUtils.put("site", "site", finalSite); |
| | | CacheUtils.put("teamGroup", "teamGroup", finalTeamGroup); |
| | | user.setBoatFleet(finalTeam); |
| | | UserAndSiteUtils.put("user", "user", user); |
| | | UserAndSiteUtils.put("site", "site", finalSite); |
| | | main.Start(role, user.getId()); |
| | | frame.dispose(); |
| | | } else { |