Commit f05291ec by 庞善天

轻改短课程代码优化

1 parent dbff7732
......@@ -54,5 +54,8 @@ public class SopShortCourseTaskDTO implements Serializable {
@ApiModelProperty(notes = "消息盒子id")
private Integer msgBoxId;
@ApiModelProperty(notes = "惩罚状态 1-未触发 2-处罚中 3-已结束 4-已解除")
private Byte punishStatus;
}
......@@ -16,6 +16,7 @@ import cn.com.glsx.dj.mindworkplate.model.sop.SopShortCourseTask;
import cn.com.glsx.dj.mindworkplate.model.sop.SopShortCourseTaskDetail;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffBeisenBaseInfoDTO;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffDetailInfoDTO;
import cn.com.glsx.dj.smartcarlife.enums.ContentManagerEnum;
import cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
......@@ -114,7 +115,6 @@ public class SopShortCourseTaskService {
Date startTime = Date.from(LocalDate.parse(checkDateStr).atTime(LocalTime.MIN).atZone(ZoneId.systemDefault()).toInstant());
Date endTime = Date.from(LocalDate.parse(checkDateStr).atTime(LocalTime.MAX).atZone(ZoneId.systemDefault()).toInstant());
List<String> successCustomerPhones = sopShortCourseTaskMapper.listSuccessOrderCustomerPhones(startTime, endTime);
Set<String> successCustomerPhoneSet = CollectionUtils.isEmpty(successCustomerPhones) ? Collections.emptySet() : new HashSet<>(successCustomerPhones);
// 根据手机号和复盘日期生成课程任务
Date checkDate = Date.from(LocalDate.parse(checkDateStr).atStartOfDay(ZoneId.systemDefault()).toInstant());
......@@ -139,8 +139,9 @@ public class SopShortCourseTaskService {
// 根据录音列表生成任务明细
List<SopShortCourseTaskDetail> detailList = new ArrayList<>();
for (SopShortCourseRecordingDTO recording : recordings) {
if (!successCustomerPhoneSet.isEmpty() && StringUtils.isNotBlank(recording.getCustomerPhone())
&& successCustomerPhoneSet.contains(StringUtils.trim(recording.getCustomerPhone()))) {
// 成功下单的客户排除掉
if (!successCustomerPhones.isEmpty() && StringUtils.isNotBlank(recording.getCustomerPhone())
&& successCustomerPhones.contains(StringUtils.trim(recording.getCustomerPhone()))) {
continue;
}
SopShortCourseTaskDetail d = buildTaskDetail(recording);
......@@ -183,6 +184,9 @@ public class SopShortCourseTaskService {
msgBox.setBusinessType(BusinessTypeEnums.PREMIUM_PRODUCTS.getCode());
msgBox.setPhone(staffPhone);
msgBox.setStatus(0);
msgBox.setReadCount(0);
msgBox.setPopupCount(0);
msgBox.setReadType(ContentManagerEnum.ReadType.FIRST.getValue());
msgBox.setCreatedBy(createdBy);
msgBox.setCreatedTime(now);
msgBox.setDelFlag(DELETE_FLAG_NORMAL);
......
......@@ -32,6 +32,8 @@
and t2.check_type = 2
and t4.phone_number = #{staffPhone}
and t1.reception_start_time between #{startTime} and #{endTime}
and t3.quality_inspection is not null
and t3.quality_inspection != ''
order by t1.reception_start_time desc, t3.id desc
</select>
......
......@@ -44,7 +44,7 @@
and staff_name like concat('%', #{staffName}, '%')
</if>
<if test="staffPhone != null and staffPhone != ''">
and staff_phone = #{staffPhone}
and staff_phone like concat('%', #{staffPhone}, '%')
</if>
<if test="merchantName != null and merchantName != ''">
and merchant_name like concat('%', #{merchantName}, '%')
......@@ -52,7 +52,9 @@
<if test="taskStatus != null">
and task_status = #{taskStatus}
</if>
<if test="punishStatus != null">
and punish_status = #{punishStatus}
</if>
<if test="checkStartTime != null">
and check_date &gt;= #{checkStartTime}
</if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!