forked from integrated_whb/integrated_whb
修改导入,登录
parent
98406f230b
commit
60bb52b485
|
@ -239,7 +239,11 @@ public class DepartmentController extends BaseController {
|
|||
depar.setDEPARTMENT_ID(dept.getString("DEPARTMENT_ID"));
|
||||
depar.setPARENT_ID(dept.getString("PARENT_ID"));
|
||||
depar.setNAME(dept.getString("NAME"));
|
||||
depar.setDISABLED(true);
|
||||
if(pd.get("rootDisabled")!= null && pd.get("rootDisabled").toString().equals("Y")){
|
||||
depar.setDISABLED(true);
|
||||
}else {
|
||||
depar.setDISABLED(false);
|
||||
}
|
||||
depar.setTreeurl(url+depar.getDEPARTMENT_ID());
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("parentId", depar.getDEPARTMENT_ID());
|
||||
|
|
|
@ -126,118 +126,98 @@ public class LoginController extends BaseController {
|
|||
pd.put("USERNAME", USERNAME);
|
||||
pd = usersService.findByUsername(pd);
|
||||
PageData cpd = corpinfoService.findById(pd);
|
||||
// System.out.println(Integer.parseInt(cpd.get("TRIALDAY").toString()) );
|
||||
System.out.println(cpd.get("TRIALDAY"));
|
||||
if (Integer.parseInt(cpd.get("HAS_LIVE").toString()) >0 || cpd.getString("ISDELIVER").equals("0") ) {
|
||||
if (cpd.get("TRIALDAY")== null || Integer.parseInt(cpd.get("TRIALDAY").toString()) >= 0 ) {
|
||||
System.out.println(cpd.get("TRIALDAY"));
|
||||
System.out.println(cpd.getString("ISSTOP") == null);
|
||||
System.out.println("1".equals(cpd.getString("ISSTOP")));
|
||||
System.out.println("0".equals(cpd.getString("ISSTOP")));
|
||||
System.out.println(cpd.getString("ISSTOP"));
|
||||
// if (pd != null && pd.get("RIGHTS") != null && Tools.notEmpty(pd.get("RIGHTS").toString())
|
||||
// && "788664966448".equals(pd.get("RIGHTS").toString())) {
|
||||
if ("1".equals(cpd.getString("ISSTOP")) || cpd.getString("ISSTOP") == null) {
|
||||
map.put("USERNAME", USERNAME);
|
||||
map.put("USER_ID", pd.getString("USER_ID"));
|
||||
map.put("NAME", pd.getString("NAME"));
|
||||
map.put("ISMAIN", pd.getString("ISMAIN"));
|
||||
map.put("IS_SAFETY", pd.get("IS_SAFETY"));
|
||||
map.put("ISHEAD", pd.getString("ISHEAD"));
|
||||
map.put("ISLEADER", pd.getString("ISLEADER"));
|
||||
map.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
map.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
map.put("CORP_NAME", cpd.getString("CORP_NAME"));
|
||||
map.put("PROVINCE", cpd.getString("PROVINCE"));
|
||||
map.put("USERNAME", USERNAME);
|
||||
map.put("USER_ID", pd.getString("USER_ID"));
|
||||
map.put("NAME", pd.getString("NAME"));
|
||||
map.put("ISMAIN", pd.getString("ISMAIN"));
|
||||
map.put("IS_SAFETY", pd.get("IS_SAFETY"));
|
||||
map.put("ISHEAD", pd.getString("ISHEAD"));
|
||||
map.put("ISLEADER", pd.getString("ISLEADER"));
|
||||
map.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
map.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
map.put("CORP_NAME", cpd.getString("CORP_NAME"));
|
||||
map.put("PROVINCE", cpd.getString("PROVINCE"));
|
||||
// PageData dpd = new PageData();
|
||||
// dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
// dpd=departmentService.findById(dpd);
|
||||
// map.put("DEPARTMENT_NAME", dpd.getString("NAME"));
|
||||
// map.put("PARENT_NAME", dpd.getString("PARENT_NAME"));
|
||||
PageData rpd = roleService.findById(pd);
|
||||
map.put("ROLEID", rpd.getString("ROLE_ID"));
|
||||
map.put("ROLE_NAME", rpd.getString("ROLE_NAME"));
|
||||
map.put("USERBZ", pd.getString("BZ"));
|
||||
PageData dpd = new PageData();
|
||||
dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
dpd = departmentService.findById(dpd);
|
||||
map.put("DEPARTMENT_NAME", dpd.getString("NAME"));
|
||||
map.put("DEPARTMENT_LEVEL", dpd.getString("LEVEL"));
|
||||
map.put("ISSUPERVISE", dpd.getString("ISSUPERVISE"));
|
||||
User user = new User();
|
||||
user.setUSER_ID(pd.getString("USER_ID"));
|
||||
user.setUSERNAME(pd.getString("USERNAME"));
|
||||
user.setPASSWORD(pd.getString("PASSWORD"));
|
||||
user.setNAME(pd.getString("NAME"));
|
||||
user.setROLE_ID(pd.getString("ROLE_ID"));
|
||||
user.setLAST_LOGIN(pd.getString("LAST_LOGIN"));
|
||||
user.setIP(pd.getString("IP"));
|
||||
user.setSTATUS(pd.getString("STATUS"));
|
||||
if (Tools.notEmpty(pd.getString("WORKSTATUS")) && "2".equals(pd.getString("WORKSTATUS"))) {// 查看用户是否处于周期性休班中
|
||||
// 休班(周期性)
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
// 查看用户是否在休假中
|
||||
PageData isRest = this.getPageData();
|
||||
isRest.put("ISREST", "1");
|
||||
isRest.put("USER_ID", pd.getString("USER_ID"));
|
||||
isRest.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
List<PageData> restList = offdutyService.listAll(isRest);
|
||||
if (restList != null && restList.size() > 0) {
|
||||
// 休假中
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
// 正常工作
|
||||
map.put("ISREST", "0");
|
||||
}
|
||||
}
|
||||
map.put("deptList", departmentService.listAll(cpd));
|
||||
map.put("userList", usersService.listAllUser(cpd));
|
||||
map.put("CORP_TRAINTYPE",
|
||||
Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE"));// 用户所属企业的培训行业类型到
|
||||
session.setAttribute(Const.SESSION_USER, user); // 把当前用户放入session
|
||||
session.setAttribute(Const.DEPARTMENT_ID, pd.getString("DEPARTMENT_ID")); // 把当前用户放入session
|
||||
session.setAttribute(Const.ISSUPERVISE, dpd.getString("ISSUPERVISE")); // 把当前用户放入session
|
||||
session.setAttribute(Const.VIPLEVEL, cpd.getString("VIPLEVEL")); // 把当前用户放入session
|
||||
System.out.println(session.getAttribute(Const.VIPLEVEL));
|
||||
session.setAttribute(Const.CORPINFO_ID, pd.getString("CORPINFO_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.POST_ID,
|
||||
pd.getString("POST_ID") == null ? "" : pd.getString("POST_ID")); // 把当前用户岗位放入session
|
||||
session.setAttribute(Const.USER_ID, pd.getString("USER_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session
|
||||
session.setAttribute(Const.SESSION_U_NAME, user.getNAME()); // 放入用户姓名到session
|
||||
session.setAttribute(Const.IS_MAIN, pd.get("ISMAIN")); // 是否主账号
|
||||
session.setAttribute(Const.CORP_TRAINTYPE,
|
||||
Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE")); // 放入当前用户所属企业的培训行业类型到session
|
||||
|
||||
|
||||
// 记录日志
|
||||
PageData log = new PageData();
|
||||
log.put("USERNAME", USERNAME);
|
||||
log.put("CONTENT", "成功登录系统");
|
||||
log.put("FHLOG_ID", UuidUtil.get32UUID());
|
||||
log.put("IP", ip);
|
||||
log.put("CZTIME", DateUtil.date2Str(new Date()));
|
||||
log.put("SOURCE", source);
|
||||
log.put("USER_ID", pd.getString("USER_ID"));
|
||||
log.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
log.put("TYPE", "1");
|
||||
log.put("NAME", pd.getString("NAME"));
|
||||
log.put("DEPARTMENT", dpd.getString("NAME"));
|
||||
log.put("DEPARTMENT_ID", dpd.getString("DEPARTMENT_ID"));
|
||||
|
||||
FHLOG.save(log);
|
||||
|
||||
} else {
|
||||
errInfo = "usercorperror";
|
||||
}
|
||||
|
||||
PageData rpd = roleService.findById(pd);
|
||||
map.put("ROLEID", rpd.getString("ROLE_ID"));
|
||||
map.put("ROLE_NAME", rpd.getString("ROLE_NAME"));
|
||||
map.put("USERBZ", pd.getString("BZ"));
|
||||
PageData dpd = new PageData();
|
||||
dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
dpd = departmentService.findById(dpd);
|
||||
map.put("DEPARTMENT_NAME", dpd.getString("NAME"));
|
||||
map.put("DEPARTMENT_LEVEL", dpd.getString("LEVEL"));
|
||||
map.put("ISSUPERVISE", dpd.getString("ISSUPERVISE"));
|
||||
User user = new User();
|
||||
user.setUSER_ID(pd.getString("USER_ID"));
|
||||
user.setUSERNAME(pd.getString("USERNAME"));
|
||||
user.setPASSWORD(pd.getString("PASSWORD"));
|
||||
user.setNAME(pd.getString("NAME"));
|
||||
user.setROLE_ID(pd.getString("ROLE_ID"));
|
||||
user.setLAST_LOGIN(pd.getString("LAST_LOGIN"));
|
||||
user.setIP(pd.getString("IP"));
|
||||
user.setSTATUS(pd.getString("STATUS"));
|
||||
if (Tools.notEmpty(pd.getString("WORKSTATUS")) && "2".equals(pd.getString("WORKSTATUS"))) {// 查看用户是否处于周期性休班中
|
||||
// 休班(周期性)
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
errInfo = "userUSEerror";
|
||||
}
|
||||
}else {
|
||||
errInfo = "userUSEerror";
|
||||
// 查看用户是否在休假中
|
||||
PageData isRest = this.getPageData();
|
||||
isRest.put("ISREST", "1");
|
||||
isRest.put("USER_ID", pd.getString("USER_ID"));
|
||||
isRest.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
List<PageData> restList = offdutyService.listAll(isRest);
|
||||
if (restList != null && restList.size() > 0) {
|
||||
// 休假中
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
// 正常工作
|
||||
map.put("ISREST", "0");
|
||||
}
|
||||
}
|
||||
map.put("deptList", departmentService.listAll(cpd));
|
||||
map.put("userList", usersService.listAllUser(cpd));
|
||||
map.put("CORP_TRAINTYPE",
|
||||
Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE"));// 用户所属企业的培训行业类型到
|
||||
session.setAttribute(Const.SESSION_USER, user); // 把当前用户放入session
|
||||
session.setAttribute(Const.DEPARTMENT_ID, pd.getString("DEPARTMENT_ID")); // 把当前用户放入session
|
||||
session.setAttribute(Const.ISSUPERVISE, dpd.getString("ISSUPERVISE")); // 把当前用户放入session
|
||||
session.setAttribute(Const.VIPLEVEL, cpd.getString("VIPLEVEL")); // 把当前用户放入session
|
||||
System.out.println(session.getAttribute(Const.VIPLEVEL));
|
||||
session.setAttribute(Const.CORPINFO_ID, pd.getString("CORPINFO_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.POST_ID,
|
||||
pd.getString("POST_ID") == null ? "" : pd.getString("POST_ID")); // 把当前用户岗位放入session
|
||||
session.setAttribute(Const.USER_ID, pd.getString("USER_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session
|
||||
session.setAttribute(Const.SESSION_U_NAME, user.getNAME()); // 放入用户姓名到session
|
||||
session.setAttribute(Const.IS_MAIN, pd.get("ISMAIN")); // 是否主账号
|
||||
session.setAttribute(Const.CORP_TRAINTYPE,
|
||||
Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE")); // 放入当前用户所属企业的培训行业类型到session
|
||||
|
||||
|
||||
// 记录日志
|
||||
PageData log = new PageData();
|
||||
log.put("USERNAME", USERNAME);
|
||||
log.put("CONTENT", "成功登录系统");
|
||||
log.put("FHLOG_ID", UuidUtil.get32UUID());
|
||||
log.put("IP", ip);
|
||||
log.put("CZTIME", DateUtil.date2Str(new Date()));
|
||||
log.put("SOURCE", source);
|
||||
log.put("USER_ID", pd.getString("USER_ID"));
|
||||
log.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
log.put("TYPE", "1");
|
||||
log.put("NAME", pd.getString("NAME"));
|
||||
log.put("DEPARTMENT", dpd.getString("NAME"));
|
||||
log.put("DEPARTMENT_ID", dpd.getString("DEPARTMENT_ID"));
|
||||
|
||||
FHLOG.save(log);
|
||||
|
||||
} else {
|
||||
token.clear();
|
||||
errInfo = "usererror";
|
||||
|
@ -258,11 +238,6 @@ public class LoginController extends BaseController {
|
|||
map.put("msg", "用户名或密码有误");
|
||||
} else if ("error".equals(errInfo)) {
|
||||
map.put("msg", "缺少参数");
|
||||
} else if ("userUSEerror".equals(errInfo)) {
|
||||
map.put("msg", "尊敬的一体化数字平台客户,您的平台服务已过期,如需恢复平台使用功能,请联系我们客户服务人员,客服热线:13303358557");
|
||||
}
|
||||
else if ("usercorperror".equals(errInfo)) {
|
||||
map.put("msg", "尊敬的一体化数字平台客户,您好, 您的平台服务已暂停使用,如需恢复使用请联系我们客户服务人员,客服热线:13313350564");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class ObjectExcelRead {
|
|||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return varList;
|
||||
|
@ -98,6 +98,9 @@ public class ObjectExcelRead {
|
|||
int rowCount = 0;
|
||||
for (int i = 1; i <= sheet.getLastRowNum(); i++) {
|
||||
HSSFRow row = sheet.getRow(i); //行
|
||||
if(row == null){
|
||||
break;
|
||||
}
|
||||
HSSFCell cell = row.getCell(0);
|
||||
if(null != cell){
|
||||
rowCount ++;
|
||||
|
|
Loading…
Reference in New Issue