Browse Source

Merge remote-tracking branch 'origin/dev_1118' into dev_1118

dev
李鹏飞 6 years ago
parent
commit
f023d2936e
  1. 17
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/AppMenuDTO.java
  2. 5
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcAppChildNavResultDTO.java
  3. 15
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/AppMenuEntity.java
  4. 4
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml
  5. 45
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserGridRelationDTO.java
  6. 71
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcUserQueryFormDTO.java
  7. 27
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcUserQueryResultDTO.java
  8. 17
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java
  9. 19
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java
  10. 10
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
  11. 30
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
  12. 72
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

17
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/AppMenuDTO.java

@ -55,11 +55,6 @@ public class AppMenuDTO extends TreeNode<SysMenuDTO> implements Serializable {
@NotNull(message = "{sysmenu.pid.require}", groups = DefaultGroup.class)
private Long pid;
/**
* 菜单URL
*/
private String url;
/**
* 类型 0菜单 1按钮
*/
@ -71,11 +66,6 @@ public class AppMenuDTO extends TreeNode<SysMenuDTO> implements Serializable {
*/
private String icon;
/**
* 权限标识sys:menu:save
*/
private String permissions;
/**
* 样式名称
*/
@ -130,4 +120,9 @@ public class AppMenuDTO extends TreeNode<SysMenuDTO> implements Serializable {
@NotBlank(message = "{sysmenu.name.require}", groups = DefaultGroup.class)
private String name;
}
/**
* 是否显示数字 0否 1是
*/
private String numFlag;
}

5
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcAppChildNavResultDTO.java

@ -37,4 +37,9 @@ public class EpdcAppChildNavResultDTO implements Serializable {
* 样式名称
*/
private String className;
/**
* 是否显示数字 0否 1是
*/
private String numFlag;
}

15
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/AppMenuEntity.java

@ -52,11 +52,6 @@ public class AppMenuEntity extends BaseEntity {
@TableField(exist = false)
private String name;
/**
* 菜单URL
*/
private String url;
/**
* 类型 0菜单 1按钮
*/
@ -67,11 +62,6 @@ public class AppMenuEntity extends BaseEntity {
*/
private String icon;
/**
* 权限标识sys:menu:save
*/
private String permissions;
/**
* 样式名称
*/
@ -121,4 +111,9 @@ public class AppMenuEntity extends BaseEntity {
*/
private String templateId;
/**
* 是否显示数字 0否 1是
*/
private String numFlag;
}

4
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml

@ -83,6 +83,7 @@
<result column="remark" property="remark"/>
<result column="icon" property="icon"/>
<result column="className" property="className"/>
<result column="numFlag" property="numFlag"/>
</collection>
</resultMap>
@ -98,7 +99,8 @@
mc.menu_code AS navCode,
mc.class_name AS className,
mc.remark,
mc.icon
mc.icon,
mc.num_flag as numFlag
FROM
sys_app_menu mp
LEFT JOIN sys_language lp ON lp.table_id = mp.id

45
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserGridRelationDTO.java

@ -19,13 +19,14 @@ package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 网格长与网格关系表
*
* @author work@yujt.net.cn
* @author work@yujt.net.cn
* @since v1.0.0 2019-10-23
*/
@Data
@ -36,12 +37,12 @@ public class UserGridRelationDTO implements Serializable {
/**
* 主键
*/
private String id;
private String id;
/**
* 用户ID
*/
private String userId;
private String userId;
/**
* 区县
@ -76,51 +77,71 @@ public class UserGridRelationDTO implements Serializable {
/**
* 所属网格
*/
private String grid;
private String grid;
/**
* 网格ID
*/
private Long gridId;
private Long gridId;
/**
* 最后切换此网格的时间
*/
private Date switchedTime;
private Date switchedTime;
/**
* 乐观锁
*/
private Integer revision;
private Integer revision;
/**
* 创建人
*/
private String createdBy;
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
private Date updatedTime;
/**
* 删除标记
*/
private String delFlag;
private String delFlag;
/**
* 是否是网格长 0否1是
*/
private String leaderFlag;
/***
*所有部门名称
*/
private String allDeptNames;
/***
*所有部门ID
*/
private String allDeptIds;
/***
*父所有部门
*/
private String parentDeptNames;
/***
*父所有部门
*/
private String parentDeptIds;
}

71
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcUserQueryFormDTO.java

@ -0,0 +1,71 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description 居民管理[未认证居民待认证居民已认证居民居民认证失败]页面查询入参DTO
* @Author yinzuomei
* @Date 2019/11/28 15:50
*/
@Data
public class EpdcUserQueryFormDTO implements Serializable {
private static final long serialVersionUID = -6726464735906160180L;
/**
* 姓名
*/
private String realName;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String identityNo;
/**
* 注册开始日期
*/
private String startTime;
/**
* 注册结束日期
*/
private String endTime;
/**
* 是否是党员
*/
private String partyFlag;
/**
* 状态
*/
private String state;
/**
* 当前页码
*/
private int page;
/**
* 每页条数
*/
private int limit;
/**
* 所属机构
*/
private List<String> deptIdList;
/**
* 所属机构字符串
*/
private String deptIdListStr;
}

27
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcUserQueryResultDTO.java

@ -0,0 +1,27 @@
package com.elink.esua.epdc.dto.epdc.result;
import com.elink.esua.epdc.dto.UserDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description 居民管理[未认证居民待认证居民已认证居民居民认证失败]页面查询返参DTO
* @Author yinzuomei
* @Date 2019/11/28 16:13
*/
@Data
public class EpdcUserQueryResultDTO implements Serializable {
private static final long serialVersionUID = -7375391737870073472L;
/**
* 总记录数
*/
private int total;
/**
* 居民信息列表
*/
private List<UserDTO> list;
}

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

@ -27,6 +27,8 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserQueryFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserQueryResultDTO;
import com.elink.esua.epdc.enums.AppUserStatesEnum;
import com.elink.esua.epdc.excel.UserExcel;
import com.elink.esua.epdc.service.UserService;
@ -57,6 +59,19 @@ public class UserController {
return new Result<PageData<UserDTO>>().ok(page);
}
/**
* @param formDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.UserDTO>>
* @Author yinzuomei
* @Description 居民列表[未认证居民待认证居民已认证居民居民认证失败]页面查询方法
* @Date 2019/11/28 16:01
**/
@PostMapping("query")
public Result<EpdcUserQueryResultDTO> query(@RequestBody EpdcUserQueryFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return userService.listUserDTO(formDTO);
}
@GetMapping("{id}")
public Result<UserDTO> get(@PathVariable("id") String id) {
UserDTO data = userService.get(id);
@ -129,4 +144,4 @@ public class UserController {
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcel.class);
}
}
}

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

@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.epdc.form.EpdcUnauthorizedAmountFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserQueryFormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcResidentDetailResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
@ -152,4 +153,22 @@ public interface UserDao extends BaseDao<UserEntity> {
* @date 2019/11/19 13:31
*/
int selectOneAnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto);
/**
* @param formDTO
* @return java.util.List<com.elink.esua.epdc.dto.UserDTO>
* @Author yinzuomei
* @Description 居民列表[未认证居民待认证居民已认证居民居民认证失败]页面查询方法
* @Date 2019/11/28 16:23
**/
List<UserDTO> selectListUserDTO(EpdcUserQueryFormDTO formDTO);
/**
* @param formDTO
* @return int
* @Author yinzuomei
* @Description 居民列表[未认证居民待认证居民已认证居民居民认证失败]页面查询总记录数
* @Date 2019/11/28 16:23
**/
int selectCountOfUserDTO(EpdcUserQueryFormDTO formDTO);
}

