Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tao.mo
2023-07-06 17:46:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7c0266c33334d30dbca1fa5dd84041574ea44a93
7c0266c3
1 parent
4af4e74e
根据登录账号查询本地账号
mt 2023年7月6日17:45:54
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
17 deletions
src/main/java/com/erry/iclear/dateInterface/repository/SysUserRepository.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/util/FileUtils.java
src/main/java/com/erry/iclear/dateInterface/repository/SysUserRepository.java
View file @
7c0266c
...
...
@@ -15,29 +15,26 @@ import java.util.List;
@Repository
public
interface
SysUserRepository
extends
JpaSpecificationExecutor
<
SysUser
>,
JpaRepository
<
SysUser
,
Long
>
{
@Query
(
nativeQuery
=
true
,
value
=
"select TOP 1 * from t_au_user where login_name = ?1 "
)
public
SysUser
findByLoginName
(
String
loginName
);
/**
* 根据
用户登录名list查询用户列表
信息
* 根据
登录名本地账号用户
信息
*
* @param loginName
s
* @param loginName
* @return
*/
@Query
(
nativeQuery
=
true
,
value
=
"select * from t_au_user where login_name IN (?1) "
)
public
List
<
SysUser
>
findUserListByLoginNames
(
List
loginNames
);
@Query
(
nativeQuery
=
true
,
value
=
"select top 1 * from t_au_user a where a.login_name = ?1 "
+
" and a.user_source_id in( "
+
" select id from dbo.T_BI_DICTIONARY_ENTRIES "
+
" where dict_code='userSourceCode' and code='LOCALUSER') "
)
public
SysUser
findUserByLoginName
(
String
loginName
);
/**
* 根据
登录名查询单个用户
信息
* 根据
用户登录名list查询用户列表
信息
*
* @param loginName
* @param loginName
s
* @return
*/
@Query
(
nativeQuery
=
true
,
value
=
"select * from t_au_user where login_name
= ?1
"
)
public
SysUser
findUserByLoginName
(
String
loginName
);
@Query
(
nativeQuery
=
true
,
value
=
"select * from t_au_user where login_name
IN (?1)
"
)
public
List
<
SysUser
>
findUserListByLoginNames
(
List
loginNames
);
@Query
(
nativeQuery
=
true
,
value
=
"select * from t_au_user where username = ?1"
)
public
List
<
SysUser
>
findByUserName
(
String
userName
);
...
...
@@ -74,5 +71,4 @@ public interface SysUserRepository extends JpaSpecificationExecutor<SysUser>, Jp
*/
@Query
(
nativeQuery
=
true
,
value
=
"select ID from T_AU_USER where IS_VALID = 1 AND ORG_NAME = 'RDE' AND CONS_DISTRIBUTION = '2'"
)
public
List
<
BigDecimal
>
findByDistribution
();
}
}
\ No newline at end of file
...
...
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
7c0266c
...
...
@@ -294,6 +294,7 @@ public class ChmConsignmentService {
result
.
setUpdateTime
(
pushTime
);
if
(!
creator
.
equals
(
"IDE-ICLEAR-API"
)){
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getLoginName
());
}
...
...
@@ -513,7 +514,7 @@ public class ChmConsignmentService {
ChmConsignment
chmConsignmentDB
=
this
.
findChmConsignmentByConsignmentCode
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
));
//获取用户账号信息
SysUser
sysUser
=
sysUserRepository
.
findByLoginName
(
"CUSTOMS"
);
SysUser
sysUser
=
sysUserRepository
.
find
User
ByLoginName
(
"CUSTOMS"
);
//设置当前运单创建人ID
chmConsignment
.
setCreatorId
(
sysUser
);
//设置创建人名称
...
...
src/main/java/com/erry/iclear/dateInterface/util/FileUtils.java
View file @
7c0266c
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment