master
Joe 2 years ago
parent fe9be91df2
commit 709ffd40d5

Binary file not shown.

@ -38,7 +38,7 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "学历", orderNum = "2")
@Excel(name = "就业学历", orderNum = "2")
private String education;
/**
@ -47,7 +47,7 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "学校", orderNum = "3")
@Excel(name = "最高学历学校", orderNum = "6")
private String school;
/**
@ -56,7 +56,7 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "专业", orderNum = "4")
@Excel(name = "专业", orderNum = "7")
private String speciality;
/**
@ -65,7 +65,7 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "入学时间", orderNum = "5")
@Excel(name = "入学时间", orderNum = "8")
private String intake;
/**
@ -74,9 +74,36 @@ public class EducationResume {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "毕业时间", orderNum = "6")
@Excel(name = "毕业时间", orderNum = "9")
private String graduationTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.highest_education
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "最高学历", orderNum = "3")
private String highestEducation;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.undergraduate_schools
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "本科学历学校", orderNum = "4")
private String undergraduateSchools;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.undergraduate_major
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "本科学历专业", orderNum = "5")
private String undergraduateMajor;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column education_resume.create_date_time
@ -428,4 +455,77 @@ public class EducationResume {
public void setState(Integer state) {
this.state = state;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column education_resume.highest_education
*
* @return the value of education_resume.highest_education
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getHighestEducation() {
return highestEducation;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column education_resume.highest_education
*
* @param highestEducation the value for education_resume.highest_education
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setHighestEducation(String highestEducation) {
this.highestEducation = highestEducation;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column education_resume.undergraduate_schools
*
* @return the value of education_resume.undergraduate_schools
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getUndergraduateSchools() {
return undergraduateSchools;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column education_resume.undergraduate_schools
*
* @param undergraduateSchools the value for education_resume.undergraduate_schools
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setUndergraduateSchools(String undergraduateSchools) {
this.undergraduateSchools = undergraduateSchools;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column education_resume.undergraduate_major
*
* @return the value of education_resume.undergraduate_major
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getUndergraduateMajor() {
return undergraduateMajor;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column education_resume.undergraduate_major
*
* @param undergraduateMajor the value for education_resume.undergraduate_major
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setUndergraduateMajor(String undergraduateMajor) {
this.undergraduateMajor = undergraduateMajor;
}
}

@ -152,6 +152,57 @@ public class Employee {
*/
private Long highestEducationId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.department
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "部门", orderNum = "10")
private String department;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.department_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
private Long departmentId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.age
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "年龄", orderNum = "11")
private String age;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.age_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
private Long ageId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.sex
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
@Excel(name = "性别", replace = { "男_1", "女_2" }, orderNum = "12")
private Integer sex;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.photo
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
private String photo;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column employee.create_date_time
@ -719,4 +770,147 @@ public class Employee {
public void setState(Integer state) {
this.state = state;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.department
*
* @return the value of employee.department
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getDepartment() {
return department;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.department
*
* @param department the value for employee.department
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setDepartment(String department) {
this.department = department;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.department_id
*
* @return the value of employee.department_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public Long getDepartmentId() {
return departmentId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.department_id
*
* @param departmentId the value for employee.department_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.age
*
* @return the value of employee.age
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getAge() {
return age;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.age
*
* @param age the value for employee.age
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setAge(String age) {
this.age = age;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.age_id
*
* @return the value of employee.age_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public Long getAgeId() {
return ageId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.age_id
*
* @param ageId the value for employee.age_id
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setAgeId(Long ageId) {
this.ageId = ageId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.sex
*
* @return the value of employee.sex
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public Integer getSex() {
return sex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.sex
*
* @param sex the value for employee.sex
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setSex(Integer sex) {
this.sex = sex;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column employee.photo
*
* @return the value of employee.photo
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public String getPhoto() {
return photo;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column employee.photo
*
* @param photo the value for employee.photo
*
* @mbggenerated Tue Jun 13 23:39:23 CST 2023
*/
public void setPhoto(String photo) {
this.photo = photo;
}
}

@ -38,7 +38,7 @@ public class Honor {
*
* @mbggenerated Wed May 03 18:26:57 CST 2023
*/
@Excel(name = "荣誉等级", orderNum = "2")
@Excel(name = "奖惩等级", orderNum = "2")
private String honorLevel;
/**

@ -52,17 +52,34 @@ public class EmployeeServiceImpl implements EmployeeService {
Employee employee = JSONObject.toJavaObject(jsonObject, Employee.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("state",Constants.STATE_VALID);
String honorLevel = jsonObject.getString("honorLevel");
String honorDescription = jsonObject.getString("honorDescription");
JSONArray jsonArray = jsonObject.getJSONArray("ptqIds");
List<Long> ptqIds = jsonArray != null ? jsonArray.toJavaList(Long.class) : new ArrayList<>();
JSONArray ptqIdsJson = jsonObject.getJSONArray("ptqIds");
List<Long> ptqIds = ptqIdsJson != null ? ptqIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray postIdsJson = jsonObject.getJSONArray("postIds");
List<Long> postIds = postIdsJson != null ? postIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray groupsIdsJson = jsonObject.getJSONArray("groupsIds");
List<Long> groupsIds = groupsIdsJson != null ? groupsIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray skillLevelIdsJson = jsonObject.getJSONArray("skillLevelIds");
List<Long> skillLevelIds = skillLevelIdsJson != null ? skillLevelIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray highestEducationIdsJson = jsonObject.getJSONArray("highestEducationIds");
List<Long> highestEducationIds = highestEducationIdsJson != null ? highestEducationIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray unitIdsJson = jsonObject.getJSONArray("unitIds");
List<Long> unitIds = unitIdsJson != null ? unitIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray honorLevelsJson = jsonObject.getJSONArray("honorLevels");
List<Long> honorLevels = honorLevelsJson != null ? honorLevelsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray sexesJson = jsonObject.getJSONArray("sexes");
List<Integer> sexes = sexesJson != null ? sexesJson.toJavaList(Integer.class) : new ArrayList<>();
JSONArray departmentIdsJson = jsonObject.getJSONArray("departmentIds");
List<Long> departmentIds = departmentIdsJson != null ? departmentIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray ageIdsJson = jsonObject.getJSONArray("ageIds");
List<Long> ageIds = ageIdsJson != null ? ageIdsJson.toJavaList(Long.class) : new ArrayList<>();
List<String> honorEmployees = new ArrayList<>();
if (StringUtils.isNotEmpty(honorLevel) || StringUtils.isNotEmpty(honorDescription)) {
if ((null != honorLevels && honorLevels.size() > 0) || StringUtils.isNotEmpty(honorDescription)) {
Example example1 = new Example(Honor.class);
Example.Criteria criteria1 = example1.createCriteria();
criteria1.andEqualTo("state",Constants.STATE_VALID);
if (StringUtils.isNotEmpty(honorLevel)) {
criteria1.andEqualTo("honorLevel", honorLevel);
if (null != honorLevels && honorLevels.size() > 0) {
criteria1.andIn("honorLevel", honorLevels);
}
if (StringUtils.isNotEmpty(honorDescription)) {
criteria1.andLike("honorDescription", "%"+honorDescription+"%");
@ -76,13 +93,17 @@ public class EmployeeServiceImpl implements EmployeeService {
if (honorEmployees.size() > 0) criteria.andIn("employeeNo", honorEmployees);
if (StringUtils.isNotEmpty(employee.getEmployeeName())) criteria.andLike("employeeName", "%"+employee.getEmployeeName()+"%");
if (StringUtils.isNotEmpty(employee.getMobile())) criteria.andLike("mobile", "%"+employee.getMobile()+"%");
if (null != employee.getPostId()) criteria.andEqualTo("postId", employee.getPostId());
if (null != employee.getGroupsId()) criteria.andEqualTo("groupsId", employee.getGroupsId());
if (null != sexes && sexes.size() > 0) criteria.andIn("sex", sexes);
if (null != departmentIds && departmentIds.size() > 0) criteria.andIn("departmentId", departmentIds);
if (null != ageIds && ageIds.size() > 0) criteria.andIn("ageId", ageIds);
if (null != ptqIds && ptqIds.size() > 0) criteria.andIn("ptqId", ptqIds);
if (null != employee.getSkillLevelId()) criteria.andEqualTo("skillLevelId", employee.getSkillLevelId());
if (null != employee.getHighestEducationId()) criteria.andEqualTo("highestEducationId", employee.getHighestEducationId());
if (null != unitIds && unitIds.size() > 0) criteria.andIn("unitId", unitIds);
if (null != postIds && postIds.size() > 0) criteria.andIn("postId", postIds);
if (null != groupsIds && groupsIds.size() > 0) criteria.andIn("groupsId", groupsIds);
if (null != skillLevelIds && skillLevelIds.size() > 0) criteria.andIn("skillLevelId", skillLevelIds);
if (null != highestEducationIds && highestEducationIds.size() > 0) criteria.andIn("highestEducationId", highestEducationIds);
List<Employee> employeeList = employeeMapper.selectByExample(example);
if ((StringUtils.isNotEmpty(honorLevel) || StringUtils.isNotEmpty(honorDescription)) && honorEmployees.size() == 0) employeeList = new ArrayList<>();
if (((null != honorLevels && honorLevels.size() > 0) || StringUtils.isNotEmpty(honorDescription)) && honorEmployees.size() == 0) employeeList = new ArrayList<>();
JSONObject pageJson = PageUtils.page(employeeList,current,pageSize);
return pageJson;
}
@ -94,17 +115,34 @@ public class EmployeeServiceImpl implements EmployeeService {
Employee employee = JSONObject.toJavaObject(jsonObject, Employee.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("state",Constants.STATE_VALID);
String honorLevel = jsonObject.getString("honorLevel");
String honorDescription = jsonObject.getString("honorDescription");
JSONArray jsonArray = jsonObject.getJSONArray("ptqIds");
List<Long> ptqIds = jsonArray.toJavaList(Long.class);
JSONArray ptqIdsJson = jsonObject.getJSONArray("ptqIds");
List<Long> ptqIds = ptqIdsJson != null ? ptqIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray postIdsJson = jsonObject.getJSONArray("postIds");
List<Long> postIds = postIdsJson != null ? postIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray groupsIdsJson = jsonObject.getJSONArray("groupsIds");
List<Long> groupsIds = groupsIdsJson != null ? groupsIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray skillLevelIdsJson = jsonObject.getJSONArray("skillLevelIds");
List<Long> skillLevelIds = skillLevelIdsJson != null ? skillLevelIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray highestEducationIdsJson = jsonObject.getJSONArray("highestEducationIds");
List<Long> highestEducationIds = highestEducationIdsJson != null ? highestEducationIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray unitIdsJson = jsonObject.getJSONArray("unitIds");
List<Long> unitIds = unitIdsJson != null ? unitIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray honorLevelsJson = jsonObject.getJSONArray("honorLevels");
List<Long> honorLevels = honorLevelsJson != null ? honorLevelsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray sexesJson = jsonObject.getJSONArray("sexes");
List<Integer> sexes = sexesJson != null ? sexesJson.toJavaList(Integer.class) : new ArrayList<>();
JSONArray departmentIdsJson = jsonObject.getJSONArray("departmentIds");
List<Long> departmentIds = departmentIdsJson != null ? departmentIdsJson.toJavaList(Long.class) : new ArrayList<>();
JSONArray ageIdsJson = jsonObject.getJSONArray("ageIds");
List<Long> ageIds = ageIdsJson != null ? ageIdsJson.toJavaList(Long.class) : new ArrayList<>();
List<String> honorEmployees = new ArrayList<>();
if (StringUtils.isNotEmpty(honorLevel) || StringUtils.isNotEmpty(honorDescription)) {
if ((null != honorLevels && honorLevels.size() > 0) || StringUtils.isNotEmpty(honorDescription)) {
Example example1 = new Example(Honor.class);
Example.Criteria criteria1 = example1.createCriteria();
criteria1.andEqualTo("state",Constants.STATE_VALID);
if (StringUtils.isNotEmpty(honorLevel)) {
criteria1.andEqualTo("honorLevel", honorLevel);
if (null != honorLevels && honorLevels.size() > 0) {
criteria1.andIn("honorLevel", honorLevels);
}
if (StringUtils.isNotEmpty(honorDescription)) {
criteria1.andLike("honorDescription", "%"+honorDescription+"%");
@ -116,13 +154,17 @@ public class EmployeeServiceImpl implements EmployeeService {
if (honorEmployees.size() > 0) criteria.andIn("employeeNo", honorEmployees);
if (StringUtils.isNotEmpty(employee.getEmployeeName())) criteria.andLike("employeeName", "%"+employee.getEmployeeName()+"%");
if (StringUtils.isNotEmpty(employee.getMobile())) criteria.andLike("mobile", "%"+employee.getMobile()+"%");
if (null != employee.getPostId()) criteria.andEqualTo("postId", employee.getPostId());
if (null != employee.getGroupsId()) criteria.andEqualTo("groupsId", employee.getGroupsId());
if (null != ptqIds && ptqIds.size() > 0) criteria.andIn("ptqId", ptqIds);
if (null != employee.getSkillLevelId()) criteria.andEqualTo("skillLevelId", employee.getSkillLevelId());
if (null != employee.getHighestEducationId()) criteria.andEqualTo("highestEducationId", employee.getHighestEducationId());
if (null != sexes && sexes.size() > 0) criteria.andIn("sex", sexes);
if (null != departmentIds && departmentIds.size() > 0) criteria.andIn("departmentId", departmentIds);
if (null != ageIds && ageIds.size() > 0) criteria.andIn("ageId", ageIds);
if (null != unitIds && unitIds.size() > 0) criteria.andIn("unitId", unitIds);
if (null != postIds && postIds.size() > 0) criteria.andIn("postId", postIds);
if (null != groupsIds && groupsIds.size() > 0) criteria.andIn("groupsId", groupsIds);
if (null != skillLevelIds && skillLevelIds.size() > 0) criteria.andIn("skillLevelId", skillLevelIds);
if (null != highestEducationIds && highestEducationIds.size() > 0) criteria.andIn("highestEducationId", highestEducationIds);
List<Employee> employeeList = employeeMapper.selectByExample(example);
if ((StringUtils.isNotEmpty(honorLevel) || StringUtils.isNotEmpty(honorDescription)) && honorEmployees.size() == 0) employeeList = new ArrayList<>();
if (((null != honorLevels && honorLevels.size() > 0) || StringUtils.isNotEmpty(honorDescription)) && honorEmployees.size() == 0) employeeList = new ArrayList<>();
ExportParams exportParams = new ExportParams();
Workbook workbook = ExcelExportUtil.exportExcel(exportParams,Employee.class, employeeList);
ExcelUtils.export(workbook, response, "员工导出");
@ -205,6 +247,22 @@ public class EmployeeServiceImpl implements EmployeeService {
employee.setHighestEducationId(infoSettingValuesFilter.get(0).getId());
}
}
//年龄
if (StringUtils.isNotEmpty(employee.getAge())) {
List<InfoSettingValue> infoSettingValues = infoSettingValueService.getAllInfoSettingValueBySettingName("年龄");
List<InfoSettingValue> infoSettingValuesFilter = infoSettingValues.stream().filter(item -> item.getSettingValue().equals(employee.getAge())).collect(Collectors.toList());
if (infoSettingValuesFilter.size() > 0) {
employee.setAgeId(infoSettingValuesFilter.get(0).getId());
}
}
//部门
if (StringUtils.isNotEmpty(employee.getDepartment())) {
List<InfoSettingValue> infoSettingValues = infoSettingValueService.getAllInfoSettingValueBySettingName("部门");
List<InfoSettingValue> infoSettingValuesFilter = infoSettingValues.stream().filter(item -> item.getSettingValue().equals(employee.getDepartment())).collect(Collectors.toList());
if (infoSettingValuesFilter.size() > 0) {
employee.setDepartmentId(infoSettingValuesFilter.get(0).getId());
}
}
Employee employeeSelect = new Employee();
employeeSelect.setEmployeeNo(employee.getEmployeeNo());
employeeSelect.setState(Constants.ENABLE);
@ -253,15 +311,21 @@ public class EmployeeServiceImpl implements EmployeeService {
@Override
public AjaxResult dataStatistics(JSONObject jsonObject) {
AjaxResult ajaxResult = new AjaxResult();
String postName = jsonObject.getString("postName");
JSONArray postNamesJson = jsonObject.getJSONArray("postNames");
List<String> postNames = postNamesJson != null ? postNamesJson.toJavaList(String.class) : new ArrayList<>();
JSONArray departmentsJson = jsonObject.getJSONArray("departments");
List<String> departments = departmentsJson != null ? departmentsJson.toJavaList(String.class) : new ArrayList<>();
// List<Long> postIdList = (List<Long>) Arrays.stream(postIds.split(",")).mapToLong(num -> Long.parseLong(num));
Integer isEdu = jsonObject.getInteger("isEdu");
Integer isSkill = jsonObject.getInteger("isSkill");
Integer isPtq = jsonObject.getInteger("isPtq");
Integer isDepartment = jsonObject.getInteger("isDepartment");
Integer isAge = jsonObject.getInteger("isAge");
Integer isSex = jsonObject.getInteger("isSex");
List<DataStatisticsVO> dataStatisticsVOS = new ArrayList<>();
List<String> postNameList = new ArrayList<>();
if (StringUtils.isNotEmpty(postName)) {
postNameList.add(postName);
if (postNames != null && postNames.size() > 0) {
postNameList = postNames;
} else {
List<InfoSettingValue> infoSettingValues = infoSettingValueService.getAllInfoSettingValueBySettingName("岗位");
postNameList = infoSettingValues.stream().map(item -> item.getSettingValue()).collect(Collectors.toList());
@ -282,6 +346,27 @@ public class EmployeeServiceImpl implements EmployeeService {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(3, s);
dataStatisticsVO.setSkillLevelList(dataAnalysisVOS);
}
if (null != isSex && isSex == 1) {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(4, s);
dataStatisticsVO.setSexList(dataAnalysisVOS);
}
if (null != isAge && isAge == 1) {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(5, s);
dataStatisticsVO.setAgeList(dataAnalysisVOS);
}
if (null != isDepartment && isDepartment == 1) {
List<DataAnalysisVO> dataAnalysisVOS = employeeMapper.dataStatistics(6, s);
if (departments != null && departments.size()>0) {
List<DataAnalysisVO> dataAnalysisVOS1 = new ArrayList<>();
for (DataAnalysisVO dataAnalysisVO : dataAnalysisVOS) {
if (departments.contains(dataAnalysisVO.getAnalysisName())) {
dataAnalysisVOS1.add(dataAnalysisVO);
}
}
dataAnalysisVOS = dataAnalysisVOS1;
}
dataStatisticsVO.setDepartmentList(dataAnalysisVOS);
}
dataStatisticsVOS.add(dataStatisticsVO);
}

@ -12,4 +12,7 @@ public class DataStatisticsVO {
private List<DataAnalysisVO> educationList;
private List<DataAnalysisVO> ptqList;
private List<DataAnalysisVO> skillLevelList;
private List<DataAnalysisVO> sexList;
private List<DataAnalysisVO> departmentList;
private List<DataAnalysisVO> ageList;
}

@ -26,10 +26,10 @@
<javaModelGenerator targetPackage="com.jingcheng.cms.model" targetProject="src/main/java"/>
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"/>
<!-- <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"/>-->
<javaClientGenerator targetPackage="com.jingcheng.cms.mapper" targetProject="src/main/java"
type="XMLMAPPER"/>
<!-- <javaClientGenerator targetPackage="com.jingcheng.cms.mapper" targetProject="src/main/java"-->
<!-- type="XMLMAPPER"/>-->
<table tableName="%">
<!--mysql 配置-->

@ -18,6 +18,18 @@
t1.skill_level as analysisName,
COUNT( t1.skill_level ) as analysisCount
</if>
<if test="type == 4">
t1.sex as analysisName,
COUNT( t1.sex ) as analysisCount
</if>
<if test="type == 5">
t1.age as analysisName,
COUNT( t1.age ) as analysisCount
</if>
<if test="type == 6">
t1.department as analysisName,
COUNT( t1.department ) as analysisCount
</if>
FROM
employee t1
JOIN (SELECT post, COUNT(post) as postCount FROM employee GROUP BY post) t2 ON t1.post = t2.post
@ -36,6 +48,15 @@
<if test="type == 3">
t1.skill_level
</if>
<if test="type == 4">
t1.sex
</if>
<if test="type == 5">
t1.age
</if>
<if test="type == 6">
t1.department
</if>
</select>
</mapper>
Loading…
Cancel
Save