10
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java

@ -229,7 +229,7 @@ public interface UserService extends BaseService<UserEntity> {
* @date 2019/11/18 14:00
*/
Result<List<EpdcWorkUserResultDTO>> getWorkUserList(EpdcWorkUserFromDTO workUserFromDto);
/***
* 查询待认证用户数量
* @param fromDto
@ -239,4 +239,12 @@ public interface UserService extends BaseService<UserEntity> {
*/
Result<Integer> getAnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto);
/**
* @param formDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcUserQueryResultDTO>
* @Author yinzuomei
* @Description 居民列表[未认证居民待认证居民已认证居民居民认证失败]页面查询方法
* @Date 2019/11/28 16:17
**/
Result<EpdcUserQueryResultDTO> listUserDTO(EpdcUserQueryFormDTO formDTO);
}

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

@ -58,8 +58,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.validation.constraints.NotBlank;
import java.util.*;
import java.util.stream.Collectors;
/**
* 用户信息表
@ -399,9 +399,13 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
}
}
userGridRel.setUserId(formUserDto.getId());
//修改数据库结构
userGridRel.setAllDeptNames(formUserDto.getStreet()+"-"+formUserDto.getCommunity()+"-"+formUserDto.getGrid());
userGridRel.setAllDeptIds(formUserDto.getStreetId()+","+formUserDto.getCommunityId()+","+formUserDto.getGridId());
userGridRel.setParentDeptNames(formUserDto.getStreet()+"-"+formUserDto.getCommunity());
userGridRel.setParentDeptIds(formUserDto.getStreetId()+","+formUserDto.getCommunityId());
// 用户绑定网格
userGridRelationService.save(userGridRel);
// 组装用户注册信息
EpdcUserRegisterInfoResultDTO resultDto = new EpdcUserRegisterInfoResultDTO();
resultDto.setRegisterState(NumConstant.TWO);
@ -639,4 +643,26 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
public Result<Integer> getAnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto) {
return new Result<Integer>().ok(baseDao.selectOneAnauthorizedAmount(fromDto));
}
/**
* @param formDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcUserQueryResultDTO>
* @Author yinzuomei
* @Description 居民列表[未认证居民待认证居民已认证居民居民认证失败]页面查询方法
* @Date 2019/11/28 16:17
**/
@Override
public Result<EpdcUserQueryResultDTO> listUserDTO(EpdcUserQueryFormDTO formDTO) {
EpdcUserQueryResultDTO data = new EpdcUserQueryResultDTO();
int pageIndex = (formDTO.getPage() - NumConstant.ONE) * formDTO.getLimit();
formDTO.setPage(pageIndex);
if (null != formDTO.getDeptIdList() && formDTO.getDeptIdList().size() > 0) {
formDTO.setDeptIdListStr(formDTO.getDeptIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));
}
List<UserDTO> userDTOList = baseDao.selectListUserDTO(formDTO);
int total = baseDao.selectCountOfUserDTO(formDTO);
data.setTotal(total);
data.setList(userDTOList);
return new Result<EpdcUserQueryResultDTO>().ok(data);
}
}

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

