Commit 2058feef by 涂亚平

人脸识别上线版本

1 parent d2b413ec
...@@ -127,13 +127,13 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -127,13 +127,13 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
StringBuilder fullName = new StringBuilder(); StringBuilder fullName = new StringBuilder();
//fullName 遍历生成全名称 //fullName 遍历生成全名称
do { do {
depNames.add("/"+departmentDictDO.getDepartmentName()); depNames.add("/" + departmentDictDO.getDepartmentName());
departmentDictDO = this.baseMapper.selectById(departmentDictDO.getParentId()); departmentDictDO = this.baseMapper.selectById(departmentDictDO.getParentId());
} while(null != departmentDictDO.getParentId()); } while (null != departmentDictDO.getParentId());
depNames.add(departmentDictDO.getDepartmentName()); depNames.add(departmentDictDO.getDepartmentName());
for (int i = depNames.size()-1; i >=0 ; i--){ for (int i = depNames.size() - 1; i >= 0; i--) {
fullName.append(depNames.get(i)); fullName.append(depNames.get(i));
} }
departmentDictDO1.setFullName(fullName.toString()); departmentDictDO1.setFullName(fullName.toString());
...@@ -189,49 +189,54 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -189,49 +189,54 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
Page pager = new Page(getDepartmentMembersDTO.getPageNum(), getDepartmentMembersDTO.getPageSize()); Page pager = new Page(getDepartmentMembersDTO.getPageNum(), getDepartmentMembersDTO.getPageSize());
if (null != getDepartmentMembersDTO.getDepartmentId()){ if (null != getDepartmentMembersDTO.getDepartmentId()) {
//查询某个部门 //查询某个部门
IPage iPage = memberMapper.getMembers(pager,getDepartmentMembersDTO.getDepartmentId(),getDepartmentMembersDTO.getUserName(),null,getDepartmentMembersDTO.getStartDate(),getDepartmentMembersDTO.getEndDate()); IPage iPage = memberMapper.getMembers(pager, getDepartmentMembersDTO.getDepartmentId(), getDepartmentMembersDTO.getUserName(), null, getDepartmentMembersDTO.getStartDate(), getDepartmentMembersDTO.getEndDate());
return iPage; return iPage;
}else { } else {
//查询整个公司 //查询整个公司
IPage iPage = memberMapper.manageMember(pager,getDepartmentMembersDTO.getCompanyId(),getDepartmentMembersDTO.getUserName(),getDepartmentMembersDTO.getStartDate(),getDepartmentMembersDTO.getEndDate()); IPage iPage = memberMapper.manageMember(pager, getDepartmentMembersDTO.getCompanyId(), getDepartmentMembersDTO.getUserName(), getDepartmentMembersDTO.getStartDate(), getDepartmentMembersDTO.getEndDate());
return iPage; return iPage;
} }
} }
public List<GetMembersVO> getMembers(GetDepartmentMembersDTO getDepartmentMembersDTO){ public List<GetMembersVO> getMembers(GetDepartmentMembersDTO getDepartmentMembersDTO) {
List<GetMembersVO> getMembersVOS = new ArrayList<>(); List<GetMembersVO> getMembersVOS = new ArrayList<>();
GetMembersVO getMembersVO = new GetMembersVO(); // GetMembersVO getMembersVO = new GetMembersVO();
//找到父节点 //找到父节点
DepartmentDictDO departmentDictDO = this.baseMapper.selectOne(new QueryWrapper<DepartmentDictDO>() DepartmentDictDO departmentDictDO = this.baseMapper.selectOne(new QueryWrapper<DepartmentDictDO>()
.lambda() .lambda()
.eq(DepartmentDictDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()) .eq(DepartmentDictDO::getCompanyId, getDepartmentMembersDTO.getCompanyId())
.isNull(DepartmentDictDO::getParentId)); .isNull(DepartmentDictDO::getParentId));
BeanUtils.copyProperties(departmentDictDO,getMembersVO); // BeanUtils.copyProperties(departmentDictDO,getMembersVO);
List<DepartmentDictDO> departmentDictDOS = new ArrayList<>(); // List<DepartmentDictDO> departmentDictDOS = new ArrayList<>();
departmentDictDOS.add(departmentDictDO); // departmentDictDOS.add(departmentDictDO);
for (DepartmentDictDO dpt : departmentDictDOS){ // for (DepartmentDictDO dpt : departmentDictDOS){
GetMembersVO gmv = new GetMembersVO(); GetMembersVO gmv = new GetMembersVO();
BeanUtils.copyProperties(dpt,gmv); BeanUtils.copyProperties(departmentDictDO, gmv);
if (null!=departmentDictDO.getParentId()){ // if (null!=departmentDictDO.getParentId()){
DepartmentDictDO departmentDictDO1 =this.baseMapper.selectById(departmentDictDO.getParentId()); // DepartmentDictDO departmentDictDO1 =this.baseMapper.selectById(departmentDictDO.getParentId());
gmv.setParentDepartmentName(departmentDictDO1.getDepartmentName()); // gmv.setParentDepartmentName(departmentDictDO1.getDepartmentName());
} // }
gmv.setChildren(getChildNodes(gmv)); gmv.setChildren(getChildNodes(gmv));
//父节点人员
List<MemberDO> memberDOS = memberMapper.getMemberWithoutPage(departmentDictDO.getId(), getDepartmentMembersDTO.getUserName(), null, null, null);
if (memberDOS.size() > 0) {
gmv.setMemberDOS(memberDOS);
}
// if (dpt.getParentId()!=null){ // if (dpt.getParentId()!=null){
// //部门人员 // //部门人员
// List<MemberDO> memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null); // List<MemberDO> memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null);
// gmv.setMemberDOS(memberDOS1); // gmv.setMemberDOS(memberDOS1);
// getMembersVOS.add(gmv); // getMembersVOS.add(gmv);
// }else { // }else {
// //公司人员 //公司人员
// List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>() // List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
// .lambda() // .lambda()
// .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId())); // .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()));
...@@ -239,7 +244,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -239,7 +244,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
// getMembersVOS.add(gmv); // getMembersVOS.add(gmv);
// } // }
getMembersVOS.add(gmv); getMembersVOS.add(gmv);
} // }
return getMembersVOS; return getMembersVOS;
} }
...@@ -252,6 +257,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -252,6 +257,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
*/ */
public List<GetMembersVO> getChildNodes(GetMembersVO getMembersVO) { public List<GetMembersVO> getChildNodes(GetMembersVO getMembersVO) {
List<GetMembersVO> getAllDepartmentVOS = new ArrayList<>(); List<GetMembersVO> getAllDepartmentVOS = new ArrayList<>();
//查询该节点的子节点 //查询该节点的子节点
...@@ -263,7 +269,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -263,7 +269,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
for (DepartmentDictDO dd : departmentDictDOS) { for (DepartmentDictDO dd : departmentDictDOS) {
GetMembersVO gmv = new GetMembersVO(); GetMembersVO gmv = new GetMembersVO();
BeanUtils.copyProperties(dd, gmv); BeanUtils.copyProperties(dd, gmv);
if (null!=dd.getParentId()){ if (null != dd.getParentId()) {
DepartmentDictDO departmentDictDO = this.baseMapper.selectById(dd.getParentId()); DepartmentDictDO departmentDictDO = this.baseMapper.selectById(dd.getParentId());
gmv.setParentDepartmentName(departmentDictDO.getDepartmentName()); gmv.setParentDepartmentName(departmentDictDO.getDepartmentName());
} }
...@@ -271,8 +277,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -271,8 +277,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
//部门人员 //部门人员
List<MemberDO> memberDOS = memberMapper.getMemberWithoutPage(dd.getId(),getMembersVO.getUserName(),null,null,null); List<MemberDO> memberDOS = memberMapper.getMemberWithoutPage(dd.getId(), getMembersVO.getUserName(), null, null, null);
if (memberDOS.size()>0){ if (memberDOS.size() > 0) {
gmv.setMemberDOS(memberDOS); gmv.setMemberDOS(memberDOS);
} }
getAllDepartmentVOS.add(gmv); getAllDepartmentVOS.add(gmv);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
spring.server.port=23459 spring.server.port=23459
# 数据源配置 # 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=ykadmin_new spring.datasource.username=ykadmin_new
......
# 环境配置 # 环境配置
spring.profiles.active=dev spring.profiles.active=prod
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100 spring.server.minSpareThreads=100
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<if test="userName !=null and userName !=''"> <if test="userName !=null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
</if> </if>
order by t2.id order by t2.account_name
</select> </select>
<select id="getMemberClassCount" parameterType="long" resultType="long"> <select id="getMemberClassCount" parameterType="long" resultType="long">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!