para.put("account", account);
para.put("password", Utility.getInstance().md5(password));
// get Login UserInfo
SqlSession session = IBatisFactory.getInstance().getSqlSession();
UserInfo userInfo = (UserInfo) session.selectOne("Login.searchUserInfo", para);
if (userInfo == null) {
try {
Messagebox.show("輸入的使用者帳戶或密碼有錯", "錯誤的資料", Messagebox.RETRY, Messagebox.ERROR);
} catch (InterruptedException e) {
e.printStackTrace();
}
return;
} else {
logger.debug("User's company org id: " + " (" + userInfo.getOrgId() + ") and user's id:"+userInfo.getUserId());
this.getDesktop().getSession().setAttribute("userInfo", userInfo);
}
// get User's dutyInfo
session = IBatisFactory.getInstance().getSqlSession();
List dutyInfoList = session.selectList("Login.searchDutyInfo", userInfo.getUserId());
if (dutyInfoList == null || dutyInfoList.size() ==0) {
logger.info("There is no available dutyInfo ");
try {
Messagebox.show("該使用者無可用的 " + "" + " 權限身份", "錯誤的資料", Messagebox.RETRY, Messagebox.ERROR);