Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
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
platform
hg-smart
Commits
86ac2833
Commit
86ac2833
authored
May 07, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
ad8d6013
20c452e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
227 additions
and
1 deletions
+227
-1
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+44
-1
HGPZ008.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ008.java
+0
-0
HGPZ008.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ008.xml
+183
-0
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
86ac2833
...
...
@@ -12,7 +12,9 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.collections.MapUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
...
...
@@ -98,5 +100,46 @@ public class UserSessionUtils extends UserSession {
}
return
factoryCodes
;
}
/**
* TODO *
* *获取登录用户所有角色的公司列表
* @return
*/
public
static
List
<
Map
<
String
,
String
>>
getRoleCompany
(){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(){{
put
(
"companyCode"
,
"001"
);
put
(
"companyName"
,
"公司A"
);
}};
return
new
ArrayList
<
Map
<
String
,
String
>>(){{
add
(
map
);}};
}
/**
* TODO *
* *获取指定公司的部门列表
* @return
*/
public
static
List
<
Map
<
String
,
String
>>
getDepByCompany
(
String
companyCode
){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(){{
put
(
"depCode"
,
"001"
);
put
(
"depName"
,
"公司A"
);
}};
return
new
ArrayList
<
Map
<
String
,
String
>>(){{
add
(
map
);}};
}
/**
* TODO *
* *获取指定公司的人员列表
* @return
*/
public
static
List
<
Map
<
String
,
String
>>
getUserByCompany
(
String
companyCode
){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(){{
put
(
"userCode"
,
""
);
//工号
put
(
"userName"
,
""
);
//用户名称
put
(
"userPhone"
,
""
);
//用户电话
put
(
"depCode"
,
""
);
//所属部门编码
put
(
"depName"
,
""
);
//所属部门名称
}};
return
new
ArrayList
<
Map
<
String
,
String
>>(){{
add
(
map
);}};
}
}
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ008.java
0 → 100644
View file @
86ac2833
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ008.xml
0 → 100644
View file @
86ac2833
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-07 14:09:49
Version : 1.0
schema : hggp
tableName : HGPZ008
ID INTEGER NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
NAT_CODE VARCHAR NOT NULL,
NAT_NAME VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap
namespace=
"HGPZ008"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"natCode"
>
NAT_CODE = #natCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"natName"
>
NAT_NAME = #natName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ008"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 帐套编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
NAT_CODE as "natCode",
<!-- 性质编码 -->
NAT_NAME as "natName",
<!-- 项目性质 -->
STATUS as "status",
<!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ008 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ008 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natCode">
NAT_CODE = #natCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="natName">
NAT_NAME = #natName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGPZ008 (ID,
ACCOUNT_CODE,
<!-- 帐套编码 -->
DEP_CODE,
<!-- 部门编码 -->
NAT_CODE,
<!-- 性质编码 -->
NAT_NAME,
<!-- 项目性质 -->
STATUS,
<!-- 状态 0未启用 1启用 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG
<!-- 是否删除0.否1.是 -->
)
VALUES (#id#, #accountCode#, #depCode#, #natCode#, #natName#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGPZ008 WHERE
ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGPZ008
SET
ACCOUNT_CODE = #accountCode#,
<!-- 帐套编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
NAT_CODE = #natCode#,
<!-- 性质编码 -->
NAT_NAME = #natName#,
<!-- 项目性质 -->
STATUS = #status#,
<!-- 状态 0未启用 1启用 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_NAME = #createdName#,
<!-- 创建人名称 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#
<!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
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