Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
a0f3dfad
Commit
a0f3dfad
authored
Sep 19, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险数据权限
parent
babf3321
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
724 additions
and
793 deletions
+724
-793
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+1
-1
PersonAttributesMapper.java
...us/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
+0
-3
LdapUtil.java
...om/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
+11
-18
ldapConfig.properties
...yifu-common-ldap/src/main/resources/ldapConfig.properties
+1
-1
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+2
-7
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+2
-7
InsuranceRefundHandlingParam.java
...s/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
+2
-7
InsuranceRefundParam.java
...loud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
+2
-1
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+2
-5
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+2
-7
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+0
-10
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+638
-684
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+48
-25
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+3
-3
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+5
-7
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+5
-7
No files found.
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
a0f3dfad
...
@@ -10,7 +10,7 @@ import java.util.Date;
...
@@ -10,7 +10,7 @@ import java.util.Date;
@Data
@Data
@ToString
@ToString
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
安徽皖信人力资源管理有限公司
,ou=wanxin"
)
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
皖信人力集团
,ou=wanxin"
)
public
class
PersonVo
{
public
class
PersonVo
{
/**
/**
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
View file @
a0f3dfad
...
@@ -28,9 +28,6 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
...
@@ -28,9 +28,6 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if
(
null
!=
attributes
.
get
(
"ou"
))
{
if
(
null
!=
attributes
.
get
(
"ou"
))
{
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
}
}
if
(
null
!=
attributes
.
get
(
"userPassword"
))
{
personVo
.
setPassword
((
String
)
attributes
.
get
(
"userPassword"
).
get
());
}
return
personVo
;
return
personVo
;
}
}
}
}
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
View file @
a0f3dfad
...
@@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.ldap.core.LdapTemplate
;
import
org.springframework.ldap.core.LdapTemplate
;
import
javax.naming.AuthenticationException
;
import
javax.naming.Context
;
import
javax.naming.Context
;
import
javax.naming.NamingEnumeration
;
import
javax.naming.NamingEnumeration
;
import
javax.naming.NamingException
;
import
javax.naming.NamingException
;
...
@@ -36,7 +35,7 @@ public class LdapUtil {
...
@@ -36,7 +35,7 @@ public class LdapUtil {
private
static
LdapContext
ctx
=
null
;
private
static
LdapContext
ctx
=
null
;
private
static
Control
[]
connCtls
=
null
;
private
static
final
Control
[]
connCtls
=
null
;
/**
/**
* @return List<SearchResultEntry>
* @return List<SearchResultEntry>
...
@@ -45,16 +44,14 @@ public class LdapUtil {
...
@@ -45,16 +44,14 @@ public class LdapUtil {
* @description get请求获取指定对象信息
* @description get请求获取指定对象信息
**/
**/
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
List
<
SearchResultEntry
>
result
=
new
ArrayList
<
SearchResultEntry
>();
List
<
SearchResultEntry
>
result
=
new
ArrayList
<>();
try
{
try
{
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
for
(
SearchResultEntry
entry
:
searchResult
.
getSearchEntries
())
{
result
.
addAll
(
searchResult
.
getSearchEntries
());
result
.
add
(
entry
);
}
}
catch
(
LDAPException
e
)
{
}
catch
(
LDAPException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -62,15 +59,14 @@ public class LdapUtil {
...
@@ -62,15 +59,14 @@ public class LdapUtil {
}
}
public
List
<
PersonVo
>
getAllPersons
()
{
public
List
<
PersonVo
>
getAllPersons
()
{
List
<
PersonVo
>
list
=
ldapTemplate
.
search
(
query
()
return
ldapTemplate
.
search
(
query
()
.
where
(
"objectclass"
).
is
(
"posixAccount"
),
new
PersonAttributesMapper
());
.
where
(
"objectclass"
).
is
(
"posixAccount"
),
new
PersonAttributesMapper
());
return
list
;
}
}
// 校验用户名密码的方法
// 校验用户名密码的方法
public
Boolean
authenticate
(
String
usr
,
String
pwd
)
{
public
Boolean
authenticate
(
String
usr
,
String
pwd
)
{
boolean
valide
=
false
;
boolean
valide
;
if
(
pwd
==
null
||
pwd
==
""
)
if
(
pwd
==
null
||
""
.
equals
(
pwd
)
)
return
false
;
return
false
;
if
(
ctx
==
null
)
{
if
(
ctx
==
null
)
{
getCtx
();
getCtx
();
...
@@ -85,9 +81,6 @@ public class LdapUtil {
...
@@ -85,9 +81,6 @@ public class LdapUtil {
ctx
.
reconnect
(
connCtls
);
ctx
.
reconnect
(
connCtls
);
valide
=
true
;
valide
=
true
;
closeCtx
();
closeCtx
();
}
catch
(
AuthenticationException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
}
catch
(
NamingException
e
)
{
}
catch
(
NamingException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
valide
=
false
;
...
@@ -99,7 +92,7 @@ public class LdapUtil {
...
@@ -99,7 +92,7 @@ public class LdapUtil {
if
(
ctx
!=
null
)
{
if
(
ctx
!=
null
)
{
return
;
return
;
}
}
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<
String
,
String
>();
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<>();
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
PROVIDER_URL
,
"ldap://"
+
ldapProperties
.
getUrl
()
+
":"
+
ldapProperties
.
getPort
()
+
env
.
put
(
Context
.
PROVIDER_URL
,
"ldap://"
+
ldapProperties
.
getUrl
()
+
":"
+
ldapProperties
.
getPort
()
+
"/"
+
ldapProperties
.
getDn
());
"/"
+
ldapProperties
.
getDn
());
...
@@ -120,7 +113,7 @@ public class LdapUtil {
...
@@ -120,7 +113,7 @@ public class LdapUtil {
}
}
public
String
getUserDN
(
String
uid
)
{
public
String
getUserDN
(
String
uid
)
{
String
userDN
=
""
;
String
Builder
userDN
=
new
StringBuilder
()
;
try
{
try
{
SearchControls
constraints
=
new
SearchControls
();
SearchControls
constraints
=
new
SearchControls
();
constraints
.
setSearchScope
(
SearchControls
.
SUBTREE_SCOPE
);
constraints
.
setSearchScope
(
SearchControls
.
SUBTREE_SCOPE
);
...
@@ -129,13 +122,13 @@ public class LdapUtil {
...
@@ -129,13 +122,13 @@ public class LdapUtil {
Object
obj
=
en
.
nextElement
();
Object
obj
=
en
.
nextElement
();
if
(
obj
instanceof
javax
.
naming
.
directory
.
SearchResult
)
{
if
(
obj
instanceof
javax
.
naming
.
directory
.
SearchResult
)
{
javax
.
naming
.
directory
.
SearchResult
si
=
(
javax
.
naming
.
directory
.
SearchResult
)
obj
;
javax
.
naming
.
directory
.
SearchResult
si
=
(
javax
.
naming
.
directory
.
SearchResult
)
obj
;
userDN
+=
si
.
getName
(
);
userDN
.
append
(
si
.
getName
()
);
userDN
+=
","
+
ldapProperties
.
getDn
(
);
userDN
.
append
(
","
).
append
(
ldapProperties
.
getDn
()
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
userDN
;
return
userDN
.
toString
()
;
}
}
}
}
yifu-common/yifu-common-ldap/src/main/resources/ldapConfig.properties
View file @
a0f3dfad
...
@@ -3,4 +3,4 @@ ldap.port=389
...
@@ -3,4 +3,4 @@ ldap.port=389
ldap.userName
=
cn=admin,dc=worfu,dc=com
ldap.userName
=
cn=admin,dc=worfu,dc=com
ldap.password
=
yifu123456!
ldap.password
=
yifu123456!
ldap.dn
=
dc=worfu,dc=com
ldap.dn
=
dc=worfu,dc=com
ldap.baseDn
=
ou=
\u
5B89
\u
5FBD
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
8D44
\u
6E90
\u
7BA1
\u7406\u6709\u9650\u
516C
\u
53F8,ou=wanxin,dc=worfu,dc=com
ldap.baseDn
=
ou=
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
96C6
\u
56E2,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,7 +14,7 @@ import java.util.List;
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
*/
@Data
@Data
@Schema
(
description
=
"导出办理请求参数"
)
@Schema
(
description
=
"导出办理请求参数"
)
public
class
InsuranceExportListParam
implements
Serializable
{
public
class
InsuranceExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
/**
...
@@ -46,12 +47,6 @@ public class InsuranceExportListParam implements Serializable {
...
@@ -46,12 +47,6 @@ public class InsuranceExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
/**
* 购买类型, 1新增、3批增、4替换
* 购买类型, 1新增、3批增、4替换
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,7 +14,7 @@ import java.util.List;
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
*/
@Data
@Data
@Schema
(
description
=
"投保列表请求参数"
)
@Schema
(
description
=
"投保列表请求参数"
)
public
class
InsuranceListParam
implements
Serializable
{
public
class
InsuranceListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4692341622141432288L
;
private
static
final
long
serialVersionUID
=
-
4692341622141432288L
;
/**
/**
...
@@ -70,12 +71,6 @@ public class InsuranceListParam implements Serializable {
...
@@ -70,12 +71,6 @@ public class InsuranceListParam implements Serializable {
@Schema
(
description
=
"项目编码列表"
)
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
private
List
<
String
>
deptNoList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
/**
* 保单办理人
* 保单办理人
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,7 +14,7 @@ import java.io.Serializable;
...
@@ -13,7 +14,7 @@ import java.io.Serializable;
*/
*/
@Data
@Data
@Tag
(
name
=
"减员办理查询条件"
)
@Tag
(
name
=
"减员办理查询条件"
)
public
class
InsuranceRefundHandlingParam
implements
Serializable
{
public
class
InsuranceRefundHandlingParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
...
@@ -77,12 +78,6 @@ public class InsuranceRefundHandlingParam implements Serializable {
...
@@ -77,12 +78,6 @@ public class InsuranceRefundHandlingParam implements Serializable {
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
private
Integer
isOverdue
;
private
Integer
isOverdue
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
/**
* 办理人
* 办理人
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -14,7 +15,7 @@ import java.util.List;
...
@@ -14,7 +15,7 @@ import java.util.List;
*/
*/
@Data
@Data
@Tag
(
name
=
"已减员查询列表参数"
)
@Tag
(
name
=
"已减员查询列表参数"
)
public
class
InsuranceRefundParam
implements
Serializable
{
public
class
InsuranceRefundParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -19,7 +16,7 @@ import java.util.List;
...
@@ -19,7 +16,7 @@ import java.util.List;
*/
*/
@Data
@Data
@Tag
(
name
=
"已投保列表查询条件"
)
@Tag
(
name
=
"已投保列表查询条件"
)
public
class
InsuredParam
implements
Serializable
{
public
class
InsuredParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
a0f3dfad
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,7 +14,7 @@ import java.util.List;
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
*/
@Data
@Data
@Schema
(
description
=
"导出减员办理请求参数"
)
@Schema
(
description
=
"导出减员办理请求参数"
)
public
class
RefundExportListParam
implements
Serializable
{
public
class
RefundExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
/**
...
@@ -52,10 +53,4 @@ public class RefundExportListParam implements Serializable {
...
@@ -52,10 +53,4 @@ public class RefundExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
a0f3dfad
...
@@ -206,16 +206,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
...
@@ -206,16 +206,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
*/
List
<
TInsuranceDetail
>
selectListByEmpIdcardNo
(
String
empIdcardNo
);
List
<
TInsuranceDetail
>
selectListByEmpIdcardNo
(
String
empIdcardNo
);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionSql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail
selectByRegionSql
(
@Param
(
"regionSql"
)
String
regionSql
,
@Param
(
"id"
)
String
id
);
/**
/**
* 商险订单减员列表查询
* 商险订单减员列表查询
*
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
a0f3dfad
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
a0f3dfad
...
@@ -95,6 +95,9 @@
...
@@ -95,6 +95,9 @@
detail.SETTLE_MONTH as settleMonth
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
where detail.DELETE_FLAG = 0
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
and detail.DEPT_NO = #{param.deptNo}
</if>
</if>
...
@@ -137,6 +140,10 @@
...
@@ -137,6 +140,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
</select>
<!--投保不分页查询-->
<!--投保不分页查询-->
...
@@ -218,6 +225,9 @@
...
@@ -218,6 +225,9 @@
detail.SETTLE_TYPE as settleType,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0
where detail.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
and detail.DEPT_NO = #{param.deptNo}
...
@@ -243,9 +253,6 @@
...
@@ -243,9 +253,6 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.HANDLED_BY = #{param.updateBy}
and detail.HANDLED_BY = #{param.updateBy}
</if>
</if>
...
@@ -258,6 +265,10 @@
...
@@ -258,6 +265,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
</select>
<!--通过id查询商险信息-->
<!--通过id查询商险信息-->
...
@@ -365,6 +376,9 @@
...
@@ -365,6 +376,9 @@
detail.POLICY_NO as policyNo,
detail.POLICY_NO as policyNo,
detail.REMARK as remark
detail.REMARK as remark
from t_insurance_detail detail
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
...
@@ -378,9 +392,6 @@
...
@@ -378,9 +392,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.buyType != null"
>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
and detail.BUY_TYPE = #{param.buyType}
</if>
</if>
...
@@ -390,6 +401,10 @@
...
@@ -390,6 +401,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.CREATE_TIME DESC
</select>
</select>
<!--批量更新保单号-->
<!--批量更新保单号-->
...
@@ -428,6 +443,9 @@
...
@@ -428,6 +443,9 @@
detail.BUY_STANDARD as buyStandard
detail.BUY_STANDARD as buyStandard
from
from
t_insurance_detail detail
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
where
detail.DELETE_FLAG = 0
detail.DELETE_FLAG = 0
and
and
...
@@ -481,6 +499,10 @@
...
@@ -481,6 +499,10 @@
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC ,detail.ID ASC
ORDER BY detail.CREATE_TIME DESC ,detail.ID ASC
</select>
</select>
<!-- 已投保列表不分页查询-->
<!-- 已投保列表不分页查询-->
...
@@ -587,6 +609,9 @@
...
@@ -587,6 +609,9 @@
from
from
t_insurance_detail detail,
t_insurance_detail detail,
t_insurance_refund refund
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
where
detail.DELETE_FLAG = 0
detail.DELETE_FLAG = 0
and
and
...
@@ -627,6 +652,10 @@
...
@@ -627,6 +652,10 @@
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
)
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
</select>
<!-- 已减员列表不分页查询-->
<!-- 已减员列表不分页查询-->
...
@@ -721,6 +750,9 @@
...
@@ -721,6 +750,9 @@
from
from
t_insurance_detail detail,
t_insurance_detail detail,
t_insurance_refund refund
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
where
detail.REFUND_ID = refund.ID
detail.REFUND_ID = refund.ID
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
@@ -741,9 +773,6 @@
...
@@ -741,9 +773,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
and refund.UPDATE_BY = #{param.updateBy}
</if>
</if>
...
@@ -756,6 +785,10 @@
...
@@ -756,6 +785,10 @@
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
</select>
<!-- 查询保单列表-->
<!-- 查询保单列表-->
...
@@ -861,6 +894,9 @@
...
@@ -861,6 +894,9 @@
detail.REMARK as remark
detail.REMARK as remark
from
from
t_insurance_detail detail
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
where
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
@@ -878,9 +914,10 @@
...
@@ -878,9 +914,10 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
</if>
<if
test=
"param.
regionSql != null and param.region
Sql.trim() != ''"
>
<if
test=
"param.
authSql != null and param.auth
Sql.trim() != ''"
>
and ${param.region
Sql}
${param.auth
Sql}
</if>
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.CREATE_TIME DESC
</select>
</select>
<!-- 减员办理-->
<!-- 减员办理-->
...
@@ -926,20 +963,6 @@
...
@@ -926,20 +963,6 @@
</where>
</where>
ORDER BY CREATE_TIME desc
ORDER BY CREATE_TIME desc
</select>
</select>
<!--查数据是否存在权限范围内-->
<select
id=
"selectByRegionSql"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
t_insurance_detail detail
<where>
detail.ID = #{id}
<if
test=
"regionSql != null and regionSql.trim() != ''"
>
and ${regionSql}
</if>
</where>
ORDER BY CREATE_TIME desc
</select>
<!--商险订单列表查询-->
<!--商险订单列表查询-->
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
(
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
a0f3dfad
...
@@ -191,7 +191,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
...
@@ -191,7 +191,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
@@ -202,7 +202,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
...
@@ -202,7 +202,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
if
(
size
==
1
)
{
...
@@ -220,7 +220,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
...
@@ -220,7 +220,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
sysDept
.
setName
(
deptName
);
sysDept
.
setName
(
deptName
);
this
.
updateDeptById
(
sysDept
);
this
.
updateDeptById
(
sysDept
);
}
}
}
else
if
(
size
>=
2
)
{
}
else
{
try
{
try
{
SysDept
sysDept
=
this
.
getOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
SysDept
sysDept
=
this
.
getOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
if
(
null
!=
sysDept
)
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
a0f3dfad
...
@@ -380,8 +380,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -380,8 +380,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
// 根据角色名称查询角色ID
// 根据角色名称查询角色ID
List
<
Long
>
roleIdList
=
roleCollList
.
stream
().
map
(
SysRole:
:
getRoleId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
roleIdList
=
roleCollList
.
stream
().
map
(
SysRole:
:
getRoleId
).
collect
(
Collectors
.
toList
());
userDTO
.
setRole
(
roleIdList
);
userDTO
.
setRole
(
roleIdList
);
// List<Long> postIdList = postCollList.stream().map(SysPost::getPostId).collect(Collectors.toList());
// userDTO.setPost(postIdList);
// 插入用户
// 插入用户
this
.
saveUser
(
userDTO
);
this
.
saveUser
(
userDTO
);
}
}
...
@@ -433,10 +431,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -433,10 +431,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
insertList
.
add
(
personVo
);
insertList
.
add
(
personVo
);
}
}
}
}
if
(
updateList
.
size
()
>
0
)
{
if
(
!
updateList
.
isEmpty
()
)
{
sysUserMapper
.
batchUpdateUser
(
updateList
);
sysUserMapper
.
batchUpdateUser
(
updateList
);
}
}
if
(
insertList
.
size
()
>
0
)
{
if
(
!
insertList
.
isEmpty
()
)
{
sysUserMapper
.
batchInsertUser
(
insertList
);
sysUserMapper
.
batchInsertUser
(
insertList
);
}
}
}
}
...
@@ -447,7 +445,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -447,7 +445,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
@@ -458,7 +456,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -458,7 +456,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
if
(
size
==
1
)
{
...
@@ -476,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -476,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysDept
.
setName
(
deptName
);
sysDept
.
setName
(
deptName
);
sysDeptMapper
.
updateById
(
sysDept
);
sysDeptMapper
.
updateById
(
sysDept
);
}
}
}
else
if
(
size
>=
2
)
{
}
else
{
SysDept
sysDept
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
SysDept
sysDept
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
if
(
null
!=
sysDept
)
{
SysDept
sysDeptCount
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
));
SysDept
sysDeptCount
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
));
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
a0f3dfad
...
@@ -210,17 +210,15 @@
...
@@ -210,17 +210,15 @@
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
insert into sys_user
insert into sys_user
(user_id,username,phone,email,
password,nickname,deptId
,create_time)
(user_id,username,phone,email,
nickname
,create_time)
VALUES
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
(
REPLACE(UUID(),"-",""),
REPLACE(UUID(),"-",""),
#{item.uid,jdbcType=VARCHAR},
#{item.uid},
#{item.telephoneNumber,jdbcType=VARCHAR},
#{item.telephoneNumber},
#{item.email,jdbcType=VARCHAR},
#{item.email},
#{item.password,jdbcType=VARCHAR},
#{item.personName},
#{item.personName,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
now()
now()
)
)
</foreach>
</foreach>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment