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
693254e6
Commit
693254e6
authored
Apr 24, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购申请撤审;采购订单撤审
parent
afd5ee79
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
148 additions
and
66 deletions
+148
-66
sapPurchaseApprovalList.js
...iz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
+20
-18
showRevokeDetail.jsp
...bapp/biz/topsun/sap/purchaseApproval/showRevokeDetail.jsp
+18
-0
sapPurchaseOrderDetail.js
...pp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
+13
-0
sapPurchaseOrderDetail.jsp
...p/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
+14
-19
sapPurchaseOrderList.js
...bapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
+21
-19
showRevokeDetail.jsp
.../webapp/biz/topsun/sap/purchaseOrder/showRevokeDetail.jsp
+18
-0
SapPurchaseApprovalApplication.java
...eApproval/application/SapPurchaseApprovalApplication.java
+1
-1
SapPurchaseApprovalApplicationImpl.java
.../application/impl/SapPurchaseApprovalApplicationImpl.java
+6
-3
SapPurchaseApprovalController.java
...aseApproval/controller/SapPurchaseApprovalController.java
+9
-1
SapPurchaseApproval.java
...psun/sap/purchaseApproval/domain/SapPurchaseApproval.java
+6
-0
SapPurchaseOrderApplication.java
...urchaseOrder/application/SapPurchaseOrderApplication.java
+1
-1
SapPurchaseOrderApplicationImpl.java
...der/application/impl/SapPurchaseOrderApplicationImpl.java
+6
-3
SapPurchaseOrderController.java
.../purchaseOrder/controller/SapPurchaseOrderController.java
+9
-1
SapPurchaseOrder.java
...gou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
+6
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
View file @
693254e6
...
@@ -11,24 +11,26 @@ function initUI() {
...
@@ -11,24 +11,26 @@ function initUI() {
function
initPurchaseListGrid
()
{
function
initPurchaseListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// revokeApproveHandler: {
revokeApproveHandler
:
{
// id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
id
:
'revokeApproveHandler'
,
text
:
'撤销审批'
,
img
:
'fa-trash'
,
click
:
function
()
{
// var rows = purchaseApprovalGridManager.getSelectedRows();
var
row
=
purchaseApprovalGridManager
.
getSelectedRow
();
// if (rows.length == 0 || rows.length > 1) {
if
(
row
.
status
!=
3
)
{
// Public.tip("请选择一条已完成的数据!");
Public
.
tip
(
"请选择一条已完成的数据!"
);
// return;
return
;
// }
}
// if (rows[0].status != 3) {
UICtrl
.
showAjaxDialog
({
// Public.tip("请选择一条已完成的数据!");
url
:
web_app
.
name
+
'/sapPurchaseApproval/showRevokeDetail.load'
,
// return;
param
:{
id
:
row
.
id
},
// }
title
:
"撤审"
,
// UICtrl.confirm('确定要把当前单据撤销审批吗?', function () {
width
:
400
,
// Public.ajax(web_app.name + '/sapPurchaseApproval/revokeApproval.ajax', {id: rows[0].id}, function (msg) {
ok
:
function
()
{
// purchaseApprovalGridManager.loadData();
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseApproval/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()},
function
(
msg
)
{
// });
purchaseApprovalGridManager
.
loadData
();
// });
});
// }
}
// }
});
}
}
});
});
purchaseApprovalGridManager
=
UICtrl
.
grid
(
'#purchaseApprovalGrid'
,
{
purchaseApprovalGridManager
=
UICtrl
.
grid
(
'#purchaseApprovalGrid'
,
{
columns
:
[
columns
:
[
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/showRevokeDetail.jsp
0 → 100644
View file @
693254e6
<%@ 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"
/>
</head>
<body>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"revokeForm"
>
<x:hidden
name=
"id"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"revokeReason"
required=
"true"
label=
"撤审原因"
labelCol=
"4"
fieldCol=
"8"
rows=
"3"
/>
</div>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
View file @
693254e6
var
itemGridManager
=
null
;
var
itemGridManager
=
null
;
$
(
function
()
{
$
(
function
()
{
$
(
"#toolBar"
).
toolBar
(
"enable"
,
"forceAbortTask"
);
$
(
"#toolBar"
).
toolBar
(
"enable"
,
"forceAbortTask"
);
revoke
();
initItemGrid
();
initItemGrid
();
bindEvent
();
bindEvent
();
var
retpo
=
$
(
"#retpo"
).
val
();
var
retpo
=
$
(
"#retpo"
).
val
();
...
@@ -17,6 +18,18 @@ function bindEvent() {
...
@@ -17,6 +18,18 @@ function bindEvent() {
}
}
function
revoke
(){
var
revokeReason
=
$
(
"#revokeReason"
).
val
();
if
(
Public
.
isNotBlank
(
revokeReason
))
{
$
(
"#billTitle .subject"
).
html
(
"采购订单撤审"
)
$
(
"#revoke"
).
show
();
$
(
"#normal"
).
hide
();
}
else
{
$
(
"#normal"
).
show
();
$
(
"#revoke"
).
hide
();
}
}
function
initItemGrid
()
{
function
initItemGrid
()
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
columns
:
getGridColumns
(),
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
View file @
693254e6
...
@@ -44,25 +44,20 @@
...
@@ -44,25 +44,20 @@
<x:inputC
name=
"headText"
label=
"备注"
readonly=
"true"
labelCol=
"1"
fieldCol=
"8"
required=
"false"
/>
<x:inputC
name=
"headText"
label=
"备注"
readonly=
"true"
labelCol=
"1"
fieldCol=
"8"
required=
"false"
/>
</div>
</div>
</div>
</div>
<div
id=
"normal"
>
<x:title
title=
"sap回执"
name=
"group"
/>
<x:title
title=
"sap回执"
name=
"group"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"msgType"
label=
"消息类型"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"msgType"
label=
"消息类型"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"message"
label=
"消息内容"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"message"
label=
"消息内容"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<%-- <x:inputC name="msgId" label="消息id" readonly="true" labelCol="1" fieldCol="2" required="false"/>--%>
</div>
<%-- <x:inputC name="number" label="消息编号" readonly="true" labelCol="1" fieldCol="2" required="false"/>--%>
</div>
<%-- <x:inputC name="logNo" label="日志编号" readonly="true" labelCol="1" fieldCol="2" required="false"/>--%>
<div
id=
"revoke"
>
<%-- <x:inputC name="logMsgNo" label="日志消息编号" readonly="true" labelCol="1" fieldCol="2"--%>
<div
class=
"hg-form-cols"
>
<%-- required="false"/>--%>
<div
class=
"hg-form-row"
>
<%-- <x:inputC name="messageV1" label="消息参数 1" readonly="true" wrapper="date" labelCol="1" fieldCol="2"--%>
<x:textareaC
name=
"revokeReason"
required=
"true"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"5"
rows=
"3"
/>
<%-- required="false"/>--%>
</div>
<%-- <x:inputC name="messageV2" label="消息参数 2" readonly="true" wrapper="date" labelCol="1" fieldCol="2"--%>
<%-- required="false"/>--%>
<%-- <x:inputC name="messageV3" label="消息参数 3" readonly="true" wrapper="date" labelCol="1" fieldCol="2"--%>
<%-- required="false"/>--%>
<%-- <x:inputC name="messageV4" label="消息参数 4" readonly="true" wrapper="date" labelCol="1" fieldCol="2"--%>
<%-- required="false"/>--%>
</div>
</div>
</div>
</div>
<div
id=
"maingrid"
></div>
<div
id=
"maingrid"
></div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
View file @
693254e6
...
@@ -26,24 +26,26 @@ function loadGrid() {
...
@@ -26,24 +26,26 @@ function loadGrid() {
sendOutHandler
();
sendOutHandler
();
}
}
},
},
// revokeApproveHandler: {
revokeApproveHandler
:
{
// id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
id
:
'revokeApproveHandler'
,
text
:
'撤销审批'
,
img
:
'fa-trash'
,
click
:
function
()
{
// var rows = purchaseOrderGridManager.getSelectedRows();
var
row
=
purchaseOrderGridManager
.
getSelectedRow
();
// if (rows.length == 0 || rows.length > 1) {
if
(
row
.
status
!=
3
)
{
// Public.tip("请选择一条已完成的数据!");
Public
.
tip
(
"请选择一条已完成的数据!"
);
// return;
return
;
// }
}
// if (rows[0].status != 3) {
UICtrl
.
showAjaxDialog
({
// Public.tip("请选择一条已完成的数据!");
url
:
web_app
.
name
+
'/sapPurchaseOrder/showRevokeDetail.load'
,
// return;
param
:{
id
:
row
.
id
},
// }
title
:
"撤审"
,
// UICtrl.confirm('确定要把当前单据撤销审批吗?', function () {
width
:
400
,
// Public.ajax(web_app.name + '/sapPurchaseOrder/revokeApproval.ajax', {id: rows[0].id}, function (msg) {
ok
:
function
()
{
// purchaseOrderGridManager.loadData();
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseOrder/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()},
function
(
msg
)
{
// });
purchaseOrderGridManager
.
loadData
();
// });
});
// }
}
// }
});
}
}
});
});
//debugger
//debugger
purchaseOrderGridManager
=
UICtrl
.
grid
(
'#purchaseOrderGrid'
,
{
purchaseOrderGridManager
=
UICtrl
.
grid
(
'#purchaseOrderGrid'
,
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/showRevokeDetail.jsp
0 → 100644
View file @
693254e6
<%@ 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"
/>
</head>
<body>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"revokeForm"
>
<x:hidden
name=
"id"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"revokeReason"
required=
"true"
label=
"撤审原因"
labelCol=
"4"
fieldCol=
"8"
rows=
"3"
/>
</div>
</div>
</form>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/SapPurchaseApprovalApplication.java
View file @
693254e6
...
@@ -23,7 +23,7 @@ public interface SapPurchaseApprovalApplication {
...
@@ -23,7 +23,7 @@ public interface SapPurchaseApprovalApplication {
void
saveSapPurchaseApprovalVo
(
SapPurchaseApprovalDto
sapPurchaseApprovalDto
);
void
saveSapPurchaseApprovalVo
(
SapPurchaseApprovalDto
sapPurchaseApprovalDto
);
String
revokeApproval
(
String
id
);
String
revokeApproval
(
String
id
,
String
revokeReason
);
void
abortPurchaseApproval
(
String
id
,
String
jobPageId
);
void
abortPurchaseApproval
(
String
id
,
String
jobPageId
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/impl/SapPurchaseApprovalApplicationImpl.java
View file @
693254e6
...
@@ -170,8 +170,11 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
...
@@ -170,8 +170,11 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
SapPurchaseApproval
sapPurchaseApproval
=
sapPurchaseApprovalRepository
.
findOne
(
bizId
);
SapPurchaseApproval
sapPurchaseApproval
=
sapPurchaseApprovalRepository
.
findOne
(
bizId
);
sapPurchaseApproval
.
setStatusId
(
status
.
getId
());
sapPurchaseApproval
.
setStatusId
(
status
.
getId
());
sapPurchaseApprovalRepository
.
save
(
sapPurchaseApproval
);
sapPurchaseApprovalRepository
.
save
(
sapPurchaseApproval
);
if
(
StringUtil
.
isBlank
(
sapPurchaseApproval
.
getRevokeReason
())){
//如果没有撤销原因,才去调用sap接口;撤审通知去sap主动撤审
sendSapData
(
sapPurchaseApproval
,
"Y"
,
""
);
sendSapData
(
sapPurchaseApproval
,
"Y"
,
""
);
}
}
}
/**
/**
* 转换成SAP JSON格式数据
* 转换成SAP JSON格式数据
...
@@ -497,7 +500,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
...
@@ -497,7 +500,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
}
}
@Override
@Override
public
String
revokeApproval
(
String
id
){
public
String
revokeApproval
(
String
id
,
String
revokeReason
){
SapPurchaseApproval
sapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
id
);
SapPurchaseApproval
sapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
id
);
if
(
sapPurchaseApproval
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
if
(
sapPurchaseApproval
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
...
@@ -509,7 +512,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
...
@@ -509,7 +512,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
SapPurchaseApproval
newSapPurchaseApproval
=
new
SapPurchaseApproval
();
SapPurchaseApproval
newSapPurchaseApproval
=
new
SapPurchaseApproval
();
ClassHelper
.
copyProperties
(
sapPurchaseApproval
,
newSapPurchaseApproval
);
ClassHelper
.
copyProperties
(
sapPurchaseApproval
,
newSapPurchaseApproval
);
newSapPurchaseApproval
.
setId
(
""
);
newSapPurchaseApproval
.
setId
(
""
);
newSapPurchaseApproval
.
setRevokeReason
(
revokeReason
);
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
newSapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
pId
);
newSapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
pId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/controller/SapPurchaseApprovalController.java
View file @
693254e6
...
@@ -98,7 +98,8 @@ public class SapPurchaseApprovalController extends CommonController {
...
@@ -98,7 +98,8 @@ public class SapPurchaseApprovalController extends CommonController {
public
String
revokeApproval
(){
public
String
revokeApproval
(){
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
String
id
=
sdo
.
getString
(
"id"
);
String
newId
=
sapPurchaseApprovalApplication
.
revokeApproval
(
id
);
String
revokeReason
=
sdo
.
getString
(
"revokeReason"
);
String
newId
=
sapPurchaseApprovalApplication
.
revokeApproval
(
id
,
revokeReason
);
return
success
();
return
success
();
}
}
...
@@ -114,4 +115,11 @@ public class SapPurchaseApprovalController extends CommonController {
...
@@ -114,4 +115,11 @@ public class SapPurchaseApprovalController extends CommonController {
sapPurchaseApprovalApplication
.
abortPurchaseApproval
(
id
,
jobPageId
);
sapPurchaseApprovalApplication
.
abortPurchaseApproval
(
id
,
jobPageId
);
return
success
();
return
success
();
}
}
public
String
showRevokeDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
this
.
putAttribute
(
"id"
,
id
);
return
forward
(
"showRevokeDetail"
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/domain/SapPurchaseApproval.java
View file @
693254e6
...
@@ -55,6 +55,12 @@ public class SapPurchaseApproval extends FlowBillAbstractEntity {
...
@@ -55,6 +55,12 @@ public class SapPurchaseApproval extends FlowBillAbstractEntity {
@Column
(
name
=
"EKGRP"
)
@Column
(
name
=
"EKGRP"
)
private
String
ekgrp
;
private
String
ekgrp
;
/**
* 撤审原因
*/
@Column
(
name
=
"revoke_reason"
)
private
String
revokeReason
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/SapPurchaseOrderApplication.java
View file @
693254e6
...
@@ -27,7 +27,7 @@ public interface SapPurchaseOrderApplication {
...
@@ -27,7 +27,7 @@ public interface SapPurchaseOrderApplication {
void
sendSapDate
(
SapPurchaseOrder
sapPurchaseOrder
,
String
flag
,
String
status
);
void
sendSapDate
(
SapPurchaseOrder
sapPurchaseOrder
,
String
flag
,
String
status
);
String
revokeApproval
(
String
id
);
String
revokeApproval
(
String
id
,
String
revokeReason
);
Map
<
String
,
Object
>
print
(
String
id
);
Map
<
String
,
Object
>
print
(
String
id
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/impl/SapPurchaseOrderApplicationImpl.java
View file @
693254e6
...
@@ -208,7 +208,10 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
...
@@ -208,7 +208,10 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
SapPurchaseOrder
sapPurchaseOrder
=
sapPurchaseOrderRepository
.
findOne
(
bizId
);
sapPurchaseOrder
.
setStatusId
(
status
.
getId
());
sapPurchaseOrder
.
setStatusId
(
status
.
getId
());
SapPurchaseOrder
save
=
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
SapPurchaseOrder
save
=
sapPurchaseOrderRepository
.
save
(
sapPurchaseOrder
);
if
(
StringUtil
.
isBlank
(
sapPurchaseOrder
.
getRevokeReason
())){
//如果没有撤销原因,才去调用sap接口;撤审通知去sap主动撤审
this
.
sendSapDate
(
save
,
"Y"
,
""
);
this
.
sendSapDate
(
save
,
"Y"
,
""
);
}
// asyncWriteExecutor.execute(()->
// asyncWriteExecutor.execute(()->
// //创建放行条
// //创建放行条
// this.startSapPermit(sapPurchaseOrder)
// this.startSapPermit(sapPurchaseOrder)
...
@@ -429,7 +432,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
...
@@ -429,7 +432,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
}
}
@Override
@Override
public
String
revokeApproval
(
String
id
){
public
String
revokeApproval
(
String
id
,
String
revokeReason
){
SapPurchaseOrder
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
id
);
SapPurchaseOrder
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
id
);
if
(
sapPurchaseOrder
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
if
(
sapPurchaseOrder
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
...
@@ -441,7 +444,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
...
@@ -441,7 +444,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
SapPurchaseOrder
newSapPurchaseOrder
=
new
SapPurchaseOrder
();
SapPurchaseOrder
newSapPurchaseOrder
=
new
SapPurchaseOrder
();
ClassHelper
.
copyProperties
(
sapPurchaseOrder
,
newSapPurchaseOrder
);
ClassHelper
.
copyProperties
(
sapPurchaseOrder
,
newSapPurchaseOrder
);
newSapPurchaseOrder
.
setId
(
""
);
newSapPurchaseOrder
.
setId
(
""
);
newSapPurchaseOrder
.
setRevokeReason
(
revokeReason
);
//撤审原因
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
newSapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
pId
);
newSapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
pId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/controller/SapPurchaseOrderController.java
View file @
693254e6
...
@@ -93,7 +93,8 @@ public class SapPurchaseOrderController extends CommonController {
...
@@ -93,7 +93,8 @@ public class SapPurchaseOrderController extends CommonController {
public
String
revokeApproval
(){
public
String
revokeApproval
(){
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
String
id
=
sdo
.
getString
(
"id"
);
String
newId
=
sapPurchaseOrderApplication
.
revokeApproval
(
id
);
String
revokeReason
=
sdo
.
getString
(
"revokeReason"
);
String
newId
=
sapPurchaseOrderApplication
.
revokeApproval
(
id
,
revokeReason
);
return
success
();
return
success
();
}
}
...
@@ -144,4 +145,11 @@ public class SapPurchaseOrderController extends CommonController {
...
@@ -144,4 +145,11 @@ public class SapPurchaseOrderController extends CommonController {
sapPurchaseOrderApplication
.
abortPurchaseOrder
(
id
,
jobPageId
);
sapPurchaseOrderApplication
.
abortPurchaseOrder
(
id
,
jobPageId
);
return
success
();
return
success
();
}
}
public
String
showRevokeDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
this
.
putAttribute
(
"id"
,
id
);
return
forward
(
"showRevokeDetail"
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
View file @
693254e6
...
@@ -181,6 +181,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
...
@@ -181,6 +181,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
@Column
(
name
=
"KNTTP"
)
@Column
(
name
=
"KNTTP"
)
private
String
knttp
;
private
String
knttp
;
/**
* 撤审原因
*/
@Column
(
name
=
"revoke_reason"
)
private
String
revokeReason
;
@Override
@Override
protected
String
getCodeRuleId
()
{
protected
String
getCodeRuleId
()
{
return
"sapPurchaseOrder"
;
return
"sapPurchaseOrder"
;
...
...
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