|
@@ -47,7 +47,13 @@ public class TaPreselectionServiceImpl extends ServiceImpl<TaPreselectionMapper,
|
47
|
47
|
|
48
|
48
|
ResponseBean responseBean = new ResponseBean();
|
49
|
49
|
IPage<TaPreselection> pg = new Page<>(pageNum, pageSize);
|
50
|
|
- responseBean.addSuccess(taPreselectionMapper.listPresecretByCondition(pg, salesBatchName, buildingId, orgId, status, taPersonBuildingListByUserId));
|
|
50
|
+ IPage<TaPreselection> taPreselectionIPage = taPreselectionMapper.listPresecretByCondition(pg, salesBatchName, buildingId, orgId, status, taPersonBuildingListByUserId);
|
|
51
|
+ taPreselectionIPage.getRecords().forEach(e->{
|
|
52
|
+ QueryWrapper<TaPreselectionRecord> taPreselectionRecordQueryWrapper = new QueryWrapper<>();
|
|
53
|
+ taPreselectionRecordQueryWrapper.eq("sales_batch_id", e.getSalesBatchId());
|
|
54
|
+ e.setPreNum(taPreselectionRecordMapper.selectCount(taPreselectionRecordQueryWrapper));
|
|
55
|
+ });
|
|
56
|
+ responseBean.addSuccess(taPreselectionIPage);
|
51
|
57
|
return responseBean;
|
52
|
58
|
}
|
53
|
59
|
|
|
@@ -65,7 +71,7 @@ public class TaPreselectionServiceImpl extends ServiceImpl<TaPreselectionMapper,
|
65
|
71
|
preselectionRecordQueryWrapper.eq("status", 1);
|
66
|
72
|
List<TaPreselectionRecord> tpList = taPreselectionRecordMapper.selectList(preselectionRecordQueryWrapper);
|
67
|
73
|
if (CollectionUtils.isNotEmpty(tpList)) {
|
68
|
|
- responseBean.addError(String.format("销售批次%s已有用户预选,请先删除预选记录。", tp.getSalesBatchId()));
|
|
74
|
+ responseBean.addError(String.format("销售批次%s已有用户预选,请先删除预选记录。", tp.getSalesBatchName()));
|
69
|
75
|
return responseBean;
|
70
|
76
|
}
|
71
|
77
|
}
|