Commit 30f3f48c authored by 赵啸非's avatar 赵啸非

添加窗口编码

parent 4050a5b1
...@@ -104,7 +104,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -104,7 +104,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
ownerList.addAll(subTwoList); ownerList.addAll(subTwoList);
if (!ObjectUtils.isEmpty(pdu.getHallId())) { if (!ObjectUtils.isEmpty(pdu.getHallId())) {
ownerList = ownerList.stream().sorted(Comparator.comparing(WindowPdu::getSelected).reversed()).filter(f -> pdu.getHallId().equals(f.getHallId())).collect(Collectors.toList()); ownerList = ownerList.stream().sorted(Comparator.comparing(WindowPdu::getSelected)).filter(f -> pdu.getHallId().equals(f.getHallId())).collect(Collectors.toList());
} }
...@@ -237,4 +237,20 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -237,4 +237,20 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
} }
@Override
protected void removeBefore(Long[] ids, Context context) throws AppException {
super.removeBefore(ids, context);
//删除窗口人员
List<WindowOwnerEntity> windowOwnerEntities = this.get(ids, context);
List<Long> collect = windowOwnerEntities.stream().map(item -> item.getWindowId()).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(collect)) {
WindowOwnerDetailQuery detailQuery = new WindowOwnerDetailQuery();
detailQuery.ownerIdList(collect);
Long[] delIds = windowOwnerDetailService.find(detailQuery).stream().map(item -> item.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(delIds)) {
windowOwnerDetailService.remove(delIds, context);
}
}
}
} }
\ No newline at end of file
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