Commit d4e45ab5 by 范富荣

督导-周报:优化分页列表查询逻辑

1 parent f1621551
......@@ -86,6 +86,18 @@ public class SupervisorTaskDTO implements Serializable {
private Integer audioReviewCompletedCount;
/**
* 周任务完成标准(分母)
*/
@ApiModelProperty(notes = "周任务完成标准(分母)")
private Integer weeklyTaskTotalCount;
/**
* 周任务已完成数量(分子)
*/
@ApiModelProperty(notes = "周任务已完成数量(分子)")
private Integer weeklyTaskCompletedCount;
/**
* 创建时间
*/
@ApiModelProperty(notes = "创建时间")
......@@ -109,6 +121,11 @@ public class SupervisorTaskDTO implements Serializable {
private String startDate;
private String endDate;
@ApiModelProperty(notes = "督导UUID")
private String supervisorUuid;
/**
* 性别
......
......@@ -630,6 +630,22 @@ public class SupervisorTaskInfoService {
}
}
}
// 周任务进度计算:优秀案例录音、带教要求
for (SupervisorTaskDTO task : taskList) {
if (task.getTaskType() == null) continue;
if (StringUtils.isBlank(task.getSupervisorUuid()) || StringUtils.isBlank(task.getStartDate()) || StringUtils.isBlank(task.getEndDate())) continue;
if (TaskTypeEnum.EXCELLENT_CASE_AUDIO.getCode().equals(task.getTaskType())) {
task.setWeeklyTaskTotalCount(env.getProperty("supervisor.weektask.excellentCaseLimit", Integer.class, 2));
int caseCount = excellentCaseReviewMapper.countBySubmitterAndDateRange(
task.getSupervisorUuid(), task.getStartDate(), task.getEndDate());
task.setWeeklyTaskCompletedCount(caseCount);
} else if (TaskTypeEnum.COACHING_REQUIREMENT.getCode().equals(task.getTaskType())) {
task.setWeeklyTaskTotalCount(env.getProperty("supervisor.weektask.coachingRequirementLimit", Integer.class, 6));
int coachingCount = supervisorTaskInfoMapper.countCoachingBySupervisorAndDateRange(
task.getSupervisorUuid(), task.getStartDate(), task.getEndDate());
task.setWeeklyTaskCompletedCount(coachingCount);
}
}
}
return page;
}
......
......@@ -51,6 +51,8 @@
<result column="store_manager_phone" property="storeManagerPhone" jdbcType="VARCHAR" />
<result column="store_manager_name" property="storeManagerName" jdbcType="VARCHAR" />
<result column="start_date" property="startDate"/>
<result column="end_date" property="endDate"/>
<result column="supervisor_uuid" property="supervisorUuid"/>
<result column="next_work_items" property="nextWorkItems"/>
<result column="need_assist_items" property="needAssistItems"/>
<collection property="taskImageList" ofType="cn.com.glsx.dj.supervisor.model.SupervisorTaskImage">
......@@ -90,7 +92,7 @@
<select id="listTask" parameterType="cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO" resultMap="TaskDetailMap">
select sti.id, sti.task_type, sti.task_status,sti.updated_date,sti.updated_phone, sti.updated_by, sti.store_manager_name,
sti.task_desc,sti.task_context, sti.merchant_name, sti.create_time
sti.task_desc,sti.task_context, sti.merchant_name, sti.create_time, sti.start_date, sti.end_date, sti.supervisor_uuid
from supervisor_task_info sti
<where>
sti.deleted_flag = 'N'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!