Commit 13157e9e authored by 赵啸非's avatar 赵啸非

添加窗口人员查询

parent ec3f71a7
...@@ -166,7 +166,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -166,7 +166,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException { protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) { if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.getWindowOwnerDetailList().stream().peek(item -> { entity.getWindowOwnerDetailList().stream().peek(item -> {
item.setOwnerId(entity.getId()); item.setOwnerId(entity.getStaffId());
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
}).count(); }).count();
...@@ -178,10 +178,10 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -178,10 +178,10 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
@Override @Override
protected void updateAfter(WindowOwnerEntity entity, Context context) throws AppException { protected void updateAfter(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) { if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
Long[] windowOwnerDetailIds = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerId(entity.getId())).stream().map(WindowOwnerDetailEntity::getId).toArray(Long[]::new); Long[] windowOwnerDetailIds = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerId(entity.getStaffId())).stream().map(WindowOwnerDetailEntity::getId).toArray(Long[]::new);
windowOwnerDetailService.remove(windowOwnerDetailIds, context); windowOwnerDetailService.remove(windowOwnerDetailIds, context);
entity.getWindowOwnerDetailList().stream().peek(item -> { entity.getWindowOwnerDetailList().stream().peek(item -> {
item.setOwnerId(entity.getId()); item.setOwnerId(entity.getStaffId());
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context)); item.setUpdateUserId(this.getContextUserId(context));
...@@ -192,10 +192,4 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -192,10 +192,4 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
super.updateAfter(entity, context); super.updateAfter(entity, context);
} }
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<WindowOwnerDetailEntity> windowOwnerDetaillist = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerIdList(Arrays.asList(ids)));
windowOwnerDetailService.removeList(windowOwnerDetaillist, context);
super.removeAfter(ids, context, result);
}
} }
\ 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