|
|
@@ -114,6 +114,15 @@ public class KwpWantBuyService {
|
|
|
if (CollectionUtils.isEmpty(wantBuyDto)) {
|
|
|
return new PageRes<>();
|
|
|
}
|
|
|
+ //数据处理
|
|
|
+ for (WantBuySelectRes wantBuySelectRes:wantBuyDto) {
|
|
|
+ KwoWantBuyTrading findDto = new KwoWantBuyTrading();
|
|
|
+ findDto.setWantBuyId(wantBuySelectRes.getId());
|
|
|
+ List<KwoWantBuyTrading> tradings = kwpWantBuyTradingMapper.findWantBuyTrading(findDto);
|
|
|
+ List<WantBuyTradingRes> wantBuyTradings = BeanUtils.copyToList(tradings, WantBuyTradingRes.class);
|
|
|
+ wantBuySelectRes.setWantBuyTradings(wantBuyTradings);
|
|
|
+ }
|
|
|
+
|
|
|
List<WantBuyHallRes> res = BeanUtils.copyToList(wantBuyDto, WantBuyHallRes.class);
|
|
|
|
|
|
// 获取供应企业信息
|
|
|
@@ -198,6 +207,15 @@ public class KwpWantBuyService {
|
|
|
if (CollectionUtils.isEmpty(wantBuyDto)) {
|
|
|
return new PageRes<>();
|
|
|
}
|
|
|
+ //数据处理
|
|
|
+ for (WantBuySelectRes wantBuySelectRes:wantBuyDto) {
|
|
|
+ KwoWantBuyTrading findDto = new KwoWantBuyTrading();
|
|
|
+ findDto.setWantBuyId(wantBuySelectRes.getId());
|
|
|
+ List<KwoWantBuyTrading> tradings = kwpWantBuyTradingMapper.findWantBuyTrading(findDto);
|
|
|
+ List<WantBuyTradingRes> wantBuyTradings = BeanUtils.copyToList(tradings, WantBuyTradingRes.class);
|
|
|
+ wantBuySelectRes.setWantBuyTradings(wantBuyTradings);
|
|
|
+ }
|
|
|
+
|
|
|
// 获取供应企业信息
|
|
|
List<Long> supplyEntIds = wantBuyDto.stream()
|
|
|
.map(WantBuySelectRes::getEntId)
|
|
|
@@ -563,6 +581,17 @@ public class KwpWantBuyService {
|
|
|
|
|
|
// List<WantBuySelectRes> result = kwpWantBuyMapper.pageSelect(params);
|
|
|
List<WantBuySelectRes> result = kwpWantBuyMapper.pageSelectAllByManager(params,authEntIdList);
|
|
|
+ if (CollectionUtils.isNotEmpty(result)) {
|
|
|
+ //数据处理
|
|
|
+ for (WantBuySelectRes wantBuySelectRes : result) {
|
|
|
+ KwoWantBuyTrading findDto = new KwoWantBuyTrading();
|
|
|
+ findDto.setWantBuyId(wantBuySelectRes.getId());
|
|
|
+ List<KwoWantBuyTrading> tradings = kwpWantBuyTradingMapper.findWantBuyTrading(findDto);
|
|
|
+ List<WantBuyTradingRes> wantBuyTradings = BeanUtils.copyToList(tradings, WantBuyTradingRes.class);
|
|
|
+ wantBuySelectRes.setWantBuyTradings(wantBuyTradings);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Map<Integer, List<WantBuySelectRes>> map = result.stream().collect(Collectors.groupingBy(WantBuySelectRes::getStatus));
|
|
|
List<TableTop> tableTops = new ArrayList<>();
|
|
|
TableTop all = new TableTop();
|
|
|
@@ -650,6 +679,16 @@ public class KwpWantBuyService {
|
|
|
if (CollectionUtils.isEmpty(wantBuyDto)) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
+
|
|
|
+ //数据处理
|
|
|
+ for (WantBuySelectRes wantBuySelectRes : wantBuyDto) {
|
|
|
+ KwoWantBuyTrading findDto = new KwoWantBuyTrading();
|
|
|
+ findDto.setWantBuyId(wantBuySelectRes.getId());
|
|
|
+ List<KwoWantBuyTrading> tradings = kwpWantBuyTradingMapper.findWantBuyTrading(findDto);
|
|
|
+ List<WantBuyTradingRes> wantBuyTradings = BeanUtils.copyToList(tradings, WantBuyTradingRes.class);
|
|
|
+ wantBuySelectRes.setWantBuyTradings(wantBuyTradings);
|
|
|
+ }
|
|
|
+
|
|
|
// 获取供应企业信息
|
|
|
Map<Long, EntCacheResDto> entMap = remoteSystemService.queryEntCacheMapByIds(
|
|
|
wantBuyDto.stream().map(WantBuySelectRes::getEntId).collect(Collectors.toList()));
|