|
@@ -47,8 +47,8 @@ public class TaPreselectionServiceImpl extends ServiceImpl<TaPreselectionMapper,
|
47
|
47
|
|
48
|
48
|
ResponseBean responseBean = new ResponseBean();
|
49
|
49
|
IPage<TaPreselection> pg = new Page<>(pageNum, pageSize);
|
50
|
|
- IPage<TaPreselection> taPreselectionIPage = taPreselectionMapper.listPresecretByCondition(pg, salesBatchName, buildingId, orgId, status, taPersonBuildingListByUserId);
|
51
|
|
- taPreselectionIPage.getRecords().forEach(e->{
|
|
50
|
+ IPage<TaPreselection> taPreselectionIPage = taPreselectionMapper.listPresecretByCondition(pg, salesBatchName, buildingId, orgId, status, taPersonBuildingListByUserId);
|
|
51
|
+ taPreselectionIPage.getRecords().forEach(e -> {
|
52
|
52
|
QueryWrapper<TaPreselectionRecord> taPreselectionRecordQueryWrapper = new QueryWrapper<>();
|
53
|
53
|
taPreselectionRecordQueryWrapper.eq("sales_batch_id", e.getSalesBatchId());
|
54
|
54
|
e.setPreNum(taPreselectionRecordMapper.selectCount(taPreselectionRecordQueryWrapper));
|
|
@@ -95,4 +95,25 @@ public class TaPreselectionServiceImpl extends ServiceImpl<TaPreselectionMapper,
|
95
|
95
|
responseBean.addSuccess(taPreselectionMapper.getPresecretById(id, orgId));
|
96
|
96
|
return responseBean;
|
97
|
97
|
}
|
|
98
|
+
|
|
99
|
+ @Override
|
|
100
|
+ public ResponseBean checkHavingRecordForSalesBatch(Integer salesBatchId, Integer orgId) {
|
|
101
|
+ logger.info("checkHavingRecordForSalesBatch 接收参数:salesBatchId:{},orgId:{}", salesBatchId, orgId);
|
|
102
|
+
|
|
103
|
+ ResponseBean responseBean = new ResponseBean();
|
|
104
|
+ QueryWrapper<TaPreselection> queryWrapper = new QueryWrapper<>();
|
|
105
|
+ queryWrapper.eq("sales_batch_id", salesBatchId);
|
|
106
|
+ queryWrapper.eq("org_id", orgId);
|
|
107
|
+ queryWrapper.eq("status", 1);
|
|
108
|
+ TaPreselection taPreselection = getOne(queryWrapper);
|
|
109
|
+ JSONObject jsonObject = new JSONObject();
|
|
110
|
+ if (taPreselection != null) {
|
|
111
|
+ jsonObject.put("havingRecord", true);
|
|
112
|
+ responseBean.addSuccess("success");
|
|
113
|
+ } else {
|
|
114
|
+ jsonObject.put("havingRecord", false);
|
|
115
|
+ responseBean.addSuccess("success");
|
|
116
|
+ }
|
|
117
|
+ return responseBean;
|
|
118
|
+ }
|
98
|
119
|
}
|