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
f063f031
Commit
f063f031
authored
Aug 02, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
ea857298
5ac1d4bc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
775 additions
and
823 deletions
+775
-823
EmpProjectDispatchVo.java
.../cloud/plus/v1/yifu/archives/vo/EmpProjectDispatchVo.java
+7
-1
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+2
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+7
-5
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+1
-1
LdapProperties.java
...cloud/plus/v1/yifu/common/ldap/config/LdapProperties.java
+25
-0
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+2
-2
LdapCheck.java
...m/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapCheck.java
+0
-121
LdapUtil.java
...om/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
+17
-20
spring.factories
...-common-ldap/src/main/resources/META-INF/spring.factories
+1
-1
ldapConfig.properties
...yifu-common-ldap/src/main/resources/ldapConfig.properties
+6
-0
MybatisPlusMetaObjectHandler.java
...u/common/mybatis/config/MybatisPlusMetaObjectHandler.java
+5
-5
TInsuranceSettleCancel.java
...lus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
+7
-9
BigDecimalUtils.java
...u/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
+17
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+8
-0
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+9
-3
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+2
-2
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+2
-2
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+252
-73
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+24
-15
TInsuranceSettleCancelMapper.xml
...rc/main/resources/mapper/TInsuranceSettleCancelMapper.xml
+1
-2
TProvidentFund.java
...yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
+14
-0
TSocialInfo.java
...om/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
+14
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+58
-20
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+262
-531
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+0
-1
TProvidentFundMapper.xml
...al-biz/src/main/resources/mapper/TProvidentFundMapper.xml
+5
-1
TSocialInfoMapper.xml
...ocial-biz/src/main/resources/mapper/TSocialInfoMapper.xml
+5
-1
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+7
-4
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+6
-1
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+9
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpProjectDispatchVo.java
View file @
f063f031
...
...
@@ -64,7 +64,13 @@ public class EmpProjectDispatchVo implements Serializable {
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不能为空"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"身份证号"
)
private
String
empIdcard
;
/**
* 项目编码
*/
@NotNull
(
message
=
"项目编码不能为空"
)
@ExcelProperty
(
value
=
"项目编码"
)
@ExcelAttribute
(
name
=
"项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"项目编码不能为空"
,
maxLength
=
20
)
private
String
deptId
;
/**
* 项目编码
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
f063f031
...
...
@@ -469,7 +469,8 @@ public class TEmployeeInfoController {
* @Date: 2022/08/01 18:52
**/
@Operation
(
summary
=
"通过EMP_ID查询人员档案变更日志"
,
description
=
"通过EMP_ID查询人员档案变更日志"
)
@GetMapping
(
"/inner/updateEmpInfo"
)
@Inner
@PostMapping
(
"/inner/updateEmpInfo"
)
public
Boolean
updateEmpInfo
(
@RequestBody
UpdateEmpVo
vo
)
{
return
tEmployeeInfoService
.
updateEmpInfo
(
vo
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
f063f031
...
...
@@ -32,7 +32,6 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
...
...
@@ -2094,14 +2093,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
**/
@Override
public
Boolean
updateEmpInfo
(
UpdateEmpVo
vo
)
{
if
(
Common
.
is
Empty
(
vo
)){
if
(
Common
.
is
Empty
(
vo
.
getEmpIdCard
())){
if
(
Common
.
is
NotNull
(
vo
)){
if
(
Common
.
is
NotNull
(
vo
.
getEmpIdCard
())){
TEmployeeInfo
employeeInfo
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
is
Empty
(
employeeInfo
)){
if
(
Common
.
is
NotNull
(
employeeInfo
)){
employeeInfo
.
setStatus
(
CommonConstants
.
ONE_INT
);
baseMapper
.
updateById
(
employeeInfo
);
}
...
...
@@ -2120,11 +2119,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
if
(
Common
.
isNotNull
(
vo
.
getProjectNo
())){
TEmployeeProject
p
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getProjectNo
())
.
eq
(
TEmployeeProject:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
p
)){
p
.
setStatus
(
CommonConstants
.
ONE_INT
);
tEmployeeProjectService
.
updateById
(
p
);
}
}
...
...
@@ -2162,6 +2163,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract
.
setFileTown
(
emp
.
getFileTown
());
}
}
contract
.
setAuditStatus
(
CommonConstants
.
ONE_INT
);
contract
.
setApplyNo
(
contractServicer
.
getCode
(
false
));
contractServicer
.
save
(
contract
);
contractAdd
.
setId
(
contract
.
getId
());
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
f063f031
...
...
@@ -181,7 +181,7 @@ public class ArchivesDaprUtil {
vo
.
setContractName
(
contractName
);
R
<
Boolean
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
()
,
"/temployeeinfo/inner/updateEmpInfo"
,
JSON
.
toJSONString
(
vo
),
UpdateEmpVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/temployeeinfo/inner/updateEmpInfo"
,
JSON
.
toJSONString
(
vo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"更新人员档案、项目档案、合同状态信息失败!"
);
}
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/config/LdapProperties.java
0 → 100644
View file @
f063f031
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
ldap
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
@Data
@Component
@PropertySource
(
"classpath:ldapConfig.properties"
)
@ConfigurationProperties
(
value
=
"ldap"
,
ignoreInvalidFields
=
false
)
public
class
LdapProperties
{
String
url
;
String
dn
;
String
password
;
Integer
port
;
String
userName
;
String
baseDn
;
}
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
f063f031
...
...
@@ -56,13 +56,13 @@ public class PersonVo {
private
String
homeDirectory
;
/**
*
主键
*
部门名称
*/
@Attribute
(
name
=
"ou"
)
private
String
deptName
;
/**
*
主键
*
用户密码
*/
@Attribute
(
name
=
"userPassword"
)
private
String
password
;
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapCheck.java
deleted
100644 → 0
View file @
ea857298
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
ldap
.
util
;
import
javax.naming.AuthenticationException
;
import
javax.naming.Context
;
import
javax.naming.NamingEnumeration
;
import
javax.naming.NamingException
;
import
javax.naming.directory.SearchControls
;
import
javax.naming.directory.SearchResult
;
import
javax.naming.ldap.Control
;
import
javax.naming.ldap.InitialLdapContext
;
import
javax.naming.ldap.LdapContext
;
import
java.util.Hashtable
;
/**
* 用户登陆认证,LDAP跨域认证,通过LDAP对用户进行更新
*
*/
public
class
LdapCheck
{
private
static
LdapContext
ctx
=
null
;
private
static
Control
[]
connCtls
=
null
;
/**** 定义LDAP的基本连接信息 ******/
// LDAP的连接地址(ldap://ip:port/)port默认为389
private
static
String
URL
=
"192.168.1.65"
;
//port
private
static
String
port
=
"389"
;
// LDAP的根DN
private
static
String
BASEDN
=
"dc=worfu,dc=com"
;
// LDAP的连接账号(身份认证管理平台添加的应用账号,应用账号格式:uid=?,ou=?,dc=????)
private
static
String
PRINCIPAL
=
"cn=admin,dc=worfu,dc=com"
;
// LDAP的连接账号的密码(身份认证管理平台添加的应用账号的密码)
private
static
String
PASSWORD
=
"yifu123456!"
;
// 校验用户名密码的方法
public
static
boolean
authenticate
(
String
usr
,
String
pwd
)
{
boolean
valide
=
false
;
if
(
pwd
==
null
||
pwd
==
""
)
return
false
;
if
(
ctx
==
null
)
{
getCtx
();
}
String
userDN
=
getUserDN
(
usr
);
if
(
""
.
equals
(
userDN
)
||
userDN
==
null
)
{
return
false
;
}
try
{
ctx
.
addToEnvironment
(
Context
.
SECURITY_PRINCIPAL
,
userDN
);
ctx
.
addToEnvironment
(
Context
.
SECURITY_CREDENTIALS
,
pwd
);
ctx
.
reconnect
(
connCtls
);
valide
=
true
;
closeCtx
();
}
catch
(
AuthenticationException
e
)
{
System
.
out
.
println
(
userDN
+
" is not authenticated"
);
System
.
out
.
println
(
e
.
toString
());
valide
=
false
;
}
catch
(
NamingException
e
)
{
System
.
out
.
println
(
userDN
+
" is not authenticated"
);
valide
=
false
;
}
return
valide
;
}
public
static
void
getCtx
()
{
if
(
ctx
!=
null
)
{
return
;
}
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<
String
,
String
>();
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
PROVIDER_URL
,
URL
+
":"
+
port
+
BASEDN
);
env
.
put
(
Context
.
SECURITY_AUTHENTICATION
,
"simple"
);
env
.
put
(
Context
.
SECURITY_PRINCIPAL
,
PRINCIPAL
);
env
.
put
(
Context
.
SECURITY_CREDENTIALS
,
PASSWORD
);
try
{
// 链接ldap
ctx
=
new
InitialLdapContext
(
env
,
connCtls
);
}
catch
(
AuthenticationException
e
)
{
System
.
out
.
println
(
"Authentication faild: "
+
e
.
toString
());
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Something wrong while authenticating: "
+
e
.
toString
());
}
}
public
static
void
closeCtx
()
{
try
{
if
(
ctx
!=
null
)
ctx
.
close
();
}
catch
(
NamingException
ex
)
{
}
}
public
static
String
getUserDN
(
String
uid
)
{
String
userDN
=
""
;
try
{
SearchControls
constraints
=
new
SearchControls
();
constraints
.
setSearchScope
(
SearchControls
.
SUBTREE_SCOPE
);
NamingEnumeration
<?>
en
=
ctx
.
search
(
""
,
"uid="
+
uid
,
constraints
);
if
(
en
==
null
)
{
System
.
out
.
println
(
"Have no NamingEnumeration."
);
}
if
(!
en
.
hasMoreElements
())
{
System
.
out
.
println
(
"Have no element."
);
}
while
(
en
!=
null
&&
en
.
hasMoreElements
())
{
Object
obj
=
en
.
nextElement
();
if
(
obj
instanceof
SearchResult
)
{
SearchResult
si
=
(
SearchResult
)
obj
;
userDN
+=
si
.
getName
();
userDN
+=
","
+
BASEDN
;
}
else
{
System
.
out
.
println
(
obj
);
}
System
.
out
.
println
();
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Exception in search():"
+
e
);
}
return
userDN
;
}
}
\ No newline at end of file
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
View file @
f063f031
...
...
@@ -2,10 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.common.ldap.util;
import
com.unboundid.ldap.sdk.*
;
import
com.unboundid.ldap.sdk.controls.SubentriesRequestControl
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.config.LdapProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.entity.PersonVo
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.mapper.PersonAttributesMapper
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.ldap.core.LdapTemplate
;
import
javax.naming.AuthenticationException
;
...
...
@@ -23,26 +25,19 @@ import java.util.List;
import
static
org
.
springframework
.
ldap
.
query
.
LdapQueryBuilder
.
query
;
@Log4j2
@EnableConfigurationProperties
(
LdapProperties
.
class
)
public
class
LdapUtil
{
@Autowired
private
LdapTemplate
ldapTemplate
;
@Autowired
private
LdapProperties
ldapProperties
;
private
static
LdapContext
ctx
=
null
;
private
static
Control
[]
connCtls
=
null
;
/**** 定义LDAP的基本连接信息 ******/
// LDAP的连接地址(ldap://ip:port/)port默认为389
private
static
String
URL
=
"ldap://192.168.1.65:389/"
;
// LDAP的根DN
private
static
String
BASEDN
=
"dc=worfu,dc=com"
;
// LDAP的连接账号(身份认证管理平台添加的应用账号,应用账号格式:uid=?,ou=?,dc=????)
private
static
String
PRINCIPAL
=
"cn=admin,dc=worfu,dc=com"
;
// LDAP的连接账号的密码(身份认证管理平台添加的应用账号的密码)
private
static
String
PASSWORD
=
"yifu123456!"
;
/**
* @return List<SearchResultEntry>
* @author huyc
...
...
@@ -52,8 +47,9 @@ public class LdapUtil {
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
List
<
SearchResultEntry
>
result
=
new
ArrayList
<
SearchResultEntry
>();
try
{
LDAPConnection
connection
=
new
LDAPConnection
(
"192.168.1.65"
,
389
,
"cn=admin,dc=worfu,dc=com"
,
"yifu123456!"
);
SearchRequest
searchRequest
=
new
SearchRequest
(
"ou=安徽皖信人力资源管理有限公司,ou=wanxin,dc=worfu,dc=com"
,
SearchScope
.
SUB
,
"(objectclass=*)"
);
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
for
(
SearchResultEntry
entry
:
searchResult
.
getSearchEntries
())
{
...
...
@@ -99,16 +95,17 @@ public class LdapUtil {
return
valide
;
}
public
static
void
getCtx
()
{
public
void
getCtx
()
{
if
(
ctx
!=
null
)
{
return
;
}
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<
String
,
String
>();
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
PROVIDER_URL
,
URL
+
BASEDN
);
env
.
put
(
Context
.
PROVIDER_URL
,
"ldap://"
+
ldapProperties
.
getUrl
()
+
":"
+
ldapProperties
.
getPort
()
+
"/"
+
ldapProperties
.
getDn
());
env
.
put
(
Context
.
SECURITY_AUTHENTICATION
,
"simple"
);
env
.
put
(
Context
.
SECURITY_PRINCIPAL
,
PRINCIPAL
);
env
.
put
(
Context
.
SECURITY_CREDENTIALS
,
PASSWORD
);
env
.
put
(
Context
.
SECURITY_PRINCIPAL
,
ldapProperties
.
getUserName
()
);
env
.
put
(
Context
.
SECURITY_CREDENTIALS
,
ldapProperties
.
getPassword
()
);
try
{
// 链接ldap
ctx
=
new
InitialLdapContext
(
env
,
connCtls
);
...
...
@@ -117,12 +114,12 @@ public class LdapUtil {
}
}
public
static
void
closeCtx
()
throws
NamingException
{
public
void
closeCtx
()
throws
NamingException
{
if
(
ctx
!=
null
)
ctx
.
close
();
}
public
static
String
getUserDN
(
String
uid
)
{
public
String
getUserDN
(
String
uid
)
{
String
userDN
=
""
;
try
{
SearchControls
constraints
=
new
SearchControls
();
...
...
@@ -133,7 +130,7 @@ public class LdapUtil {
if
(
obj
instanceof
javax
.
naming
.
directory
.
SearchResult
)
{
javax
.
naming
.
directory
.
SearchResult
si
=
(
javax
.
naming
.
directory
.
SearchResult
)
obj
;
userDN
+=
si
.
getName
();
userDN
+=
","
+
BASEDN
;
userDN
+=
","
+
ldapProperties
.
getDn
()
;
}
}
}
catch
(
Exception
e
)
{
...
...
yifu-common/yifu-common-ldap/src/main/resources/META-INF/spring.factories
View file @
f063f031
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.ldap.
config.LdapAutoConfigue
\
com.yifu.cloud.plus.v1.yifu.common.ldap.
util.LdapUtil
\
yifu-common/yifu-common-ldap/src/main/resources/ldapConfig.properties
0 → 100644
View file @
f063f031
ldap.url
=
192.168.1.65
ldap.port
=
389
ldap.userName
=
cn=admin,dc=worfu,dc=com
ldap.password
=
yifu123456!
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
\ No newline at end of file
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/config/MybatisPlusMetaObjectHandler.java
View file @
f063f031
...
...
@@ -27,13 +27,13 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
log
.
debug
(
"mybatis plus start insert fill ...."
);
LocalDateTime
now
=
LocalDateTime
.
now
();
fillValIfNullByName
(
"createTime"
,
now
,
metaObject
,
fals
e
);
fillValIfNullByName
(
"updateTime"
,
now
,
metaObject
,
fals
e
);
fillValIfNullByName
(
"createTime"
,
now
,
metaObject
,
tru
e
);
fillValIfNullByName
(
"updateTime"
,
now
,
metaObject
,
tru
e
);
YifuUser
yifuUser
=
getYifuUser
();
if
(
Common
.
isNotNull
(
yifuUser
)){
fillValIfNullByName
(
"createBy"
,
yifuUser
.
getId
(),
metaObject
,
fals
e
);
fillValIfNullByName
(
"updateBy"
,
yifuUser
.
getId
(),
metaObject
,
fals
e
);
fillValIfNullByName
(
"createName"
,
yifuUser
.
getNickname
(),
metaObject
,
fals
e
);
fillValIfNullByName
(
"createBy"
,
yifuUser
.
getId
(),
metaObject
,
tru
e
);
fillValIfNullByName
(
"updateBy"
,
yifuUser
.
getId
(),
metaObject
,
tru
e
);
fillValIfNullByName
(
"createName"
,
yifuUser
.
getNickname
(),
metaObject
,
tru
e
);
}
}
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceSettleCancel.java
View file @
f063f031
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
...
...
@@ -14,8 +17,9 @@ import java.util.Date;
@Tag
(
name
=
"结算信息作废记录"
)
public
class
TInsuranceSettleCancel
implements
Serializable
{
/**
*
*
id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
/**
...
...
@@ -37,21 +41,15 @@ public class TInsuranceSettleCancel implements Serializable {
* 项目名称
*/
private
String
deptName
;
/**
* 订单编号
*/
private
String
orderNo
;
/**
* 推送标识 1成功 0失败
* 推送标识
未推送,
1成功 0失败
*/
private
Integer
isCancelPush
;
/**
* 创建时间
*/
private
Dat
e
createTime
;
private
LocalDateTim
e
createTime
;
/**
* 操作人
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
View file @
f063f031
...
...
@@ -237,6 +237,23 @@ public class BigDecimalUtils {
}
return
bigDecimal
;
}
/**
* null 默认 为 0
* @Author zhaji
* @Date 2022-08-02
* @param bigDecimal
* @return
**/
public
static
Boolean
isNullOrZero
(
BigDecimal
bigDecimal
){
if
(
null
==
bigDecimal
){
return
true
;
}
if
(
bigDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
return
true
;
}
return
false
;
}
/**
* 对象转为BigDecimal 数据 并四舍五入保留两位小数
* @Author fxj
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
f063f031
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -86,4 +87,11 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
@JsonIgnore
private
Integer
settleType
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
f063f031
...
...
@@ -100,9 +100,15 @@ public class InsuredParam implements Serializable {
private
Integer
isOverdue
;
/**
* 派单日期
* 派单
开始
日期
*/
@Schema
(
description
=
"派单日期"
)
private
String
createTime
;
@Schema
(
description
=
"派单开始日期"
)
private
String
createStartTime
;
/**
* 派单结束日期
*/
@Schema
(
description
=
"派单结束日期"
)
private
String
createEndTime
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
f063f031
...
...
@@ -327,8 +327,8 @@ public class TInsuranceDetailController {
* @return {@link R<IPage< RefundExportListVo >>}
*/
@Operation
(
summary
=
"减员办理列表分页查询"
,
description
=
"减员办理列表分页查询"
)
@
Pos
tMapping
(
"/getInsuranceRefundHandlingPageList"
)
public
R
<
IPage
<
RefundExportListVo
>>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
@RequestBody
InsuranceRefundHandlingParam
param
)
{
@
Ge
tMapping
(
"/getInsuranceRefundHandlingPageList"
)
public
R
<
IPage
<
RefundExportListVo
>>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceRefundHandlingPageList
(
page
,
param
));
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
f063f031
...
...
@@ -152,7 +152,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
TInsuranceRefundDetail
selectRefundDetail
(
@Param
(
"param"
)
TInsuranceRefundDetail
refundDetail
);
/**
*
TODO
*
根据ID导出减员办理列表
*
* @author zhaji
* @param idList
...
...
@@ -161,7 +161,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List
<
RefundExportListVo
>
getRefundExportListBySelect
(
@Param
(
"idList"
)
List
<
String
>
idList
);
/**
*
TODO
*
导出减员办理列表
*
* @author zhaji
* @param param
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
f063f031
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
f063f031
...
...
@@ -334,8 +334,11 @@
<if
test=
"param.isOverdue != null"
>
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
<if
test=
"param.createStartTime != null and param.createStartTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
...
...
@@ -412,8 +415,11 @@
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
<if
test=
"param.createStartTime != null and param.createStartTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
...
...
@@ -564,16 +570,16 @@
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO
like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
and detail.DEPT_NO
= #{param.deptNo}
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if
test=
"param.i
sOverdue != null
"
>
and detail.I
S_OVERDUE like concat('%',replace(replace(#{param.isOverdu
e},'_','\_'),'%','\%'),'%')
<if
test=
"param.i
nsuranceTypeName != null and param.insuranceTypeName.trim() != ''
"
>
and detail.I
NSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeNam
e},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.i
sUse != null
"
>
and detail.I
S_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
<if
test=
"param.i
nsuranceCompanyName != null and param.insuranceCompanyName.trim() != ''
"
>
and detail.I
NSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
ORDER BY refund.CREATE_TIME DESC
</select>
...
...
@@ -672,7 +678,7 @@
and detail.POLICY_NO = #{param.policyNo}
</if>
</select>
<!--
已投保列表分页查询
-->
<!--
根据ID导出减员办理列表
-->
<select
id=
"getRefundExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
detail.id as id,
...
...
@@ -705,7 +711,7 @@
</foreach>
ORDER BY detail.CREATE_TIME DESC
</select>
<!--
已投保列表分页查询
-->
<!--
根据查询参数导出减员办理列表
-->
<select
id=
"getRefundExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
detail.id as id,
...
...
@@ -740,14 +746,17 @@
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
and detail.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"
>
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<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
= #{param.insuranceCompanyName}
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<!--
已投保列表分页查询
-->
<!--
减员办理
-->
<update
id=
"updateInsuranceRefund"
>
update
t_insurance_detail detail
...
...
@@ -762,7 +771,7 @@
</foreach>
</update>
<!--
getInsuranceListByIdCard
-->
<!--
根据身份证查询商险信息
-->
<select
id=
"getInsuranceListByIdCard"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListByIdCardVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceSettleCancelMapper.xml
View file @
f063f031
...
...
@@ -10,7 +10,6 @@
<result
property=
"settleId"
column=
"SETTLE_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptName"
column=
"DEPT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"isCancelPush"
column=
"IS_CANCEL_PUSH"
jdbcType=
"TINYINT"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createUesr"
column=
"CREATE_UESR"
jdbcType=
"VARCHAR"
/>
...
...
@@ -18,7 +17,7 @@
<sql
id=
"Base_Column_List"
>
ID,INS_DETAIL_ID,SETTLE_ID,
DEPT_NO,DEPT_NAME,
ORDER_NO,
DEPT_NO,DEPT_NAME,
IS_CANCEL_PUSH,CREATE_TIME,CREATE_UESR
</sql>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
View file @
f063f031
...
...
@@ -404,5 +404,19 @@ public class TProvidentFund extends BaseEntity {
@Schema
(
description
=
"电信编号"
)
@ExcelProperty
(
"电信编号"
)
private
String
telecomNumber
;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute
(
name
=
"基数上限(社保或公积金)"
)
@Schema
(
description
=
"基数上限(社保或公积金)"
)
@ExcelProperty
(
"基数上限(社保或公积金)"
)
private
BigDecimal
upperLimit
;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute
(
name
=
"基数下限(社保或公积金)"
)
@Schema
(
description
=
"基数下限(社保或公积金)"
)
@ExcelProperty
(
"基数下限(社保或公积金)"
)
private
BigDecimal
lowerLimit
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
View file @
f063f031
...
...
@@ -747,6 +747,20 @@ public class TSocialInfo extends BaseEntity {
@Schema
(
description
=
"大病办理状态:0待办理1办理成功2办理失败3已派减"
)
@ExcelProperty
(
"大病办理状态:0待办理1办理成功2办理失败3已派减"
)
private
String
bigailmentHandle
;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute
(
name
=
"基数上限(社保或公积金)"
)
@Schema
(
description
=
"基数上限(社保或公积金)"
)
@ExcelProperty
(
"基数上限(社保或公积金)"
)
private
BigDecimal
upperLimit
;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute
(
name
=
"基数下限(社保或公积金)"
)
@Schema
(
description
=
"基数下限(社保或公积金)"
)
@ExcelProperty
(
"基数下限(社保或公积金)"
)
private
BigDecimal
lowerLimit
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
f063f031
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
f063f031
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
f063f031
...
...
@@ -177,7 +177,6 @@ public class ServiceUtil {
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
canOverpay
)){
temp
=
socialStartDate
;
}
boolean
falg
=
isaBoolean
(
temp
,
now
);
return
(
null
!=
temp
&&
(
temp
.
getYear
()
<
now
.
getYear
()
||
isaBoolean
(
temp
,
now
)));
}
private
static
boolean
isaBoolean
(
LocalDateTime
temp
,
LocalDateTime
now
)
{
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TProvidentFundMapper.xml
View file @
f063f031
...
...
@@ -74,6 +74,8 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"payPolicy"
column=
"PAY_POLICY"
/>
<result
property=
"lowerLimit"
column=
"LOWER_LIMIT"
/>
<result
property=
"upperLimit"
column=
"UPPER_LIMIT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -125,7 +127,9 @@
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.PAY_POLICY
a.PAY_POLICY,
a.LOWER_LIMIT,
a.UPPER_LIMIT
</sql>
<sql
id=
"tProvidentFund_where"
>
<if
test=
"tProvidentFund != null"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialInfoMapper.xml
View file @
f063f031
...
...
@@ -121,6 +121,8 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"payPolicy"
column=
"PAY_POLICY"
/>
<result
property=
"lowerLimit"
column=
"LOWER_LIMIT"
/>
<result
property=
"upperLimit"
column=
"UPPER_LIMIT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -221,7 +223,9 @@
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.PAY_POLICY
a.PAY_POLICY,
a.LOWER_LIMIT,
a.UPPER_LIMIT
</sql>
<sql
id=
"tSocialInfo_where"
>
<if
test=
"tSocialInfo != null"
>
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
f063f031
...
...
@@ -26,13 +26,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.unboundid.ldap.sdk.SearchResultEntry
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDeptRelation
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.mapper.SysDeptMapper
;
import
com.yifu.cloud.plus.v1.yifu.admin.mapper.SysUserMapper
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDeptRelationService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDeptService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.util.LdapUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -44,7 +42,6 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* <p>
...
...
@@ -214,6 +211,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
SysDept
insertSysDept
=
new
SysDept
();
insertSysDept
.
setName
(
deptName
);
insertSysDept
.
setParentId
(
0L
);
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
insertSysDept
.
setDeptDn
(
dn
);
this
.
save
(
insertSysDept
);
}
else
{
...
...
@@ -231,6 +231,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
insertSysDept
.
setName
(
deptName
);
insertSysDept
.
setParentId
(
sysDept
.
getDeptId
());
insertSysDept
.
setDeptDn
(
dn
);
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
this
.
save
(
insertSysDept
);
}
}
else
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
f063f031
...
...
@@ -424,7 +424,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if
(
null
!=
list
)
{
List
<
SysUser
>
listUser
=
this
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
().
eq
(
SysUser:
:
getDelFlag
,
CommonConstants
.
STATUS_NORMAL
));
List
<
String
>
list1
=
listUser
.
stream
().
map
(
SysUser:
:
getUsername
).
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
map
=
listUser
.
stream
().
collect
(
HashMap:
:
new
,
(
m
,
v
)
->
m
.
put
(
v
.
getUsername
(),
v
.
getUserId
()),
HashMap:
:
putAll
);
List
<
PersonVo
>
updateList
=
new
ArrayList
<>();
List
<
PersonVo
>
insertList
=
new
ArrayList
<>();
for
(
PersonVo
personVo
:
list
)
{
...
...
@@ -469,6 +468,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
insertSysDept
.
setName
(
deptName
);
insertSysDept
.
setParentId
(
0L
);
insertSysDept
.
setDeptDn
(
dn
);
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
sysDeptMapper
.
insert
(
insertSysDept
);
}
else
{
sysDept
.
setName
(
deptName
);
...
...
@@ -484,6 +486,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
insertSysDept
.
setName
(
deptName
);
insertSysDept
.
setParentId
(
sysDept
.
getDeptId
());
insertSysDept
.
setDeptDn
(
dn
);
if
(
Common
.
isNotNull
(
entry
.
getAttributeValue
(
"x-ouid"
)))
{
insertSysDept
.
setDeptId
(
Long
.
valueOf
(
entry
.
getAttributeValue
(
"x-ouid"
)));
}
sysDeptMapper
.
insert
(
insertSysDept
);
}
}
else
{
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
f063f031
...
...
@@ -210,7 +210,7 @@
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
insert into sys_user
(user_id,username,phone,email,password,nickname,create_time)
(user_id,username,phone,email,password,nickname,
deptId,
create_time)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
...
...
@@ -220,6 +220,7 @@
#{item.email,jdbcType=VARCHAR},
#{item.password,jdbcType=VARCHAR},
#{item.personName,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
now()
)
</foreach>
...
...
@@ -256,6 +257,13 @@
</if>
</foreach>
</trim>
<trim
prefix=
"deptId =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.deptId!=null"
>
when username=#{i.uid} then #{i.deptId}
</if>
</foreach>
</trim>
<trim
prefix=
"update_time =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when username=#{i.uid} then now()
...
...
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