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
391e8afb
Commit
391e8afb
authored
Mar 15, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
废品销售接口流程
parent
824364ff
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1178 additions
and
0 deletions
+1178
-0
wasteSaleDetail.js
...c/main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.js
+195
-0
wasteSaleDetail.jsp
.../main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.jsp
+43
-0
wasteSaleList.js
...src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleList.js
+73
-0
wasteSaleList.jsp
...rc/main/webapp/biz/topsun/sap/wasteSale/wasteSaleList.jsp
+28
-0
SapResult.java
...uigou/topsun/sap/purchaseInfoRecord/domain/SapResult.java
+2
-0
WasteSaleApplication.java
...opsun/sap/wasteSale/application/WasteSaleApplication.java
+29
-0
WasteSaleItemApplication.java
...n/sap/wasteSale/application/WasteSaleItemApplication.java
+24
-0
WasteSaleApplicationImpl.java
.../wasteSale/application/impl/WasteSaleApplicationImpl.java
+203
-0
WasteSaleItemApplicationImpl.java
...teSale/application/impl/WasteSaleItemApplicationImpl.java
+57
-0
WasteSaleController.java
.../topsun/sap/wasteSale/controller/WasteSaleController.java
+65
-0
WasteSaleItemController.java
...sun/sap/wasteSale/controller/WasteSaleItemController.java
+38
-0
WasteSale.java
...ava/com/huigou/topsun/sap/wasteSale/domain/WasteSale.java
+68
-0
WasteSaleItem.java
...com/huigou/topsun/sap/wasteSale/domain/WasteSaleItem.java
+63
-0
WasteSaleQueryRequest.java
...sun/sap/wasteSale/domain/query/WasteSaleQueryRequest.java
+14
-0
SapWasteSaleItemVo.java
...ou/topsun/sap/wasteSale/domain/vo/SapWasteSaleItemVo.java
+55
-0
SapWasteSaleVo.java
...huigou/topsun/sap/wasteSale/domain/vo/SapWasteSaleVo.java
+66
-0
WasteSaleItemRepository.java
...sun/sap/wasteSale/repository/WasteSaleItemRepository.java
+15
-0
WasteSaleRepository.java
.../topsun/sap/wasteSale/repository/WasteSaleRepository.java
+12
-0
wasteSaleProc.bpmn
...ources/config/bpm/topsun/sap/wasteSale/wasteSaleProc.bpmn
+111
-0
wasteSale.xml
.../main/resources/config/topsun/sap/wasteSale/wasteSale.xml
+17
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.js
0 → 100644
View file @
391e8afb
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadGrid
();
bindEvent
();
});
function
initialize
(){
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
var
statusId
=
$
(
"#statusId"
).
val
();
if
(
statusId
===
"0"
){
UICtrl
.
setElHideOrShow
(
"#bktxt"
,
true
)
UICtrl
.
setElHideOrShow
(
"#budat"
,
true
)
UICtrl
.
setElHideOrShow
(
"#paymentMethod"
,
true
)
UICtrl
.
setElHideOrShow
(
"#totalMoney"
,
true
)
}
}
function
bindEvent
(){
}
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
,{
sequence
:
(
gridManager
.
getData
().
length
+
1
)});
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'wasteSaleItem/deleteWasteSaleItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
getGridColumns
(),
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/wasteSaleItem/queryWasteSaleItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
wasteSaleId
:
getId
()},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
height
:
"70%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
getGridColumns
(){
var
columns
=
[];
columns
.
push
({
display
:
"序号"
,
name
:
"sequence"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},)
columns
.
push
({
display
:
"品类"
,
name
:
"wasteType"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},)
columns
.
push
({
display
:
"数量"
,
name
:
"quantity"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.99'
}
},)
columns
.
push
({
display
:
"计量单位"
,
name
:
"unitName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MEINS"
}
},
back
:
{
MSEHI
:
"unit"
,
MSEHL
:
"unitName"
,
}
},
}
},)
var
subProcUnitId
=
getSubProcUnitId
();
var
statusId
=
$
(
"#statusId"
).
val
();
if
(
subProcUnitId
===
"purchase"
||
statusId
>
0
){
//采购部专员录入回收单价,自动计算出总价,补充收款账户
columns
.
push
({
display
:
"单价"
,
name
:
"price"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.99'
}
},)
columns
.
push
({
display
:
"总价"
,
name
:
"amount"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
render
:
function
(
item
){
if
(
Public
.
isNotBlank
(
item
.
quantity
)
&&
Public
.
isNotBlank
(
item
.
price
)){
var
amount
=
MathUtil
.
mul
(
item
.
quantity
,
item
.
price
)
countTotalMoney
();
return
item
.
amount
=
amount
}
}
},)
}
return
columns
;
}
/**
* 流程引擎回调设置打样的id
* @param value 打样申请的id
*/
function
setId
(
id
)
{
$
(
"#id"
).
val
(
id
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
wasteSaleId
=
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
;
}
//UICtrl中校验是否允许编辑
function
businessJudgmentUnit
()
{
var
isApply
=
''
;
if
(
typeof
(
isApplyProcUnit
)
==
'function'
){
isApply
=
isApplyProcUnit
();
}
if
(
isApply
){
return
true
}
else
{
var
subProcUnitId
=
getSubProcUnitId
();
if
(
subProcUnitId
===
"purchase"
){
UICtrl
.
setEditable
(
$
(
"#submitForm"
));
UICtrl
.
setElRequiredFlag
(
'#bktxt'
,
true
);
UICtrl
.
setElRequiredFlag
(
'#budat'
,
true
);
UICtrl
.
setElRequiredFlag
(
'#paymentMethod'
,
true
);
UICtrl
.
disable
(
$
(
"#totalMoney"
))
return
true
}
}
return
false
;
}
function
countTotalMoney
(){
var
datas
=
gridManager
.
getData
();
var
totalMoney
=
0
;
datas
.
forEach
(
data
=>
{
var
amount
=
MathUtil
.
mul
(
data
.
quantity
,
data
.
price
);
totalMoney
=
MathUtil
.
add
(
totalMoney
,
amount
);
$
(
"#totalMoney"
).
val
(
totalMoney
);
})
}
topsun-xt/src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.jsp
0 → 100644
View file @
391e8afb
<%@ 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/sap/wasteSale/wasteSaleDetail.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=
"statusId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:hidden
name=
"burks"
/>
<x:inputC
name=
"bktxt"
required=
"false"
label=
"回收商"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"budat"
required=
"false"
label=
"回收日期"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"date"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"maingrid"
style=
"margin: 2px;"
>
</div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"paymentMethod"
required=
"false"
label=
"收款方式"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"totalMoney"
readonly=
"true"
label=
"合计"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleList.js
0 → 100644
View file @
391e8afb
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
:
"burks"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"回收商"
,
name
:
"bktxt"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"回收日期"
,
name
:
"budat"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"收款方式"
,
name
:
"paymentMethod"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"合计"
,
name
:
"totalMoney"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息类型"
,
name
:
"type"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"会计凭证编号"
,
name
:
"messageV1"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/wasteSale/slicedWasteSaleList.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
+
'/wasteSale/forwardWasteSaleDetail.job'
});
}
function
doView
(
id
)
{
UICtrl
.
addTabItem
({
tabid
:
'epSaleOrder'
+
id
,
text
:
"查看废品销售单"
,
url
:
web_app
.
name
+
'/wasteSale/showWasteSaleDetail.job?bizId='
+
id
+
"&isReadOnly=true"
});
}
topsun-xt/src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleList.jsp
0 → 100644
View file @
391e8afb
<%@ 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/sap/wasteSale/wasteSaleList.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/sap/purchaseInfoRecord/domain/SapResult.java
View file @
391e8afb
...
...
@@ -27,4 +27,6 @@ public class SapResult implements Serializable {
*/
private
String
MESSAGE_V1
;
private
String
MESSAGE_V2
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/application/WasteSaleApplication.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
application
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:11
* @Description:
*/
public
interface
WasteSaleApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/wasteSale/wasteSale.xml"
;
String
PROCESS_DEFINITION_KEY
=
"wasteSaleProc"
;
WasteSale
findWasteSaleById
(
String
id
);
void
deleteWasteSaleById
(
List
<
String
>
ids
);
WasteSale
saveWasteSale
(
WasteSale
wasteSale
);
Map
<
String
,
Object
>
slicedWasteSaleList
(
WasteSaleQueryRequest
queryRequest
);
public
void
sendWasteSaleData
(
WasteSale
wasteSale
);
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/application/WasteSaleItemApplication.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
application
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:11
* @Description:
*/
public
interface
WasteSaleItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/wasteSale/wasteSale.xml"
;
void
saveWasteSaleItems
(
String
wasteSaleId
,
List
<
WasteSaleItem
>
wasteSaleItems
);
Map
<
String
,
Object
>
queryWasteSaleItems
(
WasteSaleQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
WasteSaleItem
>
findByWasteSaleId
(
String
wasteSaleId
);
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/application/impl/WasteSaleApplicationImpl.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapResult
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem
;
import
com.huigou.topsun.sap.wasteSale.application.WasteSaleApplication
;
import
com.huigou.topsun.sap.wasteSale.application.WasteSaleItemApplication
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
import
com.huigou.topsun.sap.wasteSale.domain.vo.SapWasteSaleItemVo
;
import
com.huigou.topsun.sap.wasteSale.domain.vo.SapWasteSaleVo
;
import
com.huigou.topsun.sap.wasteSale.repository.WasteSaleRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.DateUtil
;
import
com.huigou.util.StringUtil
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:14
* @Description:
*/
@Service
(
"wasteSaleApplication"
)
public
class
WasteSaleApplicationImpl
extends
FlowBroker
implements
WasteSaleApplication
{
@Autowired
private
WasteSaleRepository
wasteSaleRepository
;
@Autowired
private
WasteSaleItemApplication
wasteSaleItemApplication
;
@Autowired
private
HttpClient
httpClient
;
@Override
public
WasteSale
findWasteSaleById
(
String
id
)
{
return
wasteSaleRepository
.
findOne
(
id
);
}
@Override
public
void
deleteWasteSaleById
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
wasteSaleRepository
.
delete
(
id
);
});
}
@Override
public
WasteSale
saveWasteSale
(
WasteSale
wasteSale
)
{
return
wasteSaleRepository
.
save
(
wasteSale
);
}
@Override
public
Map
<
String
,
Object
>
slicedWasteSaleList
(
WasteSaleQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"wasteSale"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
map
;
}
@Override
public
void
sendWasteSaleData
(
WasteSale
wasteSale
)
{
List
<
WasteSaleItem
>
saleItemList
=
wasteSaleItemApplication
.
findByWasteSaleId
(
wasteSale
.
getId
());
List
<
SapWasteSaleItemVo
>
sapWasteSaleVoList
=
new
ArrayList
<>();
SapWasteSaleVo
sapWasteSaleVo
=
new
SapWasteSaleVo
();
sapWasteSaleVo
.
setBurks
(
wasteSale
.
getBurks
());
sapWasteSaleVo
.
setBlart
(
"SA"
);
String
dateFormat
=
DateUtil
.
getDateFormat
(
wasteSale
.
getBudat
(),
"yyyyMMdd"
);
sapWasteSaleVo
.
setBudat
(
dateFormat
);
sapWasteSaleVo
.
setBldat
(
DateUtil
.
getDateFormat
(
new
Date
(),
"yyyyMMdd"
));
sapWasteSaleVo
.
setGjahr
(
dateFormat
.
substring
(
0
,
4
));
sapWasteSaleVo
.
setMonat
(
dateFormat
.
substring
(
4
,
6
));
sapWasteSaleVo
.
setWaers
(
"CNY"
);
sapWasteSaleVo
.
setBktxt
(
wasteSale
.
getBktxt
()+
"-"
+
wasteSale
.
getTotalMoney
());
sapWasteSaleVo
.
setXblnr
(
wasteSale
.
getBillCode
());
Integer
i
=
1
;
for
(
WasteSaleItem
wasteSaleItem
:
saleItemList
)
{
SapWasteSaleItemVo
sapWasteSaleItemVo
=
new
SapWasteSaleItemVo
();
sapWasteSaleItemVo
.
setShkzg
(
"S"
);
sapWasteSaleItemVo
.
setKoart
(
"S"
);
sapWasteSaleItemVo
.
setBschl
(
"40"
);
sapWasteSaleItemVo
.
setKtonr
(
"1001010000"
);
sapWasteSaleItemVo
.
setWrbtr
(
wasteSaleItem
.
getAmount
().
toString
());
sapWasteSaleItemVo
.
setSgtxt
(
"废品回收-"
+
wasteSaleItem
.
getWasteType
()+
"-"
+
wasteSaleItem
.
getQuantity
()+
wasteSaleItem
.
getUnit
()+
"-"
+
wasteSaleItem
.
getAmount
());
sapWasteSaleItemVo
.
setRstgr
(
"113"
);
sapWasteSaleItemVo
.
setBuzei
(
i
.
toString
());
sapWasteSaleVoList
.
add
(
sapWasteSaleItemVo
);
i
++;
SapWasteSaleItemVo
sapWasteSaleItemNextVo
=
new
SapWasteSaleItemVo
();
BeanUtil
.
copyProperties
(
sapWasteSaleItemVo
,
sapWasteSaleItemNextVo
);
sapWasteSaleItemNextVo
.
setBuzei
(
i
.
toString
());
sapWasteSaleItemNextVo
.
setShkzg
(
"H"
);
sapWasteSaleItemNextVo
.
setBschl
(
"50"
);
sapWasteSaleItemNextVo
.
setKtonr
(
"6301090000"
);
sapWasteSaleItemNextVo
.
setRstgr
(
""
);
sapWasteSaleVoList
.
add
(
sapWasteSaleItemNextVo
);
i
++;
}
sapWasteSaleVo
.
setWasteSaleItemVos
(
sapWasteSaleVoList
);
try
{
//String url = SystemCache.getParameter("sap.purchase.url", String.class);
String
execute
=
httpClient
.
execute
(
sapWasteSaleVo
,
"cud_scrap_sale/scrap_sale"
);
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
SapResult
sapResult
=
resultList
.
get
(
0
);
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
throw
new
RuntimeException
(
"数据传输失败,"
+
sapResult
.
getMESSAGE
());
}
wasteSale
.
setType
(
sapResult
.
getTYPE
());
wasteSale
.
setMessageV1
(
sapResult
.
getMESSAGE_V2
());
wasteSaleRepository
.
save
(
wasteSale
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
WasteSale
wasteSale
=
getBizEntity
(
WasteSale
.
class
);
if
(
wasteSale
.
isNew
())
{
wasteSale
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
wasteSale
=
(
WasteSale
)
commonDomainService
.
loadAndFillinProperties
(
wasteSale
);
}
wasteSale
=
wasteSaleRepository
.
save
(
wasteSale
);
List
<
WasteSaleItem
>
wasteSaleItems
=
getBizEntities
(
WasteSaleItem
.
class
,
"items"
);
wasteSaleItemApplication
.
saveWasteSaleItems
(
wasteSale
.
getId
(),
wasteSaleItems
);
return
wasteSale
.
getId
();
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
wasteSaleRepository
.
getOne
(
bizId
));
}
/**
* 任务完成前执行
*/
@Override
protected
void
onBeforeComplete
(
DelegateTask
delegateTask
)
{
super
.
onBeforeComplete
(
delegateTask
);
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
if
(
this
.
isApplyProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
// 校验及预算
updateStatus
(
bizId
,
BizBillStatus
.
APPROVING
);
}
}
@Transactional
protected
void
updateStatus
(
String
bizId
,
BizBillStatus
status
)
{
Assert
.
hasText
(
bizId
,
CommonDomainConstants
.
ID_NOT_BLANK
);
this
.
commonDomainService
.
updateStatus
(
WasteSale
.
class
,
bizId
,
status
.
getId
());
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
WasteSale
wasteSale
=
wasteSaleRepository
.
findOne
(
bizId
);
wasteSale
.
setStatusId
(
status
.
getId
());
wasteSaleRepository
.
save
(
wasteSale
);
this
.
sendWasteSaleData
(
wasteSale
);
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
WasteSale
wasteSale
=
wasteSaleRepository
.
findOne
(
bizId
);
wasteSale
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
wasteSaleRepository
.
save
(
wasteSale
);
}
/**
* @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
();
WasteSale
wasteSale
=
wasteSaleRepository
.
findOne
(
bizId
);
wasteSale
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
wasteSaleRepository
.
save
(
wasteSale
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/application/impl/WasteSaleItemApplicationImpl.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.wasteSale.application.WasteSaleItemApplication
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
import
com.huigou.topsun.sap.wasteSale.repository.WasteSaleItemRepository
;
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/13/19:17
* @Description:
*/
@Service
(
"wasteSaleItemApplication"
)
public
class
WasteSaleItemApplicationImpl
extends
BaseApplication
implements
WasteSaleItemApplication
{
@Autowired
private
WasteSaleItemRepository
wasteSaleItemRepository
;
@Override
public
void
saveWasteSaleItems
(
String
wasteSaleId
,
List
<
WasteSaleItem
>
wasteSaleItems
)
{
wasteSaleItems
.
forEach
(
wasteSaleItem
->
{
wasteSaleItem
.
setWasteSaleId
(
wasteSaleId
);
wasteSaleItemRepository
.
save
(
wasteSaleItem
);
});
}
@Override
public
Map
<
String
,
Object
>
queryWasteSaleItems
(
WasteSaleQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getWasteSaleId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"wasteSaleItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
wasteSaleItemRepository
.
delete
(
id
);
});
}
@Override
public
List
<
WasteSaleItem
>
findByWasteSaleId
(
String
wasteSaleId
)
{
return
wasteSaleItemRepository
.
findByWasteSaleId
(
wasteSaleId
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/controller/WasteSaleController.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.sap.wasteSale.application.WasteSaleApplication
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
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: 2024/03/13/19:20
* @Description:
*/
@Controller
@ControllerMapping
(
"/wasteSale"
)
public
class
WasteSaleController
extends
CommonController
{
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/wasteSale/"
;
}
@Resource
private
WasteSaleApplication
wasteSaleApplication
;
public
String
forwardWasteSaleList
(){
return
forward
(
"wasteSaleList"
);
}
public
String
slicedWasteSaleList
(){
SDO
sdo
=
this
.
getSDO
();
WasteSaleQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
WasteSaleQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
wasteSaleApplication
.
slicedWasteSaleList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardWasteSaleDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
WasteSaleApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
WasteSale
wasteSale
=
new
WasteSale
();
wasteSale
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
wasteSale
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
wasteSale
.
setBurks
(
"1000"
);
return
forward
(
"wasteSaleDetail"
,
wasteSale
);
}
public
String
showWasteSaleDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
WasteSale
wasteSale
=
wasteSaleApplication
.
findWasteSaleById
(
id
);
return
forward
(
"wasteSaleDetail"
,
wasteSale
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/controller/WasteSaleItemController.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
controller
;
import
com.huigou.topsun.sap.wasteSale.application.WasteSaleItemApplication
;
import
com.huigou.topsun.sap.wasteSale.domain.query.WasteSaleQueryRequest
;
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/13/19:20
* @Description:
*/
@Controller
@ControllerMapping
(
"/wasteSaleItem"
)
public
class
WasteSaleItemController
extends
CommonController
{
@Resource
private
WasteSaleItemApplication
wasteSaleItemApplication
;
public
String
queryWasteSaleItems
(){
SDO
sdo
=
this
.
getSDO
();
WasteSaleQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
WasteSaleQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
wasteSaleItemApplication
.
queryWasteSaleItems
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteWasteSaleItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
wasteSaleItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/domain/WasteSale.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
domain
;
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
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:03
* @Description: SAP废品销售
*/
@Data
@Entity
@Table
(
name
=
"sap_waste_sale"
)
public
class
WasteSale
extends
FlowBillAbstractEntity
{
/**
* 公司代码
*/
@Column
(
name
=
"BURKS"
)
private
String
burks
;
/**
* 回收商
*/
@Column
(
name
=
"BKTXT"
)
private
String
bktxt
;
/**
* 回收日期
*/
@Column
(
name
=
"BUDAT"
)
private
Date
budat
;
/**
* 收款方式
*/
@Column
(
name
=
"payment_method"
)
private
String
paymentMethod
;
/**
* 合计
*/
@Column
(
name
=
"total_money"
)
private
BigDecimal
totalMoney
;
/**
* 消息类型
*/
@Column
(
name
=
"type"
)
private
String
type
;
/**
* 凭证号
*/
@Column
(
name
=
"message_v1"
)
private
String
messageV1
;
@Override
protected
String
getCodeRuleId
()
{
return
"wasteSale"
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/domain/WasteSaleItem.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
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/13/19:06
* @Description:
*/
@Data
@Entity
@Table
(
name
=
"sap_waste_sale_item"
)
public
class
WasteSaleItem
extends
AbstractEntity
{
@Column
(
name
=
"waste_sale_id"
)
private
String
wasteSaleId
;
/**
* 序号
*/
@Column
(
name
=
"sequence"
)
private
Integer
sequence
;
/**
* 回收品类
*/
@Column
(
name
=
"waste_type"
)
private
String
wasteType
;
/**
* 数量
*/
@Column
(
name
=
"quantity"
)
private
BigDecimal
quantity
;
/**
* 单价
*/
@Column
(
name
=
"price"
)
private
BigDecimal
price
;
/**
* 计量单位
*/
@Column
(
name
=
"unit"
)
private
String
unit
;
@Column
(
name
=
"unit_name"
)
private
String
unitName
;
/**
* 总价
*/
@Column
(
name
=
"amount"
)
private
BigDecimal
amount
;
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/domain/query/WasteSaleQueryRequest.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:12
* @Description:
*/
@Data
public
class
WasteSaleQueryRequest
extends
QueryAbstractRequest
{
private
String
wasteSaleId
;
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/domain/vo/SapWasteSaleItemVo.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Auther: xin.lu
* @Date: 2024/03/14/21:45
* @Description:
*/
@Data
public
class
SapWasteSaleItemVo
implements
Serializable
{
/**
* 行项目号
*/
@JsonProperty
(
"BUZEI"
)
private
String
buzei
;
/**
* 账户类型
*/
@JsonProperty
(
"KOART"
)
private
String
koart
;
/**
* 借/贷标识
*/
@JsonProperty
(
"SHKZG"
)
private
String
shkzg
;
/**
* 过账码
*/
@JsonProperty
(
"BSCHL"
)
private
String
bschl
;
/**
* 总账科目
*/
@JsonProperty
(
"KTONR"
)
private
String
ktonr
;
/**
* 凭证货币金额
*/
@JsonProperty
(
"WRBTR"
)
private
String
wrbtr
;
/**
* 行项目文本
*/
@JsonProperty
(
"SGTXT"
)
private
String
sgtxt
;
/**
* 原因代码
*/
@JsonProperty
(
"RSTGR"
)
private
String
rstgr
;
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/domain/vo/SapWasteSaleVo.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
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/14/9:26
* @Description:
*/
@Data
public
class
SapWasteSaleVo
implements
Serializable
{
/**
* 公司代码
*/
@JsonProperty
(
"BUKRS"
)
private
String
burks
;
/**
* 凭证类型
*/
@JsonProperty
(
"BLART"
)
private
String
blart
;
/**
* 回收日期
*/
@JsonProperty
(
"BUDAT"
)
private
String
budat
;
/**
* 凭证日期
*/
@JsonProperty
(
"BLDAT"
)
private
String
bldat
;
/**
* 会计年度
*/
@JsonProperty
(
"GJAHR"
)
private
String
gjahr
;
/**
* 记账期间
*/
@JsonProperty
(
"MONAT"
)
private
String
monat
;
/**
* 凭证货币
*/
@JsonProperty
(
"WAERS"
)
private
String
waers
;
/**
* 凭证抬头文本
*/
@JsonProperty
(
"BKTXT"
)
private
String
bktxt
;
/**
* BPM流程编号
*/
@JsonProperty
(
"XBLNR"
)
private
String
xblnr
;
@JsonProperty
(
"ITEM"
)
private
List
<
SapWasteSaleItemVo
>
wasteSaleItemVos
;
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/repository/WasteSaleItemRepository.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
repository
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:10
* @Description:
*/
public
interface
WasteSaleItemRepository
extends
JpaRepository
<
WasteSaleItem
,
String
>
{
List
<
WasteSaleItem
>
findByWasteSaleId
(
String
wasteSaleId
);
}
topsun/src/main/java/com/huigou/topsun/sap/wasteSale/repository/WasteSaleRepository.java
0 → 100644
View file @
391e8afb
package
com
.
huigou
.
topsun
.
sap
.
wasteSale
.
repository
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/03/13/19:09
* @Description:
*/
public
interface
WasteSaleRepository
extends
JpaRepository
<
WasteSale
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/sap/wasteSale/wasteSaleProc.bpmn
0 → 100644
View file @
391e8afb
<?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=
"wasteSaleProc"
name=
"废品销售单申请"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{wasteSaleApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{wasteSaleApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"废品销售单申请"
activiti:formKey=
"wasteSale/showWasteSaleDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{wasteSaleApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{wasteSaleApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"废品销售单审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"wasteSale/showWasteSaleDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{wasteSaleApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{wasteSaleApplication}"
></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_wasteSaleProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"wasteSaleProc"
id=
"BPMNPlane_wasteSaleProc"
>
<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/wasteSale/wasteSale.xml
0 → 100644
View file @
391e8afb
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"wasteSale"
label=
"SAP废品销售"
table=
"sap_waste_sale"
>
<sql-query>
select t.* from sap_waste_sale t
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
</query>
<query
name=
"wasteSaleItems"
label=
"SAP废品销售明细"
table=
"sap_waste_sale_item"
>
<sql-query>
select t.* from sap_waste_sale_item t
</sql-query>
<condition
column=
"waste_sale_id"
name=
"wasteSaleId"
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