Commit 92524519 by 谢海旭

v5.7.0版本 飞行督导

1 parent a909109d
......@@ -36,12 +36,12 @@ public class EmployeeTrainingInfoRequestDTO implements Serializable {
/**
* 排序字段(1-学习时长、2-完成课程数、3-带教次数)
*/
private Integer sortField;
private Integer sortField = 1;
/**
* 排序方式(0-升序、1-降序)
*/
private Integer sortOrder;
private Integer sortOrder = 1;
/**
* 督导手机号
......
......@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -46,6 +47,7 @@ public class SupervisorEmployeeTrainingInfoService {
public List<EmployeeTrainingInfoDTO> getAllEmployeeTrainingInfo(EmployeeTrainingInfoRequestDTO request) {
// 1、根据督导手机号查询督导uuid
String supervisorUUID = supervisorTaskInfoService.getSupervisorUUIDByPhone(request.getSupervisorPhone());
// String supervisorUUID = "63c121922cba4956b2aac3f21dacd92f";
if (supervisorUUID == null) {
log.warn("未找到督导信息,supervisorPhone={}", request.getSupervisorPhone());
return new ArrayList<>();
......@@ -83,13 +85,14 @@ public class SupervisorEmployeeTrainingInfoService {
employeeTrainingInfo.setEmployeeName(beiSenEmployeeListResonseDTO.getName());
employeeTrainingInfo.setPhone(beiSenEmployeeListResonseDTO.getMobilePhone());
MapperQueryEmployeeTrainingInfoDTO studyHours = studyHoursMap.get(beiSenEmployeeListResonseDTO.getUserID().intValue());
employeeTrainingInfo.setStudyHours(studyHours != null ? studyHours.getStudyHours() : null);
// 默认学习时长0
employeeTrainingInfo.setStudyHours(studyHours != null ? studyHours.getStudyHours() : BigDecimal.ZERO);
MapperQueryEmployeeTrainingInfoDTO completedCourses = completedCoursesMap.get(beiSenEmployeeListResonseDTO.getUserID().intValue());
employeeTrainingInfo.setCompletedCourses(completedCourses != null ? completedCourses.getCompletedCourses() : null);
employeeTrainingInfo.setCompletedCourses(completedCourses != null ? completedCourses.getCompletedCourses() : 0);
MapperQueryEmployeeTrainingInfoDTO coachingTimes = coachingTimesMap.get(beiSenEmployeeListResonseDTO.getMobilePhone());
employeeTrainingInfo.setCoachingTimes(coachingTimes != null ? coachingTimes.getCoachingTimes() : null);
employeeTrainingInfo.setCoachingTimes(coachingTimes != null ? coachingTimes.getCoachingTimes() : 0);
return employeeTrainingInfo;
}).collect(Collectors.toList());
......
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.dto.EmployeeRanking;
import junit.framework.TestCase;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2026/3/18
**/
public class SupervisorDashboardServiceTest extends BaseServiceTest {
@Autowired
private SupervisorDashboardService supervisorDashboardService;
@Test
public void testGetSupervisorStoreAndEmployeePhoneList() {
Map<Integer, List<EmployeeRanking>> employeePhoneList = supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList("63c121922cba4956b2aac3f21dacd92f", null);
TestCase.assertNotNull(employeePhoneList);
}
}
\ No newline at end of file
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.job.SupervisorMonthlyTrainingAiAnalysisJob;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Title: SupervisorMonthlyTrainingAiAnalysisJobTest
* @Description: 督导团队培训数据月维度 AI 分析定时任务单元测试
* @Author xiehx
* @Date 2026/3/18
*/
public class SupervisorMonthlyTrainingAiAnalysisJobTest extends BaseServiceTest {
@Autowired
private SupervisorMonthlyTrainingAiAnalysisJob supervisorMonthlyTrainingAiAnalysisJob;
/**
* 测试月维度培训 AI 分析任务执行(查询上月数据,遍历全部在职飞行督导发起 AI 分析)
*/
@Test
public void testExecute() {
supervisorMonthlyTrainingAiAnalysisJob.execute(null);
}
}
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.job.SupervisorPersonalAiAnalysisJob;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Title: SupervisorPersonalAiAnalysisJobTest
* @Description: 督导团队成员个人综合数据日维度 AI 分析定时任务单元测试
* @Author xiehx
* @Date 2026/3/18
*/
public class SupervisorPersonalAiAnalysisJobTest extends BaseServiceTest {
@Autowired
private SupervisorPersonalAiAnalysisJob supervisorPersonalAiAnalysisJob;
/**
* 测试个人综合 AI 分析任务执行(查询昨天数据,遍历全部在职飞行督导下各组员,
* 聚合业绩、行为、培训数据发起 AI 分析)
*/
@Test
public void testExecute() {
supervisorPersonalAiAnalysisJob.execute(null);
}
}
......@@ -250,4 +250,66 @@ public class SupervisorTaskInfoServiceTest extends BaseServiceTest {
}
}
/**
* 测试分页查询督导列表(不带筛选条件,查询第1页)
*/
@Test
public void testPageSupervisors_noCondition() {
RpcPagination<SupervisorPageQueryDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
pagination.setCondition(new SupervisorPageQueryDTO());
RpcPagination<SupervisorPageDTO> result = supervisorTaskInfoService.pageSupervisors(pagination);
System.out.println(JSON.toJSONString(result));
}
/**
* 测试分页查询督导列表(按手机号筛选)
*/
@Test
public void testPageSupervisors_byPhone() {
RpcPagination<SupervisorPageQueryDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
SupervisorPageQueryDTO condition = new SupervisorPageQueryDTO();
condition.setPhone("13603070903");
pagination.setCondition(condition);
RpcPagination<SupervisorPageDTO> result = supervisorTaskInfoService.pageSupervisors(pagination);
System.out.println(JSON.toJSONString(result));
}
/**
* 测试督导管理详情页汇总(核心指标:团队人员数、产值、转化率、客单价)
*/
@Test
public void testGetDetailSummary() {
SupervisorDetailQueryDTO request = new SupervisorDetailQueryDTO();
request.setSupervisorPhone("13603070903");
request.setBizType(null); // 不限业务类型
request.setDateType(2); // 按指定时段
request.setStartDate("2026-03-01");
request.setEndDate("2026-03-18");
SupervisorDetailSummaryDTO summary = supervisorTaskInfoService.getDetailSummary(request);
System.out.println(JSON.toJSONString(summary));
}
/**
* 测试督导管理详情页驻店销售分页列表
*/
@Test
public void testPageDetailStaff() {
RpcPagination<SupervisorDetailQueryDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
SupervisorDetailQueryDTO condition = new SupervisorDetailQueryDTO();
condition.setSupervisorPhone("13603070903");
condition.setBizType(null); // 不限业务类型
condition.setDateType(2); // 按指定时段
condition.setStartDate("2026-03-01");
condition.setEndDate("2026-03-18");
pagination.setCondition(condition);
RpcPagination<SupervisorDetailStaffDTO> result = supervisorTaskInfoService.pageDetailStaff(pagination);
System.out.println(JSON.toJSONString(result));
}
}
\ No newline at end of file
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.job.SupervisorTrainingAiAnalysisJob;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Title: SupervisorTrainingAiAnalysisJobTest
* @Description: 督导团队培训数据日维度 AI 分析定时任务单元测试
* @Author xiehx
* @Date 2026/3/18
*/
public class SupervisorTrainingAiAnalysisJobTest extends BaseServiceTest {
@Autowired
private SupervisorTrainingAiAnalysisJob supervisorTrainingAiAnalysisJob;
/**
* 测试日维度培训 AI 分析任务执行(查询前一天数据,遍历全部在职飞行督导发起 AI 分析)
*/
@Test
public void testExecute() {
supervisorTrainingAiAnalysisJob.execute(null);
}
}
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.job.SupervisorWeeklyTrainingAiAnalysisJob;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Title: SupervisorWeeklyTrainingAiAnalysisJobTest
* @Description: 督导团队培训数据周维度 AI 分析定时任务单元测试
* @Author xiehx
* @Date 2026/3/18
*/
public class SupervisorWeeklyTrainingAiAnalysisJobTest extends BaseServiceTest {
@Autowired
private SupervisorWeeklyTrainingAiAnalysisJob supervisorWeeklyTrainingAiAnalysisJob;
/**
* 测试周维度培训 AI 分析任务执行(查询上周数据,遍历全部在职飞行督导发起 AI 分析)
*/
@Test
public void testExecute() {
supervisorWeeklyTrainingAiAnalysisJob.execute(null);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!