Commit 0bd72fc9 by 周海宝

Merge branch 'v5.5.0' into 'master'

V5.5.0合并到主干

See merge request !3
2 parents 250f2ee6 ccfc0eec
# IDE files
.idea/
.vscode/
.trae/
*.iml
# Build output
target/
# Logs
*.log
logging.path_IS_UNDEFINED
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Java
*.class
*.jar
*.war
*.ear
# Maven
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
\ No newline at end of file \ No newline at end of file
...@@ -282,7 +282,8 @@ public class SopTaskDetailInfoService { ...@@ -282,7 +282,8 @@ public class SopTaskDetailInfoService {
} }
} }
handlerDetailAgentRef(sopTaskDetailInfo, recordingInfoList.size(), businessIds); handlerDetailAgentRef(sopTaskDetailInfo, recordingInfoList.size(), businessIds);
log.info("每日派发员工明细任务,推送员工[{}]录音,批次号[{}], 大模型返回[{}]",
sopTaskInfo.getStaffUuid(), recordingInfoList.stream().map(x -> x.getRecordingId()).collect(Collectors.toList()), businessIds);
} }
/** /**
......
...@@ -343,6 +343,8 @@ public class SopTaskInfoService { ...@@ -343,6 +343,8 @@ public class SopTaskInfoService {
List<String> uuidList = staffIndicatorInfoList.stream().map(x -> x.getStaffId()).collect(Collectors.toList()); List<String> uuidList = staffIndicatorInfoList.stream().map(x -> x.getStaffId()).collect(Collectors.toList());
List<SopTaskInfo> staffTaskCountList = sopTaskInfoMapper.listUnfinishedLatestSopTaskInfoByUuids(uuidList); List<SopTaskInfo> staffTaskCountList = sopTaskInfoMapper.listUnfinishedLatestSopTaskInfoByUuids(uuidList);
if (CollectionUtils.isNotEmpty(staffTaskCountList)) { if (CollectionUtils.isNotEmpty(staffTaskCountList)) {
List<String> existStaffPhones = staffTaskCountList.stream().map(p -> p.getStaffPhone()).collect(Collectors.toList());
log.info("Sop任务step1阶段,该员工最新记录存在未结束(进行中,未改善)的 阶段任务,existStaffPhones: {}", existStaffPhones);
uuidSet = staffTaskCountList.stream().map(x -> x.getStaffUuid() + x.getMerchantId()).collect(Collectors.toSet()); uuidSet = staffTaskCountList.stream().map(x -> x.getStaffUuid() + x.getMerchantId()).collect(Collectors.toSet());
} }
Date date = new Date(); Date date = new Date();
...@@ -352,9 +354,12 @@ public class SopTaskInfoService { ...@@ -352,9 +354,12 @@ public class SopTaskInfoService {
Integer period = sopConfig.getStudyDay(); Integer period = sopConfig.getStudyDay();
List<SopTaskInfo> insertList = new ArrayList<>(); List<SopTaskInfo> insertList = new ArrayList<>();
for (DateService.ItemDetail indicatorDetail : staffIndicatorInfoList) { for (DateService.ItemDetail indicatorDetail : staffIndicatorInfoList) {
if (uuidSet.contains(indicatorDetail.getStaffId() + indicatorDetail.getMerchantId())) { String key = indicatorDetail.getStaffId() + indicatorDetail.getMerchantId();
if (uuidSet.contains(key)) {
log.info("该员工最新记录存在未结束(进行中,未改善)的阶段任务, staffId: {},merchantId: {}", indicatorDetail.getStaffId(), indicatorDetail.getMerchantId());
continue; continue;
} }
uuidSet.add(key);
SopTaskInfo sopTaskInfo = new SopTaskInfo(); SopTaskInfo sopTaskInfo = new SopTaskInfo();
sopTaskInfo.setDeletedFlag(DeleteFlagEnum.N.getValue()); sopTaskInfo.setDeletedFlag(DeleteFlagEnum.N.getValue());
sopTaskInfo.setCreatedDate(date); sopTaskInfo.setCreatedDate(date);
...@@ -378,6 +383,8 @@ public class SopTaskInfoService { ...@@ -378,6 +383,8 @@ public class SopTaskInfoService {
appendMerchantInfo(insertList); appendMerchantInfo(insertList);
if (CollectionUtils.isNotEmpty(insertList)) { if (CollectionUtils.isNotEmpty(insertList)) {
sopTaskInfoMapper.insertList(insertList); sopTaskInfoMapper.insertList(insertList);
List<String> insertStaff = insertList.stream().map(p -> p.getStaffUuid() + p.getStaffPhone()).collect(Collectors.toList());
log.info("Sop任务step1阶段,批量插入sop step1 阶段任务(进行中),insertList: {}", insertStaff);
} }
} }
...@@ -445,6 +452,8 @@ public class SopTaskInfoService { ...@@ -445,6 +452,8 @@ public class SopTaskInfoService {
} }
return false; return false;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
List<String> effectiveMerchantId = effectiveList.stream().map(p -> p.getMerchantId() + p.getMerchantName()).collect(Collectors.toList());
log.info("Sop任务step1阶段,周转化率小于{}的门店: {}", weekConversionRateBigDecimal, effectiveMerchantId);
return effectiveList; return effectiveList;
} }
...@@ -491,7 +500,29 @@ public class SopTaskInfoService { ...@@ -491,7 +500,29 @@ public class SopTaskInfoService {
} }
return false; return false;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return effectiveList; List<String> effectiveStaff = effectiveList.stream().map(p -> p.getStaffId() + p.getStaffPhone()).collect(Collectors.toList());
log.info("Sop任务step1阶段,月转化率小于{}的店员: {}", monthConversionRateBigDecimal, effectiveStaff);
return filterByWhitelist(effectiveList);
}
private List<DateService.ItemDetail> filterByWhitelist(List<DateService.ItemDetail> list) {
String whiteListStr = environment.getProperty("sop.collect.task.staff.whitelist", String.class, "");
if (StringUtils.isBlank(whiteListStr)) {
log.info("sop 无配置员工白名单");
return list;
}
List<String> whiteList = Arrays.stream(whiteListStr.split(","))
.filter(Objects::nonNull)
.map(StringUtils::trim)
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(whiteList)) {
log.info("sop 配置员工白名单为空, {}", whiteListStr);
return list;
}
log.info("sop 配置员工白名单:{}", whiteList);
return list.stream()
.filter(p -> !whiteList.contains(p.getStaffPhone()))
.collect(Collectors.toList());
} }
/** /**
...@@ -522,6 +553,7 @@ public class SopTaskInfoService { ...@@ -522,6 +553,7 @@ public class SopTaskInfoService {
if (CollectionUtils.isEmpty(recordingInfoList)) { if (CollectionUtils.isEmpty(recordingInfoList)) {
//插入一条,无需考核任务详情 //插入一条,无需考核任务详情
sopTaskDetailInfoService.saveDetail(sopTaskInfo, checkDate, SopTaskDetailStatusEnum.NO_NEED.getValue()); sopTaskDetailInfoService.saveDetail(sopTaskInfo, checkDate, SopTaskDetailStatusEnum.NO_NEED.getValue());
log.info("每日派发员工明细任务,{} 无需考核任务详情", sopTaskInfo.getStaffPhone());
} else { } else {
SopTaskDetailInfo sopTaskDetailInfo = sopTaskDetailInfoService.saveDetail(sopTaskInfo, checkDate, SopTaskDetailStatusEnum.PROGRESS.getValue()); SopTaskDetailInfo sopTaskDetailInfo = sopTaskDetailInfoService.saveDetail(sopTaskInfo, checkDate, SopTaskDetailStatusEnum.PROGRESS.getValue());
//处理录音,并推送至大模型 //处理录音,并推送至大模型
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!