Commit 07b940a5 authored by huyuchen's avatar huyuchen

派单审核导出问题修改

parent b040acf4
...@@ -15,7 +15,7 @@ spring: ...@@ -15,7 +15,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: yf_zsk password: yf_zsk
jdbc-url: jdbc:mysql://192.168.0.222:22306/mvp_insurances?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true jdbc-url: jdbc:mysql://119.96.147.6:22306/mvp_insurances?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
ekp: ekp:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
......
...@@ -40,8 +40,6 @@ public interface SysDeptMapper extends BaseMapper<SysDept> { ...@@ -40,8 +40,6 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
*/ */
List<SysDept> listDepts(); List<SysDept> listDepts();
List<String> selectDnList();
SysDept selectCountId(@Param("deptId")Long deptId); SysDept selectCountId(@Param("deptId")Long deptId);
int updateDeptById(@Param("dept") SysDept dept); int updateDeptById(@Param("dept") SysDept dept);
......
...@@ -184,15 +184,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl ...@@ -184,15 +184,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
@Override @Override
public R<Boolean> updateDeptByLdap() { public R<Boolean> updateDeptByLdap() {
List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay(); List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay();
//获取ldap所有的dn
List<String> entryDnList = entryList.stream().map(SearchResultEntry::getDN).collect(Collectors.toList());
//获取本地dept表中所有的dn
List<String> dnList = baseMapper.selectDnList();
List<String> delList = dnList.stream().filter(p-> !entryDnList.contains(p)).collect(Collectors.toList());
//删除ldap中不存在的dn的数据
if (!delList.isEmpty()) {
baseMapper.delete(Wrappers.<SysDept>query().lambda().in(SysDept::getDeptDn, delList));
}
List<Map<String,Object>> updUserList = new ArrayList<>(); List<Map<String,Object>> updUserList = new ArrayList<>();
for (SearchResultEntry entry : entryList) { for (SearchResultEntry entry : entryList) {
String dn = entry.getDN(); String dn = entry.getDN();
......
...@@ -437,15 +437,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -437,15 +437,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
} }
} }
List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay(); List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay();
//获取ldap所有的dn
List<String> entryDnList = entryList.stream().map(SearchResultEntry::getDN).collect(Collectors.toList());
//获取本地dept表中所有的dn
List<String> dnList = sysDeptMapper.selectDnList();
List<String> delList = dnList.stream().filter(p-> !entryDnList.contains(p)).collect(Collectors.toList());
//删除ldap中不存在的dn的数据
if (!delList.isEmpty()) {
sysDeptMapper.delete(Wrappers.<SysDept>query().lambda().in(SysDept::getDeptDn, delList));
}
List<Map<String,Object>> updUserList = new ArrayList<>(); List<Map<String,Object>> updUserList = new ArrayList<>();
for (SearchResultEntry entry : entryList) { for (SearchResultEntry entry : entryList) {
String dn = entry.getDN(); String dn = entry.getDN();
......
...@@ -31,14 +31,6 @@ ...@@ -31,14 +31,6 @@
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
</resultMap> </resultMap>
<!--查询所有dn-->
<select id="selectDnList" resultType="String">
SELECT a.dept_dn
FROM sys_dept a
WHERE a.del_flag = 0
AND a.dept_dn IS NOT NULL
</select>
<select id="selectCountId" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept"> <select id="selectCountId" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept">
SELECT SELECT
* *
...@@ -63,6 +55,7 @@ ...@@ -63,6 +55,7 @@
<if test="dept.name != null">name=#{dept.name},</if> <if test="dept.name != null">name=#{dept.name},</if>
<if test="dept.parentId != null">parent_id=#{dept.parentId},</if> <if test="dept.parentId != null">parent_id=#{dept.parentId},</if>
<if test="dept.deptDn != null">dept_dn=#{dept.deptDn},</if> <if test="dept.deptDn != null">dept_dn=#{dept.deptDn},</if>
del_flag = '0',
update_time = now() update_time = now()
</trim> </trim>
WHERE dept_id=#{dept.deptId} WHERE dept_id=#{dept.deptId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment