Commit 8c285251 authored by hongguangwu's avatar hongguangwu

if (!deptNoList.isEmpty()) {

parent ab8dbb4b
...@@ -954,21 +954,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -954,21 +954,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL)
.in(TSettleDomain::getDepartNo, deptNoList)
);
Map<String, Integer> deptMap = new HashMap<>(); Map<String, Integer> deptMap = new HashMap<>();
if (deptList == null || deptList.isEmpty()) { if (!deptNoList.isEmpty()) {
errorMsg = new HashSet<>(); List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda()
errorMsg.add(EmployeeConstants.DEPT_NO_EXIST); .eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
errorMessageList.add(new ErrorMessage(-1L, errorMsg)); .eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL)
return R.failed(errorMessageList); .in(TSettleDomain::getDepartNo, deptNoList)
} else { );
for (TSettleDomain dept : deptList) { if (deptList == null || deptList.isEmpty()) {
deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT); errorMsg = new HashSet<>();
errorMsg.add(EmployeeConstants.DEPT_NO_EXIST);
errorMessageList.add(new ErrorMessage(-1L, errorMsg));
return R.failed(errorMessageList);
} else {
for (TSettleDomain dept : deptList) {
deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment