Browse Source

Merge remote-tracking branch 'origin/dev_resi_export' into develop

master
yinzuomei 3 years ago
parent
commit
e6a0648b42
  1. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java
  2. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  3. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  4. 15
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

9
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java

@ -29,6 +29,15 @@ public class SearchByNameFormDTO implements Serializable {
@NotBlank(message = "columnName不能为空",groups = SearchByCategoryForm.class)
private String columnName;
//id与level是 /epmetuser/statsresiwarn/list 接口的入参
/**
* 组织id
*/
@NotBlank(message = "id不能为空", groups = SearchByCategoryForm.class)
private String id;
@NotBlank(message = "level不能为空", groups = SearchByCategoryForm.class)
private String level;
private String customerId;
private String userId;

7
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -125,7 +125,12 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
* @author zxc
* @date 2021/11/3 2:05 下午
*/
List<SearchByNameResultDTO> searchByName(@Param("name") String name, @Param("columnName") String columnName, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo);
List<SearchByNameResultDTO> searchByName(@Param("name") String name,
@Param("columnName") String columnName,
@Param("level")String level,
@Param("id")String id,
@Param("agencyId") String agencyId,
@Param("pageNo") Integer pageNo);
Set<String> selectUserDemandCode(String icResiUserId);

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -879,7 +879,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
throw new RenException("未查询到当前工作人员所属组织");
}
Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), formDTO.getColumnName(),staffInfo.getAgencyId(), no));
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(),
formDTO.getColumnName(),
formDTO.getLevel(),
formDTO.getId(),
staffInfo.getAgencyId(),
no));
List<SearchByNameResultDTO> result = pageInfo.getList();
if (CollectionUtils.isEmpty(result)) {
return new PageData<>(new ArrayList<>(), pageInfo.getTotal());

15
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -243,7 +243,20 @@
IFNULL(REMARKS,'') AS REMARKS
FROM ic_resi_user
WHERE DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
<if test="level != null and level != ''">
<if test="level=='agency'">
AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%'))
</if>
<if test="level=='grid'">
AND GRID_ID = #{id}
</if>
<if test="level=='neighborHood'">
AND VILLAGE_ID = #{id}
</if>
<if test="level=='building'">
AND BUILD_ID = #{id}
</if>
</if>
<if test="name != null and name != ''">
AND `NAME` LIKE CONCAT('%',#{name},'%')
</if>

Loading…
Cancel
Save