Commit de4154e9 by 范富荣

添加查询督导任务管理模块接口

1 parent 246fcf22
Showing 16 changed files with 346 additions and 32 deletions
......@@ -27,6 +27,9 @@ public class AudioReceptionDTO implements Serializable {
@ApiModelProperty(notes = "客户手机号")
private String phoneNumber;
@ApiModelProperty(notes = "员工手机号")
private String staffPhone;
@ApiModelProperty(notes = "门店商户号")
private String merchantNo;
......@@ -49,8 +52,8 @@ public class AudioReceptionDTO implements Serializable {
@ApiModelProperty(notes = "录音结束时间")
private Date endTime; // 录音结束时间
@ApiModelProperty(notes = "总耗时时长")
private Long totalDuration;
@ApiModelProperty(notes = "总耗时时长,秒")
private String totalDuration;
@ApiModelProperty(notes = "车型")
private String carModel;
......@@ -60,6 +63,18 @@ public class AudioReceptionDTO implements Serializable {
@ApiModelProperty(notes = "复盘状态,0-未复盘,1-已复盘")
private Integer reviewStatus;
/**
* 录音标签
*/
@ApiModelProperty(notes = "录音标签")
private String reviewTarget;
/**
* 录音复盘内容
*/
@ApiModelProperty(notes = "录音复盘内容")
private String reviewContent;
@ApiModelProperty(notes = "录音批次id")
private Integer batchId;
......
......@@ -26,7 +26,7 @@ public class SupervisorTaskDTO implements Serializable {
private Long id;
@NotNull(message = "日报类型不能为空")
@ApiModelProperty(notes = "日报类型 0-日报 1-周报,2-月报, 3-录音", required = true)
@ApiModelProperty(notes = "日报类型 0-日报 1-周报,2-月报, 3-录音,4-专项,5-带教", required = true)
private Integer taskType;
@ApiModelProperty(notes = "任务状态 0-待完成 1-进行中,2-已完成")
......@@ -97,8 +97,10 @@ public class SupervisorTaskDTO implements Serializable {
@ApiModelProperty(notes = "更新时间")
private Date updatedDate;
@ApiModelProperty(notes = "更新人")
private String updatedBy;
@ApiModelProperty(notes = "更新人手机号")
private String updatedPhone;
/**
......
......@@ -28,4 +28,25 @@ public class SupervisorTaskQueryDTO implements Serializable {
@ApiModelProperty(notes = "任务状态 0-待完成 1-进行中,2-已完成")
private Integer taskStatus;
@ApiModelProperty(notes = "更新人")
private String updatedBy;
/**
* 计算录音详情标识, 0-计算,1-不计算
*/
private int calculateAudioDetailFlag;
@ApiModelProperty(notes = "督导管理的门店id列表")
private List<Integer> merchantIdList;
@ApiModelProperty(notes = "督导管理的员工手机号列表")
private List<String> staffPhoneList;
/**
* 接待结果 1.成交 0.战败
*/
private Integer receptionStatus;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
@Data
@ToString
public class SupervisorTaskSummaryDTO implements Serializable {
/**
* 总人数
*/
@ApiModelProperty(notes = "总人数")
private Integer totalCount;
/**
* 提交任务人数
*/
@ApiModelProperty(notes = "提交任务人数")
private Integer submittedCount;
/**
* 提交任务数
*/
@ApiModelProperty(notes = "提交任务数")
private Integer submittedTaskCount;
}
......@@ -26,7 +26,7 @@ public class SupervisorAudioReviewInfo implements Serializable {
* 关联接待记录id(inspection_conversation_batch.id)
*/
@Column(name = "reception_id")
private Long receptionId;
private Integer receptionId;
/**
* 关联任务id(supervisor_task_info.id)
......
......@@ -38,7 +38,7 @@ public class SupervisorWarningBaselineConfig implements Serializable {
private Integer timeDimension;
/**
* 区间最小值,+∞用NULL表示
* 区间最小值
*/
@ApiModelProperty(notes = "区间最小值", required = true)
@Column(name = "min_value")
......@@ -47,9 +47,16 @@ public class SupervisorWarningBaselineConfig implements Serializable {
/**
* 区间最大值,+∞用NULL表示
*/
@ApiModelProperty(notes = "区间最大值, +∞用NULL表示")
@ApiModelProperty(notes = "区间最大值, +∞用NULL表示")
@Column(name = "max_value")
private BigDecimal maxValue;
/**
* 正无穷大标识
*
*/
@ApiModelProperty(notes = "最大值正无穷大标识, 0-否,1-是", required = true)
@Column(name = "max_value_inf")
private Integer maxValueInf;
/**
* 预警等级:0-红,1-黄,2-绿
......
package cn.com.glsx.dj.supervisor.remote;
import cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO;
import cn.com.glsx.dj.supervisor.dto.AudioSummaryDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO;
import cn.com.glsx.dj.supervisor.dto.*;
import cn.com.glsx.dj.supervisor.model.SupervisorAudioReviewInfo;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
......@@ -37,6 +34,19 @@ public interface SupervisorTaskInfoRemote {
@ApiResponse("提交结果")
RpcResponse<SupervisorTaskDTO> getTaskDetailById(Long id);
/**
* 查询督导任务汇总信息
*
* @param request
* @return 督导任务汇总信息
*/
@ApiMethod("查询督导任务汇总信息")
@ApiParams({@ApiParam(name = "request", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("提交结果")
RpcResponse<SupervisorTaskSummaryDTO> getTaskSummary(SupervisorTaskQueryDTO request);
@ApiMethod("查询督导任务分页列表")
@ApiParams({@ApiParam(name = "request", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("提交结果")
......@@ -77,4 +87,13 @@ public interface SupervisorTaskInfoRemote {
@ApiParams({@ApiParam(name = "request", notes = "带教信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("提交结果")
RpcResponse<Long> submitCoaching(SupervisorTaskDTO request);
}
/**
* 查询督导团队概况信息
*/
@ApiMethod("查询督导团队概况信息")
@ApiParams({@ApiParam(name = "request", notes = "督导管理的门店id列表", dataType = ApiParam.DataTypeEnum.ARRAY, required = true)})
@ApiResponse("督导团队概况信息")
RpcResponse<SupervisorTeamOverviewDTO> getTeamOverview(SupervisorTaskQueryDTO request);
}
\ No newline at end of file
......@@ -64,6 +64,17 @@
<artifactId>hutool-all</artifactId>
<version>5.8.38</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife-api</artifactId>
<version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj.peanalysis</groupId>
<artifactId>rpc-dj-pe-analysis-api</artifactId>
<version>5.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.com.glsx.dj.supervisor.config;
import cn.com.glsx.dj.peanalysis.remote.BusinessSceneAnalysisRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class PeAnalysisDubboConfig extends DubboConfig {
@Bean
public BusinessSceneAnalysisRemote businessSceneAnalysisRemote() {
return factory.builder(BusinessSceneAnalysisRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
}
package cn.com.glsx.dj.supervisor.config;
import cn.com.glsx.dj.smartcarlife.remote.ShopMerchantDirectorConfigRemote;
import cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SmartcarlifeDubboConfig extends DubboConfig {
@Bean
public ShopMerchantDirectorConfigRemote shopMerchantDirectorConfigRemote() {
return factory.builder(ShopMerchantDirectorConfigRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
@Bean
public StaffBaseInfoRemote staffBaseInfoRemote() {
return factory.builder(StaffBaseInfoRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
}
package cn.com.glsx.dj.supervisor.mapper;
import cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO;
import cn.com.glsx.dj.supervisor.model.SupervisorAudioReviewInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -13,4 +14,6 @@ public interface SupervisorAudioReviewInfoMapper extends OreMapper<SupervisorAud
List<AudioReceptionDTO> listAudionByReceptionId(@Param("relationId") Long receptionId);
List<AudioReceptionDTO> listAudionByEmployeeInfo(SupervisorTaskQueryDTO query);
}
\ No newline at end of file
package cn.com.glsx.dj.supervisor.remote;
import cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO;
import cn.com.glsx.dj.supervisor.dto.AudioSummaryDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO;
import cn.com.glsx.dj.supervisor.dto.*;
import cn.com.glsx.dj.supervisor.model.SupervisorAudioReviewInfo;
import cn.com.glsx.dj.supervisor.service.SupervisorAudioReviewInfoService;
import cn.com.glsx.dj.supervisor.service.SupervisorTaskInfoService;
......@@ -82,6 +79,20 @@ public class SupervisorTaskInfoRemoteImpl implements SupervisorTaskInfoRemote {
}
@Override
public RpcResponse<SupervisorTaskSummaryDTO> getTaskSummary(SupervisorTaskQueryDTO request) {
try {
SupervisorTaskSummaryDTO result = supervisorTaskInfoService.getTaskSummary(request);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getTaskSummary error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getTaskSummary system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
@Override
public RpcResponse<RpcPagination<SupervisorTaskDTO>> pageTask(RpcPagination<SupervisorTaskQueryDTO> request) {
try {
Page result = supervisorTaskInfoService.pageTask(request);
......@@ -152,4 +163,18 @@ public class SupervisorTaskInfoRemoteImpl implements SupervisorTaskInfoRemote {
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
@Override
public RpcResponse<SupervisorTeamOverviewDTO> getTeamOverview(SupervisorTaskQueryDTO request) {
try {
SupervisorTeamOverviewDTO result = supervisorTaskInfoService.getTeamOverview(request);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getTeamOverview error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getTeamOverview system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
}
......@@ -57,10 +57,22 @@ public class SupervisorAudioReviewInfoService {
public Page<AudioReceptionDTO> pageAudioReception(RpcPagination<SupervisorTaskQueryDTO> request) {
//分页查询
Page<AudioReceptionDTO> page = PageHelper.startPage(request.getPageNum(), request.getPageSize());
supervisorAudioReviewInfoMapper.listAudionByReceptionId(request.getCondition().getId());
List<AudioReceptionDTO> list = supervisorAudioReviewInfoMapper.listAudionByReceptionId(request.getCondition().getId());
if(CollectionUtils.isNotEmpty(list)) {
list.forEach(item -> {
//处理录音时长
String duration = item.getTotalDuration();
long a = duration == null ? 0l : Long.parseLong(duration) / 1000;
item.setTotalDuration(String.valueOf(a));
});
}
return page;
}
public List<AudioReceptionDTO> listAudionByEmployeeInfo(SupervisorTaskQueryDTO query) {
return supervisorAudioReviewInfoMapper.listAudionByEmployeeInfo(query);
}
/**
* 查询录音复盘汇总信息
* @param request
......@@ -115,6 +127,10 @@ public class SupervisorAudioReviewInfoService {
return true;
}
public int batchInsert(List<SupervisorAudioReviewInfo> list) {
return supervisorAudioReviewInfoMapper.insertList(list);
}
......
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.dto.CoursePushDTO;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.oreframework.distribute.lock.annotation.GlsxDistributeLockable;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import cn.com.glsx.dj.peanalysis.dto.req.output.SceneBaseReq;
import cn.com.glsx.dj.peanalysis.dto.res.output.SceneOutputResponse;
import cn.com.glsx.dj.peanalysis.remote.BusinessSceneAnalysisRemote;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffBaseInfoDTO;
import cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTaskSummaryDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorTeamOverviewDTO;
import cn.com.glsx.dj.supervisor.enums.ReviewStatusEnum;
import cn.com.glsx.dj.supervisor.enums.TaskStatusEnum;
import cn.com.glsx.dj.supervisor.enums.TaskTypeEnum;
......@@ -19,8 +45,6 @@ import cn.com.glsx.framework.core.util.RpcAssert;
import cn.com.glsx.merchants.model.request.MerchantStaffRequest;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.oreframework.distribute.lock.annotation.GlsxDistributeLockable;
......@@ -63,6 +87,12 @@ public class SupervisorTaskInfoService {
private SupervisorTaskCourseService supervisorTaskCourseService;
@Autowired
private StaffBaseInfoRemote staffBaseInfoRemote;
@Autowired
private BusinessSceneAnalysisRemote businessSceneAnalysisRemote;
@Autowired
private SupervisorTaskImageMapper supervisorTaskImageMapper;
@Autowired
......@@ -107,6 +137,10 @@ public class SupervisorTaskInfoService {
supervisorTaskInfoMapper.insertList(taskList);
}
public int insert(SupervisorTaskInfo taskInfo) {
return supervisorTaskInfoMapper.insert(taskInfo);
}
/**
* 生成周报信息
* @param startTimeStr 周报的开始时间,yyyy-MM-dd
......@@ -232,7 +266,31 @@ public class SupervisorTaskInfoService {
return taskInfo;
}
/**
/**
* 查询督导任务汇总信息
* @param request
* @return
*/
public SupervisorTaskSummaryDTO getTaskSummary(SupervisorTaskQueryDTO request) {
SupervisorTaskSummaryDTO res = new SupervisorTaskSummaryDTO();
//查询所有飞行督导员工列表
List<MerchantStaffResponse> merchantStaffResponses = listAllSupervisors();
if (CollectionUtils.isNotEmpty(merchantStaffResponses)) {
res.setTotalCount(merchantStaffResponses.size());
}
//根据条件,调用分页查询任务 接口,根据返回的数据,去重计算提交任务人数,提交任务数
List<SupervisorTaskDTO> taskList = supervisorTaskInfoMapper.listTask(request);
if (CollectionUtils.isNotEmpty(taskList)) {
//去重计算提交任务人数,提交任务数
Set<String> submittedPhoneSet = taskList.stream().filter(x -> TaskStatusEnum.COMPLETED.getCode().equals(x.getTaskStatus()))
.map(SupervisorTaskDTO::getUpdatedPhone).collect(Collectors.toSet());
res.setSubmittedCount(submittedPhoneSet.size());
res.setSubmittedTaskCount(taskList.size());
}
return res;
}
/**
* 查询督导任务分页列表
* @param request
* @return
......@@ -241,7 +299,7 @@ public class SupervisorTaskInfoService {
Page<SupervisorTaskDTO> page = PageHelper.startPage(request.getPageNum(), request.getPageSize());
//查询任务列表
List<SupervisorTaskDTO> taskList = supervisorTaskInfoMapper.listTask(request.getCondition());
if (CollectionUtils.isNotEmpty(taskList)) {
if (CollectionUtils.isNotEmpty(taskList) && request.getCondition().getCalculateAudioDetailFlag() == 0) {
//录音复盘 需要计算录音进度
List<Long> idList = taskList.stream().filter(x -> TaskTypeEnum.AUDIO_RECORDING.getCode().equals(x.getTaskType()))
.map(SupervisorTaskDTO::getId).collect(Collectors.toList());
......@@ -296,6 +354,46 @@ public class SupervisorTaskInfoService {
}
/**
* 查询督导团队概况信息
* @param request 督导管理的门店id列表
* @return 督导团队概况信息
*/
public SupervisorTeamOverviewDTO getTeamOverview(SupervisorTaskQueryDTO request) {
log.info("查询督导团队概况信息,查询条件: {}", request);
SupervisorTeamOverviewDTO overviewDTO = new SupervisorTeamOverviewDTO();
List<Integer> merchantIdList = request.getMerchantIdList();
// 计算团队员工个数
StaffBaseInfoDTO param = new StaffBaseInfoDTO();
param.setMerchantIdList(merchantIdList);
RpcResponse<List<StaffBaseInfoDTO>> response = staffBaseInfoRemote.listShopStaffBaseInfo(param);
if (response.hasError()) {
log.error("查询团队员工个数失败,merchantIdList={}, error={}, message={}", merchantIdList, response.getError(), response.getMessage());
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, response.getMessage());
} else {
List<StaffBaseInfoDTO> staffList = response.getResult();
if (CollectionUtils.isNotEmpty(staffList)) {
overviewDTO.setStaffCount(staffList.size());
//查询产值
SceneBaseReq req = new SceneBaseReq();
req.setMerchantIds(merchantIdList);
req.setCycleType(4);
req.setStaffPhones(staffList.stream().map(StaffBaseInfoDTO::getStaffPhone).collect(Collectors.toList()));
RpcResponse<SceneOutputResponse> outputResponse = businessSceneAnalysisRemote.querySupervisorOutput(req);
if (outputResponse.hasError()) {
log.error("查询督导团队产值失败,SceneBaseReq={}, error={}, message={}", JSON.toJSONString(req), outputResponse.getError(), outputResponse.getMessage());
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, outputResponse.getMessage());
} else {
SceneOutputResponse outputResp = outputResponse.getResult();
if (outputResp != null) {
overviewDTO.setTotalValue(outputResp.getOutputValue());
}
}
}
}
return overviewDTO;
}
/**
* 发起带教 - 提交
* @param request 带教信息
* @return 任务 ID
......@@ -305,7 +403,7 @@ public class SupervisorTaskInfoService {
public Long submitCoaching(SupervisorTaskDTO request) {
try {
Date date = new Date();
// 构建带教任务信息
SupervisorTaskInfo taskInfo = new SupervisorTaskInfo();
BeanUtils.copyProperties(request, taskInfo);
......@@ -314,17 +412,17 @@ public class SupervisorTaskInfoService {
taskInfo.setDeletedFlag(BaseModel.DeletedFlagEnum.N.name());
taskInfo.setCreateTime(date);
taskInfo.setCreatedBy(request.getSupervisorPhone());
// 插入带教任务
int count = supervisorTaskInfoMapper.insertSelective(taskInfo);
if (count <= 0) {
log.error("插入带教任务失败");
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, "插入带教任务失败");
}
Long taskId = taskInfo.getId();
log.info("插入带教任务成功,taskId={}", taskId);
// 插入图片列表
if (CollectionUtils.isNotEmpty(request.getTaskImageList())) {
for (SupervisorTaskImage image : request.getTaskImageList()) {
......@@ -336,7 +434,7 @@ public class SupervisorTaskInfoService {
int imageCount = supervisorTaskImageMapper.insertList(request.getTaskImageList());
log.info("插入带教图片成功,imageCount={}", imageCount);
}
// 插入课程列表
if (CollectionUtils.isNotEmpty(request.getTaskCourseList())) {
ArrayList<CoursePushDTO> coursePushList = new ArrayList<>();
......@@ -359,10 +457,10 @@ public class SupervisorTaskInfoService {
log.info("插入带教课程成功,courseCount={}", courseCount);
}
log.info("发起带教 - 提交成功,taskId={}", taskId);
return taskId;
} catch (RpcServiceException e) {
throw e;
} catch (Exception e) {
......
......@@ -6,7 +6,7 @@
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="BIGINT" />
<result column="reception_id" property="receptionId" jdbcType="BIGINT" />
<result column="reception_id" property="receptionId" />
<result column="relation_id" property="relationId" jdbcType="BIGINT" />
<result column="review_status" property="reviewStatus" jdbcType="INTEGER" />
<result column="review_context" property="reviewContext" jdbcType="VARCHAR" />
......@@ -26,22 +26,53 @@
</sql>
<select id="listAudionByReceptionId" resultType="cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO">
select sari.id, sari.receptionId as batchId, sari.reviewStatus,
select sari.id, sari.receptionId as batchId, sari.reviewStatus, sari.review_target reviewTarget, sari.review_context reviewContext,
t2.audio_time as staticDate,t1.employee_name employeeName,re.customer_name customerName,re.phone_number as phoneNumber,
re.merchant_id merchantNo,re.car_model carModel, re.car_brand as carBrand,
ind.customer_type as customerType,ind.avg_defence as avgDefence,
cb.start_time startTime,cb.end_time endTime,cb.duration as totalDuration, cb.score as qualityCheckScore,cb.file_url fileUrl
cb.start_time startTime,cb.end_time endTime,cb.duration as totalDuration, cb.score as qualityCheckScore,cb.file_url fileUrl,
sm.merchant_name merchantName
from supervisor_audio_review_info sari
left join inspection_conversation_batch cb on cb.id = sari.reception_id
left join reception_customer_info re on cb.task_id = re.id
left join inspection_defence ind on ind.batch_id = cb.id and ind.deleted_flag = 'N'
left join inspection_conversation_date t2 on cb.conversation_id = t2.id
left join inspection_employee_badge t1 on t1.badge_id = t2.badge_id
left join dj_car_life_service_merchant sm on re.merchant_id = sm.merchant_id and sm.deleted_flag= 'N'
<where>
sari.deleted_flag = 'N' and cb.deleted_flag = 'N'
and sari.relation_id = #{relationId}
</where>
order by cb.start_time desc
</select>
<select id="listAudionByEmployeeInfo" parameterType="cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO" resultType="cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO">
select cb.id as batchId , t1.phone_number as staffPhone
from join inspection_conversation_batch cb
left join reception_customer_info re on cb.task_id = re.id
left join inspection_conversation_date t2 on cb.conversation_id = t2.id
left join inspection_employee_badge t1 on t1.badge_id = t2.badge_id
<where>
and cb.deleted_flag = 'N'
<if test="merchantIdList != null and merchantIdList.size() > 0">
and re.merchant_id in
<foreach collection="merchantIdList" item="merchantId" open="(" close=")" separator=",">
#{merchantId}
</foreach>
</if>
<if test="staffPhoneList != null and staffPhoneList.size() > 0">
and t1.phone_number in
<foreach collection="staffPhoneList" item="staffPhone" open="(" close=")" separator=",">
#{staffPhone}
</foreach>
</if>
<if test="startDate != null and endDate != null">
and t2.audio_time between #{startDate} and #{endDate}
</if>
<if test="receptionStatus != null">
and re.reception_status = #{receptionStatus}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -44,6 +44,8 @@
<result column="store_manager_name" property="storeManagerName"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" />
<result column="updated_phone" property="updatedPhone" />
<collection property="taskImageList" ofType="cn.com.glsx.dj.supervisor.model.SupervisorTaskImage">
<result column="image_url" property="imageUrl" />
</collection>
......@@ -75,8 +77,8 @@
</select>
<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.store_manager_name
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
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!