Browse Source

修正:人员分组

zhongwei
ty 7 months ago
parent
commit
ab4e220d2f
  1. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java

9
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.operational.duty.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.operational.duty.entity.*; import com.hnac.hzims.operational.duty.entity.*;
import com.hnac.hzims.operational.duty.mapper.ImsDutyGroupMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyGroupMapper;
@ -343,6 +344,14 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl<ImsDutyGroupMapper,
} }
} }
imsDutyGroupPService.deleteBatch(ids); imsDutyGroupPService.deleteBatch(ids);
for (Long id : collect1) {
for (ImsDutyGroupEntity imsDutyGroupEntity : imsDutyGroupEntities) {
if (id.equals(imsDutyGroupEntity.getManagerId())){
this.update(Wrappers.<ImsDutyGroupEntity>lambdaUpdate().set(ImsDutyGroupEntity::getManagerId,null)
.eq(ImsDutyGroupEntity::getId,imsDutyGroupEntity.getId()));
}
}
}
Map<Long, List<ImsDutyGroupPEntity>> collect = list.stream().collect(Collectors.groupingBy(ImsDutyGroupPEntity::getGroupId)); Map<Long, List<ImsDutyGroupPEntity>> collect = list.stream().collect(Collectors.groupingBy(ImsDutyGroupPEntity::getGroupId));
if (updateDuty) { if (updateDuty) {
for (Long aLong : collect.keySet()) { for (Long aLong : collect.keySet()) {

Loading…
Cancel
Save