|
@@ -9,7 +9,6 @@ import com.ozs.system.mapper.SysDeptMapper;
|
|
|
import com.ozs.system.mapper.SysDeptOrganMapper;
|
|
|
import com.ozs.system.service.SysDeptOrganService;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -71,9 +70,10 @@ public class SysDeptOrganServiceImpl implements SysDeptOrganService {
|
|
|
wrapper.eq(SysDeptOrgan::getDeptId, deptOrganList.get(0).getDeptId());
|
|
|
List<SysDeptOrgan> organs = deptOrganMapper.selectList(wrapper);
|
|
|
List<Long> idList = organs.stream().map(SysDeptOrgan::getId).collect(Collectors.toList());
|
|
|
- for (SysDeptOrgan organ : deptOrganList) {
|
|
|
- if (!idList.contains(organ.getId())) {
|
|
|
- deptOrganMapper.deleteById(organ.getId());
|
|
|
+ List<Long> didList = deptOrganList.stream().map(SysDeptOrgan::getId).collect(Collectors.toList());
|
|
|
+ for (Long aLong : idList) {
|
|
|
+ if (!didList.contains(aLong)) {
|
|
|
+ deptOrganMapper.deleteById(aLong);
|
|
|
}
|
|
|
}
|
|
|
|