@ -304,4 +304,76 @@
</otherwise>
</choose>
</select>
<!-- 居民列表[未认证居民、待认证居民、已认证居民、居民认证失败]页面查询方法 -->
<select id="selectListUserDTO" parameterType="com.elink.esua.epdc.dto.epdc.form.EpdcUserQueryFormDTO" resultType="com.elink.esua.epdc.dto.UserDTO">
SELECT
u.id,
u.REAL_NAME AS realName,
u.mobile,
u.REGISTER_TIME AS registerTime,
IDENTITY_NO AS identityNo,
address,
state,
PARTY_FLAG AS partyFlag,
u.ALL_DEPT_NAMES AS myGridName
FROM
epdc_user u
WHERE
u.del_flag = '0'
<if test="startTime != '' and endTime != ''">
and u.register_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="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="deptIdListStr != '' and deptIdListStr != null">
and u.ALL_DEPT_IDS=#{deptIdListStr}
</if>
ORDER BY u.register_time desc
LIMIT #{page},#{limit}
</select>
<!-- 居民列表[未认证居民、待认证居民、已认证居民、居民认证失败]页面查询总记录数 -->
<select id="selectCountOfUserDTO" parameterType="com.elink.esua.epdc.dto.epdc.form.EpdcUserQueryFormDTO" resultType="java.lang.Integer">
SELECT
count(u.id) as totalNum
FROM
epdc_user u
WHERE
u.del_flag = '0'
<if test="startTime != '' and endTime != ''">
and u.register_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="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="deptIdListStr != '' and deptIdListStr != null">
and u.ALL_DEPT_IDS=#{deptIdListStr}
</if>
</select>
</mapper>

Loading…
Cancel
Save