Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
Project
Project
Details
Activity
Releases
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
王琮
entrance_api
Commits
8dcf80da
Commit
8dcf80da
authored
Dec 30, 2022
by
王琮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整和捷顺 对接的员工的增删改导入功能
parent
a19acf18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
7 deletions
+26
-7
JieLinkServiceImpl.java
.../integration/jieLink/service/impl/JieLinkServiceImpl.java
+2
-2
SysUser.java
src/main/java/org/rcisoft/sys/sysuser/entity/SysUser.java
+1
-1
SysUserServiceImpl.java
.../rcisoft/sys/sysuser/service/impl/SysUserServiceImpl.java
+21
-4
SysUserRepositorys.xml
src/main/resources/mapper/SysUserRepositorys.xml
+2
-0
No files found.
src/main/java/org/rcisoft/integration/jieLink/service/impl/JieLinkServiceImpl.java
View file @
8dcf80da
...
@@ -623,7 +623,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
...
@@ -623,7 +623,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
JieLinkPersonDto
pushData
=
new
JieLinkPersonDto
();
JieLinkPersonDto
pushData
=
new
JieLinkPersonDto
();
pushData
.
setPersonNo
(
userData
.
getUsername
());
//人员编号
pushData
.
setPersonNo
(
userData
.
getUsername
());
//人员编号
pushData
.
setPersonName
(
userData
.
getName
());
//姓名 必填
pushData
.
setPersonName
(
userData
.
getName
());
//姓名 必填
pushData
.
setPersonGender
(
StringUtils
.
equals
(
"0"
,
userData
.
getSex
())
?
1
:
StringUtils
.
equals
(
"1"
,
userData
.
getSex
())
?
0
:
null
);
//性别
pushData
.
setPersonGender
(
StringUtils
.
equals
(
"0"
,
userData
.
getSex
())
?
0
:
StringUtils
.
equals
(
"1"
,
userData
.
getSex
())
?
1
:
null
);
//性别
//此处需要将头像信息转换成BASE64数据存储
//此处需要将头像信息转换成BASE64数据存储
if
(
StringUtils
.
isNotBlank
(
userData
.
getFaceAddress
()))
{
if
(
StringUtils
.
isNotBlank
(
userData
.
getFaceAddress
()))
{
//读取文件将文件转换为base64字符串
//读取文件将文件转换为base64字符串
...
@@ -1230,4 +1230,4 @@ public class JieLinkServiceImpl implements IJieLinkService {
...
@@ -1230,4 +1230,4 @@ public class JieLinkServiceImpl implements IJieLinkService {
}
}
}
}
\ No newline at end of file
src/main/java/org/rcisoft/sys/sysuser/entity/SysUser.java
View file @
8dcf80da
...
@@ -149,7 +149,7 @@ public class SysUser extends CyIdIncreEntity<SysUser> {
...
@@ -149,7 +149,7 @@ public class SysUser extends CyIdIncreEntity<SysUser> {
private
String
phone
;
private
String
phone
;
/**
/**
* @desc 用户性别(0
男 1女 2未知
)
* @desc 用户性别(0
女 1男
)
* @column sex
* @column sex
* @default
* @default
* @default
* @default
...
...
src/main/java/org/rcisoft/sys/sysuser/service/impl/SysUserServiceImpl.java
View file @
8dcf80da
...
@@ -39,12 +39,15 @@ import org.springframework.transaction.annotation.Isolation;
...
@@ -39,12 +39,15 @@ import org.springframework.transaction.annotation.Isolation;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
...
@@ -168,6 +171,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
...
@@ -168,6 +171,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
@Override
@Override
public
CyPersistModel
remove
(
SysUser
sysUser
)
{
public
CyPersistModel
remove
(
SysUser
sysUser
)
{
int
line
=
sysUserRepositorys
.
delSysUser
(
Long
.
valueOf
(
sysUser
.
getBusinessId
()));
int
line
=
sysUserRepositorys
.
delSysUser
(
Long
.
valueOf
(
sysUser
.
getBusinessId
()));
if
(
synchronization
)
{
if
(!
jieLinkService
.
pushDelUserData
(
sysUser
))
{
try
{
throw
new
CyServiceException
(
500
,
"删除员工失败,请稍后重试"
);
}
finally
{
//手工回滚异常
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
}
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
sysUser
.
getBusinessId
()
+
"的用户表信息"
);
sysUser
.
getBusinessId
()
+
"的用户表信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
...
@@ -186,9 +199,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
...
@@ -186,9 +199,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
int
line
=
baseMapper
.
deleteById
(
sysUser
);
int
line
=
baseMapper
.
deleteById
(
sysUser
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"逻辑删除了ID为"
+
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"逻辑删除了ID为"
+
sysUser
.
getBusinessId
()
+
"的用户表信息"
);
sysUser
.
getBusinessId
()
+
"的用户表信息"
);
if
(
synchronization
)
if
(
synchronization
&&
jieLinkService
.
pushDelUserData
(
sysUser
))
jieLinkService
.
pushDelUserData
(
sysUser
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
else
return
new
CyPersistModel
(
0
);
}
}
/**
/**
...
@@ -579,7 +593,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
...
@@ -579,7 +593,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
sysUser
.
setIdentity
(
"1"
);
sysUser
.
setIdentity
(
"1"
);
sysUser
.
setUsername
(
sysUser
.
getPhone
());
sysUser
.
setUsername
(
sysUser
.
getPhone
());
sysUser
.
setCreateDate
(
new
Date
());
sysUser
.
setCreateDate
(
new
Date
());
sysUserRepositorys
.
addSysUser
(
sysUser
);
SysUser
user
=
new
SysUser
();
BeanUtil
.
copyProperties
(
sysUser
,
user
);
persist
(
user
);
//sysUserRepositorys.addSysUser(sysUser);
}
}
}
}
if
(
null
!=
errorDTOArrayList
&&
errorDTOArrayList
.
size
()
>
0
)
{
if
(
null
!=
errorDTOArrayList
&&
errorDTOArrayList
.
size
()
>
0
)
{
...
...
src/main/resources/mapper/SysUserRepositorys.xml
View file @
8dcf80da
...
@@ -225,6 +225,7 @@
...
@@ -225,6 +225,7 @@
insert into sys_user
insert into sys_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"username != null"
>
username ,
</if>
<if
test=
"username != null"
>
username ,
</if>
<if
test=
"personId != null"
>
person_id ,
</if>
<if
test=
"userType != null"
>
user_type ,
</if>
<if
test=
"userType != null"
>
user_type ,
</if>
<if
test=
"name != null"
>
name ,
</if>
<if
test=
"name != null"
>
name ,
</if>
<if
test=
"sex != null"
>
sex ,
</if>
<if
test=
"sex != null"
>
sex ,
</if>
...
@@ -246,6 +247,7 @@
...
@@ -246,6 +247,7 @@
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"username != null"
>
#{username},
</if>
<if
test=
"username != null"
>
#{username},
</if>
<if
test=
"personId != null"
>
#{personId} ,
</if>
<if
test=
"userType != null"
>
#{userType},
</if>
<if
test=
"userType != null"
>
#{userType},
</if>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"sex != null"
>
#{sex},
</if>
<if
test=
"sex != null"
>
#{sex},
</if>
...
...
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