|
@@ -84,6 +84,7 @@ public class TaRecommendCustomerController extends BaseController {
|
84
|
84
|
|
85
|
85
|
/**
|
86
|
86
|
* 我的客户列表
|
|
87
|
+ *
|
87
|
88
|
* @param pageNumber
|
88
|
89
|
* @param pageSize
|
89
|
90
|
* @param keywords
|
|
@@ -93,9 +94,9 @@ public class TaRecommendCustomerController extends BaseController {
|
93
|
94
|
@GetMapping("/wx/customer/list")
|
94
|
95
|
@ApiOperation(value = "查询我的客户列表", notes = "查询我的客户列表")
|
95
|
96
|
@ApiImplicitParams({
|
96
|
|
- @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNumber", paramType = "query",value = "第几页"),
|
97
|
|
- @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
|
98
|
|
- @ApiImplicitParam(dataTypeClass = String.class, name = "keywords", paramType = "query",value = "搜索关键字,目前仅支持姓名")
|
|
97
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNumber", paramType = "query", value = "第几页"),
|
|
98
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query", value = "一页多少行"),
|
|
99
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "keywords", paramType = "query", value = "搜索关键字,目前仅支持姓名")
|
99
|
100
|
})
|
100
|
101
|
public ResponseBean getMyCustList(@RequestParam int pageNumber, @RequestParam int pageSize, String keywords, HttpServletRequest request) {
|
101
|
102
|
if (pageNumber < 0 || pageSize < 0) {
|
|
@@ -108,6 +109,7 @@ public class TaRecommendCustomerController extends BaseController {
|
108
|
109
|
|
109
|
110
|
/**
|
110
|
111
|
* 我的客户列表
|
|
112
|
+ *
|
111
|
113
|
* @param pageNumber
|
112
|
114
|
* @param pageSize
|
113
|
115
|
* @param keywords
|
|
@@ -117,9 +119,9 @@ public class TaRecommendCustomerController extends BaseController {
|
117
|
119
|
@GetMapping("/admin/customer/list/{userId}")
|
118
|
120
|
@ApiOperation(value = "查询我的客户列表", notes = "查询我的客户列表")
|
119
|
121
|
@ApiImplicitParams({
|
120
|
|
- @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNumber", paramType = "query",value = "第几页"),
|
121
|
|
- @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
|
122
|
|
- @ApiImplicitParam(dataTypeClass = String.class, name = "keywords", paramType = "query",value = "搜索关键字,目前仅支持姓名")
|
|
122
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNumber", paramType = "query", value = "第几页"),
|
|
123
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query", value = "一页多少行"),
|
|
124
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "keywords", paramType = "query", value = "搜索关键字,目前仅支持姓名")
|
123
|
125
|
})
|
124
|
126
|
public ResponseBean getAdminMyCustList(@RequestParam int pageNumber,
|
125
|
127
|
@RequestParam int pageSize,
|
|
@@ -145,13 +147,14 @@ public class TaRecommendCustomerController extends BaseController {
|
145
|
147
|
|
146
|
148
|
/**
|
147
|
149
|
* 客户详情
|
|
150
|
+ *
|
148
|
151
|
* @param id
|
149
|
152
|
* @return
|
150
|
153
|
*/
|
151
|
154
|
@GetMapping("/wx/customer/{id}")
|
152
|
155
|
@ApiOperation(value = "查询客户详情", notes = "查询客户详情")
|
153
|
156
|
@ApiImplicitParams({
|
154
|
|
- @ApiImplicitParam(dataTypeClass = String.class, name = "id", paramType = "path",value = "搜索关键字,目前仅支持姓名")
|
|
157
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "id", paramType = "path", value = "搜索关键字,目前仅支持姓名")
|
155
|
158
|
})
|
156
|
159
|
public ResponseBean getCustDetail(@PathVariable String id) {
|
157
|
160
|
if (null == id || "".equals(id.trim())) {
|
|
@@ -163,13 +166,14 @@ public class TaRecommendCustomerController extends BaseController {
|
163
|
166
|
|
164
|
167
|
/**
|
165
|
168
|
* 客户编辑
|
|
169
|
+ *
|
166
|
170
|
* @param paramStr
|
167
|
171
|
* @return
|
168
|
172
|
*/
|
169
|
173
|
@PostMapping("/wx/customer/edit")
|
170
|
174
|
@ApiOperation(value = "客户编辑", notes = "客户编辑")
|
171
|
175
|
@ApiImplicitParams({
|
172
|
|
- @ApiImplicitParam(dataTypeClass = String.class, name = "id", paramType = "path",value = "搜索关键字,目前仅支持姓名")
|
|
176
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "id", paramType = "path", value = "搜索关键字,目前仅支持姓名")
|
173
|
177
|
})
|
174
|
178
|
public ResponseBean updateCust(@RequestBody String paramStr) {
|
175
|
179
|
return taRecommendCustomerService.updateCustByJSON(paramStr);
|
|
@@ -177,6 +181,7 @@ public class TaRecommendCustomerController extends BaseController {
|
177
|
181
|
|
178
|
182
|
/**
|
179
|
183
|
* 推荐客户
|
|
184
|
+ *
|
180
|
185
|
* @param paramStr
|
181
|
186
|
* @param request
|
182
|
187
|
* @return
|
|
@@ -185,11 +190,12 @@ public class TaRecommendCustomerController extends BaseController {
|
185
|
190
|
public ResponseBean recommendCust(@RequestBody String paramStr, HttpServletRequest request) {
|
186
|
191
|
String openid = getOpenId(request);
|
187
|
192
|
Integer orgId = getOrgId(request);
|
188
|
|
- return taRecommendCustomerService.recommendCust(paramStr, openid,orgId);
|
|
193
|
+ return taRecommendCustomerService.recommendCust(paramStr, openid, orgId);
|
189
|
194
|
}
|
190
|
195
|
|
191
|
196
|
/**
|
192
|
197
|
* 报备客户
|
|
198
|
+ *
|
193
|
199
|
* @param paramStr
|
194
|
200
|
* @param request
|
195
|
201
|
* @return
|
|
@@ -198,57 +204,57 @@ public class TaRecommendCustomerController extends BaseController {
|
198
|
204
|
public ResponseBean reportCust(@RequestBody String paramStr, HttpServletRequest request) {
|
199
|
205
|
String openid = getOpenId(request);
|
200
|
206
|
Integer orgId = getOrgId(request);
|
201
|
|
- return taRecommendCustomerService.reportCust(paramStr, openid,orgId);
|
|
207
|
+ return taRecommendCustomerService.reportCust(paramStr, openid, orgId);
|
202
|
208
|
}
|
203
|
209
|
|
204
|
210
|
@PostMapping("/wx/customer/recommend")
|
205
|
|
- public ResponseBean getUnSignedCustomerList ( @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
206
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
207
|
|
- @RequestParam(value ="buildingId") String buildingId,
|
208
|
|
- HttpServletRequest request){
|
|
211
|
+ public ResponseBean getUnSignedCustomerList(@RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
212
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
213
|
+ @RequestParam(value = "buildingId") String buildingId,
|
|
214
|
+ HttpServletRequest request) {
|
209
|
215
|
String openid = getOpenId(request);
|
210
|
216
|
List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
211
|
217
|
if (null == taPersons || taPersons.size() != 1) {
|
212
|
218
|
return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
213
|
219
|
}
|
214
|
220
|
TaPerson person = taPersons.get(0);
|
215
|
|
- try{
|
216
|
|
- return ResponseBean.success(taRecommendCustomerService.getUnSignedCustomerList(pageNumber,pageSize,buildingId,person.getPersonId()));
|
217
|
|
- }catch (Exception e){
|
|
221
|
+ try {
|
|
222
|
+ return ResponseBean.success(taRecommendCustomerService.getUnSignedCustomerList(pageNumber, pageSize, buildingId, person.getPersonId()));
|
|
223
|
+ } catch (Exception e) {
|
218
|
224
|
e.printStackTrace();
|
219
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
225
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
220
|
226
|
}
|
221
|
227
|
}
|
222
|
228
|
|
223
|
229
|
@GetMapping("/wx/customer/myReport")
|
224
|
|
- public ResponseBean getCustomerIReport (HttpServletRequest request,
|
225
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
226
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
|
230
|
+ public ResponseBean getCustomerIReport(HttpServletRequest request,
|
|
231
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
232
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
227
|
233
|
String openid = getOpenId(request);
|
228
|
234
|
List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
229
|
235
|
if (null == taPersons || taPersons.size() != 1) {
|
230
|
236
|
return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
231
|
237
|
}
|
232
|
238
|
TaPerson person = taPersons.get(0);
|
233
|
|
- try{
|
234
|
|
- IPage<TaRecommendCustomer>pg = new Page<>(pageNumber,pageSize);
|
235
|
|
- QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
|
236
|
|
- queryWrapper.eq("realty_consultant",person.getPersonId());
|
237
|
|
- queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
|
238
|
|
- queryWrapper.eq("status",CommConstant.CUSTOMER_REPORT);
|
|
239
|
+ try {
|
|
240
|
+ IPage<TaRecommendCustomer> pg = new Page<>(pageNumber, pageSize);
|
|
241
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
|
242
|
+ queryWrapper.eq("realty_consultant", person.getPersonId());
|
|
243
|
+ queryWrapper.eq("report_recommend_status", CommConstant.REPORTED);
|
|
244
|
+ queryWrapper.eq("status", CommConstant.CUSTOMER_REPORT);
|
239
|
245
|
queryWrapper.orderByDesc("create_date");
|
240
|
|
- IPage<TaRecommendCustomer>result = taRecommendCustomerService.page(pg,queryWrapper);
|
|
246
|
+ IPage<TaRecommendCustomer> result = taRecommendCustomerService.page(pg, queryWrapper);
|
241
|
247
|
return ResponseBean.success(result);
|
242
|
|
- }catch (Exception e){
|
|
248
|
+ } catch (Exception e) {
|
243
|
249
|
e.printStackTrace();
|
244
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
250
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
245
|
251
|
}
|
246
|
252
|
}
|
247
|
253
|
|
248
|
254
|
@GetMapping("/wx/customer/myCustomer")
|
249
|
|
- public ResponseBean getMyCustomer ( @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
250
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
251
|
|
- HttpServletRequest request){
|
|
255
|
+ public ResponseBean getMyCustomer(@RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
256
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
257
|
+ HttpServletRequest request) {
|
252
|
258
|
String openid = getOpenId(request);
|
253
|
259
|
List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
254
|
260
|
if (null == taPersons || taPersons.size() != 1) {
|
|
@@ -256,65 +262,88 @@ public class TaRecommendCustomerController extends BaseController {
|
256
|
262
|
}
|
257
|
263
|
TaPerson person = taPersons.get(0);
|
258
|
264
|
|
259
|
|
- try{
|
260
|
|
- IPage<TaRecommendCustomer>pg = new Page<>(pageNumber,pageSize);
|
261
|
|
- QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
|
|
265
|
+ try {
|
|
266
|
+ IPage<TaRecommendCustomer> pg = new Page<>(pageNumber, pageSize);
|
|
267
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
262
|
268
|
|
263
|
269
|
// 2020-4-1 yansen realty_consultant 可能是 person_id, 可能是 user_id
|
264
|
270
|
// queryWrapper.eq("realty_consultant",person.getPersonId());
|
265
|
271
|
queryWrapper.eq("org_id", person.getOrgId()); // 主要是为了走索引
|
266
|
|
- queryWrapper.nested(query -> query.eq("realty_consultant",person.getPersonId()).or().eq("realty_consultant", person.getUserId()));
|
267
|
|
- // queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
|
268
|
|
- queryWrapper.gt("status",CommConstant.STATUS_UNACCALIMED);
|
|
272
|
+ queryWrapper.nested(query -> query.eq("realty_consultant", person.getPersonId()).or().eq("realty_consultant", person.getUserId()));
|
|
273
|
+ // queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
|
|
274
|
+ queryWrapper.gt("status", CommConstant.STATUS_UNACCALIMED);
|
269
|
275
|
queryWrapper.orderByDesc("create_date");
|
270
|
|
- IPage<TaRecommendCustomer>result = taRecommendCustomerService.page(pg,queryWrapper);
|
|
276
|
+ IPage<TaRecommendCustomer> result = taRecommendCustomerService.page(pg, queryWrapper);
|
271
|
277
|
return ResponseBean.success(result);
|
272
|
|
- }catch (Exception e){
|
|
278
|
+ } catch (Exception e) {
|
273
|
279
|
e.printStackTrace();
|
274
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
280
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
275
|
281
|
}
|
276
|
282
|
}
|
277
|
283
|
|
278
|
284
|
|
279
|
285
|
@GetMapping("/wx/customer/myInviteAgent")
|
280
|
|
- public ResponseBean getMyInviteAgent (@RequestParam(value ="personId") String personId,
|
281
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
282
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
283
|
|
- try{
|
284
|
|
- IPage<TaRecommendCustomer>pg = new Page<>(pageNumber,pageSize);
|
285
|
|
- QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
|
286
|
|
- queryWrapper.eq("realty_consultant",personId);
|
287
|
|
- queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
|
|
286
|
+ public ResponseBean getMyInviteAgent(@RequestParam(value = "personId") String personId,
|
|
287
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
288
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
289
|
+ try {
|
|
290
|
+ IPage<TaRecommendCustomer> pg = new Page<>(pageNumber, pageSize);
|
|
291
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
|
292
|
+ queryWrapper.eq("realty_consultant", personId);
|
|
293
|
+ queryWrapper.eq("report_recommend_status", CommConstant.REPORTED);
|
288
|
294
|
queryWrapper.orderByDesc("create_date");
|
289
|
|
- IPage<TaRecommendCustomer>result = taRecommendCustomerService.page(pg,queryWrapper);
|
|
295
|
+ IPage<TaRecommendCustomer> result = taRecommendCustomerService.page(pg, queryWrapper);
|
290
|
296
|
return ResponseBean.success(result);
|
291
|
|
- }catch (Exception e){
|
|
297
|
+ } catch (Exception e) {
|
292
|
298
|
e.printStackTrace();
|
293
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
299
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
294
|
300
|
}
|
295
|
301
|
}
|
296
|
302
|
|
297
|
303
|
|
298
|
|
- // 客户列表 公客/私客
|
|
304
|
+ /**
|
|
305
|
+ * 客户列表 公客/私客
|
|
306
|
+ *
|
|
307
|
+ * @param request
|
|
308
|
+ * @param name
|
|
309
|
+ * @param tel
|
|
310
|
+ * @param buildingId
|
|
311
|
+ * @param consultName
|
|
312
|
+ * @param consultTel
|
|
313
|
+ * @param pageNumber
|
|
314
|
+ * @param pageSize
|
|
315
|
+ * @param entryType
|
|
316
|
+ * @param verifyStatus
|
|
317
|
+ * @param sex
|
|
318
|
+ * @param customerType
|
|
319
|
+ * @param status
|
|
320
|
+ * @param sceneType
|
|
321
|
+ * @param startCreateDate
|
|
322
|
+ * @param endCreateDate
|
|
323
|
+ * @param belongStatus 是否归属项目 1是 0否
|
|
324
|
+ * @param sharePersonName
|
|
325
|
+ * @return
|
|
326
|
+ */
|
299
|
327
|
@GetMapping("/admin/customer/recommend")
|
300
|
|
- public ResponseBean getCustomerList (HttpServletRequest request,
|
301
|
|
- @RequestParam(value ="name",required = false) String name,
|
302
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
303
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
304
|
|
- @RequestParam(value ="consultName",required = false) String consultName,
|
305
|
|
- @RequestParam(value ="consultTel",required = false) String consultTel,
|
306
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
307
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
308
|
|
- @RequestParam(value ="entryType",required = false) String entryType,
|
309
|
|
- @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
310
|
|
- @RequestParam(value = "sex",required = false)Integer sex,
|
311
|
|
- @RequestParam(value = "customerType") String customerType,// public 公 private 私
|
312
|
|
- @RequestParam(value = "status",required = false) Integer status,
|
313
|
|
- @RequestParam(value = "sceneType",required = false) String sceneType,
|
314
|
|
- @RequestParam(value = "startCreateDate",required = false) String startCreateDate,
|
315
|
|
- @RequestParam(value = "endCreateDate",required = false) String endCreateDate,
|
316
|
|
- @RequestParam(value = "sharePersonName",required = false) String sharePersonName){
|
317
|
|
- try{
|
|
328
|
+ public ResponseBean getCustomerList(HttpServletRequest request,
|
|
329
|
+ @RequestParam(value = "name", required = false) String name,
|
|
330
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
331
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
|
332
|
+ @RequestParam(value = "consultName", required = false) String consultName,
|
|
333
|
+ @RequestParam(value = "consultTel", required = false) String consultTel,
|
|
334
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
335
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
336
|
+ @RequestParam(value = "entryType", required = false) String entryType,
|
|
337
|
+ @RequestParam(value = "verifyStatus", required = false) String verifyStatus,
|
|
338
|
+ @RequestParam(value = "sex", required = false) Integer sex,
|
|
339
|
+ @RequestParam(value = "customerType") String customerType,// public 公 private 私
|
|
340
|
+ @RequestParam(value = "status", required = false) Integer status,
|
|
341
|
+ @RequestParam(value = "sceneType", required = false) String sceneType,
|
|
342
|
+ @RequestParam(value = "startCreateDate", required = false) String startCreateDate,
|
|
343
|
+ @RequestParam(value = "endCreateDate", required = false) String endCreateDate,
|
|
344
|
+ @RequestParam(value = "belongStatus", required = false) Integer belongStatus,
|
|
345
|
+ @RequestParam(value = "sharePersonName", required = false) String sharePersonName) {
|
|
346
|
+ try {
|
318
|
347
|
|
319
|
348
|
// TODO 目前如果是公客,就取当前操作人员的 buildingId
|
320
|
349
|
// if ("public".equals(customerType)) {
|
|
@@ -327,59 +356,62 @@ public class TaRecommendCustomerController extends BaseController {
|
327
|
356
|
// TaPersonBuilding personBuilding = taPersonBuildingMapper.selectOne(queryWrapper);
|
328
|
357
|
// buildingId = personBuilding.getBuildingId();
|
329
|
358
|
// }
|
330
|
|
- return ResponseBean.success(taRecommendCustomerService.getCustomerList(status,pageNumber,pageSize,buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex, customerType, getOrgId(request),getTaPersonBuildingListByUserId(request),sceneType, startCreateDate, endCreateDate, sharePersonName));
|
331
|
|
- }catch (Exception e){
|
|
359
|
+ return ResponseBean.success(taRecommendCustomerService.getCustomerList(status, pageNumber, pageSize, buildingId, name, tel, consultName,
|
|
360
|
+ consultTel, entryType, verifyStatus, sex, customerType, getOrgId(request), getTaPersonBuildingListByUserId(request), sceneType,
|
|
361
|
+ startCreateDate, endCreateDate, sharePersonName, belongStatus));
|
|
362
|
+ } catch (Exception e) {
|
332
|
363
|
e.printStackTrace();
|
333
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
364
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
334
|
365
|
}
|
335
|
366
|
}
|
336
|
367
|
|
337
|
368
|
|
338
|
369
|
//推荐客户列表
|
339
|
370
|
@GetMapping("/admin/customer/recommend/recommender")
|
340
|
|
- public ResponseBean getRecCustomerList (HttpServletRequest request,
|
341
|
|
- @RequestParam(value ="name",required = false) String name,
|
342
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
343
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
344
|
|
- @RequestParam(value ="consultName",required = false) String consultName,
|
345
|
|
- @RequestParam(value ="consultTel",required = false) String consultTel,
|
346
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
347
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
348
|
|
- @RequestParam(value ="entryType",required = false) String entryType,
|
349
|
|
- @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
350
|
|
- @RequestParam(value = "sex",required = false)Integer sex){
|
351
|
|
- try{
|
352
|
|
- return ResponseBean.success(taRecommendCustomerService.getRecCustomerList(pageNumber,pageSize,buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex, getOrgId(request),getTaPersonBuildingListByUserId(request)));
|
353
|
|
- }catch (Exception e){
|
|
371
|
+ public ResponseBean getRecCustomerList(HttpServletRequest request,
|
|
372
|
+ @RequestParam(value = "name", required = false) String name,
|
|
373
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
374
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
|
375
|
+ @RequestParam(value = "consultName", required = false) String consultName,
|
|
376
|
+ @RequestParam(value = "consultTel", required = false) String consultTel,
|
|
377
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
378
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
379
|
+ @RequestParam(value = "entryType", required = false) String entryType,
|
|
380
|
+ @RequestParam(value = "verifyStatus", required = false) String verifyStatus,
|
|
381
|
+ @RequestParam(value = "sex", required = false) Integer sex) {
|
|
382
|
+ try {
|
|
383
|
+ return ResponseBean.success(taRecommendCustomerService.getRecCustomerList(pageNumber, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, getOrgId(request), getTaPersonBuildingListByUserId(request)));
|
|
384
|
+ } catch (Exception e) {
|
354
|
385
|
e.printStackTrace();
|
355
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
386
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
356
|
387
|
}
|
357
|
388
|
}
|
358
|
389
|
|
359
|
390
|
//报备客户列表
|
360
|
391
|
@GetMapping("/admin/customer/recommend/report")
|
361
|
|
- public ResponseBean getRepCustomerList (@RequestParam(value ="name",required = false) String name,
|
362
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
363
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
364
|
|
- @RequestParam(value ="consultName",required = false) String consultName,
|
365
|
|
- @RequestParam(value ="consultTel",required = false) String consultTel,
|
366
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
367
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
368
|
|
- @RequestParam(value ="entryType",required = false) String entryType,
|
369
|
|
- @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
370
|
|
- @RequestParam(value = "sex",required = false)Integer sex, HttpServletRequest request){
|
|
392
|
+ public ResponseBean getRepCustomerList(@RequestParam(value = "name", required = false) String name,
|
|
393
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
394
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
|
395
|
+ @RequestParam(value = "consultName", required = false) String consultName,
|
|
396
|
+ @RequestParam(value = "consultTel", required = false) String consultTel,
|
|
397
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
398
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
399
|
+ @RequestParam(value = "entryType", required = false) String entryType,
|
|
400
|
+ @RequestParam(value = "verifyStatus", required = false) String verifyStatus,
|
|
401
|
+ @RequestParam(value = "sex", required = false) Integer sex, HttpServletRequest request) {
|
371
|
402
|
Integer orgid = getOrgId(request);
|
372
|
|
- try{
|
373
|
|
- return ResponseBean.success(taRecommendCustomerService.getRepCustomerList(pageNumber,pageSize,buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex, orgid,getTaPersonBuildingListByUserId(request)));
|
374
|
|
- }catch (Exception e){
|
|
403
|
+ try {
|
|
404
|
+ return ResponseBean.success(taRecommendCustomerService.getRepCustomerList(pageNumber, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgid, getTaPersonBuildingListByUserId(request)));
|
|
405
|
+ } catch (Exception e) {
|
375
|
406
|
e.printStackTrace();
|
376
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
407
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
377
|
408
|
}
|
378
|
409
|
}
|
379
|
410
|
|
380
|
411
|
|
381
|
412
|
/**
|
382
|
413
|
* 经纪人列表
|
|
414
|
+ *
|
383
|
415
|
* @param name
|
384
|
416
|
* @param tel
|
385
|
417
|
* @param pageNumber
|
|
@@ -387,121 +419,123 @@ public class TaRecommendCustomerController extends BaseController {
|
387
|
419
|
* @return
|
388
|
420
|
*/
|
389
|
421
|
@GetMapping("/admin/customer/agents")
|
390
|
|
- public ResponseBean getIndependentAgents (HttpServletRequest request,
|
391
|
|
- @RequestParam(value ="name",required = false) String name,
|
392
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
393
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
394
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
395
|
|
- try{
|
396
|
|
- return ResponseBean.success(taRecommendCustomerService.getIndependentAgents(pageNumber,pageSize,name,tel, getOrgId(request)));
|
397
|
|
- }catch (Exception e){
|
|
422
|
+ public ResponseBean getIndependentAgents(HttpServletRequest request,
|
|
423
|
+ @RequestParam(value = "name", required = false) String name,
|
|
424
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
425
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
426
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
427
|
+ try {
|
|
428
|
+ return ResponseBean.success(taRecommendCustomerService.getIndependentAgents(pageNumber, pageSize, name, tel, getOrgId(request)));
|
|
429
|
+ } catch (Exception e) {
|
398
|
430
|
e.printStackTrace();
|
399
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
431
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
400
|
432
|
}
|
401
|
433
|
}
|
402
|
434
|
|
403
|
435
|
/**
|
404
|
436
|
* 分配置业顾问
|
405
|
437
|
*/
|
406
|
|
- @RequestMapping(value="/admin/customer/consultant/assist/{personId}",method= RequestMethod.POST)
|
407
|
|
- public ResponseBean assistConsultant (@RequestBody TaUser taUser, @PathVariable String personId, HttpServletRequest request){
|
408
|
|
- try{
|
|
438
|
+ @RequestMapping(value = "/admin/customer/consultant/assist/{personId}", method = RequestMethod.POST)
|
|
439
|
+ public ResponseBean assistConsultant(@RequestBody TaUser taUser, @PathVariable String personId, HttpServletRequest request) {
|
|
440
|
+ try {
|
409
|
441
|
Integer orgId = getOrgId(request);
|
410
|
442
|
taRecommendCustomerService.consultantAssist(taUser, personId, orgId);
|
411
|
443
|
return ResponseBean.success("");
|
412
|
|
- }catch (Exception e){
|
|
444
|
+ } catch (Exception e) {
|
413
|
445
|
e.printStackTrace();
|
414
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
446
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
415
|
447
|
}
|
416
|
448
|
}
|
417
|
449
|
|
418
|
450
|
/**
|
419
|
451
|
* 批量分配置业顾问
|
420
|
452
|
*/
|
421
|
|
- @RequestMapping(value="/admin/customer/consultant/batchAssist",method= RequestMethod.POST)
|
422
|
|
- public ResponseBean batchAssistConsultant (@RequestBody TaUser taUser, HttpServletRequest request){
|
423
|
|
- if (CollectionUtils.isEmpty(taUser.getPersonIds())){
|
|
453
|
+ @RequestMapping(value = "/admin/customer/consultant/batchAssist", method = RequestMethod.POST)
|
|
454
|
+ public ResponseBean batchAssistConsultant(@RequestBody TaUser taUser, HttpServletRequest request) {
|
|
455
|
+ if (CollectionUtils.isEmpty(taUser.getPersonIds())) {
|
424
|
456
|
return ResponseBean.error("请至少选择一条数据", ResponseBean.ERROR_UNAVAILABLE);
|
425
|
457
|
}
|
426
|
|
- try{
|
|
458
|
+ try {
|
427
|
459
|
Integer orgId = getOrgId(request);
|
428
|
460
|
taRecommendCustomerService.batchConsultantAssist(taUser, orgId);
|
429
|
461
|
return ResponseBean.success("");
|
430
|
|
- }catch (Exception e){
|
|
462
|
+ } catch (Exception e) {
|
431
|
463
|
e.printStackTrace();
|
432
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
464
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
433
|
465
|
}
|
434
|
466
|
}
|
435
|
467
|
|
436
|
468
|
@GetMapping("/admin/customer/recommend/{customerId}")
|
437
|
|
- public ResponseBean getCustomersIRecommended (@RequestParam int pageNumber, @RequestParam int pageSize, @PathVariable String customerId,HttpServletRequest request){
|
|
469
|
+ public ResponseBean getCustomersIRecommended(@RequestParam int pageNumber, @RequestParam int pageSize, @PathVariable String customerId, HttpServletRequest request) {
|
438
|
470
|
Integer orgId = getOrgId(request);
|
439
|
|
- try{
|
440
|
|
- return ResponseBean.success(taRecommendCustomerService.getCustomersIRecommended(pageNumber,pageSize,customerId,orgId,getTaPersonBuildingListByUserId(request)));
|
441
|
|
- }catch (Exception e){
|
|
471
|
+ try {
|
|
472
|
+ return ResponseBean.success(taRecommendCustomerService.getCustomersIRecommended(pageNumber, pageSize, customerId, orgId, getTaPersonBuildingListByUserId(request)));
|
|
473
|
+ } catch (Exception e) {
|
442
|
474
|
e.printStackTrace();
|
443
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
475
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
444
|
476
|
}
|
445
|
477
|
}
|
446
|
478
|
|
447
|
479
|
@GetMapping("/wx/customer/recommend/mine")
|
448
|
|
- public ResponseBean getWxCustomersIRecommended (@RequestParam int pageNumber, @RequestParam int pageSize,HttpServletRequest request){
|
449
|
|
- Integer orgId =getOrgId(request);
|
|
480
|
+ public ResponseBean getWxCustomersIRecommended(@RequestParam int pageNumber, @RequestParam int pageSize, HttpServletRequest request) {
|
|
481
|
+ Integer orgId = getOrgId(request);
|
450
|
482
|
String openid = getOpenId(request);
|
451
|
483
|
List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
452
|
484
|
if (null == taPersons || taPersons.size() != 1) {
|
453
|
485
|
return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
454
|
486
|
}
|
455
|
487
|
TaPerson person = taPersons.get(0);
|
456
|
|
- try{
|
457
|
|
- return ResponseBean.success(taRecommendCustomerService.getCustomersIRecommended(pageNumber,pageSize,person.getPersonId(),orgId,null));
|
458
|
|
- }catch (Exception e){
|
|
488
|
+ try {
|
|
489
|
+ return ResponseBean.success(taRecommendCustomerService.getCustomersIRecommended(pageNumber, pageSize, person.getPersonId(), orgId, null));
|
|
490
|
+ } catch (Exception e) {
|
459
|
491
|
e.printStackTrace();
|
460
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
492
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
461
|
493
|
}
|
462
|
494
|
}
|
463
|
495
|
|
464
|
496
|
|
465
|
|
-
|
466
|
|
- /**
|
|
497
|
+ /**
|
467
|
498
|
* 修改对象
|
|
499
|
+ *
|
468
|
500
|
* @param taRecommendCustomer 实体对象
|
469
|
501
|
* @return
|
470
|
502
|
*/
|
471
|
|
- @RequestMapping(value="/wx/customer/recommend/edit/{customerId}",method= RequestMethod.PUT)
|
|
503
|
+ @RequestMapping(value = "/wx/customer/recommend/edit/{customerId}", method = RequestMethod.PUT)
|
472
|
504
|
public ResponseBean taRecommendCustomerUpdateWx(@PathVariable String customerId,
|
473
|
|
- @RequestBody TaRecommendCustomer taRecommendCustomer){
|
|
505
|
+ @RequestBody TaRecommendCustomer taRecommendCustomer) {
|
474
|
506
|
ResponseBean responseBean = new ResponseBean();
|
475
|
507
|
taRecommendCustomer.setCustomerId(customerId);
|
476
|
508
|
try {
|
477
|
|
- if (taRecommendCustomerService.updateById(taRecommendCustomer)){
|
|
509
|
+ if (taRecommendCustomerService.updateById(taRecommendCustomer)) {
|
478
|
510
|
responseBean.addSuccess(taRecommendCustomer);
|
479
|
|
- }else {
|
|
511
|
+ } else {
|
480
|
512
|
responseBean.addError("fail");
|
481
|
513
|
}
|
482
|
|
- }catch (Exception e){
|
|
514
|
+ } catch (Exception e) {
|
483
|
515
|
e.printStackTrace();
|
484
|
516
|
responseBean.addError(e.getMessage());
|
485
|
517
|
}
|
486
|
518
|
return responseBean;
|
487
|
519
|
}
|
|
520
|
+
|
488
|
521
|
/**
|
489
|
522
|
* 修改对象
|
|
523
|
+ *
|
490
|
524
|
* @param taRecommendCustomer 实体对象
|
491
|
525
|
* @return
|
492
|
526
|
*/
|
493
|
|
- @RequestMapping(value="/admin/customer/recommend/edit/{id}",method= RequestMethod.PUT)
|
|
527
|
+ @RequestMapping(value = "/admin/customer/recommend/edit/{id}", method = RequestMethod.PUT)
|
494
|
528
|
public ResponseBean taRecommendCustomerUpdate(@PathVariable String id,
|
495
|
|
- @RequestBody TaRecommendCustomer taRecommendCustomer){
|
|
529
|
+ @RequestBody TaRecommendCustomer taRecommendCustomer) {
|
496
|
530
|
ResponseBean responseBean = new ResponseBean();
|
497
|
531
|
taRecommendCustomer.setCustomerId(id);
|
498
|
532
|
try {
|
499
|
|
- if (taRecommendCustomerService.updateById(taRecommendCustomer)){
|
|
533
|
+ if (taRecommendCustomerService.updateById(taRecommendCustomer)) {
|
500
|
534
|
responseBean.addSuccess(taRecommendCustomer);
|
501
|
|
- }else {
|
|
535
|
+ } else {
|
502
|
536
|
responseBean.addError("fail");
|
503
|
537
|
}
|
504
|
|
- }catch (Exception e){
|
|
538
|
+ } catch (Exception e) {
|
505
|
539
|
e.printStackTrace();
|
506
|
540
|
responseBean.addError(e.getMessage());
|
507
|
541
|
}
|
|
@@ -536,7 +570,7 @@ public class TaRecommendCustomerController extends BaseController {
|
536
|
570
|
ResponseBean responseBean = new ResponseBean();
|
537
|
571
|
try {
|
538
|
572
|
responseBean.addSuccess(taRecommendCustomerService.getById(customerId));
|
539
|
|
- }catch (Exception e){
|
|
573
|
+ } catch (Exception e) {
|
540
|
574
|
e.printStackTrace();
|
541
|
575
|
responseBean.addError(e.getMessage());
|
542
|
576
|
}
|
|
@@ -549,7 +583,7 @@ public class TaRecommendCustomerController extends BaseController {
|
549
|
583
|
ResponseBean responseBean = new ResponseBean();
|
550
|
584
|
try {
|
551
|
585
|
responseBean.addSuccess(taRecommendCustomerService.getCustomerById(customerId));
|
552
|
|
- }catch (Exception e){
|
|
586
|
+ } catch (Exception e) {
|
553
|
587
|
e.printStackTrace();
|
554
|
588
|
responseBean.addError(e.getMessage());
|
555
|
589
|
}
|
|
@@ -559,14 +593,14 @@ public class TaRecommendCustomerController extends BaseController {
|
559
|
593
|
|
560
|
594
|
@GetMapping(value = "/admin/customer/recommend/get/{id}")
|
561
|
595
|
public ResponseBean getCustomerDetail(@PathVariable String id,
|
562
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
563
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
564
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
|
596
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
597
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
598
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
565
|
599
|
HttpServletRequest request) {
|
566
|
600
|
ResponseBean responseBean = new ResponseBean();
|
567
|
601
|
try {
|
568
|
|
- responseBean.addSuccess(taRecommendCustomerService.getCustomerDetail(id,pageNumber,pageSize,getTaPersonBuildingListByUserId(request),buildingId));
|
569
|
|
- }catch (Exception e){
|
|
602
|
+ responseBean.addSuccess(taRecommendCustomerService.getCustomerDetail(id, pageNumber, pageSize, getTaPersonBuildingListByUserId(request), buildingId));
|
|
603
|
+ } catch (Exception e) {
|
570
|
604
|
e.printStackTrace();
|
571
|
605
|
responseBean.addError(e.getMessage());
|
572
|
606
|
}
|
|
@@ -575,13 +609,13 @@ public class TaRecommendCustomerController extends BaseController {
|
575
|
609
|
|
576
|
610
|
@GetMapping(value = "/admin/customer/recommend/public/get/{id}")
|
577
|
611
|
public ResponseBean getPublicCustomerDetail(@PathVariable String id,
|
578
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
579
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
580
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,HttpServletRequest request) {
|
|
612
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
613
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
614
|
+ @RequestParam(value = "buildingId", required = false) String buildingId, HttpServletRequest request) {
|
581
|
615
|
ResponseBean responseBean = new ResponseBean();
|
582
|
616
|
try {
|
583
|
|
- responseBean.addSuccess(taRecommendCustomerService.getPublicCustomerDetail(id,pageNumber,pageSize,getTaPersonBuildingListByUserId(request),buildingId));
|
584
|
|
- }catch (Exception e){
|
|
617
|
+ responseBean.addSuccess(taRecommendCustomerService.getPublicCustomerDetail(id, pageNumber, pageSize, getTaPersonBuildingListByUserId(request), buildingId));
|
|
618
|
+ } catch (Exception e) {
|
585
|
619
|
e.printStackTrace();
|
586
|
620
|
responseBean.addError(e.getMessage());
|
587
|
621
|
}
|
|
@@ -589,29 +623,30 @@ public class TaRecommendCustomerController extends BaseController {
|
589
|
623
|
}
|
590
|
624
|
|
591
|
625
|
@GetMapping("/admin/customer/recommend/drift")
|
592
|
|
- public ResponseBean getDriftCustomerList (HttpServletRequest request,
|
593
|
|
- @RequestParam(value ="buildingId",defaultValue = "") String buildingId,
|
594
|
|
- @RequestParam(value ="sceneType",defaultValue = "") String sceneType,
|
595
|
|
- @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
|
596
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
597
|
|
- try{
|
598
|
|
- return ResponseBean.success(taPersonService.getDriftCustomerList(pageNumber,pageSize,buildingId, getOrgId(request),sceneType));
|
599
|
|
- }catch (Exception e){
|
|
626
|
+ public ResponseBean getDriftCustomerList(HttpServletRequest request,
|
|
627
|
+ @RequestParam(value = "buildingId", defaultValue = "") String buildingId,
|
|
628
|
+ @RequestParam(value = "sceneType", defaultValue = "") String sceneType,
|
|
629
|
+ @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
|
|
630
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
631
|
+ try {
|
|
632
|
+ return ResponseBean.success(taPersonService.getDriftCustomerList(pageNumber, pageSize, buildingId, getOrgId(request), sceneType));
|
|
633
|
+ } catch (Exception e) {
|
600
|
634
|
e.printStackTrace();
|
601
|
|
- return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
635
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
602
|
636
|
}
|
603
|
637
|
}
|
604
|
638
|
|
605
|
639
|
/**
|
606
|
640
|
* 修改对象
|
|
641
|
+ *
|
607
|
642
|
* @return
|
608
|
643
|
*/
|
609
|
|
- @RequestMapping(value="/admin/customer/recommend/verify/{id}",method= RequestMethod.PUT)
|
|
644
|
+ @RequestMapping(value = "/admin/customer/recommend/verify/{id}", method = RequestMethod.PUT)
|
610
|
645
|
public ResponseBean taRecommendCustomerVerify(@PathVariable String id,
|
611
|
646
|
@RequestParam Integer verifyStatus,
|
612
|
647
|
@RequestParam(required = false) String verifyRemark,
|
613
|
648
|
@RequestParam(required = false) String realtyConsultant,
|
614
|
|
- HttpServletRequest request){
|
|
649
|
+ HttpServletRequest request) {
|
615
|
650
|
if (null == verifyStatus) {
|
616
|
651
|
return ResponseBean.error("审核结果非法", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
617
|
652
|
}
|
|
@@ -619,9 +654,9 @@ public class TaRecommendCustomerController extends BaseController {
|
619
|
654
|
ResponseBean responseBean = new ResponseBean();
|
620
|
655
|
try {
|
621
|
656
|
TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getById(id);
|
622
|
|
- if(null == taRecommendCustomer.getVerifyStatus() || 0 == taRecommendCustomer.getVerifyStatus().intValue()){ // taRecommendCustomer.getVerifyStatus().equals(CommConstant.VERIFY_READY)
|
|
657
|
+ if (null == taRecommendCustomer.getVerifyStatus() || 0 == taRecommendCustomer.getVerifyStatus().intValue()) { // taRecommendCustomer.getVerifyStatus().equals(CommConstant.VERIFY_READY)
|
623
|
658
|
taRecommendCustomer.setVerifyStatus(verifyStatus);
|
624
|
|
- if(!StringUtils.isEmpty(verifyRemark)){
|
|
659
|
+ if (!StringUtils.isEmpty(verifyRemark)) {
|
625
|
660
|
taRecommendCustomer.setVerifyRemark(verifyRemark);
|
626
|
661
|
// if(CommConstant.CUSTOMER_REPORT.equals(taRecommendCustomer.getReportRecommendStatus())){
|
627
|
662
|
// taRecommendCustomer.setRealtyConsultant(taRecommendCustomer.getRecommendPerson());
|
|
@@ -644,7 +679,7 @@ public class TaRecommendCustomerController extends BaseController {
|
644
|
679
|
}
|
645
|
680
|
}
|
646
|
681
|
|
647
|
|
- if (taRecommendCustomerService.updateById(taRecommendCustomer)){
|
|
682
|
+ if (taRecommendCustomerService.updateById(taRecommendCustomer)) {
|
648
|
683
|
|
649
|
684
|
// 审核通过增加积分
|
650
|
685
|
if (CommConstant.VERIFY_AGREE == verifyStatus) {
|
|
@@ -652,14 +687,14 @@ public class TaRecommendCustomerController extends BaseController {
|
652
|
687
|
}
|
653
|
688
|
|
654
|
689
|
responseBean.addSuccess(taRecommendCustomer);
|
655
|
|
- }else {
|
|
690
|
+ } else {
|
656
|
691
|
responseBean.addError("fail");
|
657
|
692
|
}
|
658
|
693
|
} else {
|
659
|
694
|
responseBean.addSuccess("客户已审核");
|
660
|
695
|
}
|
661
|
696
|
|
662
|
|
- }catch (Exception e){
|
|
697
|
+ } catch (Exception e) {
|
663
|
698
|
e.printStackTrace();
|
664
|
699
|
responseBean.addError(e.getMessage());
|
665
|
700
|
}
|
|
@@ -676,7 +711,7 @@ public class TaRecommendCustomerController extends BaseController {
|
676
|
711
|
response.setCharacterEncoding("utf-8");
|
677
|
712
|
response.setHeader("Content-disposition", "attachment;filename=推荐客户.xlsx");
|
678
|
713
|
|
679
|
|
- Integer count = taRecommendCustomerService.getRecCustomerExportCount(getOrgId(request),getTaPersonBuildingListByUserId(request));
|
|
714
|
+ Integer count = taRecommendCustomerService.getRecCustomerExportCount(getOrgId(request), getTaPersonBuildingListByUserId(request));
|
680
|
715
|
|
681
|
716
|
Integer pageCode = 0;
|
682
|
717
|
Integer pageSize = 100;
|
|
@@ -687,10 +722,10 @@ public class TaRecommendCustomerController extends BaseController {
|
687
|
722
|
// 设置 sheet, 同一个sheet只需要设置一次
|
688
|
723
|
WriteSheet writeSheet = EasyExcel.writerSheet("推荐客户").build();
|
689
|
724
|
do {
|
690
|
|
- List<ExcelRecommendCustomer> recCustomerExport = taRecommendCustomerService.getRecCustomerExport(getOrgId(request), pageCode * pageSize, pageSize,getTaPersonBuildingListByUserId(request));
|
|
725
|
+ List<ExcelRecommendCustomer> recCustomerExport = taRecommendCustomerService.getRecCustomerExport(getOrgId(request), pageCode * pageSize, pageSize, getTaPersonBuildingListByUserId(request));
|
691
|
726
|
excelWriter.write(recCustomerExport, writeSheet);
|
692
|
727
|
|
693
|
|
- pageCode ++;
|
|
728
|
+ pageCode++;
|
694
|
729
|
} while (pageCode <= pageCount);
|
695
|
730
|
|
696
|
731
|
/// finish 会帮忙关闭流
|
|
@@ -705,20 +740,20 @@ public class TaRecommendCustomerController extends BaseController {
|
705
|
740
|
@GetMapping("/admin/customer/recommend/report/export")
|
706
|
741
|
public void reportExport(HttpServletRequest request,
|
707
|
742
|
HttpServletResponse response,
|
708
|
|
- @RequestParam(value ="name",required = false) String name,
|
709
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
710
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
711
|
|
- @RequestParam(value ="consultName",required = false) String consultName,
|
712
|
|
- @RequestParam(value ="consultTel",required = false) String consultTel,
|
713
|
|
- @RequestParam(value ="entryType",required = false) String entryType,
|
714
|
|
- @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
715
|
|
- @RequestParam(value = "sex",required = false)Integer sex) throws IOException {
|
|
743
|
+ @RequestParam(value = "name", required = false) String name,
|
|
744
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
745
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
|
746
|
+ @RequestParam(value = "consultName", required = false) String consultName,
|
|
747
|
+ @RequestParam(value = "consultTel", required = false) String consultTel,
|
|
748
|
+ @RequestParam(value = "entryType", required = false) String entryType,
|
|
749
|
+ @RequestParam(value = "verifyStatus", required = false) String verifyStatus,
|
|
750
|
+ @RequestParam(value = "sex", required = false) Integer sex) throws IOException {
|
716
|
751
|
// response.setContentType("application/vnd.ms-excel");
|
717
|
752
|
response.setContentType("application/octet-stream");
|
718
|
753
|
response.setCharacterEncoding("utf-8");
|
719
|
754
|
response.setHeader("Content-disposition", "attachment;filename=报备客户.xlsx");
|
720
|
755
|
|
721
|
|
- Integer count = taRecommendCustomerService.getRepCustomerReportCount(buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex,getOrgId(request),getTaPersonBuildingListByUserId(request));
|
|
756
|
+ Integer count = taRecommendCustomerService.getRepCustomerReportCount(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, getOrgId(request), getTaPersonBuildingListByUserId(request));
|
722
|
757
|
|
723
|
758
|
Integer pageCode = 0;
|
724
|
759
|
Integer pageSize = 100;
|
|
@@ -730,10 +765,10 @@ public class TaRecommendCustomerController extends BaseController {
|
730
|
765
|
WriteSheet writeSheet = EasyExcel.writerSheet("报备客户").build();
|
731
|
766
|
List<ReporRecommendCustomer> recCustomerExport = null;
|
732
|
767
|
do {
|
733
|
|
- recCustomerExport = taRecommendCustomerService.getRepCustomerReportExport(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, getOrgId(request), pageCode * pageSize, pageSize,getTaPersonBuildingListByUserId(request));
|
|
768
|
+ recCustomerExport = taRecommendCustomerService.getRepCustomerReportExport(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, getOrgId(request), pageCode * pageSize, pageSize, getTaPersonBuildingListByUserId(request));
|
734
|
769
|
excelWriter.write(recCustomerExport, writeSheet);
|
735
|
770
|
|
736
|
|
- pageCode ++;
|
|
771
|
+ pageCode++;
|
737
|
772
|
} while (pageCode <= pageCount);
|
738
|
773
|
|
739
|
774
|
/// finish 会帮忙关闭流
|
|
@@ -766,7 +801,7 @@ public class TaRecommendCustomerController extends BaseController {
|
766
|
801
|
recCustomerExport = taRecommendCustomerService.getIndependentAgentsExport(getOrgId(request), pageCode * pageSize, pageSize);
|
767
|
802
|
excelWriter.write(recCustomerExport, writeSheet);
|
768
|
803
|
|
769
|
|
- pageCode ++;
|
|
804
|
+ pageCode++;
|
770
|
805
|
} while (pageCode <= pageCount);
|
771
|
806
|
|
772
|
807
|
/// finish 会帮忙关闭流
|
|
@@ -775,11 +810,11 @@ public class TaRecommendCustomerController extends BaseController {
|
775
|
810
|
}
|
776
|
811
|
|
777
|
812
|
|
778
|
|
-
|
779
|
813
|
// 客户列表 公客/私客
|
780
|
814
|
|
781
|
815
|
/**
|
782
|
816
|
* 导出数据 客户列表 公客/私客
|
|
817
|
+ *
|
783
|
818
|
* @param request
|
784
|
819
|
* @param response
|
785
|
820
|
* @param name
|
|
@@ -792,22 +827,24 @@ public class TaRecommendCustomerController extends BaseController {
|
792
|
827
|
* @param sex
|
793
|
828
|
* @param customerType
|
794
|
829
|
* @param status
|
|
830
|
+ * @param belongStatus 是否归属项目 1是 0否
|
795
|
831
|
* @throws IOException
|
796
|
832
|
*/
|
797
|
833
|
@GetMapping("/admin/customer/recommend/export")
|
798
|
|
- public void getCustomerExportList (HttpServletRequest request,
|
799
|
|
- HttpServletResponse response,
|
800
|
|
- @RequestParam(value ="name",required = false) String name,
|
801
|
|
- @RequestParam(value ="tel",required = false) String tel,
|
802
|
|
- @RequestParam(value ="buildingId",required = false) String buildingId,
|
803
|
|
- @RequestParam(value ="consultName",required = false) String consultName,
|
804
|
|
- @RequestParam(value ="consultTel",required = false) String consultTel,
|
805
|
|
- @RequestParam(value ="entryType",required = false) String entryType,
|
806
|
|
- @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
807
|
|
- @RequestParam(value = "sex",required = false)Integer sex,
|
808
|
|
- @RequestParam(value = "customerType") String customerType,
|
809
|
|
- @RequestParam(value = "status",required = false) Integer status,
|
810
|
|
- @RequestParam(value = "sceneType",required = false) String sceneType) throws IOException { // public 公 private 私
|
|
834
|
+ public void getCustomerExportList(HttpServletRequest request,
|
|
835
|
+ HttpServletResponse response,
|
|
836
|
+ @RequestParam(value = "name", required = false) String name,
|
|
837
|
+ @RequestParam(value = "tel", required = false) String tel,
|
|
838
|
+ @RequestParam(value = "buildingId", required = false) String buildingId,
|
|
839
|
+ @RequestParam(value = "consultName", required = false) String consultName,
|
|
840
|
+ @RequestParam(value = "consultTel", required = false) String consultTel,
|
|
841
|
+ @RequestParam(value = "entryType", required = false) String entryType,
|
|
842
|
+ @RequestParam(value = "verifyStatus", required = false) String verifyStatus,
|
|
843
|
+ @RequestParam(value = "sex", required = false) Integer sex,
|
|
844
|
+ @RequestParam(value = "customerType") String customerType,
|
|
845
|
+ @RequestParam(value = "status", required = false) Integer status,
|
|
846
|
+ @RequestParam(value = "sceneType", required = false) String sceneType,
|
|
847
|
+ @RequestParam(value = "belongStatus", required = false) Integer belongStatus) throws IOException { // public 公 private 私
|
811
|
848
|
|
812
|
849
|
// response.setContentType("application/vnd.ms-excel");
|
813
|
850
|
response.setContentType("application/octet-stream");
|
|
@@ -835,8 +872,8 @@ public class TaRecommendCustomerController extends BaseController {
|
835
|
872
|
// pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
|
836
|
873
|
// List<PublicCustomerExport> publicList = null;
|
837
|
874
|
// do {
|
838
|
|
- List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, entryType, verifyStatus, sex, orgId,consultTel,sceneType,getTaPersonBuildingListByUserId(request));
|
839
|
|
- excelWriter.write(publicList, writeSheet);
|
|
875
|
+ List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, entryType, verifyStatus, sex, orgId, consultTel, sceneType, getTaPersonBuildingListByUserId(request), belongStatus);
|
|
876
|
+ excelWriter.write(publicList, writeSheet);
|
840
|
877
|
|
841
|
878
|
// pageCode ++;
|
842
|
879
|
// } while (pageCode <= pageCount);
|
|
@@ -857,8 +894,8 @@ public class TaRecommendCustomerController extends BaseController {
|
857
|
894
|
// pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
|
858
|
895
|
// List<PrivateCustomerExport> privateList = null;
|
859
|
896
|
// do {
|
860
|
|
- List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,sceneType,getTaPersonBuildingListByUserId(request));
|
861
|
|
- excelWriter.write(privateList, writeSheet);
|
|
897
|
+ List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode * pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId, status, sceneType, getTaPersonBuildingListByUserId(request));
|
|
898
|
+ excelWriter.write(privateList, writeSheet);
|
862
|
899
|
|
863
|
900
|
// pageCode ++;
|
864
|
901
|
// } while (pageCode <= pageCount);
|
|
@@ -869,9 +906,10 @@ public class TaRecommendCustomerController extends BaseController {
|
869
|
906
|
|
870
|
907
|
|
871
|
908
|
}
|
872
|
|
-
|
|
909
|
+
|
873
|
910
|
/**
|
874
|
911
|
* 查询判客工具下的我的客户人数集合
|
|
912
|
+ *
|
875
|
913
|
* @param request
|
876
|
914
|
* @return
|
877
|
915
|
*/
|
|
@@ -881,44 +919,47 @@ public class TaRecommendCustomerController extends BaseController {
|
881
|
919
|
String openid = getOpenId(request);
|
882
|
920
|
return taRecommendCustomerService.getMyCustStatistics(openid);
|
883
|
921
|
}
|
884
|
|
-
|
|
922
|
+
|
885
|
923
|
/**
|
886
|
924
|
* 分页查询判客工具下的我的客户跟进人集合
|
887
|
|
- * 根据type区分 follow 跟进 clinch 成交
|
|
925
|
+ * 根据type区分 follow 跟进 clinch 成交
|
|
926
|
+ *
|
888
|
927
|
* @param request
|
889
|
928
|
* @return
|
890
|
929
|
*/
|
891
|
930
|
@GetMapping("/wx/inventory/customer/statistics/{type}")
|
892
|
931
|
@ApiOperation(value = "查询我的客户人数统计", notes = "查询我的客户人数统计")
|
893
|
932
|
public ResponseBean getMyCustFollows(@PathVariable(value = "type") String type,
|
894
|
|
- @RequestParam(value = "pageNumber",defaultValue = "0") Integer pageNumber,
|
895
|
|
- @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
896
|
|
- @RequestParam(value = "name",required = false) String name,
|
897
|
|
- @RequestParam(value = "phone",required = false) String phone,
|
898
|
|
- @RequestParam(value = "status",required = false) Integer status,
|
899
|
|
- @RequestParam(value = "startReportDate",required = false) String startReportDate,
|
900
|
|
- @RequestParam(value = "endReportDate",required = false) String endReportDate,
|
901
|
|
- @RequestParam(value = "startArrivalDate",required = false) String startArrivalDate,
|
902
|
|
- @RequestParam(value = "endArrivalDate",required = false) String endArrivalDate,
|
|
933
|
+ @RequestParam(value = "pageNumber", defaultValue = "0") Integer pageNumber,
|
|
934
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
935
|
+ @RequestParam(value = "name", required = false) String name,
|
|
936
|
+ @RequestParam(value = "phone", required = false) String phone,
|
|
937
|
+ @RequestParam(value = "status", required = false) Integer status,
|
|
938
|
+ @RequestParam(value = "startReportDate", required = false) String startReportDate,
|
|
939
|
+ @RequestParam(value = "endReportDate", required = false) String endReportDate,
|
|
940
|
+ @RequestParam(value = "startArrivalDate", required = false) String startArrivalDate,
|
|
941
|
+ @RequestParam(value = "endArrivalDate", required = false) String endArrivalDate,
|
903
|
942
|
HttpServletRequest request) {
|
904
|
943
|
String openid = getOpenId(request);
|
905
|
|
- return taRecommendCustomerService.getMyCustFollowOrClinch(pageNumber,pageSize,openid,type,name,phone,status,startReportDate,endReportDate,startArrivalDate,endArrivalDate);
|
|
944
|
+ return taRecommendCustomerService.getMyCustFollowOrClinch(pageNumber, pageSize, openid, type, name, phone, status, startReportDate, endReportDate, startArrivalDate, endArrivalDate);
|
906
|
945
|
}
|
907
|
|
-
|
|
946
|
+
|
908
|
947
|
/**
|
909
|
948
|
* 查询盘客工具下我的客户详情
|
|
949
|
+ *
|
910
|
950
|
* @param request
|
911
|
951
|
* @return
|
912
|
952
|
*/
|
913
|
953
|
@GetMapping("/wx/inventory/customer/{customerId}")
|
914
|
954
|
@ApiOperation(value = "查询客户详情", notes = "查询客户详情")
|
915
|
|
- public ResponseBean getMyCustDetail(@PathVariable(value = "customerId") String customerId,HttpServletRequest request) {
|
|
955
|
+ public ResponseBean getMyCustDetail(@PathVariable(value = "customerId") String customerId, HttpServletRequest request) {
|
916
|
956
|
String openid = getOpenId(request);
|
917
|
|
- return taRecommendCustomerService.getMyCustDetail(customerId,openid);
|
|
957
|
+ return taRecommendCustomerService.getMyCustDetail(customerId, openid);
|
918
|
958
|
}
|
919
|
|
-
|
|
959
|
+
|
920
|
960
|
/**
|
921
|
961
|
* 查询盘客工具下编辑基本信息
|
|
962
|
+ *
|
922
|
963
|
* @param request
|
923
|
964
|
* @return
|
924
|
965
|
*/
|
|
@@ -928,6 +969,25 @@ public class TaRecommendCustomerController extends BaseController {
|
928
|
969
|
@RequestBody TaRecommendCustomer taRecommendCustomer, HttpServletRequest request) {
|
929
|
970
|
String openid = getOpenId(request);
|
930
|
971
|
taRecommendCustomer.setCustomerId(customerId);
|
931
|
|
- return taRecommendCustomerService.updateMyCust(taRecommendCustomer,openid);
|
|
972
|
+ return taRecommendCustomerService.updateMyCust(taRecommendCustomer, openid);
|
|
973
|
+ }
|
|
974
|
+
|
|
975
|
+ /**
|
|
976
|
+ * 校验此职业顾问下有没有私客存在
|
|
977
|
+ * @return
|
|
978
|
+ */
|
|
979
|
+ @GetMapping("/admin/consultant/customer/list")
|
|
980
|
+ public ResponseBean consultantCustomerList(@RequestParam(value = "userId") Integer userId,
|
|
981
|
+ @RequestParam(value = "personId") String personId,
|
|
982
|
+ @RequestParam(value = "buildingId") String buildingId,
|
|
983
|
+ HttpServletRequest request){
|
|
984
|
+ Integer orgId = getOrgId(request);
|
|
985
|
+ try{
|
|
986
|
+ List<TaRecommendCustomer> list = taRecommendCustomerService.getConsultantCustomerList(userId,personId,buildingId,orgId,getTaPersonBuildingListByUserId(request));
|
|
987
|
+ return ResponseBean.success(list);
|
|
988
|
+ }catch (Exception e){
|
|
989
|
+ e.printStackTrace();
|
|
990
|
+ return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
|
|
991
|
+ }
|
932
|
992
|
}
|
933
|
993
|
}
|