|
|
|
@ -347,20 +347,33 @@ public class TaskController {
|
|
|
|
|
return Result.success(res);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
|
static class CNListParam {
|
|
|
|
|
@Schema(title = "姓名")
|
|
|
|
|
private String name;
|
|
|
|
|
@Schema(title = "手机号")
|
|
|
|
|
private String tel;
|
|
|
|
|
@Schema(title = "车型")
|
|
|
|
|
private String brand;
|
|
|
|
|
@Schema(title = "提交人")
|
|
|
|
|
private String providerName;
|
|
|
|
|
@Schema(title = "部门id")
|
|
|
|
|
private Integer departmentId;
|
|
|
|
|
private Integer pageNum;
|
|
|
|
|
private Integer pageSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "线索搜集列表")
|
|
|
|
|
@PostMapping("/customerNoteList")
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result customerNote(@RequestBody JSONObject obj) {
|
|
|
|
|
public Result customerNote(@RequestBody CNListParam param) {
|
|
|
|
|
QueryWrapper<CustomerActionNote> qw = new QueryWrapper<>();
|
|
|
|
|
String keywords = obj.getString("keywords");
|
|
|
|
|
if (keywords != null) {
|
|
|
|
|
qw.and(
|
|
|
|
|
wrapper ->
|
|
|
|
|
wrapper.like("t1.customerName", keywords).or().like("t3.title", keywords).like("t1.tel", keywords)
|
|
|
|
|
.or().like("t1.area", keywords).or().like("t1.remarks", keywords).or().like("t1.brandList", keywords)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
IPage<Map> iPage = customerActionNoteService.pageList(MybatisPlusUtil.SetPage(obj), null, qw);
|
|
|
|
|
qw.like(param.getName()!=null,"t1.customerName" ,param.getName());
|
|
|
|
|
qw.like(param.getTel()!=null,"t1.tel" ,param.getTel());
|
|
|
|
|
qw.like(param.getBrand()!=null,"t1.brandList" ,param.getBrand());
|
|
|
|
|
qw.like(param.getProviderName()!=null,"t2.name" ,param.getProviderName());
|
|
|
|
|
qw.eq(param.getDepartmentId()!=null,"t4.departmentId" ,param.getDepartmentId());
|
|
|
|
|
IPage<Map> iPage = customerActionNoteService.pageList(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()), null, qw);
|
|
|
|
|
List<Map> records = iPage.getRecords();
|
|
|
|
|
for (Map m : records) {
|
|
|
|
|
if (m.get("brandList") != null) {
|
|
|
|
|