Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
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
鲁鑫
topsun-bpm
Commits
4479574c
Commit
4479574c
authored
Jun 25, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化同步人员到SAP
parent
8ab0566a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
5 deletions
+57
-5
Org.js
huigou-xt/src/main/webapp/system/opm/organization/Org.js
+8
-1
PersonDetail.jsp
.../src/main/webapp/system/opm/organization/PersonDetail.jsp
+1
-1
OrgSyncApplication.java
...huigou/topsun/syncOrg/application/OrgSyncApplication.java
+2
-0
OrgSyncApplicationImpl.java
...psun/syncOrg/application/impl/OrgSyncApplicationImpl.java
+10
-3
SyncOrgController.java
...m/huigou/topsun/syncOrg/controller/SyncOrgController.java
+6
-0
syncOrg.xml
topsun/src/main/resources/config/topsun/base/syncOrg.xml
+30
-0
No files found.
huigou-xt/src/main/webapp/system/opm/organization/Org.js
View file @
4479574c
...
...
@@ -123,6 +123,7 @@ $(function () {
{
id
:
'initPassword'
,
text
:
'初始化密码'
,
click
:
initPassword
,
img
:
"fa-wrench"
},
{
id
:
"changePersonMainOrg"
,
text
:
"设置主岗位"
,
img
:
"fa-address-book"
},
{
id
:
"quoteAuthorizationAndBizManagement"
,
text
:
"引用权限"
,
click
:
quoteAuthorizationAndBizManagement
,
img
:
"fa-gavel"
},
{
id
:
"initPersonToSap"
,
text
:
"初始化SAP员工客户"
,
click
:
initPersonToSap
,
img
:
"fa-gavel"
},
]
};
...
...
@@ -157,7 +158,7 @@ $(function () {
}
},
{
display
:
"消息类型"
,
name
:
"typeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息文本"
,
name
:
"message"
,
width
:
2
00
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息文本"
,
name
:
"message"
,
width
:
3
00
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
"/org/slicedQueryOrgs.ajax"
,
...
...
@@ -622,6 +623,12 @@ function doSavePerson() {
});
}
function
initPersonToSap
()
{
Public
.
ajax
(
web_app
.
name
+
"/syncOrg/initAllPersonToSap.ajax"
,{},
function
()
{
reloadGrid
();
})
}
function
onDialogCloseHandler
()
{
propteryGridManager
=
null
;
if
(
refreshFlag
)
{
...
...
huigou-xt/src/main/webapp/system/opm/organization/PersonDetail.jsp
View file @
4479574c
...
...
@@ -19,7 +19,7 @@
<x:inputC
name=
"name"
id=
"name"
required=
"true"
label=
"姓名"
maxlength=
"30"
labelCol=
"2"
fieldCol=
"4"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"loginName"
id=
"loginName"
label=
"登录名"
labelCol=
"2"
fieldCol=
"4"
maxlength=
"16"
/>
<x:inputC
name=
"loginName"
id=
"loginName"
required=
"true"
label=
"登录名"
labelCol=
"2"
fieldCol=
"4"
maxlength=
"16"
/>
<x:inputC
name=
"englishName"
id=
"englishName"
label=
"英文名称"
labelCol=
"2"
fieldCol=
"4"
maxlength=
"60"
/>
</div>
<div
class=
"hg-form-row"
>
...
...
topsun/src/main/java/com/huigou/topsun/syncOrg/application/OrgSyncApplication.java
View file @
4479574c
...
...
@@ -70,4 +70,6 @@ public interface OrgSyncApplication {
List
<
SapPersonVo
>
querySapPersonVoByFullId
(
String
fullId
);
void
syncAllPersonToSap
();
}
topsun/src/main/java/com/huigou/topsun/syncOrg/application/impl/OrgSyncApplicationImpl.java
View file @
4479574c
...
...
@@ -183,10 +183,10 @@ public class OrgSyncApplicationImpl extends BaseApplication implements OrgSyncAp
//银行账户
if
(
sapPersonVo
.
getBankAccountNumber
().
length
()
>
18
){
String
bankn
=
sapPersonVo
.
getBankAccountNumber
();
//
bankVo.setBankn(bankn.substring(0,18));
bankVo
.
setBankn
(
bankn
);
bankVo
.
setBankn
(
bankn
.
substring
(
0
,
18
));
//
bankVo.setBankn(bankn);
//账户明细放18位后的值
//
bankVo.setBkref(bankn.substring(18,bankn.length()));
bankVo
.
setBkref
(
bankn
.
substring
(
18
,
bankn
.
length
()));
}
else
{
bankVo
.
setBankn
(
sapPersonVo
.
getBankAccountNumber
());
}
...
...
@@ -275,6 +275,13 @@ public class OrgSyncApplicationImpl extends BaseApplication implements OrgSyncAp
return
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
SapPersonVo
.
class
,
append
.
toString
());
}
@Override
public
void
syncAllPersonToSap
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedAllSapPersonVo"
);
List
<
SapPersonVo
>
sapPersonVos
=
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
SapPersonVo
.
class
);
this
.
buildSapPerson
(
"I"
,
sapPersonVos
);
}
/**
* 字符串转hashcode
* @param value
...
...
topsun/src/main/java/com/huigou/topsun/syncOrg/controller/SyncOrgController.java
View file @
4479574c
...
...
@@ -53,6 +53,12 @@ public class SyncOrgController extends CommonController {
return
success
();
}
public
String
initAllPersonToSap
(){
SDO
sdo
=
this
.
getSDO
();
orgSyncApplication
.
syncAllPersonToSap
();
return
success
();
}
public
String
enableOrDisablePerson
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
...
...
topsun/src/main/resources/config/topsun/base/syncOrg.xml
View file @
4479574c
...
...
@@ -64,6 +64,36 @@
</sql-query>
</query>
<query
name=
"slicedAllSapPersonVo"
label=
"构建SAP人员结构"
>
<sql-query>
SELECT
o.FULL_NAME AS PARENT_FULL_NAME,
p.CODE,
p.ID,
p.NAME,
p.EMAIL,
p.ENGLISH_NAME,
p.sex,
p.OFFICE_PHONE,
p.MOBILE_PHONE,
p.ZIP,
p.FAMILY_ADDRESS,
p.COUNTRY,
p.BANK_COUNTRY,
p.BANK_CODE,
p.BANK_ACCOUNT_NUMBER,
p.COMPANY_CODE,
p.REGION,
p.LANGU,
op.PROPERTY_VALUE AS KOSTL,
'I' AS flag
FROM sa_opperson p
LEFT JOIN sa_oporg o ON p.MAIN_ORG_ID = o.id
LEFT JOIN sa_oporgproperty op ON o.DEPT_ID = op.ORG_ID
where (p.type = '' or p.type is null) and p.is_sap_person = '1'
</sql-query>
</query>
<query
name=
"queryCodeByFullId"
label=
"查询组织下人员"
>
<sql-query>
SELECT p.* FROM
...
...
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