Browse Source

列表查询接口 添加数据查询权限

dev_shibei_match
sunyuchao 4 years ago
parent
commit
b5dad7a41b
  1. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java
  2. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
  3. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
  4. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
  5. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java
  6. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java
  7. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java
  8. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java
  9. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java
  10. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java
  11. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java
  12. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java
  13. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java
  14. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml
  15. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml
  16. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java

@ -49,5 +49,9 @@ public class GetListSocietyOrgFormDTO implements Serializable {
private Integer pageSize = 20;
//token中客户Id
private String customerId;
//token中userId
private String staffId;
//token中userId所属组织的pid
private String pids;
}

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java

@ -92,6 +92,7 @@ public class IcSocietyOrgController {
@PostMapping("getlist")
public Result<GetListSocietyOrgResultDTO> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<GetListSocietyOrgResultDTO>().ok(societyOrgService.getList(formDTO));
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java

@ -115,6 +115,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic
@Override
public GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO) {
GetListSocietyOrgResultDTO resultDTO = new GetListSocietyOrgResultDTO();
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setPids(staffInfoCache.getAgencyPIds());
//1.根据查询条件分页查询社会组织数据
PageInfo<SocietyOrgListResultDTO> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO));

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml

@ -24,6 +24,9 @@
<if test="customerId != null and customerId.trim() != ''">
AND customer_id = #{customerId}
</if>
<if test="pids != null and pids.trim() != ''">
AND pids LIKE CONCAT('%', #{pids}, '%')
</if>
<if test="societyName != null and societyName.trim() != ''">
AND society_name LIKE CONCAT('%', #{societyName}, '%')
</if>

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java

@ -52,5 +52,9 @@ public class GetListPlaceOrgFormDTO implements Serializable {
private String customerId;
//场所Id
private String placeOrgId;
//token中userId
private String staffId;
//token中userId所属组织的pid
private String pids;
}

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java

@ -50,5 +50,9 @@ public class GetListPlacePatrolRecordFormDTO implements Serializable {
private String customerId;
//巡查记录Id
private String placePatrolRecordId;
//token中userId
private String staffId;
//token中userId所属组织的pid
private String pids;
}

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java

@ -50,5 +50,9 @@ public class GetListPlacePatrolTeamFormDTO implements Serializable {
private String customerId;
//场所Id
private String teamId;
//token中userId
private String staffId;
//token中userId所属组织的pid
private String pids;
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java

@ -99,6 +99,7 @@ public class IcPlaceOrgController {
@PostMapping("getlist")
public Result<GetListPlaceOrgResultDTO> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlaceOrgFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<GetListPlaceOrgResultDTO>().ok(placeOrgService.getList(formDTO));
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java

@ -88,6 +88,7 @@ public class IcPlacePatrolRecordController {
@PostMapping("getlist")
public Result<GetListPlacePatrolRecordResultDTO> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolRecordFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<GetListPlacePatrolRecordResultDTO>().ok(placePatrolRecordService.getList(formDTO));
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java

@ -101,6 +101,7 @@ public class IcPlacePatrolTeamController {
@PostMapping("getlist")
public Result<GetListPlacePatrolTeamResultDTO> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolTeamFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<GetListPlacePatrolTeamResultDTO>().ok(placePatrolTeamService.getList(formDTO));
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java

@ -134,6 +134,8 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
@Override
public GetListPlaceOrgResultDTO getList(GetListPlaceOrgFormDTO formDTO) {
GetListPlaceOrgResultDTO resultDTO = new GetListPlaceOrgResultDTO();
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setPids(staffInfoCache.getAgencyPIds());
//1.根据查询条件分页查询场所数据
PageInfo<PlaceOrgDetailResultDTO> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO));

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java

@ -159,6 +159,8 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl<IcPlacePatro
@Override
public GetListPlacePatrolRecordResultDTO getList(GetListPlacePatrolRecordFormDTO formDTO) {
GetListPlacePatrolRecordResultDTO resultDTO = new GetListPlacePatrolRecordResultDTO();
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setPids(staffInfoCache.getAgencyPIds());
//1.根据条件查询巡查记录数据
PageInfo<PlacePatrolRecordDetailResultDTO> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO));

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java

@ -202,6 +202,8 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl<IcPlacePatrolT
@Override
public GetListPlacePatrolTeamResultDTO getList(GetListPlacePatrolTeamFormDTO formDTO) {
GetListPlacePatrolTeamResultDTO resultDTO = new GetListPlacePatrolTeamResultDTO();
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setPids(staffInfoCache.getAgencyPIds());
//1.根据条件查询分队及成员数据
PageInfo<PlacePatrolTeamDetailResultDTO> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO));

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml

@ -25,6 +25,9 @@
<if test="customerId != null and customerId.trim() != ''">
AND a.customer_id = #{customerId}
</if>
<if test="pids != null and pids.trim() != ''">
AND a.pids LIKE CONCAT('%', #{pids}, '%')
</if>
<if test="gridId != null and gridId.trim() != ''">
AND a.grid_id = #{gridId}
</if>

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml

@ -34,6 +34,9 @@
<if test="customerId != null and customerId.trim() != ''">
AND a.customer_id = #{customerId}
</if>
<if test="pids != null and pids.trim() != ''">
AND a.pids LIKE CONCAT('%', #{pids}, '%')
</if>
<if test="gridId != null and gridId.trim() != ''">
AND a.grid_id = #{gridId}
</if>

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml

@ -27,6 +27,9 @@
<if test="customerId != null and customerId.trim() != ''">
AND customer_id = #{customerId}
</if>
<if test="pids != null and pids.trim() != ''">
AND pids LIKE CONCAT('%', #{pids}, '%')
</if>
<if test="gridId != null and gridId.trim() != ''">
AND grid_ids LIKE CONCAT('%', #{gridId}, '%')
</if>

Loading…
Cancel
Save