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
4682089d
Commit
4682089d
authored
Jan 23, 2024
by
wanghang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购订单
parent
93f6728b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
1480 additions
and
660 deletions
+1480
-660
templates.xml
.idea/mybatisx/templates.xml
+6
-6
costReimbursement.js
...app/biz/topsun/sap/costReimbursement/costReimbursement.js
+26
-5
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+6
-7
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+1
-1
sapPurchaseOrderDetail.js
...pp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
+15
-0
sapPurchaseOrderDetail.jsp
...p/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
+69
-0
sapPurchaseOrderList.js
...bapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
+101
-0
sapPurchaseOrderList.jsp
...app/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.jsp
+30
-0
DefinitionHomepageTaskData.java
...va/com/huigou/topsun/base/DefinitionHomepageTaskData.java
+4
-3
WorkflowApplicationImplOverride.java
...m/huigou/topsun/base/WorkflowApplicationImplOverride.java
+0
-503
BsnMessageApplication.java
...sun/base/bsnMessage/appliction/BsnMessageApplication.java
+23
-3
BsnMessageApplicationImpl.java
...bsnMessage/appliction/impl/BsnMessageApplicationImpl.java
+43
-16
BsnMessageExecute.java
...igou/topsun/base/bsnMessage/domain/BsnMessageExecute.java
+16
-4
BsnMessageReject.java
...uigou/topsun/base/bsnMessage/domain/BsnMessageReject.java
+3
-3
BsnMessageSponsor.java
...igou/topsun/base/bsnMessage/domain/BsnMessageSponsor.java
+11
-2
BsnMessageQueryRequest.java
.../base/bsnMessage/domain/query/BsnMessageQueryRequest.java
+0
-71
BsnMessageRejectRepository.java
...ase/bsnMessage/repository/BsnMessageRejectRepository.java
+2
-1
BsnMessageSponsorRepository.java
...se/bsnMessage/repository/BsnMessageSponsorRepository.java
+1
-1
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+43
-16
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+16
-9
SapNonProdApplyDept.java
...u/topsun/sap/nonProdApply/domain/SapNonProdApplyDept.java
+0
-4
SapPurchaseOrderApplication.java
...urchaseOrder/application/SapPurchaseOrderApplication.java
+24
-0
SapPurchaseOrderItemApplication.java
...aseOrder/application/SapPurchaseOrderItemApplication.java
+21
-0
SapPurchaseOrderApplicationImpl.java
...der/application/impl/SapPurchaseOrderApplicationImpl.java
+181
-0
SapPurchaseOrderItemApplicationImpl.java
...application/impl/SapPurchaseOrderItemApplicationImpl.java
+52
-0
SapPurchaseOrderController.java
.../purchaseOrder/controller/SapPurchaseOrderController.java
+81
-0
SapPurchaseOrderItemController.java
...chaseOrder/controller/SapPurchaseOrderItemController.java
+42
-0
SapPurchaseOrder.java
...gou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
+45
-0
SapPurchaseOrderItem.java
...topsun/sap/purchaseOrder/domain/SapPurchaseOrderItem.java
+204
-0
SapPurchaseOrderItemQueryRequest.java
...eOrder/domain/query/SapPurchaseOrderItemQueryRequest.java
+18
-0
SapPurchaseOrderQueryRequest.java
...chaseOrder/domain/query/SapPurchaseOrderQueryRequest.java
+29
-0
SapPurchaseOrderItemVo.java
...n/sap/purchaseOrder/domain/vo/SapPurchaseOrderItemVo.java
+163
-0
SapPurchaseOrderVo.java
...opsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderVo.java
+33
-0
SapPurchaseOrderItemRepository.java
...chaseOrder/repository/SapPurchaseOrderItemRepository.java
+12
-0
SapPurchaseOrderRepository.java
.../purchaseOrder/repository/SapPurchaseOrderRepository.java
+12
-0
sapPurchaseOrderProc.bpmn
...bpm/topsun/sap/sapPurchaseOrder/sapPurchaseOrderProc.bpmn
+111
-0
bsnMessage.xml
topsun/src/main/resources/config/topsun/base/bsnMessage.xml
+16
-5
sapPurchaseOrder.xml
...s/config/topsun/sap/sapPurchaseOrder/sapPurchaseOrder.xml
+10
-0
sapPurchaseOrderItem.xml
...nfig/topsun/sap/sapPurchaseOrder/sapPurchaseOrderItem.xml
+10
-0
No files found.
.idea/mybatisx/templates.xml
View file @
4682089d
...
@@ -48,16 +48,16 @@
...
@@ -48,16 +48,16 @@
<option
name=
"tableUIInfoList"
>
<option
name=
"tableUIInfoList"
>
<list>
<list>
<TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"
BsnMessageSponsor
"
/>
<option
name=
"className"
value=
"
SapPurchaseItem
"
/>
<option
name=
"tableName"
value=
"
bsn_message_sponsor
"
/>
<option
name=
"tableName"
value=
"
sap_purchase_item
"
/>
</TableUIInfo>
</TableUIInfo>
<TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"
BsnMessageExecute
"
/>
<option
name=
"className"
value=
"
SapPurchaseOrder
"
/>
<option
name=
"tableName"
value=
"
bsn_message_execute
"
/>
<option
name=
"tableName"
value=
"
sap_purchase_order
"
/>
</TableUIInfo>
</TableUIInfo>
<TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"
BsnMessageReject
"
/>
<option
name=
"className"
value=
"
SapPurchaseOrderItem
"
/>
<option
name=
"tableName"
value=
"
bsn_message_reject
"
/>
<option
name=
"tableName"
value=
"
sap_purchase_order_item
"
/>
</TableUIInfo>
</TableUIInfo>
</list>
</list>
</option>
</option>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursement.js
View file @
4682089d
...
@@ -351,7 +351,7 @@ var tableArray = [
...
@@ -351,7 +351,7 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源)
//创建表格(参数、列、插入的节点、数据源)
function
loadGrid
(
obj
)
{
function
loadGrid
(
obj
)
{
var
toolbarOptions
=
null
;
var
toolbarOptions
=
null
;
// if(obj.node=="reimbursementApplierGrid") {
// if(obj.node=="reimbursementApplierGrid") {
//只有第一个表格含工具栏
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
addHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
tableArray
.
forEach
((
item
)
=>
{
...
@@ -381,7 +381,8 @@ function loadGrid(obj) {
...
@@ -381,7 +381,8 @@ function loadGrid(obj) {
fixedCellHeight
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
selectRowButtonOnly
:
true
,
onBeforeCheckRow
:
function
(
checked
,
data
)
{
onBeforeCheckRow
:
function
(
checked
,
data
)
{
//同时选定所有表格中的对应列
debugger
//同时选定或取消所有表格中的对应行
tableArray
.
forEach
((
item
)
=>
{
tableArray
.
forEach
((
item
)
=>
{
let
rows
=
item
.
gridManager
.
rows
;
let
rows
=
item
.
gridManager
.
rows
;
let
row
=
{};
let
row
=
{};
...
@@ -390,8 +391,29 @@ function loadGrid(obj) {
...
@@ -390,8 +391,29 @@ function loadGrid(obj) {
row
=
temp
;
row
=
temp
;
}
}
})
})
item
.
gridManager
.
select
(
row
);
checked
?
item
.
gridManager
.
select
(
row
):
item
.
gridManager
.
un
select
(
row
);
})
})
return
false
;
//阻止默认事件、防止某个表格的对应行被多次选中
},
onBeforeCheckAllRow
:
function
(
a
,
b
){
// console.log(b)
// $(b).addClass("l-checked")
// debugger
//同时全选、同时取消全选
// tableArray.forEach((item) => {
// let hrow=$(item.gridManager.element);//全选框
// console.log(hrow)
// console.log(item.gridManager.element)
//
// let checked= !hrow.hasClass("l-checked");
// $(hrow).toggleClass("l-checked",checked);
// let rows = item.gridManager.selected;
// rows.forEach((row) => {
// checked?item.gridManager.select(row):item.gridManager.unselect(row);
// })
// })
return
false
;
//阻止默认事件
}
}
});
});
UICtrl
.
setSearchAreaToggle
(
obj
.
gridManager
);
UICtrl
.
setSearchAreaToggle
(
obj
.
gridManager
);
...
@@ -492,9 +514,8 @@ function useArrayTable(func, ...data) {
...
@@ -492,9 +514,8 @@ function useArrayTable(func, ...data) {
return
results
;
return
results
;
}
}
//获取
序号当前值
//获取
最新子序号(维护实体的标识)
function
getZepItemNo
(){
function
getZepItemNo
(){
debugger
let
result
=
getTableDateAll
(
tableArray
[
tableArray
.
length
-
1
]);
let
result
=
getTableDateAll
(
tableArray
[
tableArray
.
length
-
1
]);
let
zepItemNo
=
"001"
;
let
zepItemNo
=
"001"
;
if
(
result
.
length
>
0
){
if
(
result
.
length
>
0
){
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
4682089d
...
@@ -203,8 +203,6 @@ function getExtendedData() {
...
@@ -203,8 +203,6 @@ function getExtendedData() {
debugger
debugger
let
msg
=
"["
;
let
msg
=
"["
;
let
isUndefined
=
false
let
isUndefined
=
false
let
deptStaffResult
=
DataUtil
.
getGridData
({
let
deptStaffResult
=
DataUtil
.
getGridData
({
gridManager
:
gridManager
,
gridManager
:
gridManager
,
isAllData
:
true
,
isAllData
:
true
,
...
@@ -228,9 +226,10 @@ function getExtendedData() {
...
@@ -228,9 +226,10 @@ function getExtendedData() {
function
rejectForm
()
{
function
rejectForm
()
{
debugger
$
(
'#auditForm'
).
ajaxSubmit
({
$
(
'#auditForm'
).
ajaxSubmit
({
url
:
web_app
.
name
+
'/sapNonProdApplyNext/
distributeSap
NonProdApplyDept.ajax'
,
url
:
web_app
.
name
+
'/sapNonProdApplyNext/
reject
NonProdApplyDept.ajax'
,
param
:
{},
param
:
{
meId
:
getMeId
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
Public
.
successTip
(
"已驳回!"
);
Public
.
successTip
(
"已驳回!"
);
_self
.
close
();
_self
.
close
();
...
@@ -244,7 +243,7 @@ function rejectForm() {
...
@@ -244,7 +243,7 @@ function rejectForm() {
* 根据选择的驳回的部门生成输入框
* 根据选择的驳回的部门生成输入框
*/
*/
function
loadRejectReasonBox
()
{
function
loadRejectReasonBox
()
{
$
(
'input[name="
bu2
"]'
).
change
(
function
()
{
$
(
'input[name="
auditDept
"]'
).
change
(
function
()
{
let
val
=
$
(
this
).
val
()
let
val
=
$
(
this
).
val
()
let
textData
=
$
(
this
).
parent
().
text
().
trim
()
let
textData
=
$
(
this
).
parent
().
text
().
trim
()
if
(
this
.
checked
)
{
if
(
this
.
checked
)
{
...
@@ -255,10 +254,10 @@ function loadRejectReasonBox() {
...
@@ -255,10 +254,10 @@ function loadRejectReasonBox() {
// 元素不存在
// 元素不存在
let
box
=
`<div id="id_
${
val
}
">
let
box
=
`<div id="id_
${
val
}
">
<div class="col-xs-4 col-sm-2" style="height:60px;">
<div class="col-xs-4 col-sm-2" style="height:60px;">
<label class="hg-form-label" name="
text_
${
val
}
" title="[
${
textData
}
]驳回原因">[
${
textData
}
]驳回原因 :</label>
<label class="hg-form-label" name="
${
val
}
" title="[
${
textData
}
]驳回原因">[
${
textData
}
]驳回原因 :</label>
</div>
</div>
<div class="col-xs-8 col-sm-10 col-warp col-white-bg" style="height:60px;">
<div class="col-xs-8 col-sm-10 col-warp col-white-bg" style="height:60px;">
<textarea name="
text_
${
val
}
" label="[
${
textData
}
]驳回原因" id="text_
${
val
}
"></textarea>
<textarea name="
${
val
}
" label="[
${
textData
}
]驳回原因" id="text_
${
val
}
"></textarea>
</div>
</div>
</div>`
;
</div>`
;
$
(
"#rejectReasonBox"
).
append
(
box
)
$
(
"#rejectReasonBox"
).
append
(
box
)
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
4682089d
...
@@ -265,7 +265,7 @@
...
@@ -265,7 +265,7 @@
</div>
</div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"
bu2"
label=
"驳回部门"
list=
"bu
"
labelCol=
"2"
<x:checkboxListC
name=
"
auditDept"
label=
"驳回部门"
list=
"auditDeptMap
"
labelCol=
"2"
fieldCol=
"10"
/>
fieldCol=
"10"
/>
</div>
</div>
<div
id=
"rejectReasonBox"
></div>
<div
id=
"rejectReasonBox"
></div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
0 → 100644
View file @
4682089d
var
itemGridManager
=
null
;
$
(
function
()
{
});
function
getId
()
{
return
$
(
'#id'
).
val
();
}
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
0 → 100644
View file @
4682089d
<%--采购申请--%>
<%@ 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/purchaseOrder/sapPurchaseOrderDetail.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"
/>
<x:hidden
name=
"bsart"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"ebeln"
label=
"采购订单号码"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"bsart"
label=
"采购订单类型"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"batxt"
label=
"采购订单类型描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"purchaseOrderId"
label=
"id"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"ebelp"
label=
"项目编号"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"pstyp"
label=
"项目类别"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"ptext"
label=
"项目类别描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"knttp"
label=
"科目分配类别"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"knttx"
label=
"科目分配类别描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"matnr"
label=
"物料号"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"matkl"
label=
"物料组"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"wgbez"
label=
"物料组描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"menge"
label=
"采购订单数量"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"meins"
label=
"采购订单计量单位"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"msehl"
label=
"单位描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"eindt"
label=
"要求交货日期"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"werks"
label=
"工厂"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"name1"
label=
"名称"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"lgort"
label=
"库存地点"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"lgobe"
label=
"库存地点的描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"ekgrp"
label=
"采购组"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"eknam"
label=
"采购组描述"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"netpr"
label=
"价格"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"peinh"
label=
"价格单位"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"mwskz"
label=
"税码"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"waers"
label=
"币种"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"netwr"
label=
"总价"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"retpo"
label=
"退货项目"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"sakto"
label=
"总账科目"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"kostl"
label=
"成本中心"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"anln1"
label=
"主资产号"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"anln2"
label=
"资产次级编号"
readonly=
"false"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
</div>
</div>
</form>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
0 → 100644
View file @
4682089d
var
purchaseOrderGridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initUI
();
initPurchaseListGrid
();
}
);
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
}
function
initPurchaseListGrid
()
{
// var toolbarOptions = UICtrl.getDefaultToolbarOptions({
// addHandler: addHandler,
// });
purchaseOrderGridManager
=
UICtrl
.
grid
(
'#purchaseOrderGrid'
,
{
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
:
"采购申请类型描述"
,
name
:
"batxt"
,
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
+
'/sapPurchaseOrder/slicedSapPurchaseOrderList.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
.
id
);
},
onAfterShowData
:
function
(
currentData
)
{
}
}
);
UICtrl
.
setSearchAreaToggle
(
purchaseOrderGridManager
);
}
/**
* 查看采购订单详情
* @param id 采购订单id
* @returns {boolean}
*/
function
viewHandler
(
id
)
{
if
(
!
id
)
{
var
row
=
DataUtil
.
getSelectedRow
(
purchaseOrderGridManager
);
if
(
!
row
)
{
return
row
;
}
id
=
row
.
id
;
}
UICtrl
.
addTabItem
({
tabid
:
'viewPurchase'
+
id
,
text
:
'查看采购订单'
,
url
:
web_app
.
name
+
'/sapPurchaseOrder/showSapPurchaseOrderDetail.job?bizId='
+
id
});
}
//
// function addHandler() {
// UICtrl.addTabItem({
// tabid: 'addPurchase',
// text: '新增采购审批',
// url: web_app.name + '/sapPurchaseOrder/forwardSapPurchaseOrderDetail.job'
// });
// }
function
reloadPurchaseGrid
()
{
var
params
=
$
(
"#queryMainForm"
).
formToJSON
();
UICtrl
.
gridSearch
(
purchaseOrderGridManager
,
params
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
purchaseOrderGridManager
,
param
);
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.jsp
0 → 100644
View file @
4682089d
<%@ 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/purchaseOrder/sapPurchaseOrderList.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=
"#purchaseOrderGrid"
name=
"list"
/>
<div
id=
"purchaseOrderGrid"
style=
"margin:2px;"
></div>
</div>
</div>
</div>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/base/DefinitionHomepageTaskData.java
View file @
4682089d
...
@@ -30,16 +30,17 @@ public class DefinitionHomepageTaskData extends BaseApplication {
...
@@ -30,16 +30,17 @@ public class DefinitionHomepageTaskData extends BaseApplication {
public
Map
<
String
,
Object
>
replaceQueryTrackingTasks
(){
public
Map
<
String
,
Object
>
replaceQueryTrackingTasks
(){
// 当前登录用户是否以任务发起人的身份发起过任务
// 当前登录用户是否以任务发起人的身份发起过任务
List
<
BsnMessageSponsor
>
messageSponsors
=
bsnMessageApplication
.
queryFinishBsnMessageSponsor
();
List
<
BsnMessageSponsor
>
messageSponsors
=
bsnMessageApplication
.
queryFinishBsnMessageSponsor
();
if
(!
messageSponsors
.
isEmpty
())
{
if
(
messageSponsors
!=
null
&&
!
messageSponsors
.
isEmpty
())
{
// 若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
// 若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
for
(
BsnMessageSponsor
sponsor
:
messageSponsors
)
{
for
(
BsnMessageSponsor
sponsor
:
messageSponsors
)
{
List
<
BsnMessageExecute
>
executes
=
new
ArrayList
<>();
List
<
BsnMessageExecute
>
executes
=
new
ArrayList
<>();
//验证状态防止多次创建任务
if
(
sponsor
.
getStatus
()
==
0
)
{
if
(
sponsor
.
getStatus
()
==
0
)
{
// 封装审批任务
// 封装审批任务
BsnMessageExecute
execute
=
new
BsnMessageExecute
();
BsnMessageExecute
execute
=
new
BsnMessageExecute
();
execute
.
set
Cre
ateDate
(
new
Date
());
execute
.
set
Upd
ateDate
(
new
Date
());
execute
.
setTaskExecute
(
this
.
getOperator
().
getUserId
());
execute
.
setTaskExecute
(
this
.
getOperator
().
getUserId
());
execute
.
setTaskDescribe
(
"
[完成]-待审核
"
);
execute
.
setTaskDescribe
(
"
各单位已完成[发起人审核]
"
);
execute
.
setBusinessCode
(
"system"
);
execute
.
setBusinessCode
(
"system"
);
execute
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
execute
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
executes
.
add
(
execute
);
executes
.
add
(
execute
);
...
...
topsun/src/main/java/com/huigou/topsun/base/WorkflowApplicationImplOverride.java
deleted
100644 → 0
View file @
93f6728b
This diff is collapsed.
Click to expand it.
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/appliction/BsnMessageApplication.java
View file @
4682089d
...
@@ -28,19 +28,39 @@ public interface BsnMessageApplication {
...
@@ -28,19 +28,39 @@ public interface BsnMessageApplication {
public
void
saveBsnMessageSponsor
(
List
<
BsnMessageSponsor
>
all
);
public
void
saveBsnMessageSponsor
(
List
<
BsnMessageSponsor
>
all
);
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
);
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
);
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
);
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
);
public
void
saveBsnMessageExecute
(
BsnMessageExecute
entity
);
public
String
saveBsnMessageExecute
(
BsnMessageExecute
entity
);
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
);
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
);
public
void
saveBsnMessageReject
(
BsnMessageReject
entity
);
public
void
saveBsnMessageReject
(
BsnMessageReject
entity
);
public
void
deleteBsnMessageSponsor
(
BsnMessageSponsor
entity
);
/**
* 根据任务发布id获取旗下任务执行信息
* @param msId
* @return
*/
List
<
BsnMessageExecute
>
getExecuteByMsId
(
String
msId
);
List
<
BsnMessageExecute
>
getExecuteByMsId
(
String
msId
);
BsnMessageExecute
getExecuteByMeId
(
String
id
);
BsnMessageExecute
getExecuteByMeId
(
String
id
);
/**
* 根据任务执行id获取驳回信息
* @param meId
* @return
*/
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
);
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
);
// List<BsnMessageSponsor> getSponsorsBy();
/**
/**
* 获取同一份任务流程的其他执行部门
* 根据表单号获取任务发布信息及其下的执行单位信息
* @param bid
* @return
*/
BsnMessageSponsor
getSponsorByBId
(
String
bid
);
/**
* 获取同一份任务流程的其他执行部门,且排除自己
* @param meId
* @param meId
* @return
* @return
*/
*/
...
...
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/appliction/impl/BsnMessageApplicationImpl.java
View file @
4682089d
...
@@ -10,22 +10,18 @@ import com.huigou.topsun.base.bsnMessage.repository.BsnMessageSponsorRepository;
...
@@ -10,22 +10,18 @@ import com.huigou.topsun.base.bsnMessage.repository.BsnMessageSponsorRepository;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.domain.Sort
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 采购编号及合同编号编码规则
* 专项任务整合及输出
*
* @ClassName: CodeRuleApplicationImpl
* @author
* @date 2018-06-20 15:20
* @version V1.0
*/
*/
@Service
(
"bsnMessageApplication"
)
@Service
(
"bsnMessageApplication"
)
public
class
BsnMessageApplicationImpl
extends
BaseApplication
implements
BsnMessageApplication
{
public
class
BsnMessageApplicationImpl
extends
BaseApplication
implements
BsnMessageApplication
{
@Autowired
@Autowired
BsnMessageExecuteRepository
messageExecuteRepository
;
BsnMessageExecuteRepository
messageExecuteRepository
;
@Autowired
@Autowired
...
@@ -41,16 +37,17 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
...
@@ -41,16 +37,17 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setSortFieldName
(
"
cre
ateDate"
);
queryModel
.
setSortFieldName
(
"
upd
ateDate"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
putParam
(
"taskExecute"
,
this
.
getOperator
().
getUserId
());
queryModel
.
putParam
(
"taskExecute"
,
this
.
getOperator
().
getUserId
());
queryModel
.
putParam
(
"addText"
,
"[驳回]"
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
}
@Override
@Override
public
List
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
()
{
public
List
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessageSponsor"
);
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessageSponsor"
);
return
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
BsnMessageSponsor
.
class
,
this
.
getOperator
().
getUserId
());
return
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
BsnMessageSponsor
.
class
,
this
.
getOperator
().
getUserId
());
}
}
...
@@ -61,7 +58,7 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
...
@@ -61,7 +58,7 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
){
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
){
String
keyId
=
messageSponsorRepository
.
save
(
entity
).
getId
();
String
keyId
=
messageSponsorRepository
.
save
(
entity
).
getId
();
if
(
!
entity
.
getExecutes
().
isEmpty
(
)){
if
(
isNotEmpty
(
entity
.
getExecutes
()
)){
entity
.
getExecutes
().
forEach
(
item
->
item
.
setMessageSponsorId
(
keyId
));
entity
.
getExecutes
().
forEach
(
item
->
item
.
setMessageSponsorId
(
keyId
));
messageExecuteRepository
.
save
(
entity
.
getExecutes
());
messageExecuteRepository
.
save
(
entity
.
getExecutes
());
}
}
...
@@ -72,8 +69,13 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
...
@@ -72,8 +69,13 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
){
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
){
messageExecuteRepository
.
save
(
all
);
messageExecuteRepository
.
save
(
all
);
}
}
public
void
saveBsnMessageExecute
(
BsnMessageExecute
entity
){
public
String
saveBsnMessageExecute
(
BsnMessageExecute
entity
){
messageExecuteRepository
.
save
(
entity
);
String
keyId
=
messageExecuteRepository
.
save
(
entity
).
getId
();
if
(
isNotEmpty
(
entity
.
getRejects
())){
entity
.
getRejects
().
forEach
(
item
->
item
.
setBsnExecuteId
(
keyId
));
messageRejectRepository
.
save
(
entity
.
getRejects
());
}
return
keyId
;
}
}
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
){
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
){
messageRejectRepository
.
save
(
all
);
messageRejectRepository
.
save
(
all
);
...
@@ -82,6 +84,14 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
...
@@ -82,6 +84,14 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
messageRejectRepository
.
save
(
entity
);
messageRejectRepository
.
save
(
entity
);
}
}
@Override
public
void
deleteBsnMessageSponsor
(
BsnMessageSponsor
entity
)
{
if
(
isNotEmpty
(
entity
.
getExecutes
())){
messageExecuteRepository
.
delete
(
entity
.
getExecutes
());
}
messageSponsorRepository
.
delete
(
entity
);
}
@Override
@Override
public
List
<
BsnMessageExecute
>
getExecuteByMsId
(
String
msId
)
{
public
List
<
BsnMessageExecute
>
getExecuteByMsId
(
String
msId
)
{
return
messageExecuteRepository
.
findAllByMessageSponsorId
(
msId
);
return
messageExecuteRepository
.
findAllByMessageSponsorId
(
msId
);
...
@@ -94,12 +104,29 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
...
@@ -94,12 +104,29 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
@Override
@Override
public
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
)
{
public
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
)
{
return
messageRejectRepository
.
findAllByBsnExecuteId
(
meId
);
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"rejectDate"
);
return
messageRejectRepository
.
findAllByBsnExecuteId
(
meId
,
sort
);
}
}
@Override
@Override
public
List
<
BsnMessageExecute
>
getBrotherExecuteByMeId
(
String
meId
)
{
public
List
<
BsnMessageExecute
>
getBrotherExecuteByMeId
(
String
meId
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryBrotherExecute"
);
Map
<
String
,
Object
>
mapParam
=
new
HashMap
<>();
mapParam
.
put
(
"meId"
,
meId
);
return
this
.
sqlExecutorDao
.
queryToListByMapParam
(
queryDescriptor
.
getSql
(),
BsnMessageExecute
.
class
,
mapParam
);
}
@Override
public
BsnMessageSponsor
getSponsorByBId
(
String
bId
)
{
BsnMessageSponsor
sponsor
=
messageSponsorRepository
.
findByBusinessId
(
bId
);
if
(
sponsor
!=
null
){
List
<
BsnMessageExecute
>
executeList
=
this
.
getExecuteByMsId
(
sponsor
.
getId
());
sponsor
.
setExecutes
(
executeList
);
}
return
sponsor
;
}
return
null
;
public
boolean
isNotEmpty
(
List
<?>
list
)
{
return
list
!=
null
&&
!
list
.
isEmpty
();
}
}
}
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessageExecute.java
View file @
4682089d
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
domain
;
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
domain
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.http.annotation.Contract
;
import
org.hibernate.annotations.GenericGenerator
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
*
*
任务执行实体
* @TableName bsn_message_execute
* @TableName bsn_message_execute
*/
*/
@Table
(
name
=
"bsn_message_execute"
)
@Table
(
name
=
"bsn_message_execute"
)
...
@@ -53,10 +56,10 @@ public class BsnMessageExecute implements Serializable {
...
@@ -53,10 +56,10 @@ public class BsnMessageExecute implements Serializable {
private
String
businessCode
;
private
String
businessCode
;
/**
/**
*
创建
日期
*
更新
日期
*/
*/
@Column
(
name
=
"
cre
ate_date"
)
@Column
(
name
=
"
upd
ate_date"
)
private
Date
cre
ateDate
;
private
Date
upd
ateDate
;
/**
/**
* 完成日期
* 完成日期
...
@@ -69,7 +72,16 @@ public class BsnMessageExecute implements Serializable {
...
@@ -69,7 +72,16 @@ public class BsnMessageExecute implements Serializable {
*/
*/
private
Integer
active
;
private
Integer
active
;
@Transient
private
List
<
BsnMessageReject
>
rejects
;
public
void
addReject
(
BsnMessageReject
reject
){
if
(
this
.
rejects
==
null
){
this
.
rejects
=
new
ArrayList
<>();
}
rejects
.
add
(
reject
);
}
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessageReject.java
View file @
4682089d
...
@@ -8,7 +8,7 @@ import java.io.Serializable;
...
@@ -8,7 +8,7 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
*
*
驳回信息实体
* @TableName bsn_message_reject
* @TableName bsn_message_reject
*/
*/
@Table
(
name
=
"bsn_message_reject"
)
@Table
(
name
=
"bsn_message_reject"
)
...
@@ -26,8 +26,8 @@ public class BsnMessageReject implements Serializable {
...
@@ -26,8 +26,8 @@ public class BsnMessageReject implements Serializable {
name
=
"system-uuid"
,
name
=
"system-uuid"
,
strategy
=
"guid"
strategy
=
"guid"
)
)
@Column
(
name
=
"
detail_I
d"
)
@Column
(
name
=
"
i
d"
)
private
String
detailI
d
;
private
String
i
d
;
/**
/**
*
*
...
...
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessageSponsor.java
View file @
4682089d
...
@@ -5,11 +5,12 @@ import org.hibernate.annotations.GenericGenerator;
...
@@ -5,11 +5,12 @@ import org.hibernate.annotations.GenericGenerator;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
*
*
任务启动/任务发布实体
* @TableName bsn_message_sponsor
* @TableName bsn_message_sponsor
*/
*/
@Table
(
name
=
"bsn_message_sponsor"
)
@Table
(
name
=
"bsn_message_sponsor"
)
...
@@ -65,7 +66,7 @@ public class BsnMessageSponsor implements Serializable {
...
@@ -65,7 +66,7 @@ public class BsnMessageSponsor implements Serializable {
private
String
executorUrl
;
private
String
executorUrl
;
/**
/**
* 完成状态(等待:0,审核:1)
* 完成状态(等待:0,审核:1
,结束:2
)
*/
*/
private
Integer
status
;
private
Integer
status
;
...
@@ -73,5 +74,13 @@ public class BsnMessageSponsor implements Serializable {
...
@@ -73,5 +74,13 @@ public class BsnMessageSponsor implements Serializable {
@Transient
@Transient
private
List
<
BsnMessageExecute
>
executes
;
private
List
<
BsnMessageExecute
>
executes
;
public
void
addExecute
(
BsnMessageExecute
execute
){
if
(
this
.
executes
==
null
){
this
.
executes
=
new
ArrayList
<>();
}
executes
.
add
(
execute
);
}
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/query/BsnMessageQueryRequest.java
deleted
100644 → 0
View file @
93f6728b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @TableName bsn_message
*/
@Data
public
class
BsnMessageQueryRequest
extends
QueryAbstractRequest
{
/**
* id
*/
private
String
id
;
/**
* 任务描述
*/
private
String
title
;
/**
* 任务执行人
*/
private
String
listners
;
/**
* 业务应用类型
*/
private
String
businessCode
;
/**
* 业务表单id
*/
private
String
businessId
;
/**
* 创建日期
*/
private
Date
createDate
;
/**
* 完成日期
*/
private
Date
finishedDate
;
/**
* 携带信息
*/
@Column
(
name
=
"reject_msg"
)
private
String
rejectMsg
;
private
String
executorUrl
;
/**
* 完成状态(默认为未完成:0,完成为:1,保存未分发:2)
*/
private
Integer
active
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessageRejectRepository.java
View file @
4682089d
...
@@ -2,12 +2,13 @@ package com.huigou.topsun.base.bsnMessage.repository;
...
@@ -2,12 +2,13 @@ package com.huigou.topsun.base.bsnMessage.repository;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
import
java.util.List
;
public
interface
BsnMessageRejectRepository
extends
JpaRepository
<
BsnMessageReject
,
String
>
{
public
interface
BsnMessageRejectRepository
extends
JpaRepository
<
BsnMessageReject
,
String
>
{
List
<
BsnMessageReject
>
findAllByBsnExecuteId
(
String
meId
);
List
<
BsnMessageReject
>
findAllByBsnExecuteId
(
String
meId
,
Sort
sortOrder
);
}
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessageSponsorRepository.java
View file @
4682089d
...
@@ -8,6 +8,6 @@ import java.util.List;
...
@@ -8,6 +8,6 @@ import java.util.List;
public
interface
BsnMessageSponsorRepository
extends
JpaRepository
<
BsnMessageSponsor
,
String
>
{
public
interface
BsnMessageSponsorRepository
extends
JpaRepository
<
BsnMessageSponsor
,
String
>
{
List
<
BsnMessageSponsor
>
findAll
ByBusinessId
(
String
BusinessId
);
BsnMessageSponsor
find
ByBusinessId
(
String
BusinessId
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
4682089d
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
...
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
NonProdApplyDeptApplicationImpl
extends
BaseApplication
implements
NonProdApplyDeptApplication
{
public
class
NonProdApplyDeptApplicationImpl
extends
BaseApplication
implements
NonProdApplyDeptApplication
{
...
@@ -44,6 +46,14 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -44,6 +46,14 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
throw
new
RuntimeException
(
"JSON转换失败:"
+
e
);
throw
new
RuntimeException
(
"JSON转换失败:"
+
e
);
}
}
/**
* 删除表单对应已存在任务
*/
BsnMessageSponsor
sponsor
=
bsnMessageApplication
.
getSponsorByBId
(
nonProdApplyDept
.
getApplyDeptId
());
if
(
sponsor
!=
null
){
bsnMessageApplication
.
deleteBsnMessageSponsor
(
sponsor
);
}
//封装分发数据
//封装分发数据
BsnMessageSponsor
bsnMessageSponsor
=
new
BsnMessageSponsor
();
BsnMessageSponsor
bsnMessageSponsor
=
new
BsnMessageSponsor
();
bsnMessageSponsor
.
setTaskSponsor
(
this
.
getOperator
().
getUserId
());
bsnMessageSponsor
.
setTaskSponsor
(
this
.
getOperator
().
getUserId
());
...
@@ -53,23 +63,21 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -53,23 +63,21 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
bsnMessageSponsor
.
setBusinessId
(
nonProdApplyDept
.
getApplyDeptId
());
bsnMessageSponsor
.
setBusinessId
(
nonProdApplyDept
.
getApplyDeptId
());
bsnMessageSponsor
.
setStatus
(
0
);
bsnMessageSponsor
.
setStatus
(
0
);
List
<
BsnMessageExecute
>
executeList
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
stringMap
:
deptStaffList
)
{
for
(
Map
<
String
,
String
>
stringMap
:
deptStaffList
)
{
BsnMessageExecute
messageExecute
=
new
BsnMessageExecute
();
BsnMessageExecute
messageExecute
=
new
BsnMessageExecute
();
String
userCode
=
stringMap
.
get
(
"userCode"
);
String
userCode
=
stringMap
.
get
(
"userCode"
);
String
deptName
=
stringMap
.
get
(
"deptName"
);
String
deptName
=
stringMap
.
get
(
"deptName"
);
String
deptCode
=
stringMap
.
get
(
"deptCode"
);
String
deptCode
=
stringMap
.
get
(
"deptCode"
);
String
[]
split
=
userCode
.
split
(
"@"
);
messageExecute
.
setTaskExecute
(
userCode
);
messageExecute
.
setTaskExecute
(
split
[
0
]
);
messageExecute
.
setBusinessCode
(
deptCode
);
messageExecute
.
setBusinessCode
(
deptCode
);
messageExecute
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
messageExecute
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
messageExecute
.
set
Cre
ateDate
(
new
Date
());
messageExecute
.
set
Upd
ateDate
(
new
Date
());
messageExecute
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
messageExecute
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
executeList
.
add
(
messageExecute
);
bsnMessageSponsor
.
addExecute
(
messageExecute
);
}
}
bsnMessageSponsor
.
setExecutes
(
executeList
);
String
keyId
=
bsnMessageApplication
.
saveBsnMessageSponsor
(
bsnMessageSponsor
);
String
keyId
=
bsnMessageApplication
.
saveBsnMessageSponsor
(
bsnMessageSponsor
);
map
.
put
(
"applyDeptId"
,
nonProdApplyDept
.
getApplyDeptId
());
map
.
put
(
"applyDeptId"
,
nonProdApplyDept
.
getApplyDeptId
());
map
.
put
(
"keyId"
,
keyId
);
map
.
put
(
"keyId"
,
keyId
);
return
map
;
return
map
;
...
@@ -92,15 +100,34 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -92,15 +100,34 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
@Override
@Override
public
void
rejectNonProdApplyDept
(
SDO
sdo
)
{
public
void
rejectNonProdApplyDept
(
SDO
sdo
)
{
String
septString
=
sdo
.
getString
(
"dept
"
);
String
meId
=
sdo
.
getString
(
"meId
"
);
//需要被驳回的部门
//需要被驳回的部门
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
List
<
BsnMessageExecute
>
brotherExecuteAll
=
bsnMessageApplication
.
getBrotherExecuteByMeId
(
meId
);
String
bdid
=
sdo
.
getString
(
"表单的id"
);
Map
<
String
,
BsnMessageExecute
>
executeMap
=
new
HashMap
<>();
//更改状态此对象为驳回状态
for
(
BsnMessageExecute
execute
:
brotherExecuteAll
)
{
SapNonProdApplyDept
one
=
nonProdApplyDeptRepository
.
findOne
(
bdid
);
executeMap
.
put
(
execute
.
getTaskExecute
(),
execute
);
one
.
setStatus
(
ActiveStatus
.
REJECTED
.
getValue
());
}
nonProdApplyDeptRepository
.
save
(
one
);
// 遍历 SDO 对象中的 key
//获取此条数据的相关部门信息
for
(
String
key
:
sdo
.
getProperties
().
keySet
())
{
// List<BsnMessage> allByBusinessId = bsnMessageRepository.findAllByBusinessId(bdid);
// 如果存在对应的 BsnMessageExecute,进行操作
BsnMessageExecute
execute
=
executeMap
.
get
(
key
);
if
(
execute
!=
null
)
{
//更改驳回状态
execute
.
setActive
(
ActiveStatus
.
REJECTED
.
getValue
());
//更新时间
execute
.
setUpdateDate
(
new
Date
());
//封装驳回详细
BsnMessageReject
reject
=
new
BsnMessageReject
();
reject
.
setRejectMsg
(
sdo
.
getString
(
key
));
reject
.
setRejectDate
(
new
Date
());
reject
.
setBsnExecuteId
(
execute
.
getId
());
execute
.
addReject
(
reject
);
bsnMessageApplication
.
saveBsnMessageExecute
(
execute
);
}
}
//当前审核任务回退
BsnMessageExecute
systemExecute
=
bsnMessageApplication
.
getExecuteByMeId
(
meId
);
systemExecute
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
bsnMessageApplication
.
saveBsnMessageExecute
(
systemExecute
);
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
4682089d
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.nonProdApply.controller;
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.nonProdApply.controller;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
...
@@ -16,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -16,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Controller
@Controller
@ControllerMapping
(
"/sapNonProdApplyNext"
)
@ControllerMapping
(
"/sapNonProdApplyNext"
)
...
@@ -98,8 +100,13 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -98,8 +100,13 @@ public class NonProdApplyNextController extends CommonController {
this
.
putAttribute
(
"isReadOnly"
,
"false"
);
this
.
putAttribute
(
"isReadOnly"
,
"false"
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
bizId
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
bizId
);
//测试数据
//测试数据
Map
<
String
,
String
>
map
=
DictUtil
.
getDictionary
(
"serviceusage"
);
// Map<String, String> map = new HashMap<>();
this
.
putAttribute
(
"bu"
,
map
);
//获取该业务流程下其他执行部门
List
<
BsnMessageExecute
>
executeAll
=
bsnMessageApplication
.
getBrotherExecuteByMeId
(
meId
);
Map
<
String
,
String
>
map
=
executeAll
.
stream
()
.
collect
(
Collectors
.
toMap
(
BsnMessageExecute:
:
getTaskExecute
,
BsnMessageExecute:
:
getBusinessCode
));
this
.
putAttribute
(
"auditDeptMap"
,
map
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
}
}
...
@@ -135,14 +142,14 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -135,14 +142,14 @@ public class NonProdApplyNextController extends CommonController {
// return null;
// return null;
// }
// }
/**
public
void
rejectNonProdApplyDept
()
{
* 驳回
* @return
*/
public
String
rejectNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
septString
=
sdo
.
getString
(
"dept"
);
nonProdApplyDeptApplication
.
rejectNonProdApplyDept
(
sdo
);
String
meId
=
sdo
.
getString
(
"meId"
);
//可以根据meId 获取msId ,根据msId获取所有的持有该任务的部门
return
success
();
//需要被驳回的部门
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
}
}
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/SapNonProdApplyDept.java
View file @
4682089d
...
@@ -34,10 +34,6 @@ public class SapNonProdApplyDept implements Serializable {
...
@@ -34,10 +34,6 @@ public class SapNonProdApplyDept implements Serializable {
@Column
(
name
=
"base_info_id"
)
@Column
(
name
=
"base_info_id"
)
private
String
baseInfoId
;
private
String
baseInfoId
;
/**
* 状态(0:未分发,1:待检查,2:已驳回,3:已完成)
*/
private
int
status
;
/**
/**
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/SapPurchaseOrderApplication.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
application
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderVo
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/18:59
* @Description:
*/
public
interface
SapPurchaseOrderApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchaseOrder/sapPurchaseOrder.xml"
;
String
PROCESS_DEFINITION_KEY
=
"sapPurchaseOrderProc"
;
Map
<
String
,
Object
>
slicedSapPurchaseOrderList
(
SapPurchaseOrderQueryRequest
queryRequest
);
SapPurchaseOrder
loadSapPurchaseOrder
(
String
id
);
void
saveSapPurchaseOrderVo
(
SapPurchaseOrderVo
sapPurchaseOrderVo
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/SapPurchaseOrderItemApplication.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
application
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrderItem
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderItemQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/19:19
* @Description:
*/
public
interface
SapPurchaseOrderItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchaseOrder/sapPurchaseOrderItem.xml"
;
void
saveSapPurchaseOrderItems
(
String
sapPurchaseOrderId
,
List
<
SapPurchaseOrderItem
>
sapPurchaseOrderItems
);
void
deleteByIds
(
List
<
String
>
ids
);
Map
<
String
,
Object
>
querySapPurchaseOrderItems
(
SapPurchaseOrderItemQueryRequest
queryRequest
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/impl/SapPurchaseOrderApplicationImpl.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
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.sap.purchaseOrder.application.SapPurchaseOrderApplication
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrderItem
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderItemVo
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderVo
;
import
com.huigou.topsun.sap.purchaseOrder.repository.SapPurchaseOrderRepository
;
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.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/18:59
* @Description:
*/
@Service
(
"sapPurchaseOrderApplication"
)
public
class
SapPurchaseOrderApplicationImpl
extends
FlowBroker
implements
SapPurchaseOrderApplication
{
@Resource
private
SapPurchaseOrderRepository
sapPurchaseOrderRepository
;
@Resource
private
SapPurchaseOrderItemApplication
sapPurchaseOrderItemApplication
;
@Resource
private
WorkflowApplication
workflowApplication
;
@Resource
private
OperatorApplication
operatorApplication
;
// @Override
protected
String
saveBizAndOrderData
()
{
// super.saveBizAndOrderData();
SapPurchaseOrder
sapPurchaseOrder
=
getBizEntity
(
SapPurchaseOrder
.
class
);
if
(
sapPurchaseOrder
.
isNew
())
{
sapPurchaseOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
sapPurchaseOrder
=
(
SapPurchaseOrder
)
commonDomainService
.
loadAndFillinProperties
(
sapPurchaseOrder
);
}
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
List
<
SapPurchaseOrderItem
>
sapPurchaseOrderItems
=
getBizEntities
(
SapPurchaseOrderItem
.
class
,
"sapPurchaseItems"
);
sapPurchaseOrderItemApplication
.
saveSapPurchaseOrderItems
(
sapPurchaseOrder
.
getId
(),
sapPurchaseOrderItems
);
//String sapPurchaseVoJson = this.getSapPurchaseVoJson(sapPurchaseOrder);
return
sapPurchaseOrder
.
getId
();
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
sapPurchaseOrderRepository
.
getOne
(
bizId
));
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
sapPurchaseOrder
.
setStatusId
(
status
.
getId
());
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
sapPurchaseOrder
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
}
/**
* @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
();
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
sapPurchaseOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedSapPurchaseOrderList
(
SapPurchaseOrderQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseOrderList"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"status"
,
BizBillStatus
.
getMap
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
SapPurchaseOrder
loadSapPurchaseOrder
(
String
id
)
{
return
sapPurchaseOrderRepository
.
findOne
(
id
);
}
@Override
@Transactional
public
void
saveSapPurchaseOrderVo
(
SapPurchaseOrderVo
sapPurchaseOrderVo
)
{
SapPurchaseOrder
sapPurchaseOrder
=
new
SapPurchaseOrder
();
BeanUtil
.
copyProperties
(
sapPurchaseOrderVo
,
sapPurchaseOrder
);
//初始化用户信息
String
createdById
=
"5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0"
;
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
createdById
);
sapPurchaseOrder
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
Map
<
String
,
Object
>
formData
=
BeanUtil
.
beanToMap
(
sapPurchaseOrder
);
String
bizId
=
this
.
startProcessInstance
(
SapPurchaseOrderApplication
.
PROCESS_DEFINITION_KEY
,
formData
);
sapPurchaseOrder
.
setId
(
bizId
);
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
List
<
SapPurchaseOrderItemVo
>
OrderItemVoList
=
sapPurchaseOrderVo
.
getItemVos
();
List
<
SapPurchaseOrderItem
>
sapPurchaseOrderItems
=
new
ArrayList
<>();
OrderItemVoList
.
forEach
(
OrderItemVo
->{
SapPurchaseOrderItem
sapPurchaseOrderItem
=
new
SapPurchaseOrderItem
();
BeanUtil
.
copyProperties
(
OrderItemVo
,
sapPurchaseOrderItem
);
sapPurchaseOrderItems
.
add
(
sapPurchaseOrderItem
);
});
sapPurchaseOrderItemApplication
.
saveSapPurchaseOrderItems
(
sapPurchaseOrder
.
getId
(),
sapPurchaseOrderItems
);
}
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/sap/purchaseOrder/application/impl/SapPurchaseOrderItemApplicationImpl.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrderItem
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderItemQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.repository.SapPurchaseOrderItemRepository
;
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: 2024/01/09/19:20
* @Description:
*/
@Service
public
class
SapPurchaseOrderItemApplicationImpl
extends
BaseApplication
implements
SapPurchaseOrderItemApplication
{
@Resource
private
SapPurchaseOrderItemRepository
sapPurchaseOrderItemRepository
;
@Override
public
void
saveSapPurchaseOrderItems
(
String
sapPurchaseOrderId
,
List
<
SapPurchaseOrderItem
>
sapPurchaseOrderItems
)
{
sapPurchaseOrderItems
.
forEach
(
sapPurchaseOrderItem
->
{
sapPurchaseOrderItem
.
setPurchaseOrderId
(
sapPurchaseOrderId
);
sapPurchaseOrderItemRepository
.
save
(
sapPurchaseOrderItem
);
});
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
sapPurchaseOrderItemRepository
.
delete
(
id
);
});
}
@Override
public
Map
<
String
,
Object
>
querySapPurchaseOrderItems
(
SapPurchaseOrderItemQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getSapPurchaseOrderId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseOrderItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/controller/SapPurchaseOrderController.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderApplication
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.domain.vo.SapPurchaseOrderVo
;
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.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/01/09/18:58
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchaseOrder"
)
public
class
SapPurchaseOrderController
extends
CommonController
{
@Resource
private
SapPurchaseOrderApplication
sapPurchaseOrderApplication
;
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/purchaseOrder/"
;
}
@SkipAuth
@RequestMapping
(
value
=
"/getSapPurchaseOrder"
)
@ResponseBody
public
HashMap
<
String
,
Object
>
getSapPurchaseOrder
(
@RequestBody
SapPurchaseOrderVo
sapPurchaseOrderVo
){
//SDO sdo = this.getSDO();
this
.
sapPurchaseOrderApplication
.
saveSapPurchaseOrderVo
(
sapPurchaseOrderVo
);
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
return
messageMap
;
}
public
String
forwardSapPurchaseOrderList
(){
return
forward
(
"sapPurchaseOrderList"
);
}
public
String
slicedSapPurchaseOrderList
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseOrderQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseOrderQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseOrderApplication
.
slicedSapPurchaseOrderList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardSapPurchaseOrderDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
SapPurchaseOrderApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
SapPurchaseOrder
sapPurchase
=
new
SapPurchaseOrder
();
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
sapPurchase
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"sapPurchaseOrderDetail"
,
sapPurchase
);
}
public
String
showSapPurchaseOrderDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderApplication
.
loadSapPurchaseOrder
(
id
);
return
forward
(
"sapPurchaseOrderDetail"
,
sapPurchaseOrder
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/controller/SapPurchaseOrderItemController.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
controller
;
import
com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication
;
import
com.huigou.topsun.sap.purchaseOrder.domain.query.SapPurchaseOrderItemQueryRequest
;
import
com.huigou.topsun.sap.purchaseOrder.repository.SapPurchaseOrderItemRepository
;
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: 2023/12/27/17:24
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchaseOrderItem"
)
public
class
SapPurchaseOrderItemController
extends
CommonController
{
@Resource
private
SapPurchaseOrderItemApplication
sapPurchaseOrderItemApplication
;
@Resource
private
SapPurchaseOrderItemRepository
sapPurchaseOrderItemRepository
;
public
String
querySapPurchaseOrderItems
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseOrderItemQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseOrderItemQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseOrderItemApplication
.
querySapPurchaseOrderItems
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteSapPurchaseOrderItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
sapPurchaseOrderItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @TableName sap_purchase_order
*/
@Table
(
name
=
"sap_purchase_order"
)
@Entity
@Data
public
class
SapPurchaseOrder
extends
FlowBillAbstractEntity
{
/**
* 采购订单号码
*/
@Column
(
name
=
"EBELN"
)
private
String
ebeln
;
/**
* 采购订单类型
*/
@Column
(
name
=
"BSART"
)
private
String
bsart
;
/**
* 采购订单类型描述
*/
@Column
(
name
=
"BATXT"
)
private
String
batxt
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapPurchaseOrder"
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrderItem.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
*
* @TableName sap_purchase_order_item
*/
@Table
(
name
=
"sap_purchase_order_item"
)
@Entity
@Data
public
class
SapPurchaseOrderItem
extends
AbstractEntity
{
/**
*
*/
@Column
(
name
=
"purchase_order_id"
)
private
String
purchaseOrderId
;
/**
* 项目编号
*/
@Column
(
name
=
"EBELP"
)
private
String
ebelp
;
/**
* 项目类别
*/
@Column
(
name
=
"PSTYP"
)
private
String
pstyp
;
/**
* 项目类别描述
*/
@Column
(
name
=
"PTEXT"
)
private
String
ptext
;
/**
* 科目分配类别
*/
@Column
(
name
=
"KNTTP"
)
private
String
knttp
;
/**
* 科目分配类别描述
*/
@Column
(
name
=
"KNTTX"
)
private
String
knttx
;
/**
* 物料号
*/
@Column
(
name
=
"MATNR"
)
private
String
matnr
;
/**
* 物料描述
*/
@Column
(
name
=
"TXZ01"
)
private
String
txz01
;
/**
* 物料组
*/
@Column
(
name
=
"MATKL"
)
private
String
matkl
;
/**
* 物料组描述
*/
@Column
(
name
=
"WGBEZ"
)
private
String
wgbez
;
/**
* 采购订单数量
*/
@Column
(
name
=
"MENGE"
)
private
String
menge
;
/**
* 采购订单计量单位
*/
@Column
(
name
=
"MEINS"
)
private
String
meins
;
/**
* 单位描述
*/
@Column
(
name
=
"MSEHL"
)
private
String
msehl
;
/**
* 要求交货日期
*/
@Column
(
name
=
"EINDT"
)
private
Date
eindt
;
/**
* 工厂
*/
@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
=
"EKGRP"
)
private
String
ekgrp
;
/**
* 采购组描述
*/
@Column
(
name
=
"EKNAM"
)
private
String
eknam
;
/**
* 价格
*/
@Column
(
name
=
"NETPR"
)
private
BigDecimal
netpr
;
/**
* 价格单位
*/
@Column
(
name
=
"PEINH"
)
private
Integer
peinh
;
/**
* 税码
*/
@Column
(
name
=
"MWSKZ"
)
private
String
mwskz
;
/**
* 币种
*/
@Column
(
name
=
"WAERS"
)
private
String
waers
;
/**
* 总价
*/
@Column
(
name
=
"NETWR"
)
private
BigDecimal
netwr
;
/**
* 退货项目
*/
@Column
(
name
=
"RETPO"
)
private
String
retpo
;
/**
* 总账科目
*/
@Column
(
name
=
"SAKTO"
)
private
String
sakto
;
/**
* 成本中心
*/
@Column
(
name
=
"KOSTL"
)
private
String
kostl
;
/**
* 主资产号
*/
@Column
(
name
=
"ANLN1"
)
private
String
anln1
;
/**
* 资产次级编号
*/
@Column
(
name
=
"ANLN2"
)
private
String
anln2
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/query/SapPurchaseOrderItemQueryRequest.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
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
SapPurchaseOrderItemQueryRequest
extends
QueryAbstractRequest
{
/**
* 采购订单id
*/
private
String
sapPurchaseOrderId
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/query/SapPurchaseOrderQueryRequest.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
import
javax.persistence.Column
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/19:13
* @Description:
*/
@Data
public
class
SapPurchaseOrderQueryRequest
extends
QueryAbstractRequest
{
/**
* 采购订单号码
*/
private
String
ebeln
;
/**
* 采购订单类型
*/
private
String
bsart
;
/**
* 采购订单类型描述
*/
private
String
batxt
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderItemVo.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
*
* @TableName sap_purchase_approval_item
*/
@Data
public
class
SapPurchaseOrderItemVo
{
/**
* 项目编号
*/
private
String
ebelp
;
/**
* 项目类别
*/
private
String
pstyp
;
/**
* 项目类别描述
*/
private
String
ptext
;
/**
* 科目分配类别
*/
private
String
knttp
;
/**
* 科目分配类别描述
*/
private
String
knttx
;
/**
* 物料号
*/
private
String
matnr
;
/**
* 物料描述
*/
private
String
txz01
;
/**
* 物料组
*/
private
String
matkl
;
/**
* 物料组描述
*/
private
String
wgbez
;
/**
* 采购订单数量
*/
private
String
menge
;
/**
* 采购订单计量单位
*/
private
String
meins
;
/**
* 单位描述
*/
private
String
msehl
;
/**
* 要求交货日期
*/
private
Date
eindt
;
/**
* 工厂
*/
private
String
werks
;
/**
* 名称
*/
private
String
name1
;
/**
* 库存地点
*/
private
String
lgort
;
/**
* 库存地点的描述
*/
private
String
lgobe
;
/**
* 采购组
*/
private
String
ekgrp
;
/**
* 采购组描述
*/
private
String
eknam
;
/**
* 价格
*/
private
BigDecimal
netpr
;
/**
* 价格单位
*/
private
Integer
peinh
;
/**
* 税码
*/
private
String
mwskz
;
/**
* 币种
*/
private
String
waers
;
/**
* 总价
*/
private
BigDecimal
netwr
;
/**
* 退货项目
*/
private
String
retpo
;
/**
* 总账科目
*/
private
String
sakto
;
/**
* 成本中心
*/
private
String
kostl
;
/**
* 主资产号
*/
private
String
anln1
;
/**
* 资产次级编号
*/
private
String
anln2
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/vo/SapPurchaseOrderVo.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
domain
.
vo
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/01/10/9:22
* @Description:
*/
@Data
public
class
SapPurchaseOrderVo
implements
Serializable
{
/**
* 采购订单号码
*/
private
String
ebeln
;
/**
* 采购订单类型
*/
private
String
bsart
;
/**
* 采购订单类型描述
*/
private
String
batxt
;
private
List
<
SapPurchaseOrderItemVo
>
itemVos
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/repository/SapPurchaseOrderItemRepository.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
repository
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrderItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/19:01
* @Description:
*/
public
interface
SapPurchaseOrderItemRepository
extends
JpaRepository
<
SapPurchaseOrderItem
,
String
>
{
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/repository/SapPurchaseOrderRepository.java
0 → 100644
View file @
4682089d
package
com
.
huigou
.
topsun
.
sap
.
purchaseOrder
.
repository
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/01/09/19:00
* @Description:
*/
public
interface
SapPurchaseOrderRepository
extends
JpaRepository
<
SapPurchaseOrder
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/sap/sapPurchaseOrder/sapPurchaseOrderProc.bpmn
0 → 100644
View file @
4682089d
<?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=
"sapPurchaseOrderProc"
name=
"采购审批"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"采购订单申请"
activiti:formKey=
"sapPurchaseOrder/showSapPurchaseOrderDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"采购订单审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"sapPurchaseOrder/showSapPurchaseOrderDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseOrderApplication}"
></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_sapPurchaseOrderProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"sapPurchaseOrderProc"
id=
"BPMNPlane_sapPurchaseOrderProc"
>
<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/base/bsnMessage.xml
View file @
4682089d
...
@@ -3,19 +3,18 @@
...
@@ -3,19 +3,18 @@
<query
name=
"queryExecuteBsnMessage"
label=
"bsn业务人员表"
table=
"bsn_message_execute"
>
<query
name=
"queryExecuteBsnMessage"
label=
"bsn业务人员表"
table=
"bsn_message_execute"
>
<sql-query>
<sql-query>
SELECT t.id,t.message_sponsor_id,t.task_execute,t.business_code,t.
cre
ate_date,t.finished_date,t.active,
SELECT t.id,t.message_sponsor_id,t.task_execute,t.business_code,t.
upd
ate_date,t.finished_date,t.active,
CASE WHEN t.active = 3 THEN CONCAT(t.task_describe,
'[驳回]'
) ELSE t.task_describe END AS task_describe,
CASE WHEN t.active = 3 THEN CONCAT(t.task_describe,
:addText
) ELSE t.task_describe END AS task_describe,
t2.title,
t2.title,
t2.executor_url,
t2.executor_url,
t2.business_id
t2.business_id
FROM bsn_message_execute t
FROM bsn_message_execute t
LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id
LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id
WHERE t.active IN (0, 3)
WHERE t.active IN (0, 3)
and task_execute = :taskExecute
</sql-query>
</sql-query>
<condition
column=
"taskExecute"
name=
"taskExecute"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
</query>
<query
name=
"queryFinishBsnMessageSponsor"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<query
name=
"queryFinishBsnMessageSponsor"
label=
"bsn业务人员表"
table=
"bsn_message
_sponsor
"
>
<sql-query>
<sql-query>
SELECT t.*
SELECT t.*
FROM bsn_message_sponsor t
FROM bsn_message_sponsor t
...
@@ -28,4 +27,16 @@
...
@@ -28,4 +27,16 @@
)
)
</sql-query>
</sql-query>
</query>
</query>
<query
name=
"queryBrotherExecute"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<sql-query>
SELECT *
FROM `bsn_message_execute`
WHERE message_sponsor_id = (
SELECT message_sponsor_id
FROM `bsn_message_execute`
WHERE id = :meId
) AND id != :meId
</sql-query>
</query>
</query-mappings>
</query-mappings>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/sapPurchaseOrder/sapPurchaseOrder.xml
0 → 100644
View file @
4682089d
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseOrderList"
label=
"SAP采购审批"
table=
"sap_purchase_order"
>
<sql-query>
select t.* from sap_purchase_order 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/sapPurchaseOrder/sapPurchaseOrderItem.xml
0 → 100644
View file @
4682089d
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseOrderItems"
label=
"SAP采购申请明细"
table=
"sap_purchase_order_item"
>
<sql-query>
select t.* from sap_purchase_order_item t
</sql-query>
<condition
column=
"purchase_order_Id"
name=
"purchaseOrderId"
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