Browse Source

修改待认证党员导出异常

feature/dangjian
liuchuang 6 years ago
parent
commit
e1aea43424
  1. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java
  2. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java
  3. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
  4. 41
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java

@ -209,7 +209,7 @@ public class UserController {
* @since 2020/3/24 16:00
*/
@GetMapping("exportWaitParty")
@DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND")
@DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND")
public void exportWaitParty(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserDTO> list = userService.listOfWaitParty(params);
ExcelUtils.exportExcelToTarget(response, "待认证党员", list, UserExcel.class);

11
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java

@ -210,4 +210,15 @@ public interface UserDao extends BaseDao<UserEntity> {
*/
List<UserDTO> selectAuthenticatedListUserDto(Map<String, Object> params);
/**
*
* 待认证居民
*
* @params [params]
* @return java.util.List<com.elink.esua.epdc.dto.UserDTO>
* @author liuchuang
* @since 2020/4/1 18:26
*/
List<UserDTO> selectWaitAuthenticatedListUserDto(Map<String, Object> params);
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java

@ -1281,9 +1281,15 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
}
this.verifyParams(params);
// 查询当前用户所具有的的数据权限
IPage<UserDTO> iPage = this.getPage(params);
List<UserDTO> userDtoList = this.baseDao.selectAuthenticatedListUserDto(params);
return new PageData<>(userDtoList, iPage.getTotal());
if (NumConstant.ONE_STR.equals(params.get("state").toString())) {
IPage<UserDTO> iPage = this.getPage(params);
List<UserDTO> userDtoList = this.baseDao.selectWaitAuthenticatedListUserDto(params);
return new PageData<>(userDtoList, iPage.getTotal());
} else {
IPage<UserDTO> iPage = this.getPage(params);
List<UserDTO> userDtoList = this.baseDao.selectAuthenticatedListUserDto(params);
return new PageData<>(userDtoList, iPage.getTotal());
}
}
/**

41
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

@ -454,6 +454,47 @@
<select id="selectAuthenticatedListUserDto" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT
u.id,
u.REAL_NAME,
u.NICKNAME,
u.MOBILE,
u.REGISTER_TIME,
u.CREATED_TIME,
IDENTITY_NO,
ADDRESS,
STATE,
PARTY_FLAG,
u.ALL_DEPT_NAMES,
u.FACE_IMG
FROM
epdc_user u
where
u.del_flag = '0'
<if test="startTime != '' and endTime != ''">and u.CREATED_TIME between #{startTime} and #{endTime}</if>
<if test="state != '' and state != null">and u.state = #{state}</if>
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if>
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if>
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if>
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if>
<if test="partyFlag != '' and partyFlag != null">and u.party_flag = #{partyFlag}</if>
<if test="streetId != '' and streetId != null">
AND (find_in_set(#{streetId},u.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},u.ALL_DEPT_IDS))
</if>
<if test="communityId != '' and communityId != null">
AND (find_in_set(#{communityId},u.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},u.ALL_DEPT_IDS))
</if>
<if test="gridId != '' and gridId != null">
AND
find_in_set(#{gridId},u.ALL_DEPT_IDS)
</if>
ORDER BY
u.register_time desc
</select>
<select id="selectWaitAuthenticatedListUserDto" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT
u.id,
u.REAL_NAME,

Loading…
Cancel
Save