Commit 762aa9fe by 张富康

feat(talentAnalysis): 实现基于角色和省份权限的人才分析数据筛选

- 新增hutool依赖用于便捷的集合和字符串操作
- 扩展QuerySql.getTalentAnalysisBasicData01方法,增加手机号码过滤条件
- 优化TalentAnalysisService服务,支持多角色权限控制及省份筛选
- 实现角色(含区域运营、大区经理、管理层等)对应数据可见范围限制
- 通过多表联查获取角色可见员工手机号列表,用于精准数据过滤
- TalentAnalysisBasicDataReq新增provinceId字段以支持省份权限过滤
- TalentAnalysisBasicDataList统一使用lombok @Data简化代码
- 适配权限判断,返回权限不足提示,避免越权访问
- 完善数据库资源关闭,避免潜在连接泄漏
- 统一接口参数检查,增强参数校验准确性与完整性
- 更新登录角色注释,明确角色编码及含义说明
1 parent 921bf04a
...@@ -210,6 +210,11 @@ ...@@ -210,6 +210,11 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.38</version>
</dependency>
<dependency> <dependency>
......
...@@ -6,8 +6,6 @@ import com.glsk.util.MysqlUtils; ...@@ -6,8 +6,6 @@ import com.glsk.util.MysqlUtils;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.stream.Collectors;
/** /**
* @author fangfang * @author fangfang
...@@ -1063,30 +1061,23 @@ public class QuerySql { ...@@ -1063,30 +1061,23 @@ public class QuerySql {
} }
public static String getTalentAnalysisBasicData01(String wherebusinesstypexxxxxx, String whereentry_datexxxxxx, String wheremobliePhonexxxxxx, Connection connInsert) {
String sql01 = "";
public static String getTalentAnalysisBasicData01(String wherebusinesstypexxxxxx,String whereentry_datexxxxxx, Connection connInsert){
String sql01="";
try { try {
String sql ="select querysql from business_analysis_query_sql where deleted_flag='N'\n" + String sql = "select querysql from business_analysis_query_sql where deleted_flag='N'\n" +
"and sqlname='getTalentAnalysisBasicData01'"; "and sqlname='getTalentAnalysisBasicData01'";
PreparedStatement st = connInsert.prepareStatement(sql); PreparedStatement st = connInsert.prepareStatement(sql);
// 执行查询并获取结果 // 执行查询并获取结果
ResultSet rs = st.executeQuery(sql); ResultSet rs = st.executeQuery(sql);
while (rs.next()) { while (rs.next()) {
sql01= rs.getString("querysql"); sql01 = rs.getString("querysql");
} }
}catch (Exception e){ } catch (Exception e) {
System.out.println(e); System.out.println(e);
} }
sql01 = sql01.replace("businesstypexxxxxx", wherebusinesstypexxxxxx)
.replace("entry_datexxxxxx", whereentry_datexxxxxx)
sql01=sql01.replace("businesstypexxxxxx",wherebusinesstypexxxxxx).replace("entry_datexxxxxx",whereentry_datexxxxxx); .replace("mobliePhonexxxxxx", wheremobliePhonexxxxxx);
return sql01; return sql01;
} }
......
package com.glsk.service; package com.glsk.service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.glsk.compute.fullupdatedata.QuerySql; import com.glsk.compute.fullupdatedata.QuerySql;
import com.glsk.util.MysqlUtils; import com.glsk.util.MysqlUtils;
import com.glsk.vo.BusinessType; import com.glsk.vo.BusinessType;
...@@ -15,7 +18,9 @@ import java.sql.PreparedStatement; ...@@ -15,7 +18,9 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Statement; import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -37,10 +42,18 @@ public class TalentAnalysisService { ...@@ -37,10 +42,18 @@ public class TalentAnalysisService {
Connection connInsert = null; Connection connInsert = null;
Connection connQuery02 = null; Connection connQuery02 = null;
PreparedStatement configst = null; PreparedStatement configSt = null;
PreparedStatement yqMerchantIdSt = null;
PreparedStatement staffPhoneSt = null;
PreparedStatement provinceStaffSt = null;
PreparedStatement canSeeProvinceSt = null;
PreparedStatement st = null; PreparedStatement st = null;
ResultSet configrs = null; ResultSet configRs = null;
ResultSet rs = null; ResultSet rs = null;
ResultSet yqMerchantIdRs = null;
ResultSet staffPhoneRs = null;
ResultSet provinceStaffRs = null;
ResultSet canSeeProvinceRs = null;
try { try {
connInsert = MysqlUtils.getConnection("insert"); connInsert = MysqlUtils.getConnection("insert");
...@@ -48,48 +61,311 @@ public class TalentAnalysisService { ...@@ -48,48 +61,311 @@ public class TalentAnalysisService {
// 确保req.getBusinessType()不为null // 确保req.getBusinessType()不为null
if (req.getBusinessType() == null || req.getStartDay() == null || req.getEndDay() == null) { if (req.getBusinessType() == null || req.getStartDay() == null || req.getEndDay() == null || req.getRole() == null) {
ret.setCode(-1); ret.setCode(-1);
ret.setMessage("BusinessType、StartDay、EndDay不能为null"); ret.setMessage("BusinessType、StartDay、EndDay、Role不能为null");
return ret; return ret;
} }
String businesstype; String businessType;
if (BusinessType.all.equals(req.getBusinessType())) { if (BusinessType.all.equals(req.getBusinessType())) {
businesstype = "talentAnalysisBI_businesstype_all"; businessType = "talentAnalysisBI_businesstype_all";
} else if (BusinessType.yanbao.equals(req.getBusinessType())) { } else if (BusinessType.yanbao.equals(req.getBusinessType())) {
businesstype = "talentAnalysisBI_businesstype_yanbao"; businessType = "talentAnalysisBI_businesstype_yanbao";
} else if (BusinessType.quanyi.equals(req.getBusinessType())) { } else if (BusinessType.quanyi.equals(req.getBusinessType())) {
businesstype = "talentAnalysisBI_businesstype_quanyi"; businessType = "talentAnalysisBI_businesstype_quanyi";
} else if (BusinessType.qinggai.equals(req.getBusinessType())) { } else if (BusinessType.qinggai.equals(req.getBusinessType())) {
businesstype = "talentAnalysisBI_businesstype_qinggai"; businessType = "talentAnalysisBI_businesstype_qinggai";
} else { } else {
ret.setCode(-1); ret.setCode(-1);
ret.setMessage("BusinessType有误,请检查"); ret.setMessage("BusinessType有误,请检查");
return ret; return ret;
} }
// 筛选后的员工
Map<String, String> staffMap = new HashMap<>();
List<String> staffPhoneList = new ArrayList<>();
// 判断角色 登录角色 1-其他角色 2-服务商老板 3-区域运营 4-广联销售(业务负责人) 5-飞行督导 6-线上运营 7-区域运营大区经理 8-销售大区经理 9-管理层及总部运营
// 9-管理层及总部运营 查看所有的门店省份
// 7-区域运营大区经理 8-销售大区经理 只查看个人管辖范围内的省份
// 3-区域运营 4-广联销售(业务负责人) 6-线上运营 只可以查看个人管辖的人员
if (ObjectUtil.equals(req.getRole(), 9)) {
// 判断是否按省份筛选
if (ObjectUtil.isNotEmpty(req.getProvinceId())) {
String provinceSql = "SELECT DISTINCT o.seller_user_id\n" +
"FROM dj_car_life_goods_order o\n" +
" JOIN (SELECT seller_user_id,\n" +
" MAX(created_date) AS latest_date\n" +
" FROM dj_car_life_goods_order\n" +
" WHERE deleted_flag = 'N'\n" +
" GROUP BY seller_user_id) latest ON o.seller_user_id = latest.seller_user_id\n" +
" AND o.created_date = latest.latest_date\n" +
" AND o.deleted_flag = 'N'\n" +
" JOIN\n" +
" dj_car_life_service_merchant m ON o.merchant_id = m.merchant_id\n" +
" AND m.deleted_flag = 'N'\n" +
"WHERE m.province_id = ?\n" +
" AND o.seller_user_id IS NOT NULL";
provinceStaffSt = connInsert.prepareStatement(provinceSql);
provinceStaffSt.setInt(1, req.getProvinceId());
provinceStaffRs = provinceStaffSt.executeQuery();
List<String> sellerUserIds = new ArrayList<>();
while (provinceStaffRs.next()) {
// 获取员工id
sellerUserIds.add(provinceStaffRs.getString("seller_user_id"));
}
if (ObjectUtil.isEmpty(sellerUserIds)) {
return ret;
}
// 通过员工id查询员工手机号
String sellerUserIdsStr = StrUtil.join(",", sellerUserIds.stream()
.map(key -> "'" + key + "'") // 为每个键添加单引号
.collect(Collectors.toList()));
String staffPhoneSql = "select DISTINCT staff_phone\n" +
"from scrm_account.platform_merchant_staff\n" +
"where staff_uuid in (?)\n" +
" and del_flag = 0 group by staff_uuid, staff_phone";
staffPhoneSt = connQuery02.prepareStatement(staffPhoneSql);
staffPhoneSt.setString(1, sellerUserIdsStr);
staffPhoneRs = staffPhoneSt.executeQuery();
while (staffPhoneRs.next()) {
// 保存员工手机号进入list
staffPhoneList.add(staffPhoneRs.getString("staff_phone"));
}
// 如果为空则返回空结果
if (CollUtil.isEmpty(staffPhoneList)) {
return ret;
}
}
} else if (ObjectUtil.equals(req.getRole(), 7) || ObjectUtil.equals(req.getRole(), 8)) {
// 查询区域运营大区经理,销售大区经理所能看到的省份
// 销售大区经理
List<Integer> provinceIds = new ArrayList<>();
if (ObjectUtil.equals(req.getRole(), 7)) {
String canSeeProvinceSql01 = "select distinct province_id\n" +
"from dj_car_life_organization\n" +
"where user_uuid = ?\n" +
" and role_type = 1\n" +
" and deleted_flag = 'N';";
canSeeProvinceSt = connInsert.prepareStatement(canSeeProvinceSql01);
canSeeProvinceSt.setString(1, req.getStaffId());
canSeeProvinceRs = canSeeProvinceSt.executeQuery();
while (canSeeProvinceRs.next()) {
// 获取省份id
provinceIds.add(canSeeProvinceRs.getInt("province_id"));
}
} else {
String canSeeProvinceSql02 = "select distinct pr.province_id\n" +
"from sale_region_user_ref ur\n" +
" left join sale_region_province_ref pr\n" +
" on ur.region_id = pr.region_id and pr.deleted_flag = 'N'\n" +
"where ur.user_id = ?\n" +
" and ur.deleted_flag = 'N'";
canSeeProvinceSt = connInsert.prepareStatement(canSeeProvinceSql02);
canSeeProvinceSt.setString(1, req.getStaffId());
canSeeProvinceRs = canSeeProvinceSt.executeQuery();
while (canSeeProvinceRs.next()) {
// 获取省份id
provinceIds.add(canSeeProvinceRs.getInt("province_id"));
}
}
if (CollUtil.isEmpty(provinceIds)) {
return ret;
}
// 判断是否按省份筛选
String provinceSql;
if (ObjectUtil.isNotEmpty(req.getProvinceId())) {
if (!provinceIds.contains(req.getProvinceId())) {
return ret;
}
provinceSql = "SELECT DISTINCT o.seller_user_id\n" +
"FROM dj_car_life_goods_order o\n" +
" JOIN (SELECT seller_user_id,\n" +
" MAX(created_date) AS latest_date\n" +
" FROM dj_car_life_goods_order\n" +
" WHERE deleted_flag = 'N'\n" +
" GROUP BY seller_user_id) latest ON o.seller_user_id = latest.seller_user_id\n" +
" AND o.created_date = latest.latest_date\n" +
" AND o.deleted_flag = 'N'\n" +
" JOIN\n" +
" dj_car_life_service_merchant m ON o.merchant_id = m.merchant_id\n" +
" AND m.deleted_flag = 'N'\n" +
"WHERE m.province_id = ?\n" +
" AND o.seller_user_id IS NOT NULL";
} else {
provinceSql = "SELECT DISTINCT o.seller_user_id\n" +
"FROM dj_car_life_goods_order o\n" +
" JOIN (SELECT seller_user_id,\n" +
" MAX(created_date) AS latest_date\n" +
" FROM dj_car_life_goods_order\n" +
" WHERE deleted_flag = 'N'\n" +
" GROUP BY seller_user_id) latest ON o.seller_user_id = latest.seller_user_id\n" +
" AND o.created_date = latest.latest_date\n" +
" AND o.deleted_flag = 'N'\n" +
" JOIN\n" +
" dj_car_life_service_merchant m ON o.merchant_id = m.merchant_id\n" +
" AND m.deleted_flag = 'N'\n" +
"WHERE o.seller_user_id IS NOT NULL";
}
provinceStaffSt = connInsert.prepareStatement(provinceSql);
provinceStaffSt.setInt(1, req.getProvinceId());
provinceStaffRs = provinceStaffSt.executeQuery();
List<String> sellerUserIds = new ArrayList<>();
while (provinceStaffRs.next()) {
// 获取员工id
sellerUserIds.add(provinceStaffRs.getString("o.seller_user_id"));
}
if (ObjectUtil.isEmpty(sellerUserIds)) {
return ret;
}
// 通过员工id查询员工手机号
String sellerUserIdsStr = StrUtil.join(",", sellerUserIds.stream()
.map(key -> "'" + key + "'") // 为每个键添加单引号
.collect(Collectors.toList()));
String staffPhoneSql = "select DISTINCT staff_phone\n" +
"from scrm_account.platform_merchant_staff\n" +
"where staff_uuid in (?)\n" +
" and del_flag = 0 group by staff_uuid, staff_phone";
staffPhoneSt = connQuery02.prepareStatement(staffPhoneSql);
staffPhoneSt.setString(1, sellerUserIdsStr);
staffPhoneRs = staffPhoneSt.executeQuery();
while (staffPhoneRs.next()) {
// 保存员工手机号进入list
staffPhoneList.add(staffPhoneRs.getString("staff_phone"));
}
// 如果为空则返回空结果
if (CollUtil.isEmpty(staffPhoneList)) {
return ret;
}
} else if (ObjectUtil.equals(req.getRole(), 3) || ObjectUtil.equals(req.getRole(), 4) || ObjectUtil.equals(req.getRole(), 6)) {
// 区域运营需要查询其管辖的4s的底下园区店的ids
String yqMerchantIdSql = "SELECT DISTINCT sub_merchant_id " +
"FROM dj_car_life_scene_merchant_ref " +
"WHERE main_merchant_id IN ( " +
" SELECT merchant_id " +
" FROM dj_car_life_shop_merchant_director_config " +
" WHERE director_user_id = ? " +
" AND director_type IN (?) " +
" AND deleted_flag = 'N' " +
") " +
" AND sub_merchant_type IN (6, 8) " +
" AND deleted_flag = 'N' " +
"GROUP BY sub_merchant_id";
// 创建预编译语句(不拼接任何用户输入)
yqMerchantIdSt = connInsert.prepareStatement(yqMerchantIdSql);
// 安全设置参数(staffId会自动转义)
// 判断 (1:精品升级业务负责人,2:精品升级业务服务商负责人,3:会员权益业务负责人,4:会员权益业务服务商负责人,5:1.1线上运营(原盯防负责人),
// 6:飞行督导,7:2.1线上运营,8:1.1区域运营,9:2.1区域运营)
if (ObjectUtil.equals(req.getRole(), 3)) {
// 角色权限为3-区域运营 => 8:1.1区域运营,9:2.1区域运营
yqMerchantIdSt.setString(1, "8,9");
} else if (ObjectUtil.equals(req.getRole(), 4)) {
// 角色权限为4-广联销售(业务负责人) => 1:精品升级业务负责人,3:会员权益业务负责人
yqMerchantIdSt.setString(1, "1,3");
} else {
// 角色权限为6-线上运营 => 5:1.1线上运营(原盯防负责人),7:2.1线上运营
yqMerchantIdSt.setString(1, "5,7");
}
yqMerchantIdSt.setString(2, req.getStaffId()); // 假设staffId是字符串类型
yqMerchantIdRs = yqMerchantIdSt.executeQuery();
List<Integer> merchantIds = new ArrayList<>();
while (yqMerchantIdRs.next()) {
// 园区店ids
merchantIds.add(yqMerchantIdRs.getInt("sub_merchant_id"));
}
// 如果staffIds为空,则返回空结果
if (ObjectUtil.isNotEmpty(merchantIds)) {
return ret;
}
String merchantIdsStr = StrUtil.join(",", merchantIds);
// 通过园区店ids查询账户中心
String staffPhoneSql = "select staff_uuid, staff_phone\n" +
"from scrm_account.platform_merchant_staff\n" +
"where merchant_id in (?)\n" +
" and del_flag = 0 group by staff_uuid, staff_phone";
staffPhoneSt = connQuery02.prepareStatement(staffPhoneSql);
staffPhoneSt.setString(1, merchantIdsStr);
staffPhoneRs = staffPhoneSt.executeQuery();
while (staffPhoneRs.next()) {
// 保存员工信息进入map
staffMap.put(staffPhoneRs.getString("staff_uuid"), staffPhoneRs.getString("staff_phone"));
}
if (ObjectUtil.isEmpty(staffMap)) {
return ret;
}
// 判断是否按省份筛选
if (ObjectUtil.isNotEmpty(req.getProvinceId())) {
String provinceSql = "SELECT DISTINCT o.seller_user_id\n" +
"FROM dj_car_life_goods_order o\n" +
" JOIN (SELECT seller_user_id,\n" +
" MAX(created_date) AS latest_date\n" +
" FROM dj_car_life_goods_order\n" +
" WHERE deleted_flag = 'N'\n" +
" AND seller_user_id IN (?)\n" +
" GROUP BY seller_user_id) latest ON o.seller_user_id = latest.seller_user_id\n" +
" AND o.created_date = latest.latest_date\n" +
" AND o.deleted_flag = 'N'\n" +
" JOIN\n" +
" dj_car_life_service_merchant m ON o.merchant_id = m.merchant_id\n" +
" AND m.deleted_flag = 'N'\n" +
"WHERE m.province_id = ?\n" +
" AND o.seller_user_id IS NOT NULL";
provinceStaffSt = connInsert.prepareStatement(provinceSql);
String sellerUserIdsStr = StrUtil.join(",", staffMap.keySet().stream()
.map(key -> "'" + key + "'") // 为每个键添加单引号
.collect(Collectors.toList()));
provinceStaffSt.setString(1, sellerUserIdsStr);
provinceStaffSt.setInt(2, req.getProvinceId());
provinceStaffRs = provinceStaffSt.executeQuery();
List<String> sellerUserIds = new ArrayList<>();
while (provinceStaffRs.next()) {
// 获取员工id
sellerUserIds.add(provinceStaffRs.getString("o.seller_user_id"));
}
if (ObjectUtil.isEmpty(sellerUserIds)) {
return ret;
}
// 如果sellerUserIds中有元素,则处理map中的键值对保留
staffMap.entrySet().removeIf(entry -> !sellerUserIds.contains(entry.getKey()));
}
// map 最后处理成需要查询的员工手机号集合
staffPhoneList = new ArrayList<>(staffMap.values());
} else {
ret.setCode(-1);
ret.setMessage("您暂无使用权限,请确认后重新操作。");
return ret;
}
String configSql = "select config_name,config_context from business_analysis_config where deleted_flag='N' \n" + String configSql = "select config_name,config_context from business_analysis_config where deleted_flag='N' \n" +
"and config_name in ('" + businesstype + "','entry_datexxxxxx')"; "and config_name in ('" + businessType + "','entry_datexxxxxx')";
String wherebusinesstypexxxxxx = ""; String wherebusinesstypexxxxxx = "";
String whereentry_datexxxxxx = ""; String whereentry_datexxxxxx = "";
// 判断是否总部运营查看 如果是不按省份查询
configst = connInsert.prepareStatement(configSql); boolean allAndNoProvinceBoolean = ObjectUtil.isEmpty(req.getProvinceId()) && ObjectUtil.equals(req.getRole(), 9);
configrs = configst.executeQuery(); String wheremobliePhonexxxxxx = "";
while (configrs.next()) { if (!allAndNoProvinceBoolean) {
if (configrs.getString("config_name").contains("talentAnalysisBI_businesstype")) { String staffPhoneStr = StrUtil.join(",", staffPhoneList.stream()
wherebusinesstypexxxxxx = configrs.getString("config_context"); .map(key -> "'" + key + "'") // 为每个键添加单引号
} .collect(Collectors.toList()));
if (configrs.getString("config_name").contains("entry_datexxxxxx")) { wheremobliePhonexxxxxx = "and mobile_phone in (mobilePhonexxxxxx)";
whereentry_datexxxxxx = configrs.getString("config_context"); wheremobliePhonexxxxxx = wheremobliePhonexxxxxx.replace("mobilePhonexxxxxx", staffPhoneStr);
}
configSt = connInsert.prepareStatement(configSql);
configRs = configSt.executeQuery();
while (configRs.next()) {
if (configRs.getString("config_name").contains("talentAnalysisBI_businesstype")) {
wherebusinesstypexxxxxx = configRs.getString("config_context");
}
if (configRs.getString("config_name").contains("entry_datexxxxxx")) {
whereentry_datexxxxxx = configRs.getString("config_context");
} }
} }
whereentry_datexxxxxx = whereentry_datexxxxxx.replace("startDayxxxxxx", req.getStartDay()).replace("endDayxxxxxx", req.getEndDay()); whereentry_datexxxxxx = whereentry_datexxxxxx.replace("startDayxxxxxx", req.getStartDay()).replace("endDayxxxxxx", req.getEndDay());
//获取sql //获取sql
String sql01 = QuerySql.getTalentAnalysisBasicData01(wherebusinesstypexxxxxx, whereentry_datexxxxxx, connInsert); String sql01 = QuerySql.getTalentAnalysisBasicData01(wherebusinesstypexxxxxx, whereentry_datexxxxxx, wheremobliePhonexxxxxx, connInsert);
log.info("获取基础数据sql01 = {}", sql01); log.info("获取基础数据sql01 = {}", sql01);
...@@ -111,18 +387,24 @@ public class TalentAnalysisService { ...@@ -111,18 +387,24 @@ public class TalentAnalysisService {
data.setResignRate(rs.getDouble("resignRate")); data.setResignRate(rs.getDouble("resignRate"));
lists.add(data); lists.add(data);
} }
ret.setCode(0); ret.setCode(0);
ret.setMessage("success"); ret.setMessage("success");
ret.setList(lists); ret.setList(lists);
return ret; return ret;
} finally { } finally {
// 逆序关闭所有资源 // 逆序关闭所有资源
closeQuietly(configrs); closeQuietly(canSeeProvinceRs);
closeQuietly(provinceStaffRs);
closeQuietly(staffPhoneRs);
closeQuietly(yqMerchantIdRs);
closeQuietly(rs); closeQuietly(rs);
closeQuietly(configst); closeQuietly(configRs);
closeQuietly(st); closeQuietly(st);
closeQuietly(canSeeProvinceSt);
closeQuietly(provinceStaffSt);
closeQuietly(staffPhoneSt);
closeQuietly(yqMerchantIdSt);
closeQuietly(configSt);
closeQuietly(connQuery02); closeQuietly(connQuery02);
closeQuietly(connInsert); closeQuietly(connInsert);
} }
......
...@@ -6,7 +6,6 @@ import lombok.Data; ...@@ -6,7 +6,6 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Date;
import java.util.List; import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
...@@ -1311,27 +1310,30 @@ public class ReqRet { ...@@ -1311,27 +1310,30 @@ public class ReqRet {
@Data @Data
@ToString @ToString
public static class TalentAnalysisBasicDataReq implements Serializable { public static class TalentAnalysisBasicDataReq implements Serializable {
@ApiModelProperty(notes = "业务场景", required = true, example="all") @ApiModelProperty(notes = "业务场景", required = true, example = "all")
private BusinessType businessType; private BusinessType businessType;
@ApiModelProperty(notes = "查询类型:日、周、月、自定义", required = true, example="year") @ApiModelProperty(notes = "查询类型:日、周、月、自定义", required = true, example = "year")
private QueryType queryType; private QueryType queryType;
@ApiModelProperty(notes = "开始时间", required = true, example="2025-01-01") @ApiModelProperty(notes = "开始时间", required = true, example = "2025-01-01")
String startDay; private String startDay;
@ApiModelProperty(notes = "结束时间", required = true, example="2025-12-31") @ApiModelProperty(notes = "结束时间", required = true, example = "2025-12-31")
String endDay; private String endDay;
@ApiModelProperty(notes = "分析岗位的岗位名称", required = true, example="retailsalesman") @ApiModelProperty(notes = "分析岗位的岗位名称", required = true, example = "retailsalesman")
JobNameEnum jobName; private JobNameEnum jobName;
@ApiModelProperty(notes = "员工id" ,required = true, example="1111") @ApiModelProperty(notes = "员工id", required = true, example = "1111")
String staffId; private String staffId;
@ApiModelProperty(notes = "员工姓名" ,required = true, example="张三") @ApiModelProperty(notes = "员工姓名", required = true, example = "张三")
String staffName; private String staffName;
@ApiModelProperty(notes = "员工手机" ,required = true, example="13112341524") @ApiModelProperty(notes = "员工手机", required = true, example = "13112341524")
String staffPhone; private String staffPhone;
@ApiModelProperty(notes = "角色" ,required = true, example="1") @ApiModelProperty(notes = "省份id", required = true, example = "120000")
Integer role; private Integer provinceId;
@ApiModelProperty(notes = "门店ids" ,required = true, example="1") @ApiModelProperty(notes = "登录角色 1-其他角色 2-服务商老板 3-区域运营 4-广联销售(业务负责人) 5-飞行督导 6-线上运营 7-区域运营大区经理 8-销售大区经理 9-管理层及总部运营",
List<Integer> merchantIds; required = true, example = "3")
private Integer role;
@ApiModelProperty(notes = "区域运营大区经理、销售大区经理可见门店ids", required = true)
private List<Integer> merchantIds;
} }
//汇总留存分析 //汇总留存分析
......
package com.glsk.vo; package com.glsk.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List; import java.util.List;
...@@ -1694,88 +1695,23 @@ public class ResponseDTO { ...@@ -1694,88 +1695,23 @@ public class ResponseDTO {
} }
/*人才分析*/
@Data
/*人才分析*/
public static class TalentAnalysisBasicDataList { public static class TalentAnalysisBasicDataList {
@ApiModelProperty(value = "在职人员总数",required=true ) @ApiModelProperty(value = "在职人员总数", required = true)
private Integer activePersonnelTotalNum; private Integer activePersonnelTotalNum;
@ApiModelProperty(value = "入职人员总数", required = true)
@ApiModelProperty(value = "入职人员总数",required=true )
private Integer newEmployeeTotalNum; private Integer newEmployeeTotalNum;
@ApiModelProperty(value = "当前在职人数", required = true)
@ApiModelProperty(value = "当前在职人数",required=true )
private Integer currentActivePersonnelNum; private Integer currentActivePersonnelNum;
@ApiModelProperty(value = "离职总人数",required=true ) @ApiModelProperty(value = "离职总人数", required = true)
private Integer resignEmployeelTotalNum; private Integer resignEmployeelTotalNum;
@ApiModelProperty(value = "留存率",required=true ) @ApiModelProperty(value = "留存率", required = true)
private Double retentionRate; private Double retentionRate;
@ApiModelProperty(value = "离职率",required=true ) @ApiModelProperty(value = "离职率", required = true)
private Double resignRate; private Double resignRate;
public Integer getActivePersonnelTotalNum() {
return activePersonnelTotalNum;
}
public void setActivePersonnelTotalNum(Integer activePersonnelTotalNum) {
this.activePersonnelTotalNum = activePersonnelTotalNum;
} }
public Integer getNewEmployeeTotalNum() {
return newEmployeeTotalNum;
}
public void setNewEmployeeTotalNum(Integer newEmployeeTotalNum) {
this.newEmployeeTotalNum = newEmployeeTotalNum;
}
public Integer getCurrentActivePersonnelNum() {
return currentActivePersonnelNum;
}
public void setCurrentActivePersonnelNum(Integer currentActivePersonnelNum) {
this.currentActivePersonnelNum = currentActivePersonnelNum;
}
public Integer getResignEmployeelTotalNum() {
return resignEmployeelTotalNum;
}
public void setResignEmployeelTotalNum(Integer resignEmployeelTotalNum) {
this.resignEmployeelTotalNum = resignEmployeelTotalNum;
}
public Double getRetentionRate() {
return retentionRate;
}
public void setRetentionRate(Double retentionRate) {
this.retentionRate = retentionRate;
}
public Double getResignRate() {
return resignRate;
}
public void setResignRate(Double resignRate) {
this.resignRate = resignRate;
}
}
public static class SummaryRetentionAnalysisList { public static class SummaryRetentionAnalysisList {
@ApiModelProperty(value = "学历分析",required=true ) @ApiModelProperty(value = "学历分析",required=true )
private List<AcademicQualificationAnalysisList> xueliList; private List<AcademicQualificationAnalysisList> xueliList;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!