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
194c75f6
Commit
194c75f6
authored
Dec 29, 2023
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap采购申请流程
parent
d096d603
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1345 additions
and
2 deletions
+1345
-2
ProcessManage.js
huigou-xt/src/main/webapp/system/configtool/ProcessManage.js
+1
-1
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+294
-0
sapPurchaseDetail.jsp
...main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
+37
-0
sapPurchaseList.js
...rc/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
+139
-0
sapPurchaseList.jsp
...c/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
+30
-0
ResourceSearchController.java
...igou/topsun/demo/controller/ResourceSearchController.java
+35
-1
SapPurchaseApplication.java
...psun/sap/purchase/application/SapPurchaseApplication.java
+21
-0
SapPurchaseItemApplication.java
.../sap/purchase/application/SapPurchaseItemApplication.java
+19
-0
SapPurchaseApplicationImpl.java
...purchase/application/impl/SapPurchaseApplicationImpl.java
+102
-0
SapPurchaseItemApplicationImpl.java
...hase/application/impl/SapPurchaseItemApplicationImpl.java
+46
-0
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+67
-0
SapPurchaseItemController.java
...un/sap/purchase/controller/SapPurchaseItemController.java
+44
-0
SapPurchase.java
...va/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
+37
-0
SapPurchaseItem.java
...om/huigou/topsun/sap/purchase/domain/SapPurchaseItem.java
+267
-0
SapPurchaseItemQueryRequest.java
...ap/purchase/domain/query/SapPurchaseItemQueryRequest.java
+18
-0
SapPurchaseQueryRequest.java
...un/sap/purchase/domain/query/SapPurchaseQueryRequest.java
+26
-0
SapPurchaseItemRepository.java
...un/sap/purchase/repository/SapPurchaseItemRepository.java
+17
-0
SapPurchaseRepository.java
...topsun/sap/purchase/repository/SapPurchaseRepository.java
+14
-0
sapPurchaseProc.bpmn
...urces/config/bpm/topsun/sap/purchase/sapPurchaseProc.bpmn
+111
-0
sapPurchase.xml
...n/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
+10
-0
sapPurchaseItem.xml
...sources/config/topsun/sap/sapPurchase/sapPurchaseItem.xml
+10
-0
No files found.
huigou-xt/src/main/webapp/system/configtool/ProcessManage.js
View file @
194c75f6
...
...
@@ -261,7 +261,7 @@ function initializeGrid() {
{
display
:
"预览处理人"
,
name
:
"showQueryHandlers"
,
width
:
80
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
render
:
function
(
item
)
{
return
renderBooleanKind
(
item
.
showQueryHandlers
);
return
renderBooleanKind
(
item
.
previewHandler
);
}
},
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
0 → 100644
View file @
194c75f6
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
ZEBKN_NUM
=
0
;
$
(
function
()
{
initItemGrid
();
bindEvent
();
});
function
bindEvent
()
{
$
(
"#bsart"
).
combox
({
onChange
:
function
(
data
){
if
(
"ZFW"
==
data
.
value
){
pstyp
=
"D"
;
}
else
{
pstyp
=
" "
;
}
}
})
fillinDate
=
$
(
"#fillinDate"
).
val
();
}
function
initItemGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
itemGridManager
,{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
},
deleteHandler
:
function
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#resourceGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapPurchaseItem/deleteSapPurchaseItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGird
();
}
});
},
});
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchaseItem/querySapPurchaseItems.ajax?'
,
parms
:{
sapPurchaseId
:
getId
()},
height
:
'99.6%'
,
heightDiff
:
-
4
,
sortName
:
'id'
,
sortOrder
:
'asc'
,
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
//autoApplyNextEditor:false,
toolbar
:
toolbarOptions
,
}
);
}
function
getGridColumns
()
{
var
columns
=
[];
columns
=
[
{
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
},
{
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"科目分配类别"
,
name
:
"knttp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"knttp"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
$
(
"#bsart"
).
val
()}
},
back
:
{
knttp
:
"knttp"
}
},
}
},
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
/*editor: {
required: true, type: "select",
data: {
type: 'system',
name: "chooseUnit",
getParam: function (item) {
return {paramValue: item.materNo}
},
back: {meins: "unit"}
},
}*/
},
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"申购数量单位"
,
name
:
"meins"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},
{
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},
{
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},
{
display
:
"要求交货日期"
,
name
:
"lfdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},
{
display
:
"服务主数据编号"
,
name
:
"srvpos"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
},
},
{
display
:
"服务短文本"
,
name
:
"ktext1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"服务条目数量"
,
name
:
"esllMenge"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text', mask: '9999999.999'},
render
:
function
(
item
){
return
item
.
esllMenge
=
item
.
menge
;
}
},
{
display
:
"服务计量单位"
,
name
:
"esllMeins"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
required
:
false
,}
},
{
display
:
'定价基数'
,
name
:
"peinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: true, type: "select"}
render
:
function
(
item
){
return
item
.
peinh
=
item
.
preis
;
}
},
{
display
:
"服务预估单价"
,
name
:
"brtwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"服务预估金额"
,
name
:
"netwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
){
if
(
item
.
brtwr
==
''
||
item
.
brtwr
==
null
||
item
.
peinh
==
''
||
item
.
peinh
==
null
){
return
item
.
netwr
=
0
;
}
return
item
.
netwr
=
(
item
.
brtwr
*
item
.
esllMenge
/
item
.
peinh
).
toFixed
(
2
);
}
},
{
display
:
"创建者"
,
name
:
"ernam"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"申请人"
,
name
:
"afnam"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
},
},
{
display
:
"评估价格"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
,
required
:
true
}
},
{
display
:
"价格基数"
,
name
:
"ebanPeinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999'
,
required
:
true
}
},
{
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
){
if
(
item
.
ebanPeinh
==
''
){
return
item
.
ebanNetwr
=
null
;
}
return
item
.
ebanNetwr
=
(
item
.
preis
*
item
.
menge
/
item
.
ebanPeinh
).
toFixed
(
2
);
}
//editor: {type: 'text'}
},
{
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
=
ZEBKN_NUM
;
}
},
{
display
:
"多重科目分配"
,
name
:
"vrtkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
)
{
var
bsart
=
$
(
"#bsart"
).
val
();
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if
(
bsart
==
"ZNE1"
&&
item
.
menge
>
1
){
return
item
.
vrtkz
=
1
;
}
}
},
{
display
:
"部分发票"
,
name
:
"twrkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
)
{
var
bsart
=
$
(
"#bsart"
).
val
();
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if
(
bsart
==
"ZNE1"
&&
item
.
menge
>
1
){
return
item
.
twrkz
=
1
;
}
}
},
{
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"主资产号"
,
name
:
"anln1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"子资产号"
,
name
:
"anln2"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"审批处理状态"
,
name
:
"banpr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
]
return
columns
;
}
//获取数据保存的参数
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
if
(
processAction
==
ProcessAction
.
BACK
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
//不验证
$
(
'#submitForm'
).
attr
(
'check'
,
false
);
}
var
extendedData
=
{};
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
if
(
_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
function
getId
()
{
return
$
(
'#id'
).
val
();
}
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
quotationId
=
value
;
}
function
reloadGird
()
{
itemGridManager
.
reload
();
}
function
getGridData
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
return
datas
;
}
function
getBsartNum
(){
var
datas
=
this
.
getGridData
();
datas
.
forEach
(
data
=>
{
})
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
0 → 100644
View file @
194c75f6
<%--采购申请--%>
<%@ page
contentType=
"text/html; charset=utf-8"
language=
"java"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
<x:script
src=
"/biz/topsun/sap/purchase/sapPurchaseDetail.js"
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"采购申请"
needStatus=
"true"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"version"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
/>
<x:hidden
name=
"fullId"
/>
<x:hidden
name=
"organId"
/>
<x:hidden
name=
"organName"
/>
<x:hidden
name=
"deptId"
/>
<x:hidden
name=
"deptName"
/>
<x:hidden
name=
"positionId"
/>
<x:hidden
name=
"positionName"
/>
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
</div>
</form>
<div
id=
"maingrid"
></div>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
0 → 100644
View file @
194c75f6
var
purchaseGridManager
=
null
,
refreshFlag
=
false
,
_roleId
=
null
,
purchaseSelectedList
=
[];
$
(
document
).
ready
(
function
()
{
initUI
();
initPurchaseListGrid
();
}
);
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
}
function
initPurchaseListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
});
purchaseGridManager
=
UICtrl
.
grid
(
'#purchaseGrid'
,
{
columns
:
[
{
display
:
"状态"
,
name
:
"statusTextView"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
}
,
{
display
:
"id"
,
name
:
"id"
,
width
:
"140"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
}
,
{
display
:
"需求跟踪编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"PR类型"
,
name
:
"bsartTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"采购申请编号"
,
name
:
"banfn"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
],
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchase/slicedSapPurchaseList.ajax?'
,
//parms: {requireItemId: $("#prepareItemId").val()},
toolbar
:
toolbarOptions
,
width
:
'99.8%'
,
height
:
'100%'
,
pageSize
:
100
,
heightDiff
:
-
4
,
//sortName: 'lastModifiedDate',
//sortOrder: 'desc',
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
false
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
enableObjectBag
:
true
,
onSuccess
:
function
(
data
)
{
if
(
data
.
error
)
{
Public
.
tip
(
data
.
error
);
}
}
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
viewHandler
(
data
.
parentId
);
},
onAfterShowData
:
function
(
currentData
)
{
}
}
);
UICtrl
.
setSearchAreaToggle
(
purchaseGridManager
);
}
/**
* 查看采购申请详情
* @param parentId 采购申请id
* @returns {boolean}
*/
function
viewHandler
(
parentId
)
{
if
(
!
parentId
)
{
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
if
(
!
row
)
{
return
row
;
}
parentId
=
row
.
parentId
;
}
UICtrl
.
addTabItem
({
tabid
:
'viewPurchase'
+
parentId
,
text
:
'查看采购申请'
,
url
:
web_app
.
name
+
'/purchase/loadPurchaseDetail.do?isReadOnly=true&id='
+
parentId
});
}
function
updateHandler
()
{
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
if
(
!
row
)
{
return
;
}
UICtrl
.
addTabItem
({
tabid
:
'updatePurchase'
+
row
.
parentId
,
text
:
'修改采购申请'
,
url
:
web_app
.
name
+
'/purchase/loadPurchaseDetail.do?id='
+
row
.
parentId
});
}
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'addPurchase'
,
text
:
'新增采购申请'
,
url
:
web_app
.
name
+
'/sapPurchase/forwardSapPurchaseDetail.job'
});
}
function
deleteHandler
()
{
var
rows
=
DataUtil
.
getObjectBagData
(
"purchaseGrid"
);
if
(
!
rows
||
rows
.
length
<
1
)
{
Public
.
tip
(
'common.warning.nochoose'
);
return
;
}
var
ids
=
[];
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
status
!=
0
)
{
Public
.
errorTip
(
'只能删除草稿状态的数据!'
);
return
;
}
ids
.
push
(
row
.
id
);
}
if
(
!
ids
)
{
return
;
}
Public
.
ajax
(
web_app
.
name
+
'/purchaseItem/deleteByIds.ajax'
,
{
ids
:
$
.
toJSON
(
ids
)},
function
()
{
reloadPurchaseGrid
();
});
}
function
reloadPurchaseGrid
()
{
var
params
=
$
(
"#queryMainForm"
).
formToJSON
();
UICtrl
.
gridSearch
(
purchaseGridManager
,
params
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
purchaseGridManager
,
param
);
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
0 → 100644
View file @
194c75f6
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
%>
<%@taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.comboDialog.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.commonTree.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.flexField.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/biz/topsun/sap/purchase/sapPurchaseList.js"
/>
'
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"container-fluid"
>
<div
id=
"layout"
>
<div
position=
"center"
title=
""
>
<x:title
title=
"搜索"
hideTable=
"queryMainForm"
/>
<form
class=
"hg-form ui-show"
method=
"post"
action=
""
id=
"queryMainForm"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"billCode"
label=
"需求跟踪编号"
labelCol=
"1"
/>
</div>
<x:searchButtons/>
</form>
<x:title
title=
"采购申请明细"
hideTable=
"#purchaseGrid"
name=
"list"
/>
<div
id=
"purchaseGrid"
style=
"margin:2px;"
></div>
</div>
</div>
</div>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/demo/controller/ResourceSearchController.java
View file @
194c75f6
package
com
.
huigou
.
topsun
.
demo
.
controller
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.topsun.resource.service.ResourceFiledService
;
import
com.huigou.topsun.technology.application.ProcessApplication
;
import
com.huigou.topsun.technology.domain.query.ProcessQueryRequest
;
...
...
@@ -7,10 +8,10 @@ import com.huigou.uasp.annotation.ControllerMapping;
import
com.huigou.uasp.bmp.common.easysearch.EasySearch
;
import
com.huigou.uasp.bmp.common.easysearch.domain.model.EasySearchParse
;
import
com.huigou.uasp.bmp.common.easysearch.domain.model.QuerySchemeField
;
import
com.huigou.uasp.bmp.configuration.application.DictionaryApplication
;
import
com.huigou.uasp.bmp.opm.application.MemEasySearcher
;
import
com.huigou.uasp.bmp.opm.application.impl.MemEasySearcherImpl
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -141,4 +142,37 @@ public class ResourceSearchController {
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
}
@EasySearch
(
queryName
=
"knttp"
)
public
Map
<
String
,
Object
>
knttpSelect
(
SDO
sdo
){
Integer
intPage
=
sdo
.
getInteger
(
"intPage"
,
1
);
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
List
<
QuerySchemeField
>
fields
=
Arrays
.
asList
(
new
QuerySchemeField
(
"科目分配类别"
,
"knttp"
,
"string"
,
100L
));
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
450L
);
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
String
paramValue
=
sdo
.
getString
(
"paramValue"
);
Map
<
String
,
String
>
knttp
=
DictUtil
.
getDictionary
(
"knttp"
);
knttp
.
forEach
((
key
,
value
)
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"knttp"
,
value
);
if
(
"ZFW"
.
equals
(
paramValue
))
{
mapList
.
add
(
map
);
}
else
if
(
"ZNE1"
.
equals
(
paramValue
))
{
if
(
"A"
.
equals
(
key
))
{
mapList
.
add
(
map
);
}
}
else
if
(
"ZNE2"
.
equals
(
paramValue
))
{
if
(
"F"
.
equals
(
key
)
||
"K"
.
equals
(
key
))
{
mapList
.
add
(
map
);
}
}
});
MemEasySearcher
<
Map
<
String
,
Object
>>
memEasySearcher
=
new
MemEasySearcherImpl
<>();
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/SapPurchaseApplication.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
application
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseQueryRequest
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:37
* @Description:
*/
public
interface
SapPurchaseApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchase/sapPurchase.xml"
;
String
PROCESS_DEFINITION_KEY
=
"sapPurchaseProc"
;
Map
<
String
,
Object
>
slicedSapPurchaseList
(
SapPurchaseQueryRequest
queryRequest
);
SapPurchase
loadSapPurchase
(
String
id
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/SapPurchaseItemApplication.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
application
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseItemQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/17:12
* @Description:
*/
public
interface
SapPurchaseItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchase/sapPurchaseItem.xml"
;
void
saveSapPurchaseItems
(
String
sapPurchaseId
,
List
<
SapPurchaseItem
>
sapPurchaseItems
);
Map
<
String
,
Object
>
querySapPurchaseItems
(
SapPurchaseItemQueryRequest
queryRequest
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/impl/SapPurchaseApplicationImpl.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
application
.
impl
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseApplication
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseItemApplication
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseQueryRequest
;
import
com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:38
* @Description:
*/
@Service
(
"sapPurchaseApplication"
)
public
class
SapPurchaseApplicationImpl
extends
FlowBroker
implements
SapPurchaseApplication
{
@Resource
private
SapPurchaseRepository
sapPurchaseRepository
;
@Resource
private
SapPurchaseItemApplication
sapPurchaseItemApplication
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
SapPurchase
sapPurchase
=
getBizEntity
(
SapPurchase
.
class
);
if
(
sapPurchase
.
isNew
())
{
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
sapPurchase
=
(
SapPurchase
)
commonDomainService
.
loadAndFillinProperties
(
sapPurchase
);
}
sapPurchase
=
sapPurchaseRepository
.
save
(
sapPurchase
);
List
<
SapPurchaseItem
>
sapPurchaseItems
=
getBizEntities
(
SapPurchaseItem
.
class
,
"sapPurchaseItems"
);
sapPurchaseItemApplication
.
saveSapPurchaseItems
(
sapPurchase
.
getId
(),
sapPurchaseItems
);
return
sapPurchase
.
getId
();
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
sapPurchaseRepository
.
getOne
(
bizId
));
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
SapPurchase
sapPurchase
=
sapPurchaseRepository
.
findOne
(
bizId
);
sapPurchase
.
setStatusId
(
status
.
getId
());
sapPurchaseRepository
.
save
(
sapPurchase
);
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
SapPurchase
sapPurchase
=
sapPurchaseRepository
.
findOne
(
bizId
);
sapPurchase
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
sapPurchaseRepository
.
save
(
sapPurchase
);
}
/**
* @param delegateTask
* @param destActivityId 回退到的目标节点id
*/
@Override
protected
void
onBack
(
DelegateTask
delegateTask
,
String
destActivityId
)
{
super
.
onBack
(
delegateTask
,
destActivityId
);
if
(
"Apply"
.
equalsIgnoreCase
(
destActivityId
))
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
SapPurchase
sapPurchase
=
sapPurchaseRepository
.
findOne
(
bizId
);
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapPurchaseRepository
.
save
(
sapPurchase
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedSapPurchaseList
(
SapPurchaseQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseList"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
SapPurchase
loadSapPurchase
(
String
id
)
{
return
sapPurchaseRepository
.
findOne
(
id
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/impl/SapPurchaseItemApplicationImpl.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseItemApplication
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseItemQueryRequest
;
import
com.huigou.topsun.sap.purchase.repository.SapPurchaseItemRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.StringUtil
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/17:12
* @Description:
*/
@Service
(
"sapPurchaseItemApplication"
)
public
class
SapPurchaseItemApplicationImpl
extends
BaseApplication
implements
SapPurchaseItemApplication
{
@Resource
private
SapPurchaseItemRepository
sapPurchaseItemRepository
;
@Override
public
void
saveSapPurchaseItems
(
String
sapPurchaseId
,
List
<
SapPurchaseItem
>
sapPurchaseItems
)
{
sapPurchaseItems
.
forEach
(
sapPurchaseItem
->{
sapPurchaseItem
.
setSapPurchaseId
(
sapPurchaseId
);
sapPurchaseItemRepository
.
save
(
sapPurchaseItem
);
});
}
@Override
public
Map
<
String
,
Object
>
querySapPurchaseItems
(
SapPurchaseItemQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getSapPurchaseId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.demo.application.LeaveApplication
;
import
com.huigou.topsun.demo.domain.model.Leave
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseApplication
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:21
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchase"
)
public
class
SapPurchaseController
extends
CommonController
{
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/purchase/"
;
}
@Resource
private
SapPurchaseApplication
sapPurchaseApplication
;
public
String
forwardSapPurchaseList
(){
return
forward
(
"sapPurchaseList"
);
}
public
String
slicedSapPurchaseList
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseApplication
.
slicedSapPurchaseList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardSapPurchaseDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
LeaveApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
SapPurchase
sapPurchase
=
new
SapPurchase
();
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
sapPurchase
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
}
public
String
showSapPurchaseDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
SapPurchase
sapPurchase
=
sapPurchaseApplication
.
loadSapPurchase
(
id
);
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseItemController.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
controller
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseItemApplication
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
com.huigou.topsun.sap.purchase.domain.query.SapPurchaseItemQueryRequest
;
import
com.huigou.topsun.sap.purchase.repository.SapPurchaseItemRepository
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.SkipAuth
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/17:24
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchaseItem"
)
public
class
SapPurchaseItemController
extends
CommonController
{
@Resource
private
SapPurchaseItemApplication
sapPurchaseItemApplication
;
@Resource
private
SapPurchaseItemRepository
sapPurchaseItemRepository
;
public
String
querySapPurchaseItems
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseItemQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseItemQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseItemApplication
.
querySapPurchaseItems
(
queryRequest
);
return
toResult
(
map
);
}
/* @SkipAuth
public String test(){
SDO sdo = this.getSDO();
String bsart = sdo.getString("bsart");
List<SapPurchaseItem> bySapPurchaseBsart = sapPurchaseItemRepository.findBySapPurchase_bsart(bsart);
return toResult(bySapPurchaseBsart);
}*/
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
domain
;
import
javax.persistence.*
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
java.util.List
;
/**
* SAP采购申请
* @TableName sap_purchase
*/
@Table
(
name
=
"sap_purchase"
)
@Entity
@Data
public
class
SapPurchase
extends
FlowBillAbstractEntity
{
/**
* pr类型
*/
@Column
(
name
=
"BSART"
)
private
String
bsart
;
/**
* 采购申请编号
*/
@Column
(
name
=
"BANFN"
)
private
String
banfn
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapPurchase"
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/SapPurchaseItem.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
javax.persistence.*
;
import
cn.hutool.core.lang.Dict
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
/**
* SAP采购申请项次
* @TableName sap_purchase_item
*/
@Table
(
name
=
"sap_purchase_item"
)
@Entity
@Data
public
class
SapPurchaseItem
extends
AbstractEntity
{
/**
* SAP采购申请id
*/
@Column
(
name
=
"SAP_PURCHASE_ID"
)
private
String
sapPurchaseId
;
/**
* 申购项次号
*/
@Column
(
name
=
"BNFPO"
)
private
Integer
bnfpo
;
/**
* 项次类别
*/
@Column
(
name
=
"PSTYP"
)
private
String
pstyp
;
/**
* 科目分配类别
*/
@Column
(
name
=
"KNTTP"
)
private
String
knttp
;
/**
* 工厂
*/
@Column
(
name
=
"WERKS"
)
private
String
werks
;
/**
* 工厂名称
*/
@Column
(
name
=
"NAME1"
)
private
String
name1
;
/**
* 库存地点
*/
@Column
(
name
=
"LGORT"
)
private
String
lgort
;
/**
* 库存地点名称
*/
@Column
(
name
=
"LGOBE"
)
private
String
lgobe
;
/**
* 物料编号
*/
@Column
(
name
=
"MATNR"
)
private
String
matnr
;
/**
* 短文本
*/
@Column
(
name
=
"TXZ01"
)
private
String
txz01
;
/**
* 物料组
*/
@Column
(
name
=
"MATKL"
)
private
String
matkl
;
/**
* 申购数量
*/
@Column
(
name
=
"MENGE"
)
private
BigDecimal
menge
;
/**
* 申购数量单位
*/
@Column
(
name
=
"MEINS"
)
private
String
meins
;
/**
* 采购组
*/
@Column
(
name
=
"EKGRP"
)
private
String
ekgrp
;
/**
* 申请日期
*/
@Column
(
name
=
"BADAT"
)
private
Date
badat
;
/**
* 创建日期
*/
@Column
(
name
=
"ERDAT"
)
private
Date
erdat
;
/**
* 批准日期
*/
@Column
(
name
=
"FRGDT"
)
private
Date
frgdt
;
/**
* 要求交货日期
*/
@Column
(
name
=
"LFDAT"
)
private
Date
lfdat
;
/**
* 服务主数据编号
*/
@Column
(
name
=
"SRVPOS"
)
private
String
srvpos
;
/**
* 服务短文本
*/
@Column
(
name
=
"KTEXT1"
)
private
String
ktext1
;
/**
* 服务条目数量
*/
@Column
(
name
=
"ESLL_MENGE"
)
private
BigDecimal
esllMenge
;
/**
* 服务计量单位
*/
@Column
(
name
=
"ESLL_MEINS"
)
private
String
esllMeins
;
/**
* 定价基数
*/
@Column
(
name
=
"PEINH"
)
private
Integer
peinh
;
/**
* 服务预估单价
*/
@Column
(
name
=
"BRTWR"
)
private
BigDecimal
brtwr
;
/**
* 服务预估金额
*/
@Column
(
name
=
"NETWR"
)
private
BigDecimal
netwr
;
/**
* 创建者
*/
@Column
(
name
=
"ERNAM"
)
private
String
ernam
;
/**
* 申请人
*/
@Column
(
name
=
"AFNAM"
)
private
String
afnam
;
/**
* 评估价格
*/
@Column
(
name
=
"PREIS"
)
private
BigDecimal
preis
;
/**
* 价格基数
*/
@Column
(
name
=
"EBAN_PEINH"
)
private
Integer
ebanPeinh
;
/**
* 币种
*/
@Column
(
name
=
"WAERS"
)
private
String
waers
;
/**
* 评估金额
*/
@Column
(
name
=
"EBAN_NETWR"
)
private
BigDecimal
ebanNetwr
;
/**
* 会计分配序号
*/
@Column
(
name
=
"ZEBKN"
)
private
Integer
zebkn
;
/**
* 多重科目分配
*/
@Column
(
name
=
"VRTKZ"
)
private
String
vrtkz
;
/**
* 部分发票
*/
@Column
(
name
=
"TWRKZ"
)
private
String
twrkz
;
/**
* PR分解数量
*/
@Column
(
name
=
"EKBN_MENGE"
)
private
Long
ekbnMenge
;
/**
* 总账科目
*/
@Column
(
name
=
"SAKTO"
)
private
String
sakto
;
/**
* 成本中心
*/
@Column
(
name
=
"KOSTL"
)
private
String
kostl
;
/**
* 订单号
*/
@Column
(
name
=
"AUFNR"
)
private
String
aufnr
;
/**
* 主资产号
*/
@Column
(
name
=
"ANLN1"
)
private
String
anln1
;
/**
* 子资产号
*/
@Column
(
name
=
"ANLN2"
)
private
String
anln2
;
/**
* 审批处理状态
*/
@Column
(
name
=
"BANPR"
)
private
String
banpr
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/query/SapPurchaseItemQueryRequest.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:45
* @Description:
*/
@Data
public
class
SapPurchaseItemQueryRequest
extends
QueryAbstractRequest
{
/**
* 采购申请id
*/
private
String
sapPurchaseId
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/query/SapPurchaseQueryRequest.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:45
* @Description:
*/
@Data
public
class
SapPurchaseQueryRequest
extends
QueryAbstractRequest
{
/**
* 需求跟踪编号
*/
private
String
billCode
;
/**
* pr类型
*/
private
String
bsart
;
/**
* 采购申请编号
*/
private
String
banfn
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/repository/SapPurchaseItemRepository.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
repository
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:20
* @Description:
*/
public
interface
SapPurchaseItemRepository
extends
JpaRepository
<
SapPurchaseItem
,
String
>
{
//List<SapPurchaseItem> findBySapPurchase_bsart(String bsart);
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/repository/SapPurchaseRepository.java
0 → 100644
View file @
194c75f6
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
repository
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2023/12/27/10:19
* @Description:
*/
public
interface
SapPurchaseRepository
extends
JpaRepository
<
SapPurchase
,
String
>
{
//SapPurchase findBySapPurchaseItems_bnfpo(String bnfpo);
}
topsun/src/main/resources/config/bpm/topsun/sap/purchase/sapPurchaseProc.bpmn
0 → 100644
View file @
194c75f6
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.activiti.org/test"
>
<process
id=
"sapPurchaseProc"
name=
"采购申请"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"采购申请"
activiti:formKey=
"sapPurchase/showSapPurchaseDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"采购审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"sapPurchase/showSapPurchaseDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseApplication}"
></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics
isSequential=
"false"
activiti:collection=
"handlerList"
activiti:elementVariable=
"assignee"
>
<completionCondition>
${chiefApprovePassed}
</completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow
id=
"flow1"
sourceRef=
"startevent1"
targetRef=
"Apply"
></sequenceFlow>
<sequenceFlow
id=
"flow2"
sourceRef=
"Apply"
targetRef=
"Approve"
></sequenceFlow>
<exclusiveGateway
id=
"ApproveFinished"
name=
"审批结束"
></exclusiveGateway>
<sequenceFlow
id=
"flow3"
name=
"审批通过"
sourceRef=
"ApprovePassed"
targetRef=
"ApproveFinished"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${approvePassed}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"flow4"
name=
"审批结束"
sourceRef=
"ApproveFinished"
targetRef=
"endevent1"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${approveFinished}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"flow5"
name=
"审批未结束"
sourceRef=
"ApproveFinished"
targetRef=
"Approve"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${!approveFinished}]]>
</conditionExpression>
</sequenceFlow>
<exclusiveGateway
id=
"ApprovePassed"
name=
"审批通过"
></exclusiveGateway>
<sequenceFlow
id=
"flow6"
sourceRef=
"Approve"
targetRef=
"ApprovePassed"
></sequenceFlow>
<sequenceFlow
id=
"flow9"
name=
"审批未通过"
sourceRef=
"ApprovePassed"
targetRef=
"Apply"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${!approvePassed}]]>
</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_sapPurchaseProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"sapPurchaseProc"
id=
"BPMNPlane_sapPurchaseProc"
>
<bpmndi:BPMNShape
bpmnElement=
"startevent1"
id=
"BPMNShape_startevent1"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"355.0"
y=
"50.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"endevent1"
id=
"BPMNShape_endevent1"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"355.0"
y=
"550.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"Apply"
id=
"BPMNShape_Apply"
>
<omgdc:Bounds
height=
"55.0"
width=
"161.0"
x=
"292.0"
y=
"140.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"Approve"
id=
"BPMNShape_Approve"
>
<omgdc:Bounds
height=
"55.0"
width=
"161.0"
x=
"292.0"
y=
"240.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"ApproveFinished"
id=
"BPMNShape_ApproveFinished"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"352.0"
y=
"440.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"ApprovePassed"
id=
"BPMNShape_ApprovePassed"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"352.0"
y=
"349.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"flow1"
id=
"BPMNEdge_flow1"
>
<omgdi:waypoint
x=
"372.0"
y=
"85.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"140.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow2"
id=
"BPMNEdge_flow2"
>
<omgdi:waypoint
x=
"372.0"
y=
"195.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"240.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow3"
id=
"BPMNEdge_flow3"
>
<omgdi:waypoint
x=
"372.0"
y=
"389.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"440.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"48.0"
x=
"320.0"
y=
"396.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow4"
id=
"BPMNEdge_flow4"
>
<omgdi:waypoint
x=
"372.0"
y=
"480.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"550.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"48.0"
x=
"382.0"
y=
"489.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
>
<omgdi:waypoint
x=
"392.0"
y=
"460.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"459.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"317.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"267.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"489.0"
y=
"267.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"453.0"
y=
"267.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"60.0"
x=
"459.0"
y=
"411.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
>
<omgdi:waypoint
x=
"372.0"
y=
"295.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"349.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow9"
id=
"BPMNEdge_flow9"
>
<omgdi:waypoint
x=
"352.0"
y=
"369.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"231.0"
y=
"369.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"231.0"
y=
"167.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"292.0"
y=
"167.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"60.0"
x=
"257.0"
y=
"376.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
0 → 100644
View file @
194c75f6
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseList"
label=
"SAP采购申请"
table=
"sap_purchase"
>
<sql-query>
select t.* from sap_purchase t
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
</query>
</query-mappings>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/sapPurchase/sapPurchaseItem.xml
0 → 100644
View file @
194c75f6
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseItems"
label=
"SAP采购申请明细"
table=
"sap_purchase_item"
>
<sql-query>
select t.* from sap_purchase_item t
</sql-query>
<condition
column=
"SAP_PURCHASE_ID"
name=
"sapPurchaseId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
</query-mappings>
\ No newline at end of file
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