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
797816fa
Commit
797816fa
authored
Mar 12, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接收EP销售订单数据后发起审批
parent
deecfac3
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1274 additions
and
0 deletions
+1274
-0
epSaleOrderDetail.js
...ain/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderDetail.js
+195
-0
epSaleOrderDetail.jsp
...in/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderDetail.jsp
+37
-0
epSaleOrderList.js
.../main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.js
+69
-0
epSaleOrderList.jsp
...main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.jsp
+28
-0
EpSaleOrderApplication.java
...u/topsun/ep/order/application/EpSaleOrderApplication.java
+34
-0
EpSaleOrderItemApplication.java
...psun/ep/order/application/EpSaleOrderItemApplication.java
+24
-0
EpSaleOrderApplicationImpl.java
...ep/order/application/impl/EpSaleOrderApplicationImpl.java
+212
-0
EpSaleOrderItemApplicationImpl.java
...rder/application/impl/EpSaleOrderItemApplicationImpl.java
+57
-0
EpSaleOrderController.java
...gou/topsun/ep/order/controller/EpSaleOrderController.java
+94
-0
EpSaleOrderItemController.java
...topsun/ep/order/controller/EpSaleOrderItemController.java
+38
-0
EpSaleOrder.java
...n/java/com/huigou/topsun/ep/order/domain/EpSaleOrder.java
+42
-0
EpSaleOrderItem.java
...va/com/huigou/topsun/ep/order/domain/EpSaleOrderItem.java
+121
-0
EpSaleOrderQueryRequest.java
...topsun/ep/order/domain/query/EpSaleOrderQueryRequest.java
+15
-0
EpSaleOrderItemVo.java
...m/huigou/topsun/ep/order/domain/vo/EpSaleOrderItemVo.java
+116
-0
EpSaleOrderVo.java
...a/com/huigou/topsun/ep/order/domain/vo/EpSaleOrderVo.java
+37
-0
EpSaleOrderItemRepository.java
...topsun/ep/order/repository/EpSaleOrderItemRepository.java
+15
-0
EpSaleOrderRepository.java
...gou/topsun/ep/order/repository/EpSaleOrderRepository.java
+12
-0
epSaleOrderProc.bpmn
...ces/config/bpm/topsun/ep/epSaleOrder/epSaleOrderProc.bpmn
+111
-0
epSaleOrder.xml
...in/resources/config/topsun/ep/epSaleOrder/epSaleOrder.xml
+17
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderDetail.js
0 → 100644
View file @
797816fa
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadGrid
();
bindEvent
();
});
function
initialize
(){
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
function
bindEvent
(){
}
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
);
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'epSaleOrderItem/deleteEpSaleOrderItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
{
display
:
"订单原因(业务交易原因)"
,
name
:
"augru"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"订单编号"
,
name
:
"vbeln"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"订单总金额"
,
name
:
"netwr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"客户采购单号"
,
name
:
"bstnk"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"销售凭证项目"
,
name
:
"posnr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"物料描述"
,
name
:
"maktx"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"订单数量"
,
name
:
"kwmeng"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"销售单位"
,
name
:
"vrkme"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"价格"
,
name
:
"vaKbetr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"指令号"
,
name
:
"zinstnum"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"型体号"
,
name
:
"zmold"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"配色号"
,
name
:
"zmapcolor"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"品牌"
,
name
:
"mvgr1"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/epSaleOrderItem/queryEpSaleOrderItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
epSaleOrderId
:
getId
()},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
/**
* 流程引擎回调设置打样的id
* @param value 打样申请的id
*/
function
setId
(
id
)
{
$
(
"#id"
).
val
(
id
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
epSaleOrderId
=
id
;
}
/**
* 流程引擎获取打样申请id的回掉方法。
* @return 打样申请的id
*/
function
getId
()
{
return
$
(
"#id"
).
val
()
||
""
;
}
function
reloadGrid
()
{
gridManager
.
loadData
();
}
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
.
items
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderDetail.jsp
0 → 100644
View file @
797816fa
<%@ 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,combox,commonTree,date"
/>
<x:script
src=
'/biz/topsun/ep/epSaleOrder/epSaleOrderDetail.js'
/>
</head>
<body>
<x:billTitle
title=
"销售订单"
needStatus=
"false"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
type=
"datetime"
/>
<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=
"status"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"telPhoneLong"
required=
"true"
label=
"联系电话长号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:inputC
name=
"telPhoneShort"
required=
"false"
label=
"联系电话短号"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"kunnr"
required=
"true"
label=
"售达方"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"maingrid"
style=
"margin: 2px;"
>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.js
0 → 100644
View file @
797816fa
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initUI
();
loadGrid
();
})
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
}
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
{
display
:
"单据编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"创建日期"
,
name
:
"fillinDate"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请人"
,
name
:
"personMemberName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请部门"
,
name
:
"deptName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"联系电话长号"
,
name
:
"telPhoneLong"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"联系电话短号"
,
name
:
"telPhoneShort"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"售达方"
,
name
:
"kunnr"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/epSaleOrder/slicedEpSaleOrderList.ajax'
,
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
width
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
doView
(
data
.
id
);
},
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
}
function
reloadGrid
()
{
gridManager
.
loadData
();
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'epSaleOrder'
,
text
:
"新增销售订单"
,
url
:
web_app
.
name
+
'/epSaleOrder/forwardEpSaleOrderDetail.job'
});
}
function
doView
(
id
)
{
UICtrl
.
addTabItem
({
tabid
:
'epSaleOrder'
+
id
,
text
:
"查看销售订单"
,
url
:
web_app
.
name
+
'/epSaleOrder/showEpSaleOrderDetail.job?bizId='
+
id
+
"&isReadOnly=true"
});
}
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.jsp
0 → 100644
View file @
797816fa
<%@ 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,combox,commonTree"
/>
<x:script
src=
'/biz/topsun/ep/epSaleOrder/epSaleOrderList.js'
/>
</head>
<body>
<div
class=
"container-fluid"
>
<div
class=
"ui-hide"
>
</div>
<div
id=
"layout"
>
<div
position=
"center"
title=
"销售订单列表"
>
<x:title
title=
"common.button.search"
hideTable=
"queryMainForm"
isHide=
"true"
/>
<form
class=
"hg-form ui-hide"
method=
"post"
action=
""
id=
"queryMainForm"
>
<x:inputC
name=
"billCode"
required=
"false"
label=
"申请单号"
labelCol=
"1"
/>
<x:searchButtons/>
</form>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"maingrid"
style=
"margin: 2px;"
></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/ep/order/application/EpSaleOrderApplication.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
application
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrder
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:13
* @Description:
*/
public
interface
EpSaleOrderApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/ep/epSaleOrder/epSaleOrder.xml"
;
String
PROCESS_DEFINITION_KEY
=
"epSaleOrderProc"
;
EpSaleOrder
findEpSaleOrderById
(
String
id
);
void
deleteEpSaleOrderById
(
List
<
String
>
ids
);
void
updateEpSaleOrder
(
EpSaleOrder
costCenter
);
EpSaleOrder
saveEpSaleOrder
(
EpSaleOrder
costCenter
);
Map
<
String
,
Object
>
slicedEpSaleOrderList
(
EpSaleOrderQueryRequest
queryRequest
);
public
void
sendEpSaleOrderData
(
EpSaleOrder
costCenter
);
void
saveEpSaleOrderVo
(
EpSaleOrderVo
epSaleOrderVo
);
}
topsun/src/main/java/com/huigou/topsun/ep/order/application/EpSaleOrderItemApplication.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
application
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrderItem
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:13
* @Description:
*/
public
interface
EpSaleOrderItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/ep/epSaleOrder/epSaleOrder.xml"
;
void
saveEpSaleOrderItems
(
String
epSaleOrderId
,
List
<
EpSaleOrderItem
>
epSaleOrderItems
);
Map
<
String
,
Object
>
queryEpSaleOrderItems
(
EpSaleOrderQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
EpSaleOrderItem
>
findByEpSaleOrderId
(
String
epSaleOrderId
);
}
topsun/src/main/java/com/huigou/topsun/ep/order/application/impl/EpSaleOrderApplicationImpl.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.ThreadLocalUtil
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.ep.order.application.EpSaleOrderApplication
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrderItem
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderItemVo
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderVo
;
import
com.huigou.topsun.ep.order.repository.EpSaleOrderRepository
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.ep.order.application.EpSaleOrderItemApplication
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrder
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.ProcessAction
;
import
com.huigou.uasp.bpm.ProcessStartModel
;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.Constants
;
import
com.huigou.util.SDO
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.*
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:17
* @Description:
*/
@Service
(
"epSaleOrderApplication"
)
public
class
EpSaleOrderApplicationImpl
extends
FlowBroker
implements
EpSaleOrderApplication
{
@Autowired
private
EpSaleOrderRepository
epSaleOrderRepository
;
@Autowired
private
EpSaleOrderItemApplication
epSaleOrderItemApplication
;
@Autowired
private
HttpClient
httpClient
;
@Resource
private
WorkflowApplication
workflowApplication
;
@Resource
private
OperatorApplication
operatorApplication
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
EpSaleOrder
epSaleOrder
=
getBizEntity
(
EpSaleOrder
.
class
);
if
(
epSaleOrder
.
isNew
())
{
epSaleOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
epSaleOrder
=
(
EpSaleOrder
)
commonDomainService
.
loadAndFillinProperties
(
epSaleOrder
);
}
epSaleOrder
=
epSaleOrderRepository
.
save
(
epSaleOrder
);
List
<
EpSaleOrderItem
>
epSaleOrderItems
=
getBizEntities
(
EpSaleOrderItem
.
class
,
"epSaleOrderItems"
);
epSaleOrderItemApplication
.
saveEpSaleOrderItems
(
epSaleOrder
.
getId
(),
epSaleOrderItems
);
return
epSaleOrder
.
getId
();
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
epSaleOrderRepository
.
getOne
(
bizId
));
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
EpSaleOrder
epSaleOrder
=
epSaleOrderRepository
.
findOne
(
bizId
);
epSaleOrder
.
setStatusId
(
status
.
getId
());
epSaleOrderRepository
.
save
(
epSaleOrder
);
/*try {
String url = SystemCache.getParameter("sap.purchase.url", String.class);
String execute = httpClient.execute(epSaleOrder, url);
List<SapResult> resultList = JSONObject.parseArray(execute, SapResult.class);
SapResult sapResult = resultList.get(0);
if (!"S".equals(sapResult.getTYPE())){
throw new RuntimeException("数据传输失败,"+ sapResult.getMESSAGE());
}
epSaleOrderRepository.save(epSaleOrder);
} catch (IOException e) {
throw new RuntimeException(e);
}*/
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
EpSaleOrder
epSaleOrder
=
epSaleOrderRepository
.
findOne
(
bizId
);
epSaleOrder
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
epSaleOrderRepository
.
save
(
epSaleOrder
);
}
/**
* @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
();
EpSaleOrder
epSaleOrder
=
epSaleOrderRepository
.
findOne
(
bizId
);
epSaleOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
epSaleOrderRepository
.
save
(
epSaleOrder
);
}
}
@Override
public
EpSaleOrder
findEpSaleOrderById
(
String
id
)
{
return
epSaleOrderRepository
.
findOne
(
id
);
}
@Override
public
void
deleteEpSaleOrderById
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
epSaleOrderRepository
.
delete
(
id
);
});
}
@Override
public
void
updateEpSaleOrder
(
EpSaleOrder
epSaleOrder
)
{
epSaleOrderRepository
.
save
(
epSaleOrder
);
}
@Override
public
EpSaleOrder
saveEpSaleOrder
(
EpSaleOrder
epSaleOrder
)
{
return
epSaleOrderRepository
.
save
(
epSaleOrder
);
}
@Override
public
Map
<
String
,
Object
>
slicedEpSaleOrderList
(
EpSaleOrderQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epSaleOrder"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
map
;
}
@Override
public
void
sendEpSaleOrderData
(
EpSaleOrder
costCenter
)
{
}
@Override
public
void
saveEpSaleOrderVo
(
EpSaleOrderVo
epSaleOrderVo
)
{
EpSaleOrder
epSaleOrder
=
new
EpSaleOrder
();
BeanUtil
.
copyProperties
(
epSaleOrderVo
,
epSaleOrder
);
//初始化用户信息
String
createdById
=
"5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0"
;
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
createdById
);
epSaleOrder
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
Map
<
String
,
Object
>
formData
=
BeanUtil
.
beanToMap
(
epSaleOrder
);
String
bizId
=
this
.
startProcessInstance
(
EpSaleOrderApplication
.
PROCESS_DEFINITION_KEY
,
formData
);
epSaleOrder
.
setId
(
bizId
);
epSaleOrder
=
epSaleOrderRepository
.
save
(
epSaleOrder
);
List
<
EpSaleOrderItemVo
>
epSaleOrderItemVos
=
epSaleOrderVo
.
getEpSaleOrderItemVos
();
List
<
EpSaleOrderItem
>
epSaleOrderItems
=
new
ArrayList
<>();
epSaleOrderItemVos
.
forEach
(
epSaleOrderItemVo
->
{
EpSaleOrderItem
epSaleOrderItem
=
new
EpSaleOrderItem
();
BeanUtil
.
copyProperties
(
epSaleOrderItemVo
,
epSaleOrderItem
);
epSaleOrderItems
.
add
(
epSaleOrderItem
);
});
this
.
epSaleOrderItemApplication
.
saveEpSaleOrderItems
(
epSaleOrder
.
getId
(),
epSaleOrderItems
);
}
public
String
startProcessInstance
(
String
processDefinitionKey
,
Map
<
String
,
Object
>
formData
){
Map
<
String
,
Object
>
variables
=
new
HashMap
();
SDO
localSdo
=
this
.
buildSDO
(
formData
);
ThreadLocalUtil
.
putVariable
(
Constants
.
SDO
,
localSdo
);
variables
.
put
(
"startModel"
,
ProcessStartModel
.
MANUAL
.
getId
());
Operator
operator
=
localSdo
.
getOperator
();
variables
.
put
(
"executorFullId"
,
operator
.
getFullId
());
variables
.
put
(
"executorFullName"
,
operator
.
getFullName
());
ThreadLocalUtil
.
putOperator
(
operator
);
ThreadLocalUtil
.
putVariable
(
"client.ip"
,
"127.0.0.1"
);
ProcessInstance
processInstance
=
this
.
workflowApplication
.
startProcessInstanceByKey
(
processDefinitionKey
,
variables
);
String
businessKey
=
processInstance
.
getBusinessKey
();
return
businessKey
;
}
private
SDO
buildSDO
(
Map
<
String
,
Object
>
formData
)
{
//String createdById = (String) formData.get("createdById");
//暂定管理员id
String
createdById
=
"5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0"
;
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
createdById
);
SDO
localSdo
=
new
SDO
();
// 将业务数据传递给工作流
formData
.
forEach
(
localSdo:
:
putProperty
);
// 将业务流程信息传递给工作流
localSdo
.
putProperty
(
"processAction"
,
ProcessAction
.
SAVE
);
localSdo
.
putProperty
(
"procUnitId"
,
"Apply"
);
localSdo
.
setOperator
(
operator
);
return
localSdo
;
}
}
topsun/src/main/java/com/huigou/topsun/ep/order/application/impl/EpSaleOrderItemApplicationImpl.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrderItem
;
import
com.huigou.topsun.ep.order.repository.EpSaleOrderItemRepository
;
import
com.huigou.topsun.ep.order.application.EpSaleOrderItemApplication
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:20
* @Description:
*/
@Service
(
"epSaleOrderItemApplication"
)
public
class
EpSaleOrderItemApplicationImpl
extends
BaseApplication
implements
EpSaleOrderItemApplication
{
@Autowired
private
EpSaleOrderItemRepository
epSaleOrderItemRepository
;
@Override
public
void
saveEpSaleOrderItems
(
String
epSaleOrderId
,
List
<
EpSaleOrderItem
>
epSaleOrderItems
)
{
epSaleOrderItems
.
forEach
(
epSaleOrderItem
->
{
epSaleOrderItem
.
setEpSaleOrderId
(
epSaleOrderId
);
epSaleOrderItemRepository
.
save
(
epSaleOrderItem
);
});
}
@Override
public
Map
<
String
,
Object
>
queryEpSaleOrderItems
(
EpSaleOrderQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getEpSaleOrderId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epSaleOrderItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
epSaleOrderItemRepository
.
delete
(
id
);
});
}
@Override
public
List
<
EpSaleOrderItem
>
findByEpSaleOrderId
(
String
epSaleOrderId
)
{
return
epSaleOrderItemRepository
.
findByEpSaleOrderId
(
epSaleOrderId
);
}
}
topsun/src/main/java/com/huigou/topsun/ep/order/controller/EpSaleOrderController.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.ep.order.application.EpSaleOrderApplication
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrder
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderVo
;
import
com.huigou.topsun.sap.purchaseApproval.controller.SapPurchaseApprovalController
;
import
com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.SkipAuth
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:13
* @Description:
*/
@Controller
@ControllerMapping
(
"/epSaleOrder"
)
public
class
EpSaleOrderController
extends
CommonController
{
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
EpSaleOrderController
.
class
);
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/ep/epSaleOrder/"
;
}
@Resource
private
EpSaleOrderApplication
epSaleOrderApplication
;
public
String
forwardEpSaleOrderList
(){
return
forward
(
"epSaleOrderList"
);
}
public
String
slicedEpSaleOrderList
(){
SDO
sdo
=
this
.
getSDO
();
EpSaleOrderQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpSaleOrderQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
epSaleOrderApplication
.
slicedEpSaleOrderList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardEpSaleOrderDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
EpSaleOrderApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
EpSaleOrder
epSaleOrder
=
new
EpSaleOrder
();
epSaleOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
epSaleOrder
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"epSaleOrderDetail"
,
epSaleOrder
);
}
public
String
showEpSaleOrderDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
EpSaleOrder
epSaleOrder
=
epSaleOrderApplication
.
findEpSaleOrderById
(
id
);
return
forward
(
"epSaleOrderDetail"
,
epSaleOrder
);
}
@SkipAuth
@RequestMapping
(
value
=
"/getEpSaleOrder"
)
@ResponseBody
public
HashMap
<
String
,
Object
>
getEpSaleOrder
(
@RequestBody
EpSaleOrderVo
epSaleOrderVo
){
//SDO sdo = this.getSDO();
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
LOG
.
info
(
"EP销售订单审批数据=={}"
,
epSaleOrderVo
);
try
{
this
.
epSaleOrderApplication
.
saveEpSaleOrderVo
(
epSaleOrderVo
);
}
catch
(
RuntimeException
e
){
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Text"
,
e
);
}
return
messageMap
;
}
}
topsun/src/main/java/com/huigou/topsun/ep/order/controller/EpSaleOrderItemController.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
controller
;
import
com.huigou.topsun.ep.order.application.EpSaleOrderItemApplication
;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
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: 2024/03/12/19:14
* @Description:
*/
@Controller
@ControllerMapping
(
"/epSaleOrderItem"
)
public
class
EpSaleOrderItemController
extends
CommonController
{
@Resource
private
EpSaleOrderItemApplication
epSaleOrderItemApplication
;
public
String
queryEpSaleOrderItems
(){
SDO
sdo
=
this
.
getSDO
();
EpSaleOrderQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpSaleOrderQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
epSaleOrderItemApplication
.
queryEpSaleOrderItems
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteEpSaleOrderItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
epSaleOrderItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/ep/order/domain/EpSaleOrder.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
domain
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/17:16
* @Description: EP销售订单
*/
@Data
@Entity
@Table
(
name
=
"ep_sale_order"
)
public
class
EpSaleOrder
extends
FlowBillAbstractEntity
{
/**
* 联系电话长号
*/
@Column
(
name
=
"tel_phone_long"
)
private
String
telPhoneLong
;
/**
* 联系电话短号
*/
@Column
(
name
=
"tel_phone_short"
)
private
String
telPhoneShort
;
/**
* 售达方
*/
@Column
(
name
=
"KUNNR"
)
private
String
kunnr
;
@Override
protected
String
getCodeRuleId
()
{
return
"epSaleOrder"
;
}
}
topsun/src/main/java/com/huigou/topsun/ep/order/domain/EpSaleOrderItem.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/17:21
* @Description: EP销售订单明细
*/
@Data
@Entity
@Table
(
name
=
"ep_sale_order_item"
)
public
class
EpSaleOrderItem
extends
AbstractEntity
{
/**
* EP销售订单id
*/
@Column
(
name
=
"ep_sale_order_id"
)
private
String
epSaleOrderId
;
/**
* 订单原因(业务交易原因)
*/
@Column
(
name
=
"AUGRU"
)
private
String
augru
;
/**
* 订单编号
*/
@Column
(
name
=
"VBELN"
)
private
String
vbeln
;
/**
* 订单总金额
*/
@Column
(
name
=
"NETWR"
)
private
BigDecimal
netwr
;
/**
* 客户采购单号
*/
@Column
(
name
=
"BSTNK"
)
private
String
bstnk
;
/**
* 销售凭证项目
*/
@Column
(
name
=
"POSNR"
)
private
String
posnr
;
/**
* 物料编号
*/
@Column
(
name
=
"MATNR"
)
private
String
matnr
;
/**
* 物料描述
*/
@Column
(
name
=
"MAKTX"
)
private
String
maktx
;
/**
* 订单数量
*/
@Column
(
name
=
"KWMENG"
)
private
BigDecimal
kwmeng
;
/**
* 销售单位
*/
@Column
(
name
=
"VRKME"
)
private
String
vrkme
;
/**
* 价格
*/
@Column
(
name
=
"VA_KBETR"
)
private
BigDecimal
vaKbetr
;
/**
* 工厂
*/
@Column
(
name
=
"WERKS"
)
private
String
werks
;
/**
* 指令号
*/
@Column
(
name
=
"ZINSTNUM"
)
private
String
zinstnum
;
/**
* 型体号
*/
@Column
(
name
=
"ZMOLD"
)
private
String
zmold
;
/**
* 配色号
*/
@Column
(
name
=
"ZMAPCOLOR"
)
private
String
zmapcolor
;
/**
* 品牌
*/
@Column
(
name
=
"MVGR1"
)
private
String
mvgr1
;
/**
* 物料组
*/
@Column
(
name
=
"MATKL"
)
private
String
matkl
;
}
topsun/src/main/java/com/huigou/topsun/ep/order/domain/query/EpSaleOrderQueryRequest.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:15
* @Description:
*/
@Data
public
class
EpSaleOrderQueryRequest
extends
QueryAbstractRequest
{
private
String
epSaleOrderId
;
}
topsun/src/main/java/com/huigou/topsun/ep/order/domain/vo/EpSaleOrderItemVo.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/17:21
* @Description: EP销售订单明细
*/
@Data
public
class
EpSaleOrderItemVo
implements
Serializable
{
/**
* EP销售订单id
*/
private
String
epSaleOrderId
;
/**
* 订单原因(业务交易原因)
*/
@JsonProperty
(
"augru"
)
private
String
augru
;
/**
* 订单编号
*/
@JsonProperty
(
"vbeln"
)
private
String
vbeln
;
/**
* 订单总金额
*/
@JsonProperty
(
"netwr"
)
private
BigDecimal
netwr
;
/**
* 客户采购单号
*/
@JsonProperty
(
"bstnk"
)
private
String
bstnk
;
/**
* 销售凭证项目
*/
@JsonProperty
(
"posnr"
)
private
String
posnr
;
/**
* 物料编号
*/
@JsonProperty
(
"matnr"
)
private
String
matnr
;
/**
* 物料描述
*/
@JsonProperty
(
"maktx"
)
private
String
maktx
;
/**
* 订单数量
*/
@JsonProperty
(
"vrkme"
)
private
BigDecimal
kwmeng
;
/**
* 销售单位
*/
@JsonProperty
(
"vrkme"
)
private
String
vrkme
;
/**
* 价格
*/
@JsonProperty
(
"vaKbetr"
)
private
BigDecimal
vaKbetr
;
/**
* 工厂
*/
@JsonProperty
(
"werks"
)
private
String
werks
;
/**
* 指令号
*/
@JsonProperty
(
"zinstnum"
)
private
String
zinstnum
;
/**
* 型体号
*/
@JsonProperty
(
"zmold"
)
private
String
zmold
;
/**
* 配色号
*/
@JsonProperty
(
"zmapcolor"
)
private
String
zmapcolor
;
/**
* 品牌
*/
@JsonProperty
(
"mvgr1"
)
private
String
mvgr1
;
/**
* 物料组
*/
@JsonProperty
(
"matkl"
)
private
String
matkl
;
}
topsun/src/main/java/com/huigou/topsun/ep/order/domain/vo/EpSaleOrderVo.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:15
* @Description:
*/
@Data
public
class
EpSaleOrderVo
implements
Serializable
{
/**
* 联系电话长号
*/
@JsonProperty
(
"telPhoneLong"
)
private
String
telPhoneLong
;
/**
* 联系电话短号
*/
@JsonProperty
(
"telPhoneShort"
)
private
String
telPhoneShort
;
/**
* 售达方
*/
@JsonProperty
(
"kunnr"
)
private
String
kunnr
;
@JsonProperty
(
"epSaleOrderItemVos"
)
private
List
<
EpSaleOrderItemVo
>
epSaleOrderItemVos
;
}
topsun/src/main/java/com/huigou/topsun/ep/order/repository/EpSaleOrderItemRepository.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
repository
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrderItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:12
* @Description:
*/
public
interface
EpSaleOrderItemRepository
extends
JpaRepository
<
EpSaleOrderItem
,
String
>
{
List
<
EpSaleOrderItem
>
findByEpSaleOrderId
(
String
epSaleOrderItemId
);
}
topsun/src/main/java/com/huigou/topsun/ep/order/repository/EpSaleOrderRepository.java
0 → 100644
View file @
797816fa
package
com
.
huigou
.
topsun
.
ep
.
order
.
repository
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrder
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/03/12/19:11
* @Description:
*/
public
interface
EpSaleOrderRepository
extends
JpaRepository
<
EpSaleOrder
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/ep/epSaleOrder/epSaleOrderProc.bpmn
0 → 100644
View file @
797816fa
<?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=
"epSaleOrderProc"
name=
"销售订单申请"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{epSaleOrderApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{epSaleOrderApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"销售订单申请"
activiti:formKey=
"epSaleOrder/showEpSaleOrderDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{epSaleOrderApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{epSaleOrderApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"销售订单审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"epSaleOrder/showEpSaleOrderDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{epSaleOrderApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{epSaleOrderApplication}"
></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_epSaleOrderProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"epSaleOrderProc"
id=
"BPMNPlane_epSaleOrderProc"
>
<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/ep/epSaleOrder/epSaleOrder.xml
0 → 100644
View file @
797816fa
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"epSaleOrder"
label=
"EP销售订单"
table=
"ep_sale_order"
>
<sql-query>
select t.* from ep_sale_order t
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
</query>
<query
name=
"epSaleOrderItems"
label=
"EP销售订单明细"
table=
"ep_sale_order_item"
>
<sql-query>
select t.* from ep_sale_order_item t
</sql-query>
<condition
column=
"ep_sale_order_id"
name=
"epSaleOrderId"
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