fix: 发消息责任人变回去

This commit is contained in:
2024-08-12 20:48:39 +08:00
parent a37a52585a
commit 1240f6929b
@@ -11,8 +11,6 @@ import com.jero.modules.laws.standard.entity.LawsReplacedStandard;
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
import com.jero.modules.laws.standard.service.ILawsReplacedStandardService;
import com.jero.modules.laws.standardmasterplan.entity.LawsStandardMasterPlan;
import com.jero.modules.laws.standardmasterplan.entity.LawsStandardMasterPlanSublist;
import com.jero.modules.laws.standardmasterplan.servicce.ILawsStandardMasterPlanService;
import com.jero.modules.laws.standardmasterplan.servicce.ILawsStandardMasterPlanSublistService;
import com.jero.modules.personal.entity.LawsStandardCollection;
@@ -27,8 +25,6 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.jero.modules.laws.standardmasterplan.common.LawsStandardMasterPlanCommon.INFORMATION_INPUT;
@Slf4j
public class ReplaceImplementationDateMsgJob implements Job {
@@ -217,20 +213,7 @@ public class ReplaceImplementationDateMsgJob implements Job {
standard = standard.split("")[0];
LawsDomesticStandard replaceStandard = standardMap.get(standard);
// 被代替标准的主起草人,责任人,收藏标准的人员
LambdaQueryWrapper<LawsStandardMasterPlan> mpWrapper = new LambdaQueryWrapper<>();
mpWrapper.eq(LawsStandardMasterPlan::getStandardId, replaceStandard.getId());
List<LawsStandardMasterPlan> masterPlanList = masterPlanService.list(mpWrapper);
if (!masterPlanList.isEmpty()) {
// 找到所有类型为1的主计划信息的责任人
LambdaQueryWrapper<LawsStandardMasterPlanSublist> sublistWrapper = new LambdaQueryWrapper<>();
sublistWrapper.eq(LawsStandardMasterPlanSublist::getType, INFORMATION_INPUT);
sublistWrapper.in(LawsStandardMasterPlanSublist::getMasterPlanId,
masterPlanList.stream().map(LawsStandardMasterPlan::getId).collect(Collectors.toList()));
List<LawsStandardMasterPlanSublist> sublistList = masterPlanSublistService.list(sublistWrapper);
for (LawsStandardMasterPlanSublist sublist : sublistList) {
userIdSet.add(sublist.getResponsiblePerson());
}
}
userIdSet.add(replaceStandard.getResponsibleUser());
// 获取收藏标准的所有人员
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, replaceStandard.getId());