Browse Source

Merge remote-tracking branch 'origin/master'

master
21819 2 years ago
parent
commit
444edd2e48
  1. 2
      mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java
  2. 28
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
  3. 3
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java
  4. 10
      mailbox-lan/src/main/java/com/biutag/lan/mapper/PoliceUserMapper.java
  5. 4
      mailbox-lan/src/main/java/com/biutag/lan/service/IMailLabelService.java
  6. 7
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  7. 31
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java
  8. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java
  9. 6
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/MailLabelServiceImpl.java
  10. 162
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java
  11. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/PostServiceImpl.java
  12. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/RoleServiceImpl.java
  13. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/SystemLoginServiceImpl.java
  14. 14
      mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserCreateValidate.java
  15. 8
      mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java
  16. 19
      mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java
  17. 49
      mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserListedVo.java
  18. 16
      mailbox-lan/src/main/resources/mapper/PoliceUserMapper.xml
  19. 1
      sql/240302.sql

2
mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java

@ -12,7 +12,7 @@ import com.biutag.enums.ErrorEnum;
import com.biutag.exception.BusinessException;
import com.biutag.exception.LoginException;
import com.biutag.lan.service.IRoleService;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.util.StringUtils;
import com.biutag.util.YmlUtils;
import jakarta.annotation.Resource;

28
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java

