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
3820a852
Commit
3820a852
authored
Jun 26, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
a734948c
779749e9
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
234 additions
and
219 deletions
+234
-219
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
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+44
-70
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+8
-63
sapZNE1PurchaseDetail.jsp
.../webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
+1
-1
sapZNE2PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
+48
-35
sapPurchaseApprovalList.js
...iz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
+18
-18
sapPurchaseOrderList.js
...bapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
+18
-18
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+19
-1
SapPurchaseApprovalApplicationImpl.java
.../application/impl/SapPurchaseApprovalApplicationImpl.java
+10
-2
SapPurchaseOrderApplicationImpl.java
...der/application/impl/SapPurchaseOrderApplicationImpl.java
+11
-6
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 @
3820a852
...
...
@@ -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 @
3820a852
...
...
@@ -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-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
3820a852
...
...
@@ -44,6 +44,16 @@ function initAufnr(knttp){
}
return
false
;
})
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"kostlName"
){
//column.hide = knttp == 'F'? false:true;
if
(
isApplyProcUnit
()){
column
.
editor
.
required
=
knttp
==
'K'
?
true
:
false
;
}
return
true
;
}
return
false
;
})
if
(
"K"
==
knttp
){
if
(
Public
.
isNotBlank
(
itemGridManager
.
currentData
)){
var
rows
=
itemGridManager
.
currentData
.
Rows
;
...
...
@@ -142,7 +152,7 @@ function getGridColumns() {
var
columns
=
[];
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
// columns.push({
...
...
@@ -183,34 +193,34 @@ function getGridColumns() {
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
filterValue
:
item
.
werks
}
},
back
:
{
MATNR
:
"matnr"
,
MAKTX
:
"txz01"
,
MATKL
:
"matkl"
,
WGBEZ
:
"matklName"
,
EKGRP
:
"ekgrp"
,
EKNAM
:
"ekgrpName"
,
PEINH
:
"peinh"
,
MEINS
:
"meins"
,
MSEHL
:
"meinsName"
,
LGFSB
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
editor: {
//
required: false, type: "select",
//
data: {
//
type: 'system',
//
name: "sapMaterialSelect",
//
getParam: function (item) {
//
return {
//
filterValue: item.werks
//
}
//
},
//
back: {
//
MATNR: "matnr",
//
MAKTX: "txz01",
//
MATKL: "matkl",
//
WGBEZ: "matklName",
//
EKGRP: "ekgrp",
//
EKNAM: "ekgrpName",
//
PEINH: "peinh",
//
MEINS: "meins",
//
MSEHL: "meinsName",
//
LGFSB: "lgort",
//
LGOBE: "lgobe"
//
}
//
},
//
}
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -244,7 +254,10 @@ function getGridColumns() {
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
filterValue
:
"C00"
}
},
back
:
{
MATKL
:
"matkl"
,
...
...
@@ -343,49 +356,10 @@ function getGridColumns() {
}
//editor: {type: 'text'}
},);
// columns.push({
// display: "会计分配序号", name: "zebkn", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// render: function (item) {
// //申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
// // if (item.knttp != ''){
// // ZEBKN_NUM = ZEBKN_NUM + 1;
// // }
// return item.zebkn = item.menge;
// }
// },);
// columns.push({
// display: "多重科目分配", name: "vrtkz", width: "100", align: "left", type: "string",
// //editor: {type: 'text'},
// // render: function (item) {
// // //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// // if (item.knttp == "A" && item.menge > 1) {
// // return item.vrtkz = 1;
// // }
// // }
// },);
// columns.push({
// display: "部分发票", name: "twrkz", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// // render: function (item) {
// // //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// // if (item.knttp == "A" && item.menge > 1) {
// // return item.twrkz = 1;
// // }
// // }
// },);
// columns.push({
// display: "PR分解数量", name: "ekbnMenge", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
// columns.push({
// display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
// editor: {type: 'text', required: true}
// },);
columns
.
push
({
display
:
"成本中心"
,
name
:
"kostlName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
View file @
3820a852
...
...
@@ -16,7 +16,8 @@ function initializeCommonUI() {
function
bindEvent
()
{
fillinDate
=
$
(
"#fillinDate"
).
val
();
$
(
'#knttp'
).
searchbox
({
$
(
'#knttp'
).
val
(
"A"
);
/*$('#knttp').searchbox({
type: "system", name: "knttp",
getParam: function (item) {
return {
...
...
@@ -26,7 +27,7 @@ function bindEvent() {
onChange: function (value, data) {
$('#knttp').val(data.knttp);
}
});
});
*/
}
function
initItemGrid
()
{
...
...
@@ -110,25 +111,9 @@ function getGridColumns() {
var
columns
=
[];
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
// columns.push({
// display: "科目分配类别", name: "knttp", width: "100", align: "left", type: "string",
// editor: {
// required: true, type: "select",
// data: {
// type: 'system',
// name: "knttp",
// getParam: function (item) {
// return {filterValue: $("#bsart").val()}
// },
// back: {
// knttp: "knttp"
// }
// },
// }
// },);
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -149,7 +134,7 @@ function getGridColumns() {
},);
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
//
editor: {required: false, type: "text"}
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
...
...
@@ -282,45 +267,8 @@ function getGridColumns() {
}
//editor: {type: 'text'}
},);
// columns.push({
// display: "会计分配序号", name: "zebkn", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// render: function (item) {
// //申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
// // if (item.knttp != ''){
// // ZEBKN_NUM = ZEBKN_NUM + 1;
// // }
// return item.zebkn = item.menge;
// }
// },);
// columns.push({
// display: "多重科目分配", name: "vrtkz", width: "100", align: "left", type: "string",
// //editor: {type: 'text'},
// // render: function (item) {
// // //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// // if (item.knttp == "A" && item.menge > 1) {
// // return item.vrtkz = 1;
// // }
// // }
// },);
// columns.push({
// display: "部分发票", name: "twrkz", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// render: function (item) {
// //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// if (item.knttp == "A" && item.menge > 1) {
// return item.twrkz = 1;
// }
// }
// },);
// columns.push({
// display: "PR分解数量", name: "ekbnMenge", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
// columns.push({
// display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
// editor: {type: 'text', required: false}
// },);
//财务部填写
if
(
"financeNode"
==
getSubProcUnitId
()){
columns
.
push
({
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -340,10 +288,7 @@ function getGridColumns() {
},
}
},);
// columns.push({
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// //editor: {type: 'text'}
// },);
}
columns
.
push
({
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
View file @
3820a852
...
...
@@ -29,7 +29,7 @@
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
disabled=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"knttp"
label=
"科目分配类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select
"
/>
<x:inputC
name=
"knttp"
label=
"科目分配类别"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true
"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
View file @
3820a852
...
...
@@ -44,9 +44,19 @@ function initAufnr(knttp){
}
return
true
;
}
return
false
;
})
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"kostlName"
){
//column.hide = knttp == 'F'? false:true;
if
(
isApplyProcUnit
()){
column
.
editor
.
required
=
knttp
==
'K'
?
true
:
false
;
}
return
true
;
}
return
false
;
})
if
(
"K"
==
knttp
){
if
(
Public
.
isNotBlank
(
itemGridManager
.
currentData
)){
var
rows
=
itemGridManager
.
currentData
.
Rows
;
...
...
@@ -165,9 +175,9 @@ function getGridColumns() {
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
...
...
@@ -246,7 +256,7 @@ function getGridColumns() {
}
else
{
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
columns
.
push
({
...
...
@@ -271,34 +281,34 @@ function getGridColumns() {
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
filterValue
:
item
.
werks
}
},
back
:
{
MATNR
:
"matnr"
,
MAKTX
:
"txz01"
,
MATKL
:
"matkl"
,
WGBEZ
:
"matklName"
,
EKGRP
:
"ekgrp"
,
EKNAM
:
"ekgrpName"
,
PEINH
:
"peinh"
,
MEINS
:
"meins"
,
MSEHL
:
"meinsName"
,
LGFSB
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
editor: {
//
required: false, type: "select",
//
data: {
//
type: 'system',
//
name: "sapMaterialSelect",
//
getParam: function (item) {
//
return {
//
filterValue: item.werks
//
}
//
},
//
back: {
//
MATNR: "matnr",
//
MAKTX: "txz01",
//
MATKL: "matkl",
//
WGBEZ: "matklName",
//
EKGRP: "ekgrp",
//
EKNAM: "ekgrpName",
//
PEINH: "peinh",
//
MEINS: "meins",
//
MSEHL: "meinsName",
//
LGFSB: "lgort",
//
LGOBE: "lgobe"
//
}
//
},
//
}
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -332,7 +342,10 @@ function getGridColumns() {
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
noContain
:
"C00"
}
},
back
:
{
MATKL
:
"matkl"
,
...
...
@@ -434,7 +447,7 @@ function getGridColumns() {
columns
.
push
({
display
:
"成本中心"
,
name
:
"kostlName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
View file @
3820a852
...
...
@@ -11,24 +11,24 @@ function initUI() {
function
initPurchaseListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
revokeApproveHandler
:
{
id
:
'revokeApproveHandler'
,
text
:
'撤销审批'
,
img
:
'fa-trash'
,
click
:
function
()
{
var
rows
=
purchaseApprovalGridManager
.
getSelectedRows
();
if
(
rows
.
length
==
0
||
rows
.
length
>
1
)
{
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
if
(
rows
[
0
].
status
!=
3
)
{
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
UICtrl
.
confirm
(
'确定要把当前单据撤销审批吗?'
,
function
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseApproval/revokeApproval.ajax'
,
{
id
:
rows
[
0
].
id
},
function
(
msg
)
{
purchaseApprovalGridManager
.
loadData
();
});
});
}
}
//
revokeApproveHandler: {
//
id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
//
var rows = purchaseApprovalGridManager.getSelectedRows();
//
if (rows.length == 0 || rows.length > 1) {
//
Public.tip("请选择一条已完成的数据!");
//
return;
//
}
//
if (rows[0].status != 3) {
//
Public.tip("请选择一条已完成的数据!");
//
return;
//
}
//
UICtrl.confirm('确定要把当前单据撤销审批吗?', function () {
//
Public.ajax(web_app.name + '/sapPurchaseApproval/revokeApproval.ajax', {id: rows[0].id}, function (msg) {
//
purchaseApprovalGridManager.loadData();
//
});
//
});
//
}
//
}
});
purchaseApprovalGridManager
=
UICtrl
.
grid
(
'#purchaseApprovalGrid'
,
{
columns
:
[
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
View file @
3820a852
...
...
@@ -11,24 +11,24 @@ function initUI() {
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
revokeApproveHandler
:
{
id
:
'revokeApproveHandler'
,
text
:
'撤销审批'
,
img
:
'fa-trash'
,
click
:
function
()
{
var
rows
=
purchaseOrderGridManager
.
getSelectedRows
();
if
(
rows
.
length
==
0
||
rows
.
length
>
1
)
{
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
if
(
rows
[
0
].
status
!=
3
)
{
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
UICtrl
.
confirm
(
'确定要把当前单据撤销审批吗?'
,
function
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseOrder/revokeApproval.ajax'
,
{
id
:
rows
[
0
].
id
},
function
(
msg
)
{
purchaseOrderGridManager
.
loadData
();
});
});
}
}
//
revokeApproveHandler: {
//
id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
//
var rows = purchaseOrderGridManager.getSelectedRows();
//
if (rows.length == 0 || rows.length > 1) {
//
Public.tip("请选择一条已完成的数据!");
//
return;
//
}
//
if (rows[0].status != 3) {
//
Public.tip("请选择一条已完成的数据!");
//
return;
//
}
//
UICtrl.confirm('确定要把当前单据撤销审批吗?', function () {
//
Public.ajax(web_app.name + '/sapPurchaseOrder/revokeApproval.ajax', {id: rows[0].id}, function (msg) {
//
purchaseOrderGridManager.loadData();
//
});
//
});
//
}
//
}
});
//debugger
purchaseOrderGridManager
=
UICtrl
.
grid
(
'#purchaseOrderGrid'
,
{
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
3820a852
...
...
@@ -57,7 +57,8 @@ public class ResourceSearchController {
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
List
<
QuerySchemeField
>
fields
=
Arrays
.
asList
(
new
QuerySchemeField
(
"科目分配类别"
,
"knttp"
,
"string"
,
100L
));
Arrays
.
asList
(
new
QuerySchemeField
(
"科目分配类别"
,
"knttp"
,
"string"
,
100L
),
new
QuerySchemeField
(
"科目分配类别描述"
,
"text"
,
"string"
,
100L
));
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
450L
);
...
...
@@ -67,6 +68,12 @@ public class ResourceSearchController {
knttp
.
forEach
((
key
,
value
)
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"knttp"
,
value
);
if
(
"F"
.
equals
(
key
)){
map
.
put
(
"text"
,
"内部订单"
);
}
if
(
"K"
.
equals
(
key
)){
map
.
put
(
"text"
,
"成本中心"
);
}
if
(
"ZFW"
.
equals
(
filterValue
))
{
if
(
"F"
.
equals
(
key
)
||
"K"
.
equals
(
key
))
{
mapList
.
add
(
map
);
...
...
@@ -266,6 +273,7 @@ public class ResourceSearchController {
String
param
=
sdo
.
getString
(
"paramValue"
);
String
fieldName
=
sdo
.
getString
(
"fieldName"
);
String
filterValue
=
sdo
.
getString
(
"filterValue"
);
String
noContain
=
sdo
.
getString
(
"noContain"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
fieldName
);
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
...
...
@@ -281,6 +289,16 @@ public class ResourceSearchController {
.
collect
(
Collectors
.
toList
());
}
}
if
(
StringUtil
.
isNotBlank
(
noContain
)){
//固定条件过滤,不包含
String
[]
split
=
noContain
.
split
(
","
);
for
(
String
s
:
split
)
{
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
noneMatch
(
value
->
value
.
contains
(
s
)))
//.filter(map -> map.containsValue(filterValue))
.
collect
(
Collectors
.
toList
());
}
}
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
mapList
=
mapList
.
stream
()
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/impl/SapPurchaseApprovalApplicationImpl.java
View file @
3820a852
...
...
@@ -196,7 +196,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
SapPurchaseApproval
sapPurchaseApproval
=
sapPurchaseApprovalRepository
.
findOne
(
bizId
);
sapPurchaseApproval
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapPurchaseApprovalRepository
.
save
(
sapPurchaseApproval
);
sendSapData
(
sapPurchaseApproval
,
"N"
);
//
sendSapData(sapPurchaseApproval,"N");
//终止
//workflowApplication.abortProcessInstance(delegateTask.getProcessInstanceId());
}
...
...
@@ -235,6 +235,10 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
//根据SAP传过来的创建人编码,映射流程发起人
String
ernam
=
purchaseApprovalVo
.
getErnam
();
Org
org
=
orgApplication
.
loadMainOrgByLoginName
(
ernam
);
String
acceptPersonCode
=
SystemCache
.
getParameter
(
"acceptPersonCode"
,
String
.
class
);
if
(
ObjectUtil
.
isNull
(
org
)){
org
=
orgApplication
.
loadMainOrgByLoginName
(
acceptPersonCode
);
}
if
(
ObjectUtil
.
isNotNull
(
org
)){
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
org
.
getId
());
ThreadLocalUtil
.
putOperator
(
operator
);
...
...
@@ -279,6 +283,10 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
sapPurchaseApprovalItems
.
add
(
sapPurchaseApprovalItem
);
sapPurchaseApproval
.
setKnttp
(
approvalItemVo
.
getKnttp
());
//科目分配类别
sapPurchaseApproval
.
setEkgrp
(
approvalItemVo
.
getEkgrp
());
//采购组
}
//knttp审批要素没有值时,赋值0,防止发起流程时报错
if
(
StringUtil
.
isBlank
(
sapPurchaseApproval
.
getKnttp
())){
sapPurchaseApproval
.
setKnttp
(
"0"
);
}
// String nextCode = codeGenerator.getNextCode("sapPurchaseApproval");
// sapPurchaseApproval.setBillCode(nextCode);
...
...
@@ -300,7 +308,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
}
//在审批中,更新明细数据的(先删除,再新增)
if
(
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()){
if
(
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()
||
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
APPLYING
.
getId
()
){
List
<
SapPurchaseApprovalItem
>
itemList
=
sapPurchaseApprovalItemApplication
.
querySapPurchaseApprovalItems
(
purchaseApproval
.
getId
());
List
<
String
>
collect
=
itemList
.
stream
().
map
(
SapPurchaseApprovalItem:
:
getId
).
collect
(
Collectors
.
toList
());
sapPurchaseApprovalItemApplication
.
deleteByIds
(
collect
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/impl/SapPurchaseOrderApplicationImpl.java
View file @
3820a852
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.ThreadLocalUtil
;
...
...
@@ -34,10 +35,7 @@ import com.huigou.uasp.bpm.FlowBroker;
import
com.huigou.uasp.bpm.ProcessAction
;
import
com.huigou.uasp.bpm.ProcessStartModel
;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.util.ApplicationContextWrapper
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.Constants
;
import
com.huigou.util.SDO
;
import
com.huigou.util.*
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.impl.persistence.entity.ExecutionEntity
;
...
...
@@ -173,7 +171,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
sapPurchaseOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
SapPurchaseOrder
save
=
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
this
.
sendSapDate
(
save
,
"N"
);
//
this.sendSapDate(save, "N");
// 调用 onEnd 方法
// DelegateExecution execution = delegateTask.getExecution();
// onEnd(execution);
...
...
@@ -213,6 +211,10 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
BeanUtil
.
copyProperties
(
sapPurchaseOrderVo
,
sapPurchaseOrder
);
String
ernam
=
sapPurchaseOrderVo
.
getErnam
();
Org
org
=
orgApplication
.
loadMainOrgByLoginName
(
ernam
);
String
acceptPersonCode
=
SystemCache
.
getParameter
(
"acceptPersonCode"
,
String
.
class
);
if
(
ObjectUtil
.
isNull
(
org
)){
org
=
orgApplication
.
loadMainOrgByLoginName
(
acceptPersonCode
);
}
if
(
ObjectUtil
.
isNotNull
(
org
)){
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
org
.
getId
());
ThreadLocalUtil
.
putOperator
(
operator
);
...
...
@@ -229,6 +231,9 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
purchaseOrderItems
.
add
(
sapPurchaseApprovalItem
);
if
(
"X"
.
equals
(
approvalItemVo
.
getRetpo
())){
retpo
=
"X"
;
}
else
{
//审批要素不能为空,赋值E
retpo
=
"E"
;
}
}
sapPurchaseOrder
.
setRetpo
(
retpo
);
...
...
@@ -262,7 +267,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
purchaseOrderId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
}
//在审批中,更新明细数据的(先删除,再新增)
if
(
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()){
if
(
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()
||
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
APPLYING
.
getId
()
){
List
<
SapPurchaseOrderItem
>
itemList
=
sapPurchaseOrderItemApplication
.
getPurchaseOrderItems
(
purchaseOrder
.
getId
());
sapPurchaseOrderItemApplication
.
deletePurchaseOrderItems
(
itemList
);
purchaseOrderId
=
purchaseOrder
.
getId
();
...
...
topsun/src/main/java/com/huigou/topsun/syncOrg/application/OrgSyncApplication.java
View file @
3820a852
...
...
@@ -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 @
3820a852
...
...
@@ -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 @
3820a852
...
...
@@ -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 @
3820a852
...
...
@@ -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