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
076c487e
Commit
076c487e
authored
Jun 09, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领料申请删除时,判断是否已有领料单号,如果有,调用终止接口删除;采购申请、采购申请审批、采购订单撤审流程
parent
8f90f367
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
301 additions
and
73 deletions
+301
-73
materialApplyNext.js
...n/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
+26
-16
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+7
-0
nonProducePickDetail.js
...app/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
+1
-1
purchaseAnln1Detail.js
...ain/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.js
+1
-1
purchaseAnln1Detail.jsp
...in/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.jsp
+1
-1
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+13
-1
sapPurchaseDetail.jsp
...main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
+6
-0
sapPurchaseList.js
...rc/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
+24
-10
sapPurchaseList.jsp
...c/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
+1
-0
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+13
-1
sapZNE1PurchaseDetail.jsp
.../webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
+6
-0
sapZNE2PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
+13
-0
sapZNE2PurchaseDetail.jsp
.../webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.jsp
+6
-0
showRevokeDetail.jsp
.../main/webapp/biz/topsun/sap/purchase/showRevokeDetail.jsp
+19
-0
sapPurchaseApprovalDetail.js
.../topsun/sap/purchaseApproval/sapPurchaseApprovalDetail.js
+6
-3
sapPurchaseApprovalDetail.jsp
...topsun/sap/purchaseApproval/sapPurchaseApprovalDetail.jsp
+2
-1
sapPurchaseApprovalList.js
...iz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
+2
-1
showRevokeDetail.jsp
...bapp/biz/topsun/sap/purchaseApproval/showRevokeDetail.jsp
+1
-0
updatePurchaseInfoRecordDetail.jsp
...sap/purchaseInfoRecord/updatePurchaseInfoRecordDetail.jsp
+1
-1
sapPurchaseOrderDetail.js
...pp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
+6
-5
sapPurchaseOrderDetail.jsp
...p/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
+2
-1
sapPurchaseOrderList.js
...bapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
+2
-1
showRevokeDetail.jsp
.../webapp/biz/topsun/sap/purchaseOrder/showRevokeDetail.jsp
+1
-0
NonProducePickItemApplication.java
...roducePick/application/NonProducePickItemApplication.java
+1
-1
NonProducePickApplicationImpl.java
...ePick/application/impl/NonProducePickApplicationImpl.java
+3
-1
NonProducePickItemApplicationImpl.java
...k/application/impl/NonProducePickItemApplicationImpl.java
+12
-1
NonProducePickItemController.java
...nProducePick/controller/NonProducePickItemController.java
+2
-1
SapPurchaseApplication.java
...psun/sap/purchase/application/SapPurchaseApplication.java
+1
-1
SapPurchaseApplicationImpl.java
...purchase/application/impl/SapPurchaseApplicationImpl.java
+16
-5
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+16
-6
SapPurchase.java
...va/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
+12
-0
SapPurchaseItemVo.java
...igou/topsun/sap/purchase/domain/vo/SapPurchaseItemVo.java
+3
-0
SapPurchaseApprovalApplication.java
...eApproval/application/SapPurchaseApprovalApplication.java
+1
-1
SapPurchaseApprovalApplicationImpl.java
.../application/impl/SapPurchaseApprovalApplicationImpl.java
+19
-3
SapPurchaseApprovalController.java
...aseApproval/controller/SapPurchaseApprovalController.java
+2
-1
SapPurchaseApproval.java
...psun/sap/purchaseApproval/domain/SapPurchaseApproval.java
+6
-0
SapPurchaseInfoRecordApplicationImpl.java
...pplication/impl/SapPurchaseInfoRecordApplicationImpl.java
+9
-1
SapPurchaseOrderApplication.java
...urchaseOrder/application/SapPurchaseOrderApplication.java
+1
-1
SapPurchaseOrderApplicationImpl.java
...der/application/impl/SapPurchaseOrderApplicationImpl.java
+25
-5
SapPurchaseOrderController.java
.../purchaseOrder/controller/SapPurchaseOrderController.java
+2
-1
SapPurchaseOrder.java
...gou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
+6
-0
sapPurchase.xml
...n/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
+2
-0
sapPurchaseApproval.xml
...ig/topsun/sap/sapPurchaseApproval/sapPurchaseApproval.xml
+2
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
View file @
076c487e
...
...
@@ -464,27 +464,37 @@ function bindEvent() {
$
(
"#lgnum"
).
val
(
"W00"
);
$
(
"#lgnumName"
).
val
(
"广州宝绅印刷工厂仓库"
);
}
var
mtart
=
$
(
"#mtart"
).
val
();
if
(
mtart
==
"ZGMB"
){
Public
.
tip
(
"刀工模板具不维护仓库管理视图"
);
if
(
data
.
WERKS
==
"1010"
){
Public
.
tip
(
"广州市宝绅科技有限公司RFID工厂不维护仓库管理视图"
);
$
(
"#businessUsageS"
).
prop
(
"checked"
,
false
);
}
else
if
(
mtart
==
"ZKGL"
){
Public
.
tip
(
"客供料不维护财务核算视图"
);
//$("#businessUsageS").prop("checked",false);
$
(
"#businessUsageB"
).
prop
(
"checked"
,
false
);
}
else
{
//选择了工厂和库存地点后,带出存储条件
bindEvent_raube
(
data
.
WERKS
,
$
(
'#lgort'
).
val
());
if
(
data
.
WERKS
==
"1010"
&&
$
(
"input[name='businessUsage']"
)[
5
].
checked
){
Public
.
tip
(
"广州市宝绅科技有限公司RFID工厂不维护仓库管理视图"
);
}
else
{
var
mtart
=
$
(
"#mtart"
).
val
();
if
(
mtart
==
"ZGMB"
){
Public
.
tip
(
"刀工模板具不维护仓库管理视图"
);
$
(
"#businessUsageS"
).
prop
(
"checked"
,
false
);
}
else
{
$
(
"#businessUsageS"
).
prop
(
"checked"
,
true
);
}
}
// var mtart = $("#mtart").val();
// if (mtart == "ZGMB" ){
// Public.tip("刀工模板具不维护仓库管理视图");
// $("#businessUsageS").prop("checked",false);
// }else if (mtart == "ZKGL"){
// Public.tip("客供料不维护财务核算视图");
// //$("#businessUsageS").prop("checked",false);
// $("#businessUsageB").prop("checked",false);
// } else {
// //选择了工厂和库存地点后,带出存储条件
// bindEvent_raube(data.WERKS,$('#lgort').val());
// if (data.WERKS == "1010" && $("input[name='businessUsage']")[5].checked){
// Public.tip("广州市宝绅科技有限公司RFID工厂不维护仓库管理视图");
// $("#businessUsageS").prop("checked",false);
// }else {
// $("#businessUsageS").prop("checked",true);
// }
// }
//选择了工厂和库存地点后,带出存储条件
bindEvent_raube
(
data
.
WERKS
,
$
(
'#lgort'
).
val
());
//选择了工厂、库存地点、仓库号,带出存储类型和上下架存储类型
bindEvent_lgtyp
(
data
.
WERKS
,
$
(
'#lgort'
).
val
(),
$
(
'#lgnum'
).
val
());
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
076c487e
...
...
@@ -82,6 +82,13 @@ function initializate() {
// if ("S" == value){
// $("#businessUsageS").prop("checked",false);
// }
if
((
"1010"
==
$
(
"#werks"
).
val
()
||
"ZGMB"
==
$
(
"#mtart"
).
val
()
)
&&
x
==
5
){
$
(
"input[name='businessUsage']"
)[
x
].
checked
=
false
;
}
else
if
(
"ZKGL"
==
$
(
"#mtart"
).
val
()
&&
x
==
6
){
$
(
"input[name='businessUsage']"
)[
x
].
checked
=
false
;
}
else
{
$
(
"input[name='businessUsage']"
)[
x
].
checked
=
true
;
}
if
(
$
(
"input[name='businessUsage']"
)[
x
].
checked
)
{
showBusiness
(
value
);
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
View file @
076c487e
...
...
@@ -84,7 +84,7 @@ function loadGrid() {
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'nonProducePickItem/deleteNonProducePickItem.ajax'
,
param
:
{},
param
:
{
nonProducePickId
:
$
(
"#id"
).
val
()
},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.js
View file @
076c487e
...
...
@@ -32,7 +32,7 @@ function initGrid() {
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchase/queryAnlanFromSap.ajax?'
,
parms
:
{
werks
:
$
(
"#werks"
).
val
(),
//
werks: $("#werks").val(),
matkl
:
$
(
"#matkl"
).
val
()
},
toolbar
:
toolbarOptions
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.jsp
View file @
076c487e
...
...
@@ -13,7 +13,7 @@
<%--<x:title title="搜索" hideTable="queryMainForm" isHide="false"/>--%>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"queryMainForm"
>
<div
class=
"hg-form-row"
>
<
x:hidden
name=
"werks"
/
>
<
%--<x:hidden name="werks"/>--%
>
<x:hidden
name=
"matkl"
/>
<x:inputC
name=
"paramValue"
label=
"查询条件"
labelCol=
"2"
fieldCol=
"4"
required=
"true"
/>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
076c487e
...
...
@@ -4,8 +4,20 @@ $(function () {
bindEvent
();
initItemGrid
();
initAufnr
();
revoke
()
});
function
revoke
(){
var
revokeType
=
$
(
"#revokeType"
).
val
();
if
(
"update"
==
revokeType
)
{
$
(
"#billTitle .subject"
).
html
(
"撤审修改采购申请"
)
$
(
"#revoke"
).
show
();
}
else
if
(
"close"
==
revokeType
){
$
(
"#billTitle .subject"
).
html
(
"撤审关闭采购申请"
)
$
(
"#revoke"
).
show
();
}
else
{
$
(
"#revoke"
).
hide
();
}
}
function
initializeCommonUI
()
{
bsart
=
$
(
"#bsart"
).
val
();
if
(
"ZFW"
==
bsart
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
View file @
076c487e
...
...
@@ -32,6 +32,12 @@
<x:inputC
name=
"knttp"
label=
"科目分配类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<div
id=
"revoke"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"8"
rows=
"2"
/>
</div>
</div>
</div>
<div
id=
"maingrid"
></div>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
View file @
076c487e
...
...
@@ -16,20 +16,32 @@ function initPurchaseListGrid() {
revokeApproveHandler
:
{
id
:
'revokeApproveHandler'
,
text
:
'撤销审批'
,
img
:
'fa-trash'
,
click
:
function
()
{
var
rows
=
purchaseGridManager
.
getSelectedRows
();
if
(
rows
.
length
==
0
||
rows
.
length
>
1
)
{
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
if
(
rows
[
0
].
status
!=
3
){
var
row
=
purchaseGridManager
.
getSelectedRow
();
if
(
row
.
status
!=
3
){
Public
.
tip
(
"请选择一条已完成的数据!"
);
return
;
}
UICtrl
.
confirm
(
'确定要把当前单据撤销审批吗?'
,
function
(){
Public
.
ajax
(
web_app
.
name
+
'/sapPurchase/revokeApproval.ajax'
,
{
id
:
rows
[
0
].
id
},
function
(
msg
)
{
purchaseGridManager
.
loadData
();
});
var
loginId
=
$
(
"#loginId"
).
val
();
if
(
row
.
personMemberId
!=
loginId
)
{
Public
.
tip
(
"只能由创建人撤审!"
);
return
;
}
UICtrl
.
showAjaxDialog
({
url
:
web_app
.
name
+
'/sapPurchase/showRevokeDetail.load'
,
param
:{
id
:
row
.
id
},
title
:
"撤审"
,
width
:
400
,
ok
:
function
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchase/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
(),
revokeType
:
$
(
"#revokeType"
).
val
()},
function
(
msg
)
{
purchaseGridManager
.
loadData
();
});
}
});
// UICtrl.confirm('确定要把当前单据撤销审批吗?',function(){
// Public.ajax(web_app.name+'/sapPurchase/revokeApproval.ajax', {id:rows[0].id}, function(msg) {
// purchaseGridManager.loadData();
// });
// });
// var newRow = JSON.parse(JSON.stringify(row));
// newRow.zepItemno = getZepItemNo();
/// newRow.id = null;
...
...
@@ -73,6 +85,8 @@ function initPurchaseListGrid() {
{
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"撤审类型"
,
name
:
"revokeTypeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
},
{
display
:
"撤审原因"
,
name
:
"revokeReason"
,
width
:
300
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
],
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchase/slicedSapPurchaseList.ajax?'
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
View file @
076c487e
...
...
@@ -15,6 +15,7 @@
<div
position=
"center"
title=
""
>
<x:title
title=
"搜索"
hideTable=
"queryMainForm"
/>
<form
class=
"hg-form ui-show"
method=
"post"
action=
""
id=
"queryMainForm"
>
<x:hidden
name=
"loginId"
/>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"billCode"
label=
"单据编号"
labelCol=
"1"
/>
<x:inputC
name=
"banfn"
label=
"申购单号"
labelCol=
"1"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
View file @
076c487e
...
...
@@ -4,8 +4,20 @@ $(function () {
initializeCommonUI
();
bindEvent
();
initItemGrid
();
revoke
()
});
function
revoke
(){
var
revokeType
=
$
(
"#revokeType"
).
val
();
if
(
"update"
==
revokeType
)
{
$
(
"#billTitle .subject"
).
html
(
"撤审修改采购申请"
)
$
(
"#revoke"
).
show
();
}
else
if
(
"close"
==
revokeType
){
$
(
"#billTitle .subject"
).
html
(
"撤审关闭采购申请"
)
$
(
"#revoke"
).
show
();
}
else
{
$
(
"#revoke"
).
hide
();
}
}
function
initializeCommonUI
()
{
bsart
=
$
(
"#bsart"
).
val
();
if
(
"ZFW"
==
bsart
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
View file @
076c487e
...
...
@@ -32,6 +32,12 @@
<x:inputC
name=
"knttp"
label=
"科目分配类别"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<div
id=
"revoke"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"8"
rows=
"2"
/>
</div>
</div>
</div>
<div
id=
"maingrid"
></div>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
View file @
076c487e
...
...
@@ -4,8 +4,21 @@ $(function () {
bindEvent
();
initItemGrid
();
initAufnr
();
revoke
()
});
function
revoke
(){
var
revokeType
=
$
(
"#revokeType"
).
val
();
if
(
"update"
==
revokeType
)
{
$
(
"#billTitle .subject"
).
html
(
"撤审修改采购申请"
)
$
(
"#revoke"
).
show
();
}
else
if
(
"close"
==
revokeType
){
$
(
"#billTitle .subject"
).
html
(
"撤审关闭采购申请"
)
$
(
"#revoke"
).
show
();
}
else
{
$
(
"#revoke"
).
hide
();
}
}
function
initializeCommonUI
()
{
bsart
=
$
(
"#bsart"
).
val
();
if
(
"ZFW"
==
bsart
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.jsp
View file @
076c487e
...
...
@@ -32,6 +32,12 @@
<x:inputC
name=
"knttp"
label=
"科目分配类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
readonly=
"true"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<div
id=
"revoke"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"8"
rows=
"2"
/>
</div>
</div>
</div>
<div
id=
"maingrid"
></div>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/showRevokeDetail.jsp
0 → 100644
View file @
076c487e
<%@ 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:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"4"
fieldCol=
"8"
dictionary=
"revokeType"
/>
<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/purchaseApproval/sapPurchaseApprovalDetail.js
View file @
076c487e
...
...
@@ -16,9 +16,12 @@ function bindEvent() {
}
function
revoke
(){
var
revokeReason
=
$
(
"#revokeReason"
).
val
();
if
(
Public
.
isNotBlank
(
revokeReason
))
{
$
(
"#billTitle .subject"
).
html
(
"采购申请撤审"
)
var
revokeType
=
$
(
"#revokeType"
).
val
();
if
(
"update"
==
revokeType
)
{
$
(
"#billTitle .subject"
).
html
(
"撤审修改采购申请审批"
)
$
(
"#revoke"
).
show
();
}
else
if
(
"close"
==
revokeType
){
$
(
"#billTitle .subject"
).
html
(
"撤审关闭采购申请审批"
)
$
(
"#revoke"
).
show
();
}
else
{
$
(
"#revoke"
).
hide
();
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/sapPurchaseApprovalDetail.jsp
View file @
076c487e
...
...
@@ -33,7 +33,8 @@
</div>
<div
id=
"revoke"
>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"5"
rows=
"3"
/>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"8"
rows=
"2"
/>
</div>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/sapPurchaseApprovalList.js
View file @
076c487e
...
...
@@ -29,7 +29,7 @@ function initPurchaseListGrid() {
title
:
"撤审"
,
width
:
400
,
ok
:
function
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseApproval/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()},
function
(
msg
)
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseApproval/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()
,
revokeType
:
$
(
"#revokeType"
).
val
()
},
function
(
msg
)
{
purchaseApprovalGridManager
.
loadData
();
});
}
...
...
@@ -74,6 +74,7 @@ function initPurchaseListGrid() {
{
display
:
"消息类型"
,
name
:
"type"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
},
{
display
:
"消息文本"
,
name
:
"message"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
},
{
display
:
"创建日期"
,
name
:
"fillinDate"
,
width
:
140
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
},
{
display
:
"撤审类型"
,
name
:
"revokeTypeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
},
{
display
:
"撤审原因"
,
name
:
"revokeReason"
,
width
:
300
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
],
dataAction
:
'server'
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseApproval/showRevokeDetail.jsp
View file @
076c487e
...
...
@@ -10,6 +10,7 @@
<x:hidden
name=
"id"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"4"
fieldCol=
"8"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"true"
label=
"撤审原因"
labelCol=
"4"
fieldCol=
"8"
rows=
"3"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/updatePurchaseInfoRecordDetail.jsp
View file @
076c487e
...
...
@@ -52,7 +52,7 @@
<x:inputC
name=
"meinsName"
label=
"基本计量单位"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
readonly=
"true"
/>
<x:hidden
name=
"bprme"
/>
<x:inputC
name=
"bprmeName"
label=
"订单价格单位(采购)"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
required=
"true"
/>
<x:inputC
name=
"bprmeName"
label=
"订单价格单位(采购)"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
required=
"true"
readonly=
"true"
/>
<x:selectC
name=
"mwskz"
label=
"销售/购买税代码"
labelCol=
"2"
fieldCol=
"3"
required=
"true"
dictionary=
"purchaseMwskz"
/>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.js
View file @
076c487e
...
...
@@ -19,13 +19,14 @@ function bindEvent() {
}
function
revoke
(){
var
revokeReason
=
$
(
"#revokeReason"
).
val
();
if
(
Public
.
isNotBlank
(
revokeReason
))
{
$
(
"#billTitle .subject"
).
html
(
"采购订单撤审"
)
var
revokeType
=
$
(
"#revokeType"
).
val
();
if
(
"update"
==
revokeType
)
{
$
(
"#billTitle .subject"
).
html
(
"撤审修改采购订单"
)
$
(
"#revoke"
).
show
();
}
else
if
(
"close"
==
revokeType
){
$
(
"#billTitle .subject"
).
html
(
"撤审关闭采购订单"
)
$
(
"#revoke"
).
show
();
$
(
"#normal"
).
hide
();
}
else
{
$
(
"#normal"
).
show
();
$
(
"#revoke"
).
hide
();
}
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderDetail.jsp
View file @
076c487e
...
...
@@ -56,7 +56,8 @@
<div
id=
"revoke"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"5"
rows=
"3"
/>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"false"
label=
"撤审原因"
labelCol=
"1"
fieldCol=
"8"
rows=
"2"
/>
</div>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/sapPurchaseOrderList.js
View file @
076c487e
...
...
@@ -44,7 +44,7 @@ function loadGrid() {
title
:
"撤审"
,
width
:
400
,
ok
:
function
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseOrder/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()},
function
(
msg
)
{
Public
.
ajax
(
web_app
.
name
+
'/sapPurchaseOrder/revokeApproval.ajax'
,
{
id
:
row
.
id
,
revokeReason
:
$
(
"#revokeForm #revokeReason"
).
val
()
,
revokeType
:
$
(
"#revokeType"
).
val
()
},
function
(
msg
)
{
purchaseOrderGridManager
.
loadData
();
});
}
...
...
@@ -71,6 +71,7 @@ function loadGrid() {
,
{
display
:
"sap回执"
,
name
:
"message"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"创建日期"
,
name
:
"fillinDate"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"创建人"
,
name
:
"personMemberName"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"撤审类型"
,
name
:
"revokeTypeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"撤审原因"
,
name
:
"revokeReason"
,
width
:
300
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
],
dataAction
:
'server'
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseOrder/showRevokeDetail.jsp
View file @
076c487e
...
...
@@ -10,6 +10,7 @@
<x:hidden
name=
"id"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"revokeType"
required=
"true"
label=
"撤审类型"
labelCol=
"4"
fieldCol=
"8"
dictionary=
"revokeType"
/>
<x:textareaC
name=
"revokeReason"
required=
"true"
label=
"撤审原因"
labelCol=
"4"
fieldCol=
"8"
rows=
"3"
/>
</div>
</div>
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/application/NonProducePickItemApplication.java
View file @
076c487e
...
...
@@ -17,7 +17,7 @@ public interface NonProducePickItemApplication {
Map
<
String
,
Object
>
queryNonProducePickItems
(
NonProducePickQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
void
deleteByIds
(
List
<
String
>
ids
,
String
nonProducePickId
);
List
<
NonProducePickItem
>
findByNonProducePickId
(
String
nonProducePickId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/application/impl/NonProducePickApplicationImpl.java
View file @
076c487e
...
...
@@ -331,7 +331,9 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
nonProducePick
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
nonProducePickRepository
.
save
(
nonProducePick
);
//终止推送到SAP
this
.
sendNonProducePickData
(
nonProducePick
,
"N"
);
if
(
StringUtil
.
isNotBlank
(
nonProducePick
.
getMessage
())){
this
.
sendNonProducePickData
(
nonProducePick
,
"N"
);
}
}
/**
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/application/impl/NonProducePickItemApplicationImpl.java
View file @
076c487e
...
...
@@ -2,10 +2,13 @@ package com.huigou.topsun.sap.nonProducePick.application.impl;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickApplication
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickItemApplication
;
import
com.huigou.topsun.sap.nonProducePick.domain.NonProducePick
;
import
com.huigou.topsun.sap.nonProducePick.domain.NonProducePickItem
;
import
com.huigou.topsun.sap.nonProducePick.domain.query.NonProducePickQueryRequest
;
import
com.huigou.topsun.sap.nonProducePick.repository.NonProducePickItemRepository
;
import
com.huigou.topsun.sap.nonProducePick.repository.NonProducePickRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,6 +28,10 @@ import java.util.Map;
public
class
NonProducePickItemApplicationImpl
extends
BaseApplication
implements
NonProducePickItemApplication
{
@Autowired
private
NonProducePickItemRepository
nonProducePickItemRepository
;
@Autowired
private
NonProducePickRepository
nonProducePickRepository
;
@Autowired
private
NonProducePickApplication
nonProducePickApplication
;
@Override
public
void
saveNonProducePickItems
(
String
nonProducePickId
,
List
<
NonProducePickItem
>
nonProducePickItems
)
{
for
(
NonProducePickItem
nonProducePickItem
:
nonProducePickItems
)
{
...
...
@@ -45,8 +52,12 @@ public class NonProducePickItemApplicationImpl extends BaseApplication implement
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
public
void
deleteByIds
(
List
<
String
>
ids
,
String
nonProducePickId
)
{
NonProducePick
nonProducePick
=
nonProducePickRepository
.
findOne
(
nonProducePickId
);
ids
.
forEach
(
id
->{
if
(
StringUtil
.
isNotBlank
(
nonProducePick
.
getMessage
())){
nonProducePickApplication
.
sendNonProducePickData
(
nonProducePick
,
"N"
);
}
nonProducePickItemRepository
.
delete
(
id
);
});
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/controller/NonProducePickItemController.java
View file @
076c487e
...
...
@@ -37,7 +37,8 @@ public class NonProducePickItemController extends CommonController {
public
String
deleteNonProducePickItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
nonProducePickItemApplication
.
deleteByIds
(
ids
);
String
nonProducePickId
=
sdo
.
getString
(
"nonProducePickId"
);
nonProducePickItemApplication
.
deleteByIds
(
ids
,
nonProducePickId
);
return
success
();
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/SapPurchaseApplication.java
View file @
076c487e
...
...
@@ -20,7 +20,7 @@ public interface SapPurchaseApplication {
SapPurchase
loadSapPurchase
(
String
id
);
String
revokeApproval
(
String
id
);
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
);
SapPurchase
saveEPPurchaseItem
(
SapPurchase
sapPurchase
,
SapPurchaseItemDto
sapPurchaseItemDto
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/impl/SapPurchaseApplicationImpl.java
View file @
076c487e
...
...
@@ -112,14 +112,20 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
SapPurchase
sapPurchase
=
this
.
sapPurchaseRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapPurchase
.
getFillinDate
());
String
title
=
""
;
if
(
"update"
.
equals
(
sapPurchase
.
getRevokeType
())){
title
=
"撤审修改-"
;
}
else
if
(
"close"
.
equals
(
sapPurchase
.
getRevokeType
())){
title
=
"撤审关单-"
;
}
//设置标题
switch
(
sapPurchase
.
getBsart
()){
case
"ZNE1"
:
//固定资产采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"固定资产采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"固定资产采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
case
"ZFW"
:
//服务类采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"服务类采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"服务类采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
case
"ZNE2"
:
//非资产类消耗性采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"非资产类消耗性采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"非资产类消耗性采购申请"
,
sapPurchase
.
getBillCode
(),
fillinDateStr
);
}
return
null
;
}
...
...
@@ -253,6 +259,10 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
sapPurchaseItemVo
.
setVrtkz
(
""
);
}
}
//如果是关单,传X
if
(
"close"
.
equals
(
sapPurchase
.
getRevokeType
())){
sapPurchaseItemVo
.
setElikz
(
"X"
);
}
sapPurchaseItemVos
.
add
(
sapPurchaseItemVo
);
});
sapPurchaseVo
.
setItemVos
(
sapPurchaseItemVos
);
...
...
@@ -307,7 +317,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
}
@Override
public
String
revokeApproval
(
String
id
){
public
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
){
SapPurchase
sapPurchase
=
this
.
sapPurchaseRepository
.
findOne
(
id
);
if
(
sapPurchase
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
...
...
@@ -319,7 +329,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
SapPurchase
newSapPurchase
=
new
SapPurchase
();
ClassHelper
.
copyProperties
(
sapPurchase
,
newSapPurchase
);
newSapPurchase
.
setId
(
""
);
newSapPurchase
.
setRevokeReason
(
revokeReason
);
newSapPurchase
.
setRevokeType
(
revokeType
);
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchase
,
PROCESS_DEFINITION_KEY
,
"sapPurchase"
);
newSapPurchase
=
this
.
sapPurchaseRepository
.
findOne
(
pId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
View file @
076c487e
...
...
@@ -56,6 +56,7 @@ public class SapPurchaseController extends CommonController {
public
String
forwardSapPurchaseList
(){
this
.
putAttribute
(
"statusKindsList"
,
BillStatus
.
getValidMap
());
this
.
putAttribute
(
"loginId"
,
this
.
getOperator
().
getPersonMemberId
());
return
forward
(
"sapPurchaseList"
);
}
...
...
@@ -114,7 +115,9 @@ public class SapPurchaseController extends CommonController {
public
String
revokeApproval
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
String
newId
=
sapPurchaseApplication
.
revokeApproval
(
id
);
String
revokeReason
=
sdo
.
getString
(
"revokeReason"
);
String
revokeType
=
sdo
.
getString
(
"revokeType"
);
String
newId
=
sapPurchaseApplication
.
revokeApproval
(
id
,
revokeReason
,
revokeType
);
return
success
();
}
...
...
@@ -133,7 +136,7 @@ public class SapPurchaseController extends CommonController {
public
String
queryAnlanFromSap
()
throws
IOException
{
SDO
sdo
=
this
.
getSDO
();
String
param
=
sdo
.
getString
(
"paramValue"
);
String
werks
=
sdo
.
getString
(
"werks"
);
//
String werks = sdo.getString("werks");
String
matkl
=
sdo
.
getString
(
"matkl"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
if
(
StringUtil
.
isBlank
(
param
)){
...
...
@@ -141,10 +144,10 @@ public class SapPurchaseController extends CommonController {
}
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
"ANLN1"
);
if
(
CollectionUtil
.
isNotEmpty
(
mapList
))
{
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
.
contains
(
werks
)))
.
collect
(
Collectors
.
toList
());
//
mapList = mapList
//
.stream()
//
.filter(map -> map.values().stream().anyMatch(value -> value.contains(werks)))
//
.collect(Collectors.toList());
//根据物料组筛选对应资产类型下的资产编号
// if ("A0001".equals(matkl)){//固定资产-房屋及建筑物
// mapList = mapList
...
...
@@ -181,4 +184,11 @@ public class SapPurchaseController extends CommonController {
}
return
messageMap
;
}
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/purchase/domain/SapPurchase.java
View file @
076c487e
...
...
@@ -41,6 +41,18 @@ public class SapPurchase extends FlowBillAbstractEntity {
@Column
(
name
=
"KNTTP"
)
private
String
knttp
;
/**
* 撤审原因
*/
@Column
(
name
=
"revoke_reason"
)
private
String
revokeReason
;
/**
* 撤审类型
*/
@Column
(
name
=
"revoke_type"
)
private
String
revokeType
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/vo/SapPurchaseItemVo.java
View file @
076c487e
...
...
@@ -271,4 +271,7 @@ public class SapPurchaseItemVo implements Serializable {
//@JsonProperty("banpr")
//private String banpr;
@JsonProperty
(
"ELIKZ"
)
private
String
elikz
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/SapPurchaseApprovalApplication.java
View file @
076c487e
...
...
@@ -23,7 +23,7 @@ public interface SapPurchaseApprovalApplication {
void
saveSapPurchaseApprovalVo
(
SapPurchaseApprovalDto
sapPurchaseApprovalDto
);
String
revokeApproval
(
String
id
,
String
revokeReason
);
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
);
void
abortPurchaseApproval
(
String
id
,
String
jobPageId
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/impl/SapPurchaseApprovalApplicationImpl.java
View file @
076c487e
...
...
@@ -113,8 +113,14 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
SapPurchaseApproval
sapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapPurchaseApproval
.
getFillinDate
());
String
title
=
""
;
if
(
"update"
.
equals
(
sapPurchaseApproval
.
getRevokeType
())){
title
=
"撤审修改-"
;
}
else
if
(
"close"
.
equals
(
sapPurchaseApproval
.
getRevokeType
())){
title
=
"撤审关单-"
;
}
//设置标题
return
String
.
format
(
"%s-%s(%s)"
,
sapPurchaseApproval
.
getBatxt
(),
sapPurchaseApproval
.
getBanfn
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
sapPurchaseApproval
.
getBatxt
(),
sapPurchaseApproval
.
getBanfn
(),
fillinDateStr
);
}
@Override
...
...
@@ -320,17 +326,19 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
purchaseApprovalId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
}
else
{
boolean
needStartWorkflow
=
true
;
for
(
SapPurchaseApproval
purchaseApproval
:
purchaseApprovalList
)
{
//将存在的作废掉 05.11 lxh
//审批完成的,终止状态的,终止审批完成的,并发起新的流程
if
(
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
COMPLETED
.
getId
()
||
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
ABORTED
.
getId
()){
purchaseApproval
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
purchaseApprovalId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
}
//在审批中,更新明细数据的(先删除,再新增)
if
(
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()
||
purchaseApproval
.
getStatusId
()
==
BizBillStatus
.
APPLYING
.
getId
()){
needStartWorkflow
=
false
;
//更新主表信息
purchaseApproval
.
setBsart
(
sapPurchaseApproval
.
getBsart
());
purchaseApproval
.
setBatxt
(
sapPurchaseApproval
.
getBatxt
());
...
...
@@ -344,6 +352,9 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
}
this
.
sapPurchaseApprovalRepository
.
save
(
purchaseApproval
);
}
if
(
needStartWorkflow
){
purchaseApprovalId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
}
}
sapPurchaseApprovalItemApplication
.
saveSapPurchaseApprovalItems
(
purchaseApprovalId
,
sapPurchaseApprovalItems
);
}
...
...
@@ -456,6 +467,10 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
paramItem
.
put
(
"bnfpo"
,
sapPurchaseApprovalItem
.
getBnfpo
());
paramItem
.
put
(
"flag"
,
flag
);
paramItem
.
put
(
"status"
,
status
);
//如果是关单,传X
if
(
"close"
.
equals
(
sapPurchaseApproval
.
getRevokeType
())){
paramItem
.
put
(
"ELIKZ"
,
"X"
);
}
paramList
.
add
(
paramItem
);
}
...
...
@@ -502,7 +517,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
}
@Override
public
String
revokeApproval
(
String
id
,
String
revokeReason
){
public
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
){
SapPurchaseApproval
sapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
id
);
if
(
sapPurchaseApproval
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
...
...
@@ -515,6 +530,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
ClassHelper
.
copyProperties
(
sapPurchaseApproval
,
newSapPurchaseApproval
);
newSapPurchaseApproval
.
setId
(
""
);
newSapPurchaseApproval
.
setRevokeReason
(
revokeReason
);
newSapPurchaseApproval
.
setRevokeType
(
revokeType
);
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseApproval
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseApproval"
);
newSapPurchaseApproval
=
this
.
sapPurchaseApprovalRepository
.
findOne
(
pId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/controller/SapPurchaseApprovalController.java
View file @
076c487e
...
...
@@ -100,7 +100,8 @@ public class SapPurchaseApprovalController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
String
revokeReason
=
sdo
.
getString
(
"revokeReason"
);
String
newId
=
sapPurchaseApprovalApplication
.
revokeApproval
(
id
,
revokeReason
);
String
revokeType
=
sdo
.
getString
(
"revokeType"
);
String
newId
=
sapPurchaseApprovalApplication
.
revokeApproval
(
id
,
revokeReason
,
revokeType
);
return
success
();
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/domain/SapPurchaseApproval.java
View file @
076c487e
...
...
@@ -61,6 +61,12 @@ public class SapPurchaseApproval extends FlowBillAbstractEntity {
@Column
(
name
=
"revoke_reason"
)
private
String
revokeReason
;
/**
* 撤审类型
*/
@Column
(
name
=
"revoke_type"
)
private
String
revokeType
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/impl/SapPurchaseInfoRecordApplicationImpl.java
View file @
076c487e
...
...
@@ -102,10 +102,18 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
*/
private
String
getApprovalSubjectName
(
String
bizId
)
{
SapPurchaseInfoRecord
infoRecord
=
this
.
sapPurchaseInfoRecordRepository
.
findOne
(
bizId
);
String
title
=
""
;
if
(
"new"
.
equals
(
infoRecord
.
getFlag
())){
title
=
"新建-"
;
}
else
if
(
"update"
.
equals
(
infoRecord
.
getFlag
())){
title
=
"修改-"
;
}
else
if
(
"cancel"
.
equals
(
infoRecord
.
getFlag
())){
title
=
"作废-"
;
}
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
infoRecord
.
getFillinDate
());
//设置标题
return
String
.
format
(
"%s-%s(%s)"
,
"采购信息记录"
,
infoRecord
.
getBillCode
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"采购信息记录"
,
infoRecord
.
getBillCode
(),
fillinDateStr
);
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/SapPurchaseOrderApplication.java
View file @
076c487e
...
...
@@ -27,7 +27,7 @@ public interface SapPurchaseOrderApplication {
void
sendSapDate
(
SapPurchaseOrder
sapPurchaseOrder
,
String
flag
,
String
status
);
String
revokeApproval
(
String
id
,
String
revokeReason
);
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
);
Map
<
String
,
Object
>
print
(
String
id
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/application/impl/SapPurchaseOrderApplicationImpl.java
View file @
076c487e
...
...
@@ -141,14 +141,20 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
SapPurchaseOrder
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapPurchaseOrder
.
getFillinDate
());
String
title
=
""
;
if
(
"update"
.
equals
(
sapPurchaseOrder
.
getRevokeType
())){
title
=
"撤审修改-"
;
}
else
if
(
"close"
.
equals
(
sapPurchaseOrder
.
getRevokeType
())){
title
=
"撤审关单-"
;
}
//设置标题
if
(
"X"
.
equals
(
sapPurchaseOrder
.
getRetpo
()))
{
return
String
.
format
(
"%s-%s(%s)"
,
"采购订单退货"
,
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"采购订单退货"
,
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
}
if
(
"X0"
.
equals
(
sapPurchaseOrder
.
getRetpo
()))
{
return
String
.
format
(
"%s-%s(%s)"
,
"采购订单换货"
,
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
"采购订单换货"
,
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
}
return
String
.
format
(
"%s-%s(%s)"
,
sapPurchaseOrder
.
getBatxt
(),
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
title
+
sapPurchaseOrder
.
getBatxt
(),
sapPurchaseOrder
.
getEbeln
(),
fillinDateStr
);
}
@Override
...
...
@@ -346,15 +352,16 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
purchaseOrderId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
}
else
{
//将存在的作废掉 05.11 lxh
boolean
needStartWorkflow
=
true
;
for
(
SapPurchaseOrder
purchaseOrder
:
purchaseOrders
)
{
//审批完成的,SAP撤审触发,终止审批完成的,并发起新的流程
if
(
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
COMPLETED
.
getId
()
||
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
ABORTED
.
getId
()){
purchaseOrder
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
purchaseOrderId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
}
//在审批中,更新明细数据的(先删除,再新增)
if
(
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
APPROVING
.
getId
()
||
purchaseOrder
.
getStatusId
()
==
BizBillStatus
.
APPLYING
.
getId
()){
needStartWorkflow
=
false
;
//更新订单主表数据
purchaseOrder
.
setBsart
(
sapPurchaseOrder
.
getBsart
());
purchaseOrder
.
setBatxt
(
sapPurchaseOrder
.
getBatxt
());
...
...
@@ -372,6 +379,9 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
}
this
.
sapPurchaseOrderRepository
.
save
(
purchaseOrder
);
}
if
(
needStartWorkflow
){
purchaseOrderId
=
mannualStartWorkApplication
.
startWorkflow
(
sapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
}
//数据第n次接收覆盖上一次数据
/* BeanUtil.copyProperties(sapPurchaseOrderVo, purchaseOrder);
...
...
@@ -397,6 +407,10 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
paramItem
.
put
(
"frgkz"
,
"10"
);
paramItem
.
put
(
"flag"
,
flag
);
paramItem
.
put
(
"status"
,
status
);
//如果是关单,传X
if
(
"close"
.
equals
(
sapPurchaseOrder
.
getRevokeType
())){
paramItem
.
put
(
"ELIKZ"
,
"X"
);
}
List
<
Map
<
String
,
Object
>>
paramList
=
new
ArrayList
<>();
paramList
.
add
(
paramItem
);
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
...
...
@@ -434,7 +448,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
}
@Override
public
String
revokeApproval
(
String
id
,
String
revokeReason
){
public
String
revokeApproval
(
String
id
,
String
revokeReason
,
String
revokeType
){
SapPurchaseOrder
sapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
id
);
if
(
sapPurchaseOrder
.
getStatusId
()!=
BizBillStatus
.
COMPLETED
.
getId
()){
throw
new
RuntimeException
(
"审批完成的单据才能撤销!"
);
...
...
@@ -447,6 +461,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
ClassHelper
.
copyProperties
(
sapPurchaseOrder
,
newSapPurchaseOrder
);
newSapPurchaseOrder
.
setId
(
""
);
newSapPurchaseOrder
.
setRevokeReason
(
revokeReason
);
//撤审原因
newSapPurchaseOrder
.
setRevokeType
(
revokeType
);
//撤审类型
String
pId
=
mannualStartWorkApplication
.
startWorkflow
(
newSapPurchaseOrder
,
PROCESS_DEFINITION_KEY
,
"sapPurchaseOrder"
);
newSapPurchaseOrder
=
this
.
sapPurchaseOrderRepository
.
findOne
(
pId
);
...
...
@@ -481,6 +496,11 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
if
(!
"虚拟库"
.
equals
(
purchaseOrderItems
.
get
(
0
).
getLgobe
())){
map
.
put
(
"strSuppl"
,
purchaseOrderItems
.
get
(
0
).
getStrSuppl
());
//交货地点
}
if
(
"1000"
.
equals
(
purchaseOrderItems
.
get
(
0
).
getWerks
())){
map
.
put
(
"strSuppl"
,
"广东省广州市白云区江高镇小塘南路68号"
);
//交货地点
}
else
if
(
"1010"
.
equals
(
purchaseOrderItems
.
get
(
0
).
getWerks
())){
map
.
put
(
"strSuppl"
,
"广东省广州市白云区广花三路382号广州市宝绅科技应用有限公司RFID大楼"
);
//交货地点
}
//订单类型是ZNB3时对应工序外发(临时工序外协)
if
(
"ZNB3"
.
equals
(
sapPurchaseOrder
.
getBsart
())){
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/controller/SapPurchaseOrderController.java
View file @
076c487e
...
...
@@ -95,7 +95,8 @@ public class SapPurchaseOrderController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
String
revokeReason
=
sdo
.
getString
(
"revokeReason"
);
String
newId
=
sapPurchaseOrderApplication
.
revokeApproval
(
id
,
revokeReason
);
String
revokeType
=
sdo
.
getString
(
"revokeType"
);
String
newId
=
sapPurchaseOrderApplication
.
revokeApproval
(
id
,
revokeReason
,
revokeType
);
return
success
();
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseOrder/domain/SapPurchaseOrder.java
View file @
076c487e
...
...
@@ -187,6 +187,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
@Column
(
name
=
"revoke_reason"
)
private
String
revokeReason
;
/**
* 撤审类型
*/
@Column
(
name
=
"revoke_type"
)
private
String
revokeType
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapPurchaseOrder"
;
...
...
topsun/src/main/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
View file @
076c487e
...
...
@@ -18,6 +18,8 @@
t.bill_code,
t.bsart,
t.banfn,
t.revoke_type,
t.revoke_reason,
it.sap_purchase_id,
it.bnfpo,
it.pstyp,
...
...
topsun/src/main/resources/config/topsun/sap/sapPurchaseApproval/sapPurchaseApproval.xml
View file @
076c487e
...
...
@@ -21,6 +21,8 @@
t.batxt,
t.type,
t.message,
t.revoke_type,
t.revoke_reason,
ai.sap_purchase_approval_id,
ai.bnfpo,
ai.pstyp,
...
...
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