浏览代码

机关业务指导处

buzhanyi 1 年之前
父节点
当前提交
d61bb2ef3c

+ 4 - 4
purchase-system/src/main/java/com/ozs/system/service/impl/SysDeptOrganServiceImpl.java

@@ -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);
                 }
             }