|
|
|
@ -129,7 +129,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
String passwordEncode = CommonUtil.getLdapPassword(password);
|
|
|
|
|
BaseModel bm = new BaseModel();
|
|
|
|
|
Map loginMap = bm.getLoginInfoByUserName(username);
|
|
|
|
|
if (loginMap == null || !passwordEncode.equals(loginMap.get("password").toString())) {
|
|
|
|
|
if (passwordEncode != null && (loginMap == null || !passwordEncode.equals(loginMap.get("password").toString()))) {
|
|
|
|
|
//扩展支持连续输入用户名密码错误,停用账号5分钟功能 2022.06.07
|
|
|
|
|
cntNum = 1;
|
|
|
|
|
if (RedisKit.Exists(PassWordKey))
|
|
|
|
@ -159,7 +159,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
RedisKit.Del(PassWordKey);
|
|
|
|
|
RedisKit.Del(checkCodeKey);
|
|
|
|
|
|
|
|
|
|
//检查当前人员是不是存在合理角色
|
|
|
|
|
//检查当前人员是不是存在合理身份
|
|
|
|
|
int identity_id = Integer.parseInt(loginMap.get("identity_id").toString());
|
|
|
|
|
String person_id = loginMap.get("person_id").toString();
|
|
|
|
|
if (identity_id == 5 || identity_id == 6) {
|
|
|
|
@ -172,7 +172,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//写入Session信息
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "identity_id", loginMap.get("identity_id").toString());
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "person_id", loginMap.get("person_id").toString());
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "bureau_id", loginMap.get("bureau_id").toString());
|
|
|
|
@ -180,6 +180,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "city_id", loginMap.get("city_id").toString());
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "area_id", loginMap.get("area_id").toString());
|
|
|
|
|
|
|
|
|
|
//返回相关信息
|
|
|
|
|
resultJson.put("success", true);
|
|
|
|
|
resultJson.put("identity_id", loginMap.get("identity_id").toString());
|
|
|
|
|
resultJson.put("person_id", loginMap.get("person_id").toString());
|
|
|
|
@ -187,8 +188,7 @@ public class LoginPersonController extends Controller {
|
|
|
|
|
resultJson.put("person_name", loginMap.get("person_name").toString());
|
|
|
|
|
resultJson.put("org_code", loginMap.get("org_code").toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据人员id,获取所有单位信息
|
|
|
|
|
//根据人员id,获取所在单位信息
|
|
|
|
|
Record r = bm.getBureauInfoByPersonId(loginMap.get("person_id").toString());
|
|
|
|
|
if (r != null) resultJson.put("bureau_name", r.getStr("bureau_name"));
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|