@ -325,6 +325,34 @@ public class MailVo {
*/
private String returnOperate;
private List<String> mailLabels;
/**
* 办理合格情况
*/
private String qualifiedProcessingStatus;
/**
* 问题解决情况
*/
private Boolean problemSolvingStatus;
/**
* 群众回复情况
*/
private String satisfactionStatus;
/**
* 认定办结意见
*/
private String completionComment;
/**
* 无效判定理由
*/
private String invalidationReason;
/**
* 部门会签
*/

3
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java

@ -124,7 +124,8 @@ public class FirstSignFlow extends Flow {
.setMailState(MailState.completion.name())
.setFlowKey(FlowNodeEnum.COMPLETION.getKey())
.setFlowName(FlowNodeEnum.COMPLETION.getFullName())
.setUpdateTime(now);
.setUpdateTime(now)
.setInvalidationReason(invalidationReason);
mailService.save(mail);
// 更新为已办
workService.updateByMunicipal(mailId, Work.State.done.name(), null);

10
mailbox-common/src/main/java/com/biutag/mapper/system/PoliceUserMapper.java → mailbox-lan/src/main/java/com/biutag/lan/mapper/PoliceUserMapper.java

@ -1,8 +1,13 @@
package com.biutag.mapper.system;
package com.biutag.lan.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.core.basics.IBaseMapper;
import com.biutag.entity.system.PoliceUser;
import com.biutag.lan.vo.system.PoliceUserListedVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -25,4 +30,7 @@ public interface PoliceUserMapper extends IBaseMapper<PoliceUser> {
@Select("SELECT id FROM police_user WHERE is_delete=0 AND #{id} = ANY (STRING_TO_ARRAY(role_ids, ','))")
List<Integer> selectChildrenById(Integer id);
Page<PoliceUserListedVo> selectPage(@Param("page") Page<PoliceUser> page, @Param(Constants.WRAPPER) QueryWrapper<PoliceUser> queryWrapper);
}

4
mailbox-lan/src/main/java/com/biutag/lan/service/IMailLabelService.java

@ -1,15 +1,19 @@
package com.biutag.lan.service;
import com.biutag.core.AjaxResult;
import com.biutag.lan.domain.MailLabel;
import com.biutag.lan.validate.system.MailLabelInsertValidate;
import com.biutag.lan.validate.system.MailLabelValidate;
import com.biutag.lan.vo.system.MailLabelVO;
import java.util.Collection;
import java.util.List;
public interface IMailLabelService {
List<MailLabelVO> allLabels();
List<MailLabel> listByIds(Collection<Integer> ids);
AjaxResult<Void> addLabel(MailLabelValidate mailLabel);
void insertLabel(MailLabelInsertValidate mailLabel);

7
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -63,6 +63,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
private final FlowNodeService flowNodeService;
private final IMailLabelService mailLabelService;
@Lazy
@Autowired
private List<Flow> flowNodes;
@ -160,6 +162,11 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
long mainDeptSignTime = flows.stream().filter(item -> item.getFlowKey().contains("_sign") || item.getFlowKey().contains("_distribute")).mapToLong(MailFlow::getConsumingTime).sum();
mailVo.setMainDeptSignTime(mainDeptSignTime);
}
// 信件标签
if (StrUtil.isNotBlank(mail.getMailLabels())) {
List<MailLabel> mailLabels = mailLabelService.listByIds(Arrays.stream(mail.getMailLabels().split(",")).map(Integer::parseInt).collect(Collectors.toList()));
mailVo.setMailLabels(mailLabels.stream().map(MailLabel::getLabelName).collect(Collectors.toList()));
}
return flowDetail;
}

31
mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.biutag.constants.AppConstants;
import com.biutag.entity.setting.DictData;
import com.biutag.enums.RoleEnum;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.validate.system.DeptCreateValidate;
@ -15,7 +16,7 @@ import com.biutag.lan.vo.system.DeptVo;
import com.biutag.entity.system.PoliceUser;
import com.biutag.entity.system.Dept;
import com.biutag.mapper.setting.DictDataMapper;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.mapper.system.DeptMapper;
import com.biutag.util.ListUtils;
import com.biutag.util.StringUtils;
@ -50,21 +51,30 @@ class DeptServiceImpl implements IDeptService {
*/
@Override
public List<DeptVo> all() {
List<Dept> DeptList = deptMapper.selectList(new QueryWrapper<Dept>()
QueryWrapper<Dept> queryWrapper = new QueryWrapper<Dept>()
.gt("pid", 0)
.eq("is_delete", 0)
.orderByAsc((Arrays.asList("sort", "id"))));
.orderByAsc((Arrays.asList("sort", "id")));
Integer roleId = AdminThreadLocal.getRoleId();
Integer deptId = AdminThreadLocal.getDeptId();
if (RoleEnum.SECOND_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.and(query -> {
query.eq("id", deptId).or().eq("pid", deptId);
});
}
if (RoleEnum.THREE_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.eq("id", deptId);
}
List<Dept> DeptList = deptMapper.selectList(queryWrapper);
List<DeptVo> list = new ArrayList<>();
for (Dept dept : DeptList) {
DeptVo vo = new DeptVo();
BeanUtils.copyProperties(dept, vo);
vo.setUpdateTime(TimeUtils.timestampToDate(dept.getUpdateTime()));
vo.setCreateTime(TimeUtils.timestampToDate(dept.getCreateTime()));
list.add(vo);
}
return list;
}
@ -88,7 +98,16 @@ class DeptServiceImpl implements IDeptService {
"like:name:str",
"=:isStop@is_stop:int"
});
Integer roleId = AdminThreadLocal.getRoleId();
Integer deptId = AdminThreadLocal.getDeptId();
if (RoleEnum.SECOND_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.and(query -> {
query.eq("id", deptId).or().eq("pid", deptId);
});
}
if (RoleEnum.THREE_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.eq("id", deptId);
}
List<Dept> DeptList = deptMapper.selectList(queryWrapper);
List<DictData> dictDataList = dictDataMapper.selectList(new QueryWrapper<DictData>()
.select("id,type_id,name,value,remark,sort,status,create_time,update_time")

3
mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java

@ -7,7 +7,6 @@ import com.biutag.constants.AppConstants;
import com.biutag.entity.setting.DictData;
import com.biutag.entity.system.Dept;
import com.biutag.entity.system.PoliceUser;
import com.biutag.entity.system.Post;
import com.biutag.lan.validate.commons.PageValidate;
import com.biutag.lan.service.IDutyService;
import com.biutag.lan.validate.system.DutyCreateValidate;
@ -20,7 +19,7 @@ import com.biutag.entity.system.Duty;
import com.biutag.mapper.system.DutyMapper;
import com.biutag.mapper.setting.DictDataMapper;
import com.biutag.mapper.system.DeptMapper;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.util.StringUtils;
import com.biutag.util.TimeUtils;
import jakarta.annotation.Resource;

6
mailbox-lan/src/main/java/com/biutag/lan/service/impl/MailLabelServiceImpl.java

@ -16,6 +16,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@Service
@ -43,6 +44,11 @@ public class MailLabelServiceImpl implements IMailLabelService {
return result;
}
@Override
public List<MailLabel> listByIds(Collection<Integer> ids) {
return mailLabelMapper.selectBatchIds(ids);
}
/**
* 新增信件标签
*

162
mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java

@ -1,9 +1,9 @@
package com.biutag.lan.service.impl;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.core.PageResult;
@ -12,6 +12,7 @@ import com.biutag.enums.RoleEnum;
import com.biutag.exception.OperateException;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.enums.PostEnums;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.lan.service.IPermService;
import com.biutag.lan.service.IPoliceUserService;
import com.biutag.lan.validate.commons.PageValidate;
@ -23,8 +24,14 @@ import com.biutag.lan.vo.system.PoliceUserDetailVo;
import com.biutag.lan.vo.system.PoliceUserInformVo;
import com.biutag.lan.vo.system.PoliceUserListedVo;
import com.biutag.lan.vo.system.PoliceUserSelvesVo;
import com.biutag.mapper.system.*;
import com.biutag.util.*;
import com.biutag.mapper.system.MenuMapper;
import com.biutag.mapper.system.PoliceDepartMapper;
import com.biutag.mapper.system.PolicePositionMapper;
import com.biutag.mapper.system.PoliceRoleMapper;
import com.biutag.util.StringUtils;
import com.biutag.util.TimeUtils;
import com.biutag.util.ToolUtils;
import com.biutag.util.UrlUtils;
import com.github.yulichang.query.MPJQueryWrapper;
import jakarta.annotation.Resource;
import org.springframework.beans.BeanUtils;
@ -44,14 +51,6 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
@Resource
MenuMapper menuMapper;
@Resource
DeptMapper deptMapper;
@Resource
PostMapper postMapper;
@Resource
RoleMapper roleMapper;
@Resource
PolicePositionMapper policePositionMapper;
@Resource
@ -74,94 +73,25 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
public PageResult<PoliceUserListedVo> list(PageValidate pageValidate, PoliceUserSearchValidate searchValidate) {
Integer page = pageValidate.getPageNo();
Integer limit = pageValidate.getPageSize();
MPJQueryWrapper<PoliceUser> mpjQueryWrapper = new MPJQueryWrapper<>();
mpjQueryWrapper.select("t.id,t.name,t.emp_no, t.phone, t.username,t.nickname,t.avatar," +
"t.post_ids as post,t.role_ids as role,t.dept_ids as dept,t.is_multipoint,t.mobile,t.id_code,t.job,t.job_type," +
"t.is_disable,t.last_login_ip,t.last_login_time,t.create_time,t.update_time")
.eq("t.is_delete", 0)
.orderByDesc(Arrays.asList("t.id", "t.sort"));
policeUserMapper.setSearch(mpjQueryWrapper, searchValidate, new String[]{
"like:empNo@emp_no:str",
"like:name:str",
"like:mobile:str",
"like:idCode@id_code:str"
});
if (StringUtils.isNotNull(searchValidate.getRole())) {
mpjQueryWrapper.in("role_ids", Collections.singletonList(searchValidate.getRole()));
QueryWrapper<PoliceUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StrUtil.isNotBlank(searchValidate.getEmpNo()), "u.emp_no", searchValidate.getEmpNo())
.like(StrUtil.isNotBlank(searchValidate.getName()), "u.name", searchValidate.getName())
.like(StrUtil.isNotBlank(searchValidate.getIdCode()), "u.id_code", searchValidate.getIdCode())
.eq(Objects.nonNull(searchValidate.getRole()), "u.role_ids", searchValidate.getRole())
.eq(StrUtil.isNotBlank(searchValidate.getDeptId()), "u.dept_ids", searchValidate.getDeptId());
Integer roleId = AdminThreadLocal.getRoleId();
Integer deptId = AdminThreadLocal.getDeptId();
if (RoleEnum.SECOND_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.and(query -> {
query.eq("u.dept_ids", deptId).or().eq("d.pid", deptId);
});
}
if (StringUtils.isNotEmpty(searchValidate.getDeptId())&&!"1".equals(searchValidate.getDeptId())) {
//查询当前deptid下的所有机构id
List<String> ids = deptMapper.selectListById(searchValidate.getDeptId());
mpjQueryWrapper.in("dept_ids", ids);
if (RoleEnum.THREE_DEPT_CLASSES.getRoleId().equals(roleId)) {
queryWrapper.eq("u.dept_ids", deptId);
}
IPage<PoliceUserListedVo> iPage = policeUserMapper.selectJoinPage(
new Page<>(page, limit),
PoliceUserListedVo.class,
mpjQueryWrapper);
for (PoliceUserListedVo vo : iPage.getRecords()) {
if (vo.getId().equals(1)) {
vo.setRole("系统管理员");
} else {
if(StringUtils.isNotNull(vo.getRole())) {
List<String> role = new LinkedList<>();
List<Integer> roleIds = ListUtils.stringToListAsInt(vo.getRole(), ",");
if (!roleIds.isEmpty()) {
List<Role> roleList = roleMapper.selectList(new QueryWrapper<Role>()
.select("id,name")
.in("id", roleIds));
for (Role d : roleList) {
role.add(d.getName());
}
}
vo.setRole(ListUtils.listToStringByStr(role, ","));
}
}
if (StringUtils.isNull(vo.getPost()) || vo.getPost().equals("")) {
vo.setPost("");
}else {
List<String> post = new LinkedList<>();
List<Integer> postIds = ListUtils.stringToListAsInt(vo.getPost(), ",");
if (!postIds.isEmpty()) {
List<Post> postList = postMapper.selectList(new QueryWrapper<Post>()
.select("id,name")
.in("id", postIds));
for (Post d : postList) {
post.add(d.getName());
}
}
vo.setPost(ListUtils.listToStringByStr(post, ","));
}
if (StringUtils.isNull(vo.getDept()) || vo.getDept().equals("")) {
vo.setDept("");
} else {
List<String> dept = new LinkedList<>();
List<Integer> deptIds = ListUtils.stringToListAsInt(vo.getDept(), ",");
if (!deptIds.isEmpty()) {
List<Dept> deptList = deptMapper.selectList(new QueryWrapper<Dept>()
.select("id,name")
.in("id", deptIds)
.eq("is_delete", 0));
for (Dept d : deptList) {
dept.add(d.getName());
}
}
vo.setDept(ListUtils.listToStringByStr(dept, ","));
}
vo.setAvatar(UrlUtils.toAbsoluteUrl(vo.getAvatar()));
vo.setCreateTime(TimeUtils.timestampToDate(vo.getCreateTime()));
vo.setUpdateTime(TimeUtils.timestampToDate(vo.getUpdateTime()));
vo.setLastLoginTime(TimeUtils.timestampToDate(vo.getLastLoginTime()));
}
return PageResult.iPageHandle(iPage);
queryWrapper.orderByAsc("d.sort").orderByAsc("u.post_ids");
Page<PoliceUserListedVo> pages = policeUserMapper.selectPage(new Page<>(page, limit), queryWrapper);
return PageResult.iPageHandle(pages);
}
@ -247,9 +177,9 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
// 角色权限
List<String> auths = new LinkedList<>();
if (adminId > 1) {
List<Integer> roleIds = ListUtils.stringToListAsInt(sysAdmin.getRoleIds(), ",");
List<Integer> roleIds = Collections.singletonList(Integer.parseInt(sysAdmin.getRoleIds()));
List<Integer> menuIds = iPermService.selectMenuIdsByRoleId(roleIds);
if (menuIds.size() > 0) {
if (!menuIds.isEmpty()) {
List<Menu> Menus = menuMapper.selectList(new QueryWrapper<Menu>()
.eq("is_disable", 0)
.in("id", menuIds)
@ -297,24 +227,16 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
.eq("id", id)
.eq("is_delete", 0)
.last("limit 1"));
Assert.notNull(sysAdmin, "账号已不存在!");
PoliceUserDetailVo vo = new PoliceUserDetailVo();
BeanUtils.copyProperties(sysAdmin, vo);
if(StringUtils.isNotNull(sysAdmin.getRoleIds())) {
vo.setRoleIds(Integer.parseInt(sysAdmin.getRoleIds()));
}
if(StringUtils.isNotNull(sysAdmin.getDeptIds())) {
vo.setDeptIds(ListUtils.stringToListAsInt(sysAdmin.getDeptIds(), ","));
}
if(StringUtils.isNotNull(sysAdmin.getPostIds())) {
vo.setPostIds(ListUtils.stringToListAsInt(sysAdmin.getPostIds(), ","));
}
vo.setAvatar(UrlUtils.toAbsoluteUrl(sysAdmin.getAvatar()));
vo.setCreateTime(TimeUtils.timestampToDate(sysAdmin.getCreateTime()));
vo.setUpdateTime(TimeUtils.timestampToDate(sysAdmin.getUpdateTime()));
vo.setLastLoginTime(TimeUtils.timestampToDate(sysAdmin.getLastLoginTime()));
vo.setRoleIds(Integer.valueOf(sysAdmin.getRoleIds()));
vo.setDeptIds(Integer.valueOf(sysAdmin.getDeptIds()));
vo.setPostIds(Integer.valueOf(sysAdmin.getPostIds()));
return vo;
}
@ -353,12 +275,12 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
PoliceUser model = new PoliceUser();
model.setRoleIds(ListUtils.listToStringByInt(createValidate.getRoleIds(), ","));
this.batchSaveRoleByEmpNo(createValidate.getEmpNo(),createValidate.getRoleIds());
model.setDeptIds(ListUtils.listToStringByInt(createValidate.getDeptIds(), ","));
this.batchSaveDepartByEmpNo(createValidate.getEmpNo(),createValidate.getDeptIds());
model.setPostIds(ListUtils.listToStringByInt(createValidate.getPostIds(), ","));
this.batchSavePositionByEmpNo(createValidate.getEmpNo(),createValidate.getPostIds());
model.setRoleIds(createValidate.getRoleIds().toString());
this.batchSaveRoleByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getRoleIds()));
model.setDeptIds(createValidate.getDeptIds().toString());
this.batchSaveDepartByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getDeptIds()));
model.setPostIds(createValidate.getPostIds().toString());
this.batchSavePositionByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getPostIds()));
model.setEmpNo(createValidate.getEmpNo());
model.setName(createValidate.getName());
model.setAvatar(avatar);
@ -394,8 +316,6 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
.eq("is_delete", 0)
.last("limit 1")), "账号不存在了!");
Assert.isNull(policeUserMapper.selectOne(new QueryWrapper<PoliceUser>()
.select(field)
.eq("is_delete", 0)
@ -419,15 +339,13 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
}
if(StringUtils.isNotNull(updateValidate.getDeptIds())) {
model.setDeptIds(ListUtils.listToStringByInt(updateValidate.getDeptIds(), ","));
if(!policeUser.getDeptIds().equals(model.getDeptIds())){
this.batchSaveDepartByEmpNo(updateValidate.getEmpNo(),updateValidate.getDeptIds());
this.batchSaveDepartByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getDeptIds()));
}
}
if(StringUtils.isNotNull(updateValidate.getPostIds())) {
model.setPostIds(ListUtils.listToStringByInt(updateValidate.getPostIds(), ","));
if(!policeUser.getPostIds().equals(model.getPostIds())){
this.batchSavePositionByEmpNo(updateValidate.getEmpNo(),updateValidate.getPostIds());
this.batchSavePositionByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getPostIds()));
}
}

2
mailbox-lan/src/main/java/com/biutag/lan/service/impl/PostServiceImpl.java

@ -13,7 +13,7 @@ import com.biutag.lan.vo.system.PostVo;
import com.biutag.core.PageResult;
import com.biutag.entity.system.PoliceUser;
import com.biutag.entity.system.Post;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.mapper.system.PostMapper;
import com.biutag.util.TimeUtils;
import org.springframework.beans.BeanUtils;

3
mailbox-lan/src/main/java/com/biutag/lan/service/impl/RoleServiceImpl.java

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.entity.system.Post;
import com.biutag.lan.service.IPermService;
import com.biutag.lan.service.IRoleService;
import com.biutag.lan.validate.commons.PageValidate;
@ -15,7 +14,7 @@ import com.biutag.lan.vo.system.RoleVo;
import com.biutag.core.PageResult;
import com.biutag.entity.system.PoliceUser;
import com.biutag.entity.system.Role;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.mapper.system.RoleMapper;
import com.biutag.util.TimeUtils;
import org.springframework.beans.BeanUtils;

2
mailbox-lan/src/main/java/com/biutag/lan/service/impl/SystemLoginServiceImpl.java

@ -12,7 +12,7 @@ import com.biutag.entity.system.SystemLogLogin;
import com.biutag.enums.ErrorEnum;
import com.biutag.exception.LoginException;
import com.biutag.exception.OperateException;
import com.biutag.mapper.system.PoliceUserMapper;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.mapper.system.SystemLogLoginMapper;
import com.biutag.util.*;
import com.google.code.kaptcha.Producer;

14
mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserCreateValidate.java

@ -30,17 +30,9 @@ public class PoliceUserCreateValidate implements Serializable {
@ApiModelProperty(value = "姓名", required = true)
private String name;
@NotEmpty(message = "手机号不能为空")
@Length(min = 2, max = 30, message = "手机号必须在2~30个字符内")
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
@ApiModelProperty(value = "手机号", required = true)
private String mobile;
@NotEmpty(message = "身份证不能为空")
@Length(min = 2, max = 18, message = "身份证必须在2~18个字符内")
@ApiModelProperty(value = "身份证", required = true)
private String idCode;
@ -70,12 +62,12 @@ public class PoliceUserCreateValidate implements Serializable {
@NotNull(message = "请选择角色")
@ApiModelProperty(value = "角色ID", required = true)
private List<Integer> roleIds;
private Integer roleIds;
@ApiModelProperty(value = "部门ID")
private List<Integer> deptIds;
private Integer deptIds;
@ApiModelProperty(value = "岗位ID")
private List<Integer> postIds;
private Integer postIds;
}

8
mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java

@ -35,10 +35,6 @@ public class PoliceUserUpdateValidate implements Serializable {
@ApiModelProperty(value = "手机号", required = true)
private String mobile;
@NotEmpty(message = "身份证不能为空")
@Length(min = 2, max = 18, message = "身份证必须在2~18个字符内")
@ApiModelProperty(value = "身份证", required = true)
private String idCode;
@ApiModelProperty(value = "登录密码")
@ -68,9 +64,9 @@ public class PoliceUserUpdateValidate implements Serializable {
private Integer roleIds;
@ApiModelProperty(value = "部门ID")
private List<Integer> deptIds;
private Integer deptIds;
@ApiModelProperty(value = "岗位ID")
private List<Integer> postIds;
private Integer postIds;
}

19
mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java

@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel("管理员详情Vo")
@ -20,11 +19,10 @@ public class PoliceUserDetailVo implements Serializable {
private Integer roleIds;
@ApiModelProperty(value = "部门ID")
private List<Integer> deptIds;
private Integer deptIds;
@ApiModelProperty(value = "岗位ID")
private List<Integer> postIds;
private Integer postIds;
@ApiModelProperty("用户账号")
private String nickname;
@ -63,18 +61,15 @@ public class PoliceUserDetailVo implements Serializable {
private String managerId;
@ApiModelProperty("电话")
private String phone;
@ApiModelProperty("传真号")
private String faxNo;
@ApiModelProperty("职位名称")
private String postTitle;
@ApiModelProperty("工作地址")
private String workAddress;
@ApiModelProperty("账号")
private String account;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("电子邮件")
private String email;
@ApiModelProperty("性别")
private String gender;
@ -83,10 +78,6 @@ public class PoliceUserDetailVo implements Serializable {
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("入职实际")
private String hiredAt;
@ApiModelProperty("类型 0 原始数据 1 协警 2 文员 3 临时工")
private String type;
@ApiModelProperty(value = "多端登录: [0=否, 1=是]")

49
mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserListedVo.java

@ -23,19 +23,17 @@ public class PoliceUserListedVo implements Serializable {
@ApiModelProperty("警号")
private String empNo;
@ApiModelProperty("身份证")
private String idCode;
private String idCode;
@ApiModelProperty("职位名称")
private String displayName;
private String displayName;
@ApiModelProperty("姓名")
private String name;
private String name;
@ApiModelProperty("用户密码")
private String password;
@ApiModelProperty("用户头像")
private String avatar;
@ApiModelProperty("加密盐巴")
private String salt;
@ApiModelProperty("角色主键")
private String roleIds;
@ -49,42 +47,25 @@ public class PoliceUserListedVo implements Serializable {
@ApiModelProperty("排序编号")
private Integer sort;
@ApiModelProperty("岗位主键")
private String districtId;
@ApiModelProperty("工作")
private String job;
@ApiModelProperty("工作类型")
private String jobType;
@ApiModelProperty("未知")
private String managerId;
@ApiModelProperty("电话")
private String phone;
@ApiModelProperty("传真号")
private String faxNo;
private String phone;
@ApiModelProperty("职位名称")
private String postTitle;
@ApiModelProperty("工作地址")
private String workAddress;
private String postTitle;
@ApiModelProperty("账号")
private String account;
private String account;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("电子邮件")
private String email;
private String mobile;
@ApiModelProperty("性别")
private String gender;
private String gender;
@ApiModelProperty("出生年月")
private String birthday;
private String birthday;
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("入职实际")
private String hiredAt;
@ApiModelProperty("类型 0 原始数据 1 协警 2 文员 3 临时工")
private String type;
private String status;
@ApiModelProperty(value = "部门")
private String dept;
@ -92,13 +73,9 @@ public class PoliceUserListedVo implements Serializable {
@ApiModelProperty(value = "角色")
private String role;
@ApiModelProperty(value = "职位")
private String post;
@ApiModelProperty(value = "多端登录: [0=否, 1=是]")
private Integer isMultipoint;
@ApiModelProperty(value = "是否禁用: [0=否, 1=是]")
private Integer isDisable;

16
mailbox-lan/src/main/resources/mapper/PoliceUserMapper.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.lan.mapper.PoliceUserMapper">
<select id="selectPage" resultType="com.biutag.lan.vo.system.PoliceUserListedVo">
select u.id, u.emp_no, u.name, u.id_code, u.phone, r.name role, d.full_name dept, p.name post, u.last_login_time, u.last_login_ip, u.is_disable
from police_user u
left join dept d on u.dept_ids = d.id
left join post p on u.post_ids = p.id
left join role r on u.role_ids = r.id
${ew.getCustomSqlSegment}
</select>
</mapper>

1
sql/240302.sql

@ -0,0 +1 @@
update flow_name set web_components = 'MailApprovalDetail,CompletionDetail' where key = 'completion'
Loading…
Cancel
Save