fix:79999
This commit is contained in:
+22
@@ -63,6 +63,28 @@ public class LawsContactManageController extends JeroController<LawsContactManag
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsContactManage
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "联络人管理合并联络人-分页列表查询")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value="联络人管理合并联络人-分页列表查询", notes="联络人管理合并联络人-分页列表查询")
|
||||
@GetMapping(value = "/pageMerge")
|
||||
@RequiresPermissions("system:contactManage:search")
|
||||
public Result<IPage<LawsContactManage>> pageMerge(LawsContactManage lawsContactManage,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<LawsContactManage> pageList = lawsContactManageService.queryPageMerge(lawsContactManage, pageNo, pageSize, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
+11
@@ -26,6 +26,17 @@ public interface ILawsContactManageService extends IService<LawsContactManage> {
|
||||
*/
|
||||
IPage<LawsContactManage> queryPage(LawsContactManage lawsContactManage, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param lawsContactManage
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<LawsContactManage> queryPageMerge(LawsContactManage lawsContactManage, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
+31
@@ -65,6 +65,37 @@ public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageM
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param lawsContactManage
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<LawsContactManage> queryPageMerge(LawsContactManage lawsContactManage, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsContactManage> queryWrapper = QueryGenerator.initQueryWrapper(lawsContactManage, req.getParameterMap());
|
||||
queryWrapper.select("group_concat(id) as id, group_concat(create_by) as create_by, max(create_time) as create_time, " +
|
||||
"group_concat(update_by) as update_by, max(update_time) as update_time, group_concat(org_code) as org_code," +
|
||||
" group_concat(depart_name) as depart_name, group_concat(depart_id) as depart_id, " +
|
||||
"group_concat(engineer_id) as engineer_id, group_concat(leader_id) as leader_id,contact_id ");
|
||||
String contactId = "contact_id";
|
||||
if (StringUtils.isNotBlank(lawsContactManage.getContact())){
|
||||
List<SysUser> userList = sysUserService.list(new LambdaQueryWrapper<SysUser>()
|
||||
.like(SysUser::getRealname, lawsContactManage.getContact()));
|
||||
if (userList.isEmpty()){
|
||||
return new Page<>(pageNo, pageSize);
|
||||
}
|
||||
queryWrapper.in(contactId, userList.stream().map(SysUser::getId).collect(Collectors.toList()));
|
||||
}
|
||||
queryWrapper.groupBy(contactId);
|
||||
Page<LawsContactManage> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user