master
Joe 2 years ago
parent 6e2ec67889
commit 0c770342e2

Binary file not shown.

@ -59,7 +59,10 @@ public class LoginController {
} else {
Users users = usersService.findUser(userNo, password);
ajaxResult.setData(JWTUtil.sign(users.getUserNo()));
JSONObject jsonObject = new JSONObject();
jsonObject.put("token", JWTUtil.sign(users.getUserNo()));
jsonObject.put("user", users);
ajaxResult.setData(jsonObject);
ajaxResult.setRetmsg("登录成功");
ajaxResult.setRetcode(AjaxResult.SUCCESS);
}

@ -38,25 +38,31 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "就业学历", orderNum = "5")
@Excel(name = "学历", orderNum = "2")
private String education;
@Excel(name = "是否就业学历", replace = { "是_1", "否_0" }, orderNum = "3")
private Integer isEducation;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.school
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "最高学历学校", orderNum = "3")
@Excel(name = "学校", orderNum = "5")
private String school;
@Excel(name = "学位", orderNum = "4")
private String degree;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.speciality
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "专业", orderNum = "4")
@Excel(name = "专业", orderNum = "6")
private String speciality;
/**
@ -65,7 +71,6 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "入学时间", orderNum = "8")
private String intake;
/**
@ -74,7 +79,7 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "毕业时间", orderNum = "9")
@Excel(name = "毕业时间", orderNum = "7")
private String graduationTime;
/**
@ -83,7 +88,6 @@ public class EducationResume {
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "最高学历", orderNum = "2")
private String highestEducation;
/**
@ -92,7 +96,6 @@ public class EducationResume {
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "本科学历学校", orderNum = "7")
private String undergraduateSchools;
/**
@ -101,7 +104,6 @@ public class EducationResume {
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "本科学历专业", orderNum = "6")
private String undergraduateMajor;
/**
@ -528,4 +530,19 @@ public class EducationResume {
this.undergraduateMajor = undergraduateMajor;
}
public Integer getIsEducation() {
return isEducation;
}
public void setIsEducation(Integer isEducation) {
this.isEducation = isEducation;
}
public String getDegree() {
return degree;
}
public void setDegree(String degree) {
this.degree = degree;
}
}

@ -56,9 +56,14 @@ public class FamilyMembers {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "电话", orderNum = "4")
private String relationMobile;
@Excel(name = "工作单位", orderNum = "4")
private String workUnit;
@Excel(name = "出生日期", orderNum = "5")
private String birthday;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column family_members.create_date_time
@ -362,4 +367,20 @@ public class FamilyMembers {
public void setState(Integer state) {
this.state = state;
}
public String getWorkUnit() {
return workUnit;
}
public void setWorkUnit(String workUnit) {
this.workUnit = workUnit;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
}

@ -36,6 +36,8 @@ public class Users {
*/
private String password;
private String permission;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column users.create_date_time
@ -291,4 +293,12 @@ public class Users {
public void setState(Integer state) {
this.state = state;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
}

@ -32,13 +32,19 @@ public class WorkExperience {
@Excel(name = "员工编号", orderNum = "0")
private String employeeNo;
@Excel(name = "班组", orderNum = "3")
private String groups;
@Excel(name = "部门", orderNum = "2")
private String department;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column work_experience.transferred_position
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "调入岗位", orderNum = "2")
@Excel(name = "岗位", orderNum = "4")
private String transferredPosition;
/**
@ -47,7 +53,6 @@ public class WorkExperience {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "原岗位", orderNum = "3")
private String originalPosition;
/**
@ -56,7 +61,7 @@ public class WorkExperience {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "调岗日期", orderNum = "4")
@Excel(name = "起始时间", orderNum = "5")
private String transferDate;
/**
@ -362,4 +367,20 @@ public class WorkExperience {
public void setState(Integer state) {
this.state = state;
}
public String getGroups() {
return groups;
}
public void setGroups(String groups) {
this.groups = groups;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
}

@ -403,11 +403,15 @@ public class EmployeeServiceImpl implements EmployeeService {
} else {
List<InfoSettingValue> infoSettingValues = infoSettingValueService.getAllInfoSettingValueBySettingName("部门");
departmentList = infoSettingValues.stream().map(item -> item.getSettingValue()).collect(Collectors.toList());
departmentList.add(0,"汇总数据");
}
for (String s : departmentList) {
DataStatisticsVO dataStatisticsVO = new DataStatisticsVO();
dataStatisticsVO.setPostName(s);
if (s.equals("汇总数据")) {
s = null;
}
if (null != isEdu && isEdu == 1) {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(1, s, postNames);
dataStatisticsVO.setEducationList(dataAnalysisVOS);
@ -428,7 +432,7 @@ public class EmployeeServiceImpl implements EmployeeService {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(5, s, postNames);
dataStatisticsVO.setAgeList(dataAnalysisVOS);
}
if (null != isDepartment && isDepartment == 1) {
if (null != isDepartment && isDepartment == 1 && !dataStatisticsVO.getPostName().equals("汇总数据")) {
Employee employee = new Employee();
employee.setState(Constants.ENABLE);
Integer all = employeeMapper.selectCount(employee);

@ -39,6 +39,7 @@ public class UsersServiceImpl implements UsersService {
public Users selectByUserNo(String key) {
Users users = new Users();
users.setUserNo(key);
users.setState(Constants.ENABLE);
users = usersMapper.selectOne(users);
return users;
}
@ -46,15 +47,9 @@ public class UsersServiceImpl implements UsersService {
@Override
public Users findUser(String userName, String password) {
Users users = new Users();
users.setUserName(userName);
users.setUserNo(userName);
users.setPassword(password);
users = usersMapper.selectOne(users);
if (null == users) {
users = new Users();
users.setUserNo(userName);
users.setPassword(password);
}
users.setState(Constants.ENABLE);
users = usersMapper.selectOne(users);
return users;
}
@ -75,12 +70,12 @@ public class UsersServiceImpl implements UsersService {
@SneakyThrows
@Override
public AjaxResult saveUsers(JSONObject jsonObject) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
AjaxResult ajaxResult = new AjaxResult();
Long id = jsonObject.getLong("id");
String userName = jsonObject.getString("userName");
String userNo = jsonObject.getString("userNo");
String password = jsonObject.getString("password");
String permission = jsonObject.getString("permission");
if (null != id){
Users users = usersMapper.selectByPrimaryKey(id);
if (null == users){
@ -95,14 +90,27 @@ public class UsersServiceImpl implements UsersService {
users.setUserName(userName);
users.setUserNo(userNo);
users.setPassword(password);
users.setPermission(permission);
usersMapper.updateByExampleSelective(users,example);
}
ajaxResult.setRetmsg("成功修改用户");
}else {
Example example = new Example(Users.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userNo",userNo);
criteria.andEqualTo("state",Constants.ENABLE);
List<Users> userList = usersMapper.selectByExample(example);
if (null != userList && userList.size() > 0) {
ajaxResult.setRetmsg("该账号已存在");
ajaxResult.setRetcode(AjaxResult.FAILED);
return ajaxResult;
}
Users users = new Users();
users.setUserName(userName);
users.setUserNo(userNo);
users.setPassword(password);
users.setPermission(permission);
users.setState(Constants.ENABLE);
usersMapper.insert(users);
ajaxResult.setRetmsg("成功新增用户");
}

@ -4,7 +4,9 @@
<select id="dataStatistics" resultType="com.jingcheng.cms.vo.DataAnalysisVO">
SELECT
<if test="postName != null">
t1.department as postName,
</if>
t2.postCount,
<if test="type == 1">
t1.highest_education as analysisName,
@ -32,8 +34,13 @@
</if>
FROM
employee t1
JOIN (SELECT department, COUNT(department) as postCount FROM employee GROUP BY department) t2 ON t1.department = t2.department
where 1=1
<if test="postName != null">
JOIN (SELECT department, COUNT(department) as postCount FROM employee where state = 1 GROUP BY department) t2 ON t1.department = t2.department
</if>
<if test="postName == null">
JOIN (SELECT COUNT(*) as postCount FROM employee where state = 1) t2
</if>
where t1.state = 1
<if test="postName != null">
and t1.department = #{postName}
</if>
@ -44,7 +51,9 @@
</foreach>
</if>
GROUP BY
<if test="postName != null">
t1.department,
</if>
<if test="type == 1">
t1.highest_education
</if>

Loading…
Cancel
Save