Commit c5627dda by 范富荣

优化录音复盘生成接口

1 parent cb27194e
......@@ -104,6 +104,8 @@ public class SupervisorTaskDTO implements Serializable {
@ApiModelProperty(value = "入职时间", example = "2025-12-12")
private String entryDate;
private String startDate;
/**
* 性别
......
......@@ -68,14 +68,19 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
public void execute(ShardingContext shardingContext) {
try {
log.info("督导录音复盘任务生成开始执行");
//从shardingContext 获取自定义参数
String jobParameter = shardingContext.getJobParameter();
log.info("自定义参数为:{}", jobParameter);
// 1. 查询系统中所有督导员工列表
List<MerchantStaffResponse> supervisorList = supervisorTaskInfoService.listAllEffectiveSupervisors();
if (supervisorList == null || supervisorList.isEmpty()) {
log.error("查询督导列表为空");
return;
}
String yesterday = DateUtils.getYesterdayDate();
String yesterday = jobParameter;
if (StringUtils.isBlank(yesterday)) {
yesterday = DateUtils.getYesterdayDate();
}
//String yesterday = "2024-05-10";
//计算员工排名阈值
double rankThreshold = environment.getProperty("dj.supervisor.audio.review.task.rank.threshold", Double.class, 0.3);
......
......@@ -110,9 +110,10 @@ public class SupervisorAudioReviewInfoService {
SupervisorTaskDTO task = supervisorTaskInfoService.getTaskDetailById(request.getId());
if (task != null) {
dto.setTaskStatus(task.getTaskStatus());
//根据task.getCreateTime() , 获取前一天日期
Date yesterday = DateUtils.addDate(task.getCreateTime(), "day", -1);
dto.setCreateTime(yesterday);
String startDate = task.getStartDate();
if (StringUtils.isNotBlank(startDate)) {
dto.setCreateTime(DateUtils.parseDate(startDate));
}
}
return dto;
}
......
......@@ -48,6 +48,7 @@
<result column="updated_phone" property="updatedPhone" />
<result column="store_manager_phone" property="storeManagerPhone" jdbcType="VARCHAR" />
<result column="store_manager_name" property="storeManagerName" jdbcType="VARCHAR" />
<result column="start_date" property="startDate"/>
<collection property="taskImageList" ofType="cn.com.glsx.dj.supervisor.model.SupervisorTaskImage">
<result column="image_url" property="imageUrl" />
</collection>
......@@ -75,7 +76,7 @@
<select id="getTaskDetailById" resultMap="TaskDetailMap">
select sti.id, sti.task_type, sti.task_status, sti.on_duty_flag, sti.merchant_id, sti.merchant_name, sti.task_desc,sti.task_context,sti.create_time,sti.updated_date,
stim.image_url,sti.store_manager_name,sti.store_manager_phone,sti.updated_by
stim.image_url,sti.store_manager_name,sti.store_manager_phone,sti.updated_by,sti.start_date
from supervisor_task_info sti
left join supervisor_task_image stim on stim.relation_id = sti.id and stim.deleted_flag = 'N'
<where>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!