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
a497ae72
Commit
a497ae72
authored
Dec 29, 2023
by
全洪江
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
713f7bb2
194c75f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
2012 additions
and
35 deletions
+2012
-35
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
CostCenterApplicationImpl.java
...ostCenter/application/impl/CostCenterApplicationImpl.java
+27
-1
CostCenter.java
...a/com/huigou/topsun/sap/costCenter/domain/CostCenter.java
+35
-0
CostCenterQueryRequest.java
...n/sap/costCenter/domain/query/CostCenterQueryRequest.java
+2
-2
returnJSON.json
...a/com/huigou/topsun/sap/costCenter/domain/returnJSON.json
+16
-0
CostCenterReturnVo.java
...u/topsun/sap/costCenter/domain/vo/CostCenterReturnVo.java
+211
-0
CostCenterVo.java
.../huigou/topsun/sap/costCenter/domain/vo/CostCenterVo.java
+2
-0
SapFixedAssetsApplicationImpl.java
...ssets/application/impl/SapFixedAssetsApplicationImpl.java
+34
-16
SapFixedAssets.java
.../huigou/topsun/sap/fixedAssets/domain/SapFixedAssets.java
+147
-7
SapFixedAssetsReturnJson.json
...psun/sap/fixedAssets/domain/SapFixedAssetsReturnJson.json
+13
-0
SapFixedAssetsReturnVo.java
...sun/sap/fixedAssets/domain/vo/SapFixedAssetsReturnVo.java
+174
-0
SapPriceMasterDataApplicationImpl.java
...a/application/impl/SapPriceMasterDataApplicationImpl.java
+5
-6
SapPriceMasterDataReturnVo.java
...priceMasterData/domain/vo/SapPriceMasterDataReturnVo.java
+1
-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 @
a497ae72
...
...
@@ -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 @
a497ae72
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
0 → 100644
View file @
a497ae72
<%--采购申请--%>
<%@ 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 @
a497ae72
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 @
a497ae72
<%@ 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 @
a497ae72
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/costCenter/application/impl/CostCenterApplicationImpl.java
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
application
.
impl
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.costCenter.application.CostCenterApplication
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterReturnVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterVo
;
import
com.huigou.topsun.sap.costCenter.repository.CostCenterRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
...
...
@@ -13,6 +17,7 @@ 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.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -84,6 +89,26 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
CostCenter
costCenter
=
costCenterRepository
.
findOne
(
bizId
);
costCenter
.
setStatusId
(
status
.
getId
());
costCenterRepository
.
save
(
costCenter
);
// 封装JSON数据
String
returnJSON
=
getReturnVo
(
costCenter
);
}
/**
* 封装返回JSON
*/
private
String
getReturnVo
(
CostCenter
costCenter
)
{
CostCenterReturnVo
costCenterReturnVo
=
new
CostCenterReturnVo
();
BeanUtils
.
copyProperties
(
costCenter
,
costCenterReturnVo
);
// 转换为JSON
ObjectMapper
objectMapper
=
new
ObjectMapper
();
String
returnJson
=
null
;
try
{
returnJson
=
objectMapper
.
writeValueAsString
(
costCenterReturnVo
);
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
returnJson
;
}
@Override
...
...
@@ -115,8 +140,9 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
CostCenter
costCenter
=
getBizEntity
(
CostCenter
.
class
);
if
(
costCenter
.
isNew
())
{
Operator
operator
=
this
.
getOperator
();
BeanUtils
.
copyProperties
(
operator
,
costCenter
);
costCenter
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
costCenter
=
(
CostCenter
)
commonDomainService
.
loadAndFillinProperties
(
costCenter
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/CostCenter.java
View file @
a497ae72
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -89,6 +90,40 @@ public class CostCenter extends FlowBillAbstractEntity {
@Column
(
name
=
"reason"
)
private
String
reason
;
/**
* 联系方式
*/
@Column
(
name
=
"tele_phone"
)
private
String
telePhone
;
/**
* ********************************返回接收数据***********************************
*/
/**
* 消息类型: S 成功,E 错误,W 警告,I 信息,A 中断
*/
@Column
(
name
=
"TYPE"
)
private
String
TYPE
;
/**
* 消息类__ID
*/
@Column
(
name
=
"message_id"
)
private
String
messageId
;
/**
* 消息编号
*/
@Column
(
name
=
"NUMBER"
)
private
BigDecimal
NUMBER
;
/**
* 消息文本
*/
@Column
(
name
=
"MESSAGE"
)
private
String
MESSAGE
;
/**
* 应用程序日志,日志号
*/
@Column
(
name
=
"LOG_NO"
)
private
String
LOG_NO
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapCostCenter"
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/query/CostCenterQueryRequest.java
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
com.topsunit.query.annotations.Dictionary
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.util.Date
;
/**
...
...
@@ -100,4 +98,6 @@ public class CostCenterQueryRequest extends QueryAbstractRequest {
private
String
personMemberId
;
private
String
personMemberName
;
private
String
telePhone
;
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/returnJSON.json
0 → 100644
View file @
a497ae72
{
"KOSTL"
:
"1"
,
"DATAB"
:
"2023.12.28"
,
"DATBI"
:
"2023.12.31"
,
"KTEXT"
:
"1"
,
"LTEXT"
:
"1"
,
"VERAK"
:
"1"
,
"KOSAR"
:
"E"
,
"PRCTR"
:
"10001001"
,
"formType"
:
"add"
,
"reason"
:
"1"
,
"fillinDate"
:
1703821440000
,
"deptName"
:
"测试使用部门"
,
"personMemberName"
:
"系统管理员"
,
"telePhone"
:
"1"
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/vo/CostCenterReturnVo.java
0 → 100644
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* title:
* author:ZHT
* date:2023/12/29
* description:
*/
@JsonIgnoreProperties
public
class
CostCenterReturnVo
implements
Serializable
{
/**
* 成本中心编码
*/
@JsonProperty
(
"KOSTL"
)
private
String
kostl
;
/**
* 有效期自 默认当年1月1日
*/
@JsonProperty
(
"DATAB"
)
@JsonFormat
(
pattern
=
"yyyy.MM.dd"
,
timezone
=
"GTM-8"
)
private
Date
datab
;
/**
* 有效截至日 默认9999.12.31
*/
@JsonProperty
(
"DATBI"
)
@JsonFormat
(
pattern
=
"yyyy.MM.dd"
,
timezone
=
"GTM-8"
)
private
Date
datbi
;
/**
* 名称
*/
@JsonProperty
(
"KTEXT"
)
private
String
ktext
;
/**
* 描述
*/
@JsonProperty
(
"LTEXT"
)
private
String
ltext
;
/**
* 负责人
*/
@JsonProperty
(
"VERAK"
)
private
String
verak
;
/**
* 成本中心类型
* 管理类 L
* 销售类 V
* 研发类 E
* 间接生产类 G
* 直接生产类 F
*/
@JsonProperty
(
"KOSAR"
)
private
String
kosar
;
/**
* 利润中心
* 10001000 广州宝绅科技利润中心
* 10001001 广州宝绅RFID利润中心
*/
@JsonProperty
(
"PRCTR"
)
private
String
prctr
;
/**
* 业务类型
*/
@JsonProperty
(
"formType"
)
private
String
formType
;
/**
* 创建原因 CHAR 100 手工输入
*/
@JsonProperty
(
"reason"
)
private
String
reason
;
@JsonProperty
(
"fillinDate"
)
private
Date
fillinDate
;
@JsonProperty
(
"deptName"
)
private
String
deptName
;
@JsonProperty
(
"personMemberName"
)
private
String
personMemberName
;
@JsonProperty
(
"telePhone"
)
private
String
telePhone
;
public
String
getKostl
()
{
return
kostl
;
}
public
void
setKostl
(
String
kostl
)
{
this
.
kostl
=
kostl
;
}
public
Date
getDatab
()
{
return
datab
;
}
public
void
setDatab
(
Date
datab
)
{
this
.
datab
=
datab
;
}
public
Date
getDatbi
()
{
return
datbi
;
}
public
void
setDatbi
(
Date
datbi
)
{
this
.
datbi
=
datbi
;
}
public
String
getKtext
()
{
return
ktext
;
}
public
void
setKtext
(
String
ktext
)
{
this
.
ktext
=
ktext
;
}
public
String
getLtext
()
{
return
ltext
;
}
public
void
setLtext
(
String
ltext
)
{
this
.
ltext
=
ltext
;
}
public
String
getVerak
()
{
return
verak
;
}
public
void
setVerak
(
String
verak
)
{
this
.
verak
=
verak
;
}
public
String
getKosar
()
{
return
kosar
;
}
public
void
setKosar
(
String
kosar
)
{
this
.
kosar
=
kosar
;
}
public
String
getPrctr
()
{
return
prctr
;
}
public
void
setPrctr
(
String
prctr
)
{
this
.
prctr
=
prctr
;
}
public
String
getFormType
()
{
return
formType
;
}
public
void
setFormType
(
String
formType
)
{
this
.
formType
=
formType
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Date
getFillinDate
()
{
return
fillinDate
;
}
public
void
setFillinDate
(
Date
fillinDate
)
{
this
.
fillinDate
=
fillinDate
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getPersonMemberName
()
{
return
personMemberName
;
}
public
void
setPersonMemberName
(
String
personMemberName
)
{
this
.
personMemberName
=
personMemberName
;
}
public
String
getTelePhone
()
{
return
telePhone
;
}
public
void
setTelePhone
(
String
telePhone
)
{
this
.
telePhone
=
telePhone
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/vo/CostCenterVo.java
View file @
a497ae72
...
...
@@ -105,6 +105,8 @@ public class CostCenterVo implements Serializable {
private
String
personMemberName
;
private
String
telePhone
;
public
static
CostCenterVo
getCostCenterVo
(
CostCenter
costCenter
)
{
return
JSON
.
parseObject
(
JSON
.
toJSONString
(
costCenter
),
CostCenterVo
.
class
);
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/impl/SapFixedAssetsApplicationImpl.java
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
application
.
impl
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.context.Operator
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.demo.domain.model.Leave
;
import
com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsApplication
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssets
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.vo.SapFixedAssetsReturnVo
;
import
com.huigou.topsun.sap.fixedAssets.domain.vo.SapFixedAssetsVo
;
import
com.huigou.topsun.sap.fixedAssets.repository.SapFixedAssetsRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
...
...
@@ -15,12 +17,15 @@ import com.huigou.util.ClassHelper;
import
com.huigou.util.StringUtil
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.net.SocketTimeoutException
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.locks.ReentrantReadWriteLock
;
/**
* @Auther: xin.lu
...
...
@@ -63,19 +68,8 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
}
else
{
// 新增
// 封装填报时间
long
timestamp
=
System
.
currentTimeMillis
();
sapFixedAssets
.
setFillinDate
(
new
Date
(
timestamp
));
// 封装人员信息
sapFixedAssets
.
setFullId
(
operator
.
getFullId
());
sapFixedAssets
.
setOrganId
(
operator
.
getOrgId
());
sapFixedAssets
.
setOrganName
(
operator
.
getOrgName
());
sapFixedAssets
.
setDeptId
(
operator
.
getDeptId
());
sapFixedAssets
.
setDeptName
(
operator
.
getDeptName
());
sapFixedAssets
.
setPositionId
(
operator
.
getPositionId
());
sapFixedAssets
.
setPositionName
(
operator
.
getPositionName
());
sapFixedAssets
.
setPersonMemberId
(
operator
.
getPersonMemberId
());
sapFixedAssets
.
setPersonMemberName
(
operator
.
getPersonMemberName
());
sapFixedAssets
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
BeanUtils
.
copyProperties
(
operator
,
sapFixedAssets
);
// sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets
.
setZflg
(
1
);
sapFixedAssets
=
sapFixedAssetsRepository
.
saveAndFlush
(
sapFixedAssets
);
}
...
...
@@ -90,6 +84,26 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
SapFixedAssets
fixedAssets
=
sapFixedAssetsRepository
.
findOne
(
bizId
);
fixedAssets
.
setStatusId
(
status
.
getId
());
sapFixedAssetsRepository
.
save
(
fixedAssets
);
// 封装返回数据
String
returnJSON
=
getReturnVo
(
fixedAssets
);
}
/**
* 封装返回JSON
*/
private
String
getReturnVo
(
SapFixedAssets
fixedAssets
)
{
SapFixedAssetsReturnVo
sapFixedAssetsReturnVo
=
new
SapFixedAssetsReturnVo
();
BeanUtils
.
copyProperties
(
fixedAssets
,
sapFixedAssetsReturnVo
);
// 转JSON
ObjectMapper
objectMapper
=
new
ObjectMapper
();
String
returnJson
=
null
;
try
{
returnJson
=
objectMapper
.
writeValueAsString
(
sapFixedAssetsReturnVo
);
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
returnJson
;
}
@Override
...
...
@@ -121,11 +135,15 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
SapFixedAssets
sapFixedAssets
=
getBizEntity
(
SapFixedAssets
.
class
);
Operator
operator
=
this
.
getOperator
();
if
(
sapFixedAssets
.
isNew
())
{
sapFixedAssets
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapFixedAssets
.
setZflg
(
1
);
BeanUtils
.
copyProperties
(
operator
,
sapFixedAssets
);
sapFixedAssets
.
setZbpmn
(
sapFixedAssets
.
getBillCode
());
}
else
{
sapFixedAssets
=
(
SapFixedAssets
)
commonDomainService
.
loadAndFillinProperties
(
sapFixedAssets
);
sapFixedAssets
.
setZflg
(
2
);
sapFixedAssets
=
(
SapFixedAssets
)
commonDomainService
.
loadAndFillinProperties
(
sapFixedAssets
);
}
sapFixedAssets
=
sapFixedAssetsRepository
.
save
(
sapFixedAssets
);
return
sapFixedAssets
.
getId
();
...
...
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/domain/SapFixedAssets.java
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
domain
;
import
java.math.BigDecimal
;
import
javax.persistence.*
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
/**
* SAP固定资产主数据
*
* @TableName sap_fixed_assets
*/
@Table
(
name
=
"sap_fixed_assets"
)
@Table
(
name
=
"sap_fixed_assets"
)
@Entity
@Data
public
class
SapFixedAssets
extends
FlowBillAbstractEntity
{
/**
* BPM单号
*/
@Column
(
name
=
"zbpmn"
)
private
String
zbpmn
;
...
...
@@ -30,7 +31,7 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/**
* 主资产号
;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*
;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*/
@Column
(
name
=
"anln1"
)
private
String
anln1
;
...
...
@@ -85,9 +86,148 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
private
String
kostlv
;
private
static
final
long
serialVersionUID
=
1L
;
/**
* ***********返回接收数据*****************
*/
/**
* 消息类型
*/
@Column
(
name
=
"MSGTY"
)
private
String
MSGTY
;
/**
* 消息文本
*/
@Column
(
name
=
"MSGTX"
)
private
String
MSGTX
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapFixedAssets"
;
}
public
SapFixedAssets
()
{
}
public
SapFixedAssets
(
String
zbpmn
,
Integer
zflg
,
String
anln1
,
String
anlkl
,
String
bukrs
,
String
txt50
,
String
invnr
,
BigDecimal
menge
,
String
meins
,
String
kostl
,
String
kostlv
)
{
this
.
zbpmn
=
zbpmn
;
this
.
zflg
=
zflg
;
this
.
anln1
=
anln1
;
this
.
anlkl
=
anlkl
;
this
.
bukrs
=
bukrs
;
this
.
txt50
=
txt50
;
this
.
invnr
=
invnr
;
this
.
menge
=
menge
;
this
.
meins
=
meins
;
this
.
kostl
=
kostl
;
this
.
kostlv
=
kostlv
;
}
public
SapFixedAssets
(
String
MSGTY
,
String
MSGTX
)
{
this
.
MSGTY
=
MSGTY
;
this
.
MSGTX
=
MSGTX
;
}
public
String
getZbpmn
()
{
return
zbpmn
;
}
public
void
setZbpmn
(
String
zbpmn
)
{
this
.
zbpmn
=
zbpmn
;
}
public
Integer
getZflg
()
{
return
zflg
;
}
public
void
setZflg
(
Integer
zflg
)
{
this
.
zflg
=
zflg
;
}
public
String
getAnln1
()
{
return
anln1
;
}
public
void
setAnln1
(
String
anln1
)
{
this
.
anln1
=
anln1
;
}
public
String
getAnlkl
()
{
return
anlkl
;
}
public
void
setAnlkl
(
String
anlkl
)
{
this
.
anlkl
=
anlkl
;
}
public
String
getBukrs
()
{
return
bukrs
;
}
public
void
setBukrs
(
String
bukrs
)
{
this
.
bukrs
=
bukrs
;
}
public
String
getTxt50
()
{
return
txt50
;
}
public
void
setTxt50
(
String
txt50
)
{
this
.
txt50
=
txt50
;
}
public
String
getInvnr
()
{
return
invnr
;
}
public
void
setInvnr
(
String
invnr
)
{
this
.
invnr
=
invnr
;
}
public
BigDecimal
getMenge
()
{
return
menge
;
}
public
void
setMenge
(
BigDecimal
menge
)
{
this
.
menge
=
menge
;
}
public
String
getMeins
()
{
return
meins
;
}
public
void
setMeins
(
String
meins
)
{
this
.
meins
=
meins
;
}
public
String
getKostl
()
{
return
kostl
;
}
public
void
setKostl
(
String
kostl
)
{
this
.
kostl
=
kostl
;
}
public
String
getKostlv
()
{
return
kostlv
;
}
public
void
setKostlv
(
String
kostlv
)
{
this
.
kostlv
=
kostlv
;
}
public
String
getMSGTY
()
{
return
MSGTY
;
}
public
void
setMSGTY
(
String
MSGTY
)
{
this
.
MSGTY
=
MSGTY
;
}
public
String
getMSGTX
()
{
return
MSGTX
;
}
public
void
setMSGTX
(
String
MSGTX
)
{
this
.
MSGTX
=
MSGTX
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/domain/SapFixedAssetsReturnJson.json
0 → 100644
View file @
a497ae72
{
"ZBPMN"
:
null
,
"ZFLG"
:
null
,
"ANLN1"
:
"1"
,
"ANLKL"
:
"1"
,
"BUKRS"
:
"1"
,
"TXT50"
:
"1"
,
"INVNR"
:
"1"
,
"MENGE"
:
1
,
"MEINS"
:
"1"
,
"KOSTL"
:
"666666"
,
"KOSTLV"
:
"1"
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/domain/vo/SapFixedAssetsReturnVo.java
0 → 100644
View file @
a497ae72
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* title:
* author:ZHT
* date:2023/12/29
* description:
*/
@JsonIgnoreProperties
public
class
SapFixedAssetsReturnVo
implements
Serializable
{
/**
* BPM单号
*/
@JsonProperty
(
"ZBPMN"
)
private
String
zbpmn
;
/**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/
@JsonProperty
(
"ZFLG"
)
private
Integer
zflg
;
/**
* 主资产号
* ;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*/
@JsonProperty
(
value
=
"ANLN1"
,
required
=
true
)
private
String
anln1
;
/**
* 资产分类
* 当创建标识为1,即创建时,资产分类必输。
*/
@JsonProperty
(
value
=
"ANLKL"
,
required
=
true
)
private
String
anlkl
;
/**
* 公司代码(必填)
*/
@JsonProperty
(
"BUKRS"
)
private
String
bukrs
;
/**
* 文本(必填)
*/
@JsonProperty
(
"TXT50"
)
private
String
txt50
;
/**
* 存货号;存放地点
*/
@JsonProperty
(
value
=
"INVNR"
,
required
=
true
)
private
String
invnr
;
/**
* 数量
*/
@JsonProperty
(
value
=
"MENGE"
,
required
=
true
)
private
BigDecimal
menge
;
/**
* 基本计量单位
*/
@JsonProperty
(
value
=
"MEINS"
,
required
=
true
)
private
String
meins
;
/**
* 成本中心(必填)
*/
@JsonProperty
(
"KOSTL"
)
private
String
kostl
;
/**
* 责任成本中心
*/
@JsonProperty
(
value
=
"KOSTLV"
,
required
=
true
)
private
String
kostlv
;
public
String
getZbpmn
()
{
return
zbpmn
;
}
public
void
setZbpmn
(
String
zbpmn
)
{
this
.
zbpmn
=
zbpmn
;
}
public
Integer
getZflg
()
{
return
zflg
;
}
public
void
setZflg
(
Integer
zflg
)
{
this
.
zflg
=
zflg
;
}
public
String
getAnln1
()
{
return
anln1
;
}
public
void
setAnln1
(
String
anln1
)
{
this
.
anln1
=
anln1
;
}
public
String
getAnlkl
()
{
return
anlkl
;
}
public
void
setAnlkl
(
String
anlkl
)
{
this
.
anlkl
=
anlkl
;
}
public
String
getBukrs
()
{
return
bukrs
;
}
public
void
setBukrs
(
String
bukrs
)
{
this
.
bukrs
=
bukrs
;
}
public
String
getTxt50
()
{
return
txt50
;
}
public
void
setTxt50
(
String
txt50
)
{
this
.
txt50
=
txt50
;
}
public
String
getInvnr
()
{
return
invnr
;
}
public
void
setInvnr
(
String
invnr
)
{
this
.
invnr
=
invnr
;
}
public
BigDecimal
getMenge
()
{
return
menge
;
}
public
void
setMenge
(
BigDecimal
menge
)
{
this
.
menge
=
menge
;
}
public
String
getMeins
()
{
return
meins
;
}
public
void
setMeins
(
String
meins
)
{
this
.
meins
=
meins
;
}
public
String
getKostl
()
{
return
kostl
;
}
public
void
setKostl
(
String
kostl
)
{
this
.
kostl
=
kostl
;
}
public
String
getKostlv
()
{
return
kostlv
;
}
public
void
setKostlv
(
String
kostlv
)
{
this
.
kostlv
=
kostlv
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/priceMasterData/application/impl/SapPriceMasterDataApplicationImpl.java
View file @
a497ae72
...
...
@@ -48,17 +48,17 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
SapPriceMasterData
fixedAssets
=
sapPriceMasterDataRepository
.
findOne
(
bizId
);
fixedAssets
.
setStatusId
(
status
.
getId
());
sapPriceMasterDataRepository
.
save
(
fixedAssets
);
SapPriceMasterData
sapPriceMasterData
=
sapPriceMasterDataRepository
.
findOne
(
bizId
);
sapPriceMasterData
.
setStatusId
(
status
.
getId
());
sapPriceMasterDataRepository
.
save
(
sapPriceMasterData
);
String
id
=
fixedAssets
.
getId
();
String
id
=
sapPriceMasterData
.
getId
();
SapPriceMasterDataItem
item
=
new
SapPriceMasterDataItem
();
item
.
setPriceMasterDataId
(
id
);
Example
<
SapPriceMasterDataItem
>
of
=
Example
.
of
(
item
);
List
<
SapPriceMasterDataItem
>
sapPriceMasterDataItemList
=
sapPriceMasterDataItemRepository
.
findAll
(
of
);
String
returnVo
=
getReturnVo
(
fixedAssets
,
sapPriceMasterDataItemList
);
String
returnVo
=
getReturnVo
(
sapPriceMasterData
,
sapPriceMasterDataItemList
);
// System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
// System.out.println(returnVo);
// TODO 调接口
...
...
@@ -204,7 +204,6 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap
String
returnJson
=
null
;
try
{
returnJson
=
objectMapper
.
writeValueAsString
(
sapPriceMasterDataReturnVos
);
System
.
out
.
println
(
returnJson
);
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/priceMasterData/domain/vo/SapPriceMasterDataReturnVo.java
View file @
a497ae72
...
...
@@ -16,7 +16,7 @@ import java.util.Date;
* description:
*/
@JsonIgnoreProperties
public
class
SapPriceMasterDataReturnVo
{
public
class
SapPriceMasterDataReturnVo
implements
Serializable
{
/**
* 单据编号
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/SapPurchaseApplication.java
0 → 100644
View file @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
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 @
a497ae72
<?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 @
a497ae72
<?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 @
a497ae72
<?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