Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
1195f9ac
Commit
1195f9ac
authored
Mar 12, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.用工管理新增用户同步到指定组织机构下面
parent
0f07eb0f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
9 deletions
+52
-9
CodesetConstant.java
...java/com/baosight/hpjx/core/constant/CodesetConstant.java
+2
-0
ServiceHPPZ013.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ013.java
+47
-0
HPPZ013.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
+1
-3
HPPZ014.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ014.xml
+1
-3
HPXSOrg.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
+1
-3
No files found.
src/main/java/com/baosight/hpjx/core/constant/CodesetConstant.java
View file @
1195f9ac
package
com
.
baosight
.
hpjx
.
core
.
constant
;
import
com.baosight.hpjx.util.StringUtils
;
/**
* @author:songx
* @date:2024/3/1,17:36
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ013.java
View file @
1195f9ac
...
...
@@ -19,9 +19,12 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -162,6 +165,28 @@ public class ServiceHPPZ013 extends ServiceBase {
fPz01301
.
setUserId
(
userId
);
fPz01301
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPPZ013
.
INSERT
,
fPz01301
);
// 添加到组织机构
this
.
insertOrgMember
(
fPz01301
);
}
/**
* 用户关联组织
*
* @param fPz01301
*/
private
void
insertOrgMember
(
HPPZ01301
fPz01301
)
{
Map
inInfoRowMap
=
new
HashMap
();
inInfoRowMap
.
put
(
"loginName"
,
fPz01301
.
getUserId
());
inInfoRowMap
.
put
(
"userId"
,
fPz01301
.
getUserId
());
inInfoRowMap
.
put
(
"orgId"
,
fPz01301
.
getGroupCode
());
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
inInfoRowMap
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"XSOG0801"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"insertUserByOrgId"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
outInfo
.
getMsg
());
}
}
/**
...
...
@@ -188,6 +213,8 @@ public class ServiceHPPZ013 extends ServiceBase {
fPz013
.
fromMap
(
resultRow
);
fPz013
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPPZ013
.
DELETE
,
fPz013
);
// 从组织机构删除
this
.
deleteOrgMember
(
fPz013
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
@@ -198,4 +225,24 @@ public class ServiceHPPZ013 extends ServiceBase {
return
inInfo
;
}
/**
* 用户删除组织
*
* @param fPz013
*/
private
void
deleteOrgMember
(
HPPZ013
fPz013
)
{
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-parentOrgId"
,
fPz013
.
getGroupCode
());
inInfo
.
set
(
"result-0-userId"
,
fPz013
.
getUserId
());
inInfo
.
set
(
"result-0-loginName"
,
fPz013
.
getUserId
());
inInfo
.
set
(
"result-0-orgId"
,
fPz013
.
getGroupCode
());
inInfo
.
set
(
"result-0-orgEname"
,
fPz013
.
getGroupCode
());
// serviceName:XSOrgManage,methodName:deleteRelationBetweenUserAndOrg
inInfo
.
set
(
EiConstant
.
serviceName
,
"XSOG0801"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"deleteUserByOrgId"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
outInfo
.
getMsg
());
}
}
}
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
View file @
1195f9ac
...
...
@@ -26,12 +26,10 @@
<sql
id=
"condition"
>
AND DELETE_FLAG = '0'
AND COMPANY_CODE = #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ014.xml
View file @
1195f9ac
...
...
@@ -25,12 +25,10 @@
<sql
id=
"condition"
>
AND DELETE_FLAG = '0'
AND COMPANY_CODE = #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
View file @
1195f9ac
...
...
@@ -4,6 +4,7 @@
<sql
id=
"condition"
>
AND IS_DELETED = '0'
AND COMPANY_CODE = #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"orgEname"
>
ORG_ENAME = #orgEname#
</isNotEmpty>
...
...
@@ -19,9 +20,6 @@
<isNotEmpty
prepend=
" AND "
property=
"parentOrgId"
>
PARENT_ORG_ID = #parentOrgId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
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