Commit db40dd8b authored by 赵啸非's avatar 赵啸非

添加远程调试

parent 727f0a90
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<id>test</id> <id>test</id>
<properties> <properties>
<profiles.active>test</profiles.active> <profiles.active>test</profiles.active>
<profiles.server.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5520</profiles.server.debug>
<profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
......
...@@ -281,31 +281,37 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -281,31 +281,37 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
@Override @Override
protected void findAfter(MatterDatumEntity params, PageInfo pageInfo, Context context, List<MatterDatumEntity> list) throws AppException { protected void findAfter(MatterDatumEntity params, PageInfo pageInfo, Context context, List<MatterDatumEntity> list) throws AppException {
List<Long> matterIdList = list.stream().map(item -> item.getMatterId()).collect(Collectors.toList()); List<Long> matterIdList = list.stream().map(item -> item.getMatterId()).collect(Collectors.toList());
MatterQuery matterQuery = new MatterQuery(); if(ObjectUtils.isEmpty(matterIdList)){
matterQuery.setIdList(matterIdList); MatterQuery matterQuery = new MatterQuery();
Map<Long, MatterEntity> matterEntityMap = matterService.find(matterQuery).stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n)); matterQuery.setIdList(matterIdList);
Map<Long, MatterEntity> matterEntityMap = matterService.find(matterQuery).stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
list.stream().forEach(entity -> {
if (!ObjectUtils.isEmpty(matterEntityMap)) {
MatterEntity matterEntity = matterEntityMap.get(entity.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) {
entity.setMatterNo(matterEntity.getMatterNo());
entity.setMatterName(matterEntity.getMatterName());
}
}
});
}
List<Long> materialIdList = list.stream().map(item -> item.getId()).collect(Collectors.toList()); List<Long> materialIdList = list.stream().map(item -> item.getId()).collect(Collectors.toList());
DatumCategoryQuery datumCategoryQuery = new DatumCategoryQuery(); if(!ObjectUtils.isEmpty(materialIdList)){
datumCategoryQuery.setMaterialIdList(materialIdList); DatumCategoryQuery datumCategoryQuery = new DatumCategoryQuery();
Map<Long, DatumCategoryEntity> collect = datumCategoryService.find(datumCategoryQuery).stream().collect(Collectors.toMap(x -> x.getMaterialId(), y -> y, (o, n) -> n)); datumCategoryQuery.setMaterialIdList(materialIdList);
list.stream().forEach(entity -> { Map<Long, DatumCategoryEntity> collect = datumCategoryService.find(datumCategoryQuery).stream().collect(Collectors.toMap(x -> x.getMaterialId(), y -> y, (o, n) -> n));
if (!ObjectUtils.isEmpty(matterEntityMap)) { list.stream().forEach(entity -> {
MatterEntity matterEntity = matterEntityMap.get(entity.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) { if (!ObjectUtils.isEmpty(collect)) {
entity.setMatterNo(matterEntity.getMatterNo()); DatumCategoryEntity datumCategoryEntity = collect.get(entity.getCategoryId());
entity.setMatterName(matterEntity.getMatterName()); if (!ObjectUtils.isEmpty(datumCategoryEntity)) {
} entity.setCategoryId(datumCategoryEntity.getCategoryId());
} entity.setCategoryName(datumCategoryEntity.getCategoryName());
if (!ObjectUtils.isEmpty(collect)) { }
DatumCategoryEntity datumCategoryEntity = collect.get(entity.getCategoryId());
if (!ObjectUtils.isEmpty(datumCategoryEntity)) {
entity.setCategoryId(datumCategoryEntity.getCategoryId());
entity.setCategoryName(datumCategoryEntity.getCategoryName());
} }
} });
}); }
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
......
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