|
@@ -1788,7 +1788,6 @@ public class QwExternalContactServiceImpl extends ServiceImpl<QwExternalContactM
|
|
|
qwSopAutoByTags.setSendType(2);
|
|
|
List<QwSopRuleTimeVO> qwSopRuleTimeVOS = qwSopMapper.selectQwSopAutoByTagsByForeach(qwSopAutoByTags);
|
|
|
try {
|
|
|
- log.info("SOP任务:{}", qwSopRuleTimeVOS.size());
|
|
|
if (qwSopRuleTimeVOS != null && !qwSopRuleTimeVOS.isEmpty()) {
|
|
|
//SOP规则
|
|
|
qwSopRuleTimeTools(qwSopRuleTimeVOS, userID, qwUser, corpId, externalUserID, externalContact.getName(), contact, currentDate, localTime, combinedTagsList);
|
|
@@ -2592,7 +2591,20 @@ public class QwExternalContactServiceImpl extends ServiceImpl<QwExternalContactM
|
|
|
}
|
|
|
|
|
|
private void qwAiSopRuleTimeTools(List<QwSopRuleTimeVO> qwSopAiRuleTimeVOS, String userID, QwUser qwUser, String corpId, String externalUserID, String externalContactName, QwExternalContact contact) {
|
|
|
+
|
|
|
+ SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("qw.config");
|
|
|
+ List<SopUserLogsInfo> sopUserLogsInfos = sopUserLogsInfoMapper.repeatProject(PubFun.listToNewList(qwSopAiRuleTimeVOS, QwSopRuleTimeVO::getProject), externalUserID);
|
|
|
+ Map<Integer, List<String>> collect = sopUserLogsInfos.stream().collect(Collectors.groupingBy(SopUserLogsInfo::getProject, Collectors.mapping(SopUserLogsInfo::getSopId, Collectors.toList())));
|
|
|
qwSopAiRuleTimeVOS.forEach(ruleTimeVO -> {
|
|
|
+ if(sysConfig != null){
|
|
|
+ QwConfig qwConfig = JSON.parseObject(sysConfig.getConfigValue(), QwConfig.class);
|
|
|
+ if(qwConfig.isProject()){
|
|
|
+ List<String> sopIdList = collect.get(ruleTimeVO.getProject());
|
|
|
+ log.info("是否多个项目:{}", sopIdList);
|
|
|
+ if(sopIdList.isEmpty()) return;
|
|
|
+ if(sopIdList.contains(ruleTimeVO.getId())) return;
|
|
|
+ }
|
|
|
+ }
|
|
|
SopUserLogsInfo sopUserLogsInfo = new SopUserLogsInfo();
|
|
|
sopUserLogsInfo.setQwUserId(userID.trim());
|
|
|
sopUserLogsInfo.setCorpId(corpId.trim());
|