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
3bd2ba83
Commit
3bd2ba83
authored
Jul 29, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
9c93b0cd
80fd740c
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
587 additions
and
36 deletions
+587
-36
job.js
huigou-xt/src/main/webapp/system/bpm/job.js
+4
-4
advancePayment.js
...webapp/biz/topsun/sap/costReimbursement/advancePayment.js
+45
-1
costReimbursement.js
...app/biz/topsun/sap/costReimbursement/costReimbursement.js
+68
-1
employeeLoan.js
...n/webapp/biz/topsun/sap/costReimbursement/employeeLoan.js
+45
-1
payApply.js
.../main/webapp/biz/topsun/sap/costReimbursement/payApply.js
+45
-1
payApplyNoPO.js
...n/webapp/biz/topsun/sap/costReimbursement/payApplyNoPO.js
+62
-1
refundApply.js
...in/webapp/biz/topsun/sap/costReimbursement/refundApply.js
+45
-1
nonProducePickDetail.js
...app/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
+1
-1
nonProducePickDetail.jsp
...pp/biz/topsun/sap/nonProducePick/nonProducePickDetail.jsp
+1
-1
nonProducePickList.js
...ebapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
+19
-1
suppliersDataDetail.js
...in/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
+4
-4
nonProducePick.ftl
.../src/main/webapp/template/print/topsun/nonProducePick.ftl
+88
-0
Function.java
topsun/src/main/java/com/huigou/topsun/common/Function.java
+11
-0
SapCostReimbursementApplication.java
...ursement/application/SapCostReimbursementApplication.java
+2
-0
SapCostReimbursementApplicationImpl.java
...application/impl/SapCostReimbursementApplicationImpl.java
+31
-2
SapCostReimbursementController.java
...mbursement/controller/SapCostReimbursementController.java
+11
-0
NonProducePickApplicationImpl.java
...ePick/application/impl/NonProducePickApplicationImpl.java
+9
-7
NonProducePickController.java
...p/nonProducePick/controller/NonProducePickController.java
+33
-0
CheckNonProducePickItemNumVo.java
...n/sap/nonProducePick/vo/CheckNonProducePickItemNumVo.java
+13
-1
SapStockTransfersApplicationImpl.java
...rs/application/impl/SapStockTransfersApplicationImpl.java
+29
-9
function.xml
topsun/src/main/resources/config/topsun/base/function.xml
+5
-0
costReimbursement.xml
...config/topsun/sap/costReimbursement/costReimbursement.xml
+16
-0
No files found.
huigou-xt/src/main/webapp/system/bpm/job.js
View file @
3bd2ba83
...
@@ -181,7 +181,7 @@ function initializeToolBar(){
...
@@ -181,7 +181,7 @@ function initializeToolBar(){
{
id
:
'sleep'
,
remark
:
'暂缓'
,
name
:
'common.button.sleep'
,
icon
:
'fa-pause-circle'
,
event
:
sleep
},
{
id
:
'sleep'
,
remark
:
'暂缓'
,
name
:
'common.button.sleep'
,
icon
:
'fa-pause-circle'
,
event
:
sleep
},
{
id
:
'abort'
,
remark
:
'终止'
,
name
:
'common.button.abort'
,
icon
:
'fa-stop-circle'
,
event
:
abort
},
{
id
:
'abort'
,
remark
:
'终止'
,
name
:
'common.button.abort'
,
icon
:
'fa-stop-circle'
,
event
:
abort
},
//{ id: 'relate', remark: '协同关联',name:'common.button.relate', icon: 'fa-link', event: relate},
//{ id: 'relate', remark: '协同关联',name:'common.button.relate', icon: 'fa-link', event: relate},
{
id
:
'print'
,
remark
:
'打印'
,
name
:
'common.button.print'
,
icon
:
'fa-print'
,
event
:
print
},
//
{ id: 'print', remark: '打印',name:'common.button.print', icon: 'fa-print', event: print },
{
id
:
'showChart'
,
remark
:
'流程图'
,
name
:
'common.button.flowchart'
,
icon
:
'fa-sitemap'
,
event
:
showChart
},
{
id
:
'showChart'
,
remark
:
'流程图'
,
name
:
'common.button.flowchart'
,
icon
:
'fa-sitemap'
,
event
:
showChart
},
{
id
:
'showApprovalHistory'
,
remark
:
'流程轨迹'
,
name
:
'common.button.approvalhistory'
,
icon
:
'fa-table'
,
event
:
showApprovalHistory
},
{
id
:
'showApprovalHistory'
,
remark
:
'流程轨迹'
,
name
:
'common.button.approvalhistory'
,
icon
:
'fa-table'
,
event
:
showApprovalHistory
},
{
id
:
'taskCollect'
,
remark
:
'收藏任务'
,
name
:
'common.button.taskcollect'
,
icon
:
'fa-star'
,
event
:
saveTaskCollect
}
{
id
:
'taskCollect'
,
remark
:
'收藏任务'
,
name
:
'common.button.taskcollect'
,
icon
:
'fa-star'
,
event
:
saveTaskCollect
}
...
@@ -1033,9 +1033,9 @@ function abort() {
...
@@ -1033,9 +1033,9 @@ function abort() {
* 打印
* 打印
*/
*/
function
print
()
{
function
print
()
{
//
var url = location.href;
var
url
=
location
.
href
;
//
url=url.replace(/\.(job)\?/g,'.print?');
url
=
url
.
replace
(
/
\.(
job
)\?
/g
,
'.print?'
);
//
Public.openPostWindow(url);
Public
.
openPostWindow
(
url
);
}
}
// 流程图
// 流程图
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/advancePayment.js
View file @
3bd2ba83
...
@@ -643,7 +643,51 @@ function getExtendedData(processAction) {
...
@@ -643,7 +643,51 @@ function getExtendedData(processAction) {
}
}
return
mergedObj
;
return
mergedObj
;
});
});
var
subProcUnitId
=
getSubProcUnitId
();
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursement.js
View file @
3bd2ba83
...
@@ -674,7 +674,7 @@ function loadGrid(obj) {
...
@@ -674,7 +674,7 @@ function loadGrid(obj) {
check
=
false
;
check
=
false
;
Public
.
tip
(
"含税金额(审批)不能大于含税金额"
)
Public
.
tip
(
"含税金额(审批)不能大于含税金额"
)
$
.
each
(
_secondGrid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
$
.
each
(
_secondGrid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
if
(
data
.
zepItemno
=
row
.
zepItemno
){
if
(
data
.
zepItemno
=
=
row
.
zepItemno
){
_secondGrid
.
updateRow
(
row
,{
_secondGrid
.
updateRow
(
row
,{
zepPtdamount1
:
data
.
kzwi1
,
zepPtdamount1
:
data
.
kzwi1
,
})
})
...
@@ -761,6 +761,24 @@ function loadGrid(obj) {
...
@@ -761,6 +761,24 @@ function loadGrid(obj) {
})
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
}
}
//费用报销单据发票号码栏,校验发票号码是否重复,重复(状态是已完成,申请,审批中)则提示该发票已经提交过,发票无效
if
(
item
.
column
.
name
==
"zyl06"
){
Public
.
ajax
(
web_app
.
name
+
"/sapCostReimbursement/checkzyl06.ajax"
,{
zyl06
:
item
.
record
.
zyl06
},
function
(
data
)
{
if
(
data
>
0
){
Public
.
tip
(
"该发票 '"
+
item
.
value
+
"' 已经提交过,发票无效"
);
var
_grid
=
UICtrl
.
getGridManager
(
'#reimbursementApplierGrid'
);
var
zepItemno
=
item
.
record
.
zepItemno
;
$
.
each
(
_grid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
if
(
zepItemno
==
row
.
zepItemno
){
_grid
.
updateRow
(
row
,{
zyl06
:
""
,
})
}
})
}
})
}
return
item
;
return
item
;
},
},
onAfterShowData
:
function
(){
onAfterShowData
:
function
(){
...
@@ -900,6 +918,7 @@ function getExtendedData(processAction) {
...
@@ -900,6 +918,7 @@ function getExtendedData(processAction) {
}
}
var
checked4
=
false
var
checked4
=
false
var
checked5
=
false
var
checked5
=
false
var
checked7
=
false
var
num
=
0
;
var
num
=
0
;
$
.
each
(
datas
,
function
(
i
,
o
)
{
$
.
each
(
datas
,
function
(
i
,
o
)
{
//判断不含税金额(审批)=含税金额(审批)- 税额(审批)
//判断不含税金额(审批)=含税金额(审批)- 税额(审批)
...
@@ -914,6 +933,9 @@ function getExtendedData(processAction) {
...
@@ -914,6 +933,9 @@ function getExtendedData(processAction) {
checked5
=
true
;
checked5
=
true
;
num
=
i
+
1
num
=
i
+
1
}
}
if
(
o
.
zepPay
==
"N"
){
checked7
=
true
}
});
});
if
(
checked4
)
{
if
(
checked4
)
{
Public
.
tip
(
"行项目:"
+
num
+
"中,不含税金额(审批)+ 税额(审批)不等于 含税金额(审批)请检查"
)
Public
.
tip
(
"行项目:"
+
num
+
"中,不含税金额(审批)+ 税额(审批)不等于 含税金额(审批)请检查"
)
...
@@ -925,6 +947,51 @@ function getExtendedData(processAction) {
...
@@ -925,6 +947,51 @@ function getExtendedData(processAction) {
}
}
}
}
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/employeeLoan.js
View file @
3bd2ba83
...
@@ -673,7 +673,51 @@ function getExtendedData(processAction) {
...
@@ -673,7 +673,51 @@ function getExtendedData(processAction) {
}
}
return
mergedObj
;
return
mergedObj
;
});
});
var
subProcUnitId
=
getSubProcUnitId
();
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApply.js
View file @
3bd2ba83
...
@@ -679,7 +679,51 @@ function getExtendedData(processAction) {
...
@@ -679,7 +679,51 @@ function getExtendedData(processAction) {
}
}
return
mergedObj
;
return
mergedObj
;
});
});
var
subProcUnitId
=
getSubProcUnitId
();
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApplyNoPO.js
View file @
3bd2ba83
...
@@ -759,6 +759,23 @@ function loadGrid(obj) {
...
@@ -759,6 +759,23 @@ function loadGrid(obj) {
})
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
}
}
//费用报销单据发票号码栏,校验发票号码是否重复,重复(状态是已完成,申请,审批中)则提示该发票已经提交过,发票无效
if
(
item
.
column
.
name
==
"zyl06"
){
Public
.
ajax
(
web_app
.
name
+
"/sapCostReimbursement/checkzyl06.ajax"
,{
zyl06
:
item
.
record
.
zyl06
},
function
(
data
)
{
if
(
data
>
0
){
Public
.
tip
(
"该发票 '"
+
item
.
value
+
"' 已经提交过,发票无效"
);
var
_grid
=
UICtrl
.
getGridManager
(
'#reimbursementApplierGrid'
);
var
zepItemno
=
item
.
record
.
zepItemno
;
$
.
each
(
_grid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
if
(
zepItemno
==
row
.
zepItemno
){
_grid
.
updateRow
(
row
,{
zyl06
:
""
,
})
}
})
}
})
}
return
item
;
return
item
;
},
},
onAfterShowData
:
function
(){
onAfterShowData
:
function
(){
...
@@ -879,7 +896,51 @@ function getExtendedData(processAction) {
...
@@ -879,7 +896,51 @@ function getExtendedData(processAction) {
}
}
return
mergedObj
;
return
mergedObj
;
});
});
var
subProcUnitId
=
getSubProcUnitId
();
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/refundApply.js
View file @
3bd2ba83
...
@@ -579,7 +579,51 @@ function getExtendedData(processAction) {
...
@@ -579,7 +579,51 @@ function getExtendedData(processAction) {
}
}
return
mergedObj
;
return
mergedObj
;
});
});
var
subProcUnitId
=
getSubProcUnitId
();
//如果没有收到SAP消息回执,不能提交归档
if
(
"file"
===
subProcUnitId
){
var
_financialGrid
=
UICtrl
.
getGridManager
(
'#financialAuditGrid'
);
var
financialDatas
=
DataUtil
.
getGridData
({
gridManager
:
_financialGrid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
financialDatas
)
{
return
false
;
}
var
checked7
=
false
var
num
=
0
;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
}
});
var
_grid
=
UICtrl
.
getGridManager
(
'#paymentAccomplish_sapReturnGrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
,
onCheck
:
function
()
{
return
true
;
}
});
if
(
!
datas
)
{
return
false
;
}
var
checked6
=
false
if
(
checked7
){
$
.
each
(
datas
,
function
(
i
,
o
)
{
if
(
Public
.
isBlank
(
o
.
belnr1
)
||
Public
.
isBlank
(
o
.
gjahr1
)){
checked6
=
true
;
}
})
}
if
(
checked6
){
Public
.
tip
(
"请收到'付款完成、sap回执'消息后才归档"
);
return
false
;
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
extendedData
.
CRDetail
=
Public
.
encodeJSONURI
(
result
);
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
View file @
3bd2ba83
...
@@ -114,7 +114,7 @@ function loadGrid() {
...
@@ -114,7 +114,7 @@ function loadGrid() {
}
}
},
},
{
{
display
:
"物料描述"
,
name
:
"maktx"
,
width
:
2
00
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"物料描述"
,
name
:
"maktx"
,
width
:
3
00
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
editor
:
{
type
:
"text"
type
:
"text"
}
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickDetail.jsp
View file @
3bd2ba83
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<x:inputC
name=
"kostlName"
required=
"false"
label=
"成本中心"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"kostlName"
required=
"false"
label=
"成本中心"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"kostl"
/>
<x:hidden
name=
"kostl"
/>
<x:inputC
name=
"aufnrName"
required=
"false"
label=
"内部订单"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"aufnrName"
required=
"false"
label=
"内部订单"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"message"
required=
"false"
label=
"
预留/相关需求的编
号"
readonly=
"true"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"message"
required=
"false"
label=
"
领料单
号"
readonly=
"true"
labelCol=
"2"
fieldCol=
"2"
/>
<x:hidden
name=
"aufnr"
/>
<x:hidden
name=
"aufnr"
/>
</div>
</div>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
View file @
3bd2ba83
...
@@ -11,6 +11,11 @@ function initUI() {
...
@@ -11,6 +11,11 @@ function initUI() {
function
loadGrid
()
{
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
addHandler
:
addHandler
,
printHandler
:
{
id
:
'print'
,
text
:
'打印'
,
img
:
'fa-clipboard'
,
click
:
function
(){
printHandler
();
}
},
});
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
columns
:
[
...
@@ -24,7 +29,7 @@ function loadGrid() {
...
@@ -24,7 +29,7 @@ function loadGrid() {
{
display
:
"内部订单描述"
,
name
:
"aufnrName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"内部订单描述"
,
name
:
"aufnrName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"审批状态"
,
name
:
"statusTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"审批状态"
,
name
:
"statusTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息类型"
,
name
:
"typeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息类型"
,
name
:
"typeTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"
预留/相关需求的编
号"
,
name
:
"message"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"
领料单
号"
,
name
:
"message"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/nonProducePick/slicedNonProducePickList.ajax'
,
url
:
web_app
.
name
+
'/nonProducePick/slicedNonProducePickList.ajax'
,
...
@@ -71,3 +76,16 @@ function doView(id) {
...
@@ -71,3 +76,16 @@ function doView(id) {
url
:
web_app
.
name
+
'/nonProducePick/showNonProducePickDetail.job?bizId='
+
id
+
"&isReadOnly=true"
url
:
web_app
.
name
+
'/nonProducePick/showNonProducePickDetail.job?bizId='
+
id
+
"&isReadOnly=true"
});
});
}
}
function
printHandler
(){
var
row
=
DataUtil
.
getUpdateRow
(
gridManager
);
if
(
!
row
)
{
return
;
}
if
(
row
.
status
!=
3
){
Public
.
tip
(
"请审批完成再打印!"
);
return
;
}
var
url
=
'/nonProducePick/print.load'
;
Public
.
openPostWindow
(
web_app
.
name
+
url
,{
id
:
row
.
id
});
}
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
View file @
3bd2ba83
...
@@ -586,8 +586,8 @@ function checkConstraints(){
...
@@ -586,8 +586,8 @@ function checkConstraints(){
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
if
(
isApp
rove
ProcUnit
()
&&
datas
.
length
==
0
&&
"2"
!=
getHandleResult
()){
if
(
isApp
ly
ProcUnit
()
&&
datas
.
length
==
0
&&
"2"
!=
getHandleResult
()){
Public
.
tip
(
"供应商银行
银行
信息必填"
);
Public
.
tip
(
"供应商银行信息必填"
);
return
false
;
return
false
;
}
}
}
}
...
@@ -601,8 +601,8 @@ function checkConstraints(){
...
@@ -601,8 +601,8 @@ function checkConstraints(){
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
if
(
isApp
rove
ProcUnit
()
&&
datas
.
length
==
0
&&
"2"
!=
getHandleResult
()){
if
(
isApp
ly
ProcUnit
()
&&
datas
.
length
==
0
&&
"2"
!=
getHandleResult
()){
Public
.
tip
(
"供应商
付款
信息必填"
);
Public
.
tip
(
"供应商
公司
信息必填"
);
return
false
;
return
false
;
}
}
}
}
...
...
topsun-xt/src/main/webapp/template/print/topsun/nonProducePick.ftl
0 → 100644
View file @
3bd2ba83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<head>
<title>
物品领料单
</title>
<
#
include
"/
print
/
commonStyleTemplate
.
ftl
"
/>
<style
type=
"text/css"
>
td
{
font-size
:
13px
;
}
</style>
</head>
<body>
<div
class=
"billTitle"
>
物品领料单
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"50%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
领料部门:${kostlName?default("")?html}
</td>
<td
class=
"right"
>
领料单号:${message?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"50%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
领料类型:${personMemberName?default("")?html}
</td>
<td
class=
"right"
>
列印日期:${fillinDate?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
'20%'
/>
<col
width=
'50%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
项次
</td>
<td
class=
"center"
>
材料编码
</td>
<td
class=
"left"
>
材料名称
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
数量
</td>
</tr>
<
#
if
itemList
??
&&
itemList
?
size
gt
0
>
<
#
list
itemList
as
detail
>
<tr>
<td
class=
"center"
>
${detail.rspos?default("")?html}
</td>
<td
class=
"center"
>
${detail.matnr?default("")?html}
</td>
<td
class=
"left"
>
${detail.maktx?default("")?html}
</td>
<td
class=
"center"
>
${detail.msehl?default("")?html}
</td>
<td
class=
"center"
>
${detail.erfmg?default("")?html}
</td>
</tr>
</
#
list>
<
#
else
>
<tr>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"left"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
</tr>
</
#
if>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
"70%"
/>
<col
width=
"10%"
/>
<col
width=
"10%"
/>
</colgroup>
<tr>
<td
class=
"center"
>
用途:
</td>
<td
class=
"left"
>
${used?default("")?html}
</td>
<td
class=
"center"
>
总计:
</td>
<td
class=
"center"
>
${count?default("")?html}
</td>
</tr>
</table>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/common/Function.java
View file @
3bd2ba83
...
@@ -99,4 +99,15 @@ public class Function extends AbstractDaoFunction {
...
@@ -99,4 +99,15 @@ public class Function extends AbstractDaoFunction {
sql
=
sql
.
replace
(
"%s"
,
tableName
);
sql
=
sql
.
replace
(
"%s"
,
tableName
);
return
this
.
sqlExecutorDao
.
queryToList
(
sql
,
OrgUnit
.
class
,
bizId
);
return
this
.
sqlExecutorDao
.
queryToList
(
sql
,
OrgUnit
.
class
,
bizId
);
}
}
/**
* 根据业务主表id查询申请人
* @param bizId
* @return
*/
public
List
<
OrgUnit
>
findPersonMember
(
String
bizId
){
Assert
.
hasText
(
bizId
,
"参数id不能为空。"
);
String
sql
=
this
.
getSqlByname
(
"findPersonMember"
);
return
this
.
sqlExecutorDao
.
queryToList
(
sql
,
OrgUnit
.
class
,
bizId
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/SapCostReimbursementApplication.java
View file @
3bd2ba83
...
@@ -30,4 +30,6 @@ public interface SapCostReimbursementApplication {
...
@@ -30,4 +30,6 @@ public interface SapCostReimbursementApplication {
void
savePaymentReceiptVo
(
PaymentReceiptVo
paymentReceiptVo
);
void
savePaymentReceiptVo
(
PaymentReceiptVo
paymentReceiptVo
);
String
queryTaskByBizId
(
String
bizId
);
String
queryTaskByBizId
(
String
bizId
);
Integer
checkzyl06
(
String
zyl06
);
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementApplicationImpl.java
View file @
3bd2ba83
...
@@ -24,6 +24,8 @@ import com.huigou.topsun.util.MyBaseUtil;
...
@@ -24,6 +24,8 @@ import com.huigou.topsun.util.MyBaseUtil;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.engine.domain.model.ProcUnitHandler
;
import
com.huigou.uasp.bpm.engine.domain.model.TaskExtension
;
import
com.huigou.util.*
;
import
com.huigou.util.*
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateExecution
;
...
@@ -141,6 +143,17 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
...
@@ -141,6 +143,17 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
if
(
this
.
isApplyProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
if
(
this
.
isApplyProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
updateStatus
(
bizId
,
BizBillStatus
.
APPROVING
);
updateStatus
(
bizId
,
BizBillStatus
.
APPROVING
);
}
}
if
(
this
.
isApprovalProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
TaskExtension
te
=
actApplication
.
loadRuntimeTaskExtension
(
delegateTask
.
getId
());
cn
.
hutool
.
core
.
lang
.
Assert
.
notNull
(
te
,
String
.
format
(
"未查询到流程任务【%s】的扩展信息"
,
delegateTask
.
getId
()));
// 获取流程任务对应的审批环节信息
ProcUnitHandler
procUnitHandler
=
procUnitHandlerApplication
.
loadProcUnitHandler
(
te
.
getProcUnitHandlerId
());
String
subProcUnitId
=
procUnitHandler
.
getSubProcUnitId
();
if
(
"fundNode"
.
equals
(
subProcUnitId
)){
//在资产节点传到SAP
this
.
sendSapDate
(
this
.
costReimbursementRepository
.
findOne
(
bizId
));
}
}
}
}
/**
/**
...
@@ -174,7 +187,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
...
@@ -174,7 +187,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
sapCostReimbursement
.
setStatusId
(
status
.
getId
());
sapCostReimbursement
.
setStatusId
(
status
.
getId
());
costReimbursementRepository
.
save
(
sapCostReimbursement
);
costReimbursementRepository
.
save
(
sapCostReimbursement
);
//审核完成、远程调用sap接口
//审核完成、远程调用sap接口
sendSapDate
(
sapCostReimbursement
);
//
sendSapDate(sapCostReimbursement);
}
}
@Override
@Override
...
@@ -319,7 +332,9 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
...
@@ -319,7 +332,9 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
sapCostReimbursementDetail
.
setGjahr1
(
paymentReceiptVo
.
getGjahr1
());
sapCostReimbursementDetail
.
setGjahr1
(
paymentReceiptVo
.
getGjahr1
());
costReimbursementDetailRepository
.
save
(
sapCostReimbursementDetail
);
costReimbursementDetailRepository
.
save
(
sapCostReimbursementDetail
);
}
}
this
.
makeACopyFor
(
reimbursement
);
//在接收到SAP回执消息后,修改任务标题和当前时间,让申请人能看到该任务
this
.
updateActRuTaskExtension
(
reimbursement
.
getId
());
//this.makeACopyFor(reimbursement);
}
}
@Override
@Override
...
@@ -330,6 +345,14 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
...
@@ -330,6 +345,14 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
return
taskId
;
return
taskId
;
}
}
@Override
public
Integer
checkzyl06
(
String
zyl06
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"checkzyl06"
);
String
sql
=
queryDescriptor
.
getSql
();
int
i
=
this
.
sqlExecutorDao
.
queryToInt
(
sql
,
zyl06
);
return
i
;
}
public
void
makeACopyFor
(
SapCostReimbursement
reimbursement
)
{
public
void
makeACopyFor
(
SapCostReimbursement
reimbursement
)
{
// 流程结束给申请人发送抄送
// 流程结束给申请人发送抄送
List
<
String
>
executorIds
=
new
ArrayList
<>(
1
);
List
<
String
>
executorIds
=
new
ArrayList
<>(
1
);
...
@@ -340,6 +363,12 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
...
@@ -340,6 +363,12 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
this
.
workflowService
.
makeACopyFor
(
taskId
,
executorIds
,
"付款完成、sap回执:"
+
reimbursement
.
getZepFtypename
()+
"-"
+
reimbursement
.
getBillCode
());
this
.
workflowService
.
makeACopyFor
(
taskId
,
executorIds
,
"付款完成、sap回执:"
+
reimbursement
.
getZepFtypename
()+
"-"
+
reimbursement
.
getBillCode
());
}
}
public
void
updateActRuTaskExtension
(
String
bizId
){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"updateActRuTaskExtension"
);
String
sql
=
queryDescriptor
.
getSql
();
this
.
sqlExecutorDao
.
executeUpdate
(
sql
,
"付款完成、sap回执:"
,
new
Date
(),
bizId
);
}
public
static
void
main
(
String
[]
args
)
throws
JsonProcessingException
{
public
static
void
main
(
String
[]
args
)
throws
JsonProcessingException
{
// post.setHeader("Content-type", "application/json;charset=utf-8");
// post.setHeader("Content-type", "application/json;charset=utf-8");
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/controller/SapCostReimbursementController.java
View file @
3bd2ba83
...
@@ -195,4 +195,15 @@ public class SapCostReimbursementController extends CommonController {
...
@@ -195,4 +195,15 @@ public class SapCostReimbursementController extends CommonController {
}
}
return
messageMap
;
return
messageMap
;
}
}
/**
* 根据发票号校验是否已经提交过该发票号
* @return
*/
public
String
checkzyl06
(){
SDO
sdo
=
this
.
getSDO
();
String
zyl06
=
sdo
.
getString
(
"zyl06"
);
Integer
count
=
costReimbursementApplication
.
checkzyl06
(
zyl06
);
return
success
(
count
);
}
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/application/impl/NonProducePickApplicationImpl.java
View file @
3bd2ba83
...
@@ -120,11 +120,12 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
...
@@ -120,11 +120,12 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
nonProducePick
.
setType
(
sapResult
.
getTYPE
());
nonProducePick
.
setType
(
sapResult
.
getTYPE
());
if
(
"Y"
.
equals
(
ztype
)){
if
(
"Y"
.
equals
(
ztype
)){
nonProducePick
.
setMessage
(
sapResult
.
getMESSAGE_V1
());
nonProducePick
.
setMessage
(
sapResult
.
getMESSAGE_V1
());
}
else
if
(
"N"
.
equals
(
ztype
)){
nonProducePick
.
setMessage
(
sapResult
.
getMESSAGE
());
}
else
if
(
StringUtil
.
isBlank
(
ztype
)){
nonProducePick
.
setMessage
(
sapResult
.
getMESSAGE
());
}
}
// else if ("N".equals(ztype)){
// nonProducePick.setMessage(sapResult.getMESSAGE());
// }else if (StringUtil.isBlank(ztype)){
// nonProducePick.setMessage(sapResult.getMESSAGE());
// }
nonProducePickRepository
.
save
(
nonProducePick
);
nonProducePickRepository
.
save
(
nonProducePick
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
@@ -139,26 +140,27 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
...
@@ -139,26 +140,27 @@ public class NonProducePickApplicationImpl extends FlowBroker implements NonProd
if
(
nonProducePick
.
isNew
())
{
if
(
nonProducePick
.
isNew
())
{
nonProducePick
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
nonProducePick
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
//根据工厂。物料,单位检查可用数量
//根据工厂。物料,单位检查可用数量
//this.checkNonProducePickNum(nonProducePickItems);
}
else
{
}
else
{
nonProducePick
=
(
NonProducePick
)
commonDomainService
.
loadAndFillinProperties
(
nonProducePick
);
nonProducePick
=
(
NonProducePick
)
commonDomainService
.
loadAndFillinProperties
(
nonProducePick
);
}
}
this
.
checkNonProducePickNum
(
nonProducePickItems
,
nonProducePick
.
getWerks
());
nonProducePick
=
nonProducePickRepository
.
save
(
nonProducePick
);
nonProducePick
=
nonProducePickRepository
.
save
(
nonProducePick
);
nonProducePickItemApplication
.
saveNonProducePickItems
(
nonProducePick
.
getId
(),
nonProducePickItems
);
nonProducePickItemApplication
.
saveNonProducePickItems
(
nonProducePick
.
getId
(),
nonProducePickItems
);
return
nonProducePick
.
getId
();
return
nonProducePick
.
getId
();
}
}
public
void
checkNonProducePickNum
(
List
<
NonProducePickItem
>
nonProducePickItems
){
public
void
checkNonProducePickNum
(
List
<
NonProducePickItem
>
nonProducePickItems
,
String
werks
){
List
<
CheckNonProducePickItemNumVo
>
collect
=
nonProducePickItems
List
<
CheckNonProducePickItemNumVo
>
collect
=
nonProducePickItems
.
stream
()
.
stream
()
.
map
(
nonProducePickItem
->
{
.
map
(
nonProducePickItem
->
{
CheckNonProducePickItemNumVo
checkNonProducePickItemNumVo
=
new
CheckNonProducePickItemNumVo
();
CheckNonProducePickItemNumVo
checkNonProducePickItemNumVo
=
new
CheckNonProducePickItemNumVo
();
BeanUtils
.
copyProperties
(
nonProducePickItem
,
checkNonProducePickItemNumVo
);
BeanUtils
.
copyProperties
(
nonProducePickItem
,
checkNonProducePickItemNumVo
);
checkNonProducePickItemNumVo
.
setWerks
(
werks
);
return
checkNonProducePickItemNumVo
;
return
checkNonProducePickItemNumVo
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
try
{
try
{
//http://192.168.3.109:8000/sap/bc/erp_ep/mm_check?sap-client=300
//http://192.168.3.109:8000/sap/bc/erp_ep/mm_check?sap-client=300
String
execute
=
httpClient
.
execute
(
collect
,
"
erp_ep/
mm_check"
);
String
execute
=
httpClient
.
execute
(
collect
,
"mm_check"
);
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
SapResult
sapResult
=
resultList
.
get
(
0
);
SapResult
sapResult
=
resultList
.
get
(
0
);
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/controller/NonProducePickController.java
View file @
3bd2ba83
...
@@ -2,17 +2,29 @@ package com.huigou.topsun.sap.nonProducePick.controller;
...
@@ -2,17 +2,29 @@ package com.huigou.topsun.sap.nonProducePick.controller;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.data.domain.query.QueryPageRequest
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.sap.nonProducePick.application.NonProducePickApplication
;
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.NonProducePick
;
import
com.huigou.topsun.sap.nonProducePick.domain.NonProducePickItem
;
import
com.huigou.topsun.sap.nonProducePick.domain.query.NonProducePickQueryRequest
;
import
com.huigou.topsun.sap.nonProducePick.domain.query.NonProducePickQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.SDO
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @Auther: xin.lu
* @Auther: xin.lu
...
@@ -29,6 +41,8 @@ public class NonProducePickController extends CommonController {
...
@@ -29,6 +41,8 @@ public class NonProducePickController extends CommonController {
@Resource
@Resource
private
NonProducePickApplication
nonProducePickApplication
;
private
NonProducePickApplication
nonProducePickApplication
;
@Autowired
private
NonProducePickItemApplication
nonProducePickItemApplication
;
public
String
forwardNonProducePickList
(){
public
String
forwardNonProducePickList
(){
return
forward
(
"nonProducePickList"
);
return
forward
(
"nonProducePickList"
);
...
@@ -61,4 +75,23 @@ public class NonProducePickController extends CommonController {
...
@@ -61,4 +75,23 @@ public class NonProducePickController extends CommonController {
NonProducePick
nonProducePick
=
nonProducePickApplication
.
findNonProducePickById
(
id
);
NonProducePick
nonProducePick
=
nonProducePickApplication
.
findNonProducePickById
(
id
);
return
forward
(
"nonProducePickDetail"
,
nonProducePick
);
return
forward
(
"nonProducePickDetail"
,
nonProducePick
);
}
}
/**
* 打印
* @return
*/
public
String
print
()
{
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
NonProducePick
nonProducePick
=
this
.
nonProducePickApplication
.
findNonProducePickById
(
id
);
Map
<
String
,
Object
>
map
=
ClassHelper
.
beanToMap
(
nonProducePick
);
// 获取Grid数据
List
<
NonProducePickItem
>
itemList
=
nonProducePickItemApplication
.
findByNonProducePickId
(
id
);
map
.
put
(
"printTime"
,
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm"
).
format
(
LocalDateTime
.
now
()));
map
.
put
(
"itemList"
,
itemList
);
BigDecimal
bigDecimal
=
itemList
.
stream
().
map
(
NonProducePickItem:
:
getErfmg
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
map
.
put
(
"count"
,
bigDecimal
);
String
pintPage
=
String
.
format
(
"/print/topsun/nonProducePick.ftl"
);
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/vo/CheckNonProducePickItemNumVo.java
View file @
3bd2ba83
...
@@ -27,7 +27,19 @@ public class CheckNonProducePickItemNumVo implements Serializable {
...
@@ -27,7 +27,19 @@ public class CheckNonProducePickItemNumVo implements Serializable {
/**
/**
*单位
*单位
*/
*/
@
Column
(
name
=
"UNIT"
)
@
JsonProperty
(
"UNIT"
)
private
String
meins
;
private
String
meins
;
/**
* 数量
*/
@JsonProperty
(
"MNG06"
)
private
BigDecimal
erfmg
;
/**
* 库存地点
*/
@JsonProperty
(
"LGORT"
)
private
String
lgort
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/transfers/application/impl/SapStockTransfersApplicationImpl.java
View file @
3bd2ba83
...
@@ -12,14 +12,6 @@ import com.huigou.topsun.base.coderule.application.CodeRuleApplication;
...
@@ -12,14 +12,6 @@ import com.huigou.topsun.base.coderule.application.CodeRuleApplication;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersBank
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersBuyer
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersInfo
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersPay
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersBankVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersBuyerVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersInfoVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersPayVo
;
import
com.huigou.topsun.sap.transfers.application.SapStockTransfersApplication
;
import
com.huigou.topsun.sap.transfers.application.SapStockTransfersApplication
;
import
com.huigou.topsun.sap.transfers.application.SapStockTransfersItemApplication
;
import
com.huigou.topsun.sap.transfers.application.SapStockTransfersItemApplication
;
import
com.huigou.topsun.sap.transfers.domain.SapStockTransfers
;
import
com.huigou.topsun.sap.transfers.domain.SapStockTransfers
;
...
@@ -33,6 +25,7 @@ import com.huigou.uasp.bmp.common.BizBillStatus;
...
@@ -33,6 +25,7 @@ import com.huigou.uasp.bmp.common.BizBillStatus;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.DateUtil
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -43,6 +36,7 @@ import java.util.ArrayList;
...
@@ -43,6 +36,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @Auther: Lxh
* @Auther: Lxh
...
@@ -162,6 +156,29 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
...
@@ -162,6 +156,29 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
}
}
}
}
/**
* 设置任务名称
*/
@Override
protected
void
setTaskDescription
(
DelegateTask
delegateTask
)
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
delegateTask
.
setDescription
(
this
.
getApprovalSubjectName
(
bizId
));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private
String
getApprovalSubjectName
(
String
bizId
)
{
SapStockTransfers
sapStockTransfers
=
this
.
sapStockTransfersRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapStockTransfers
.
getFillinDate
());
//设置标题
return
String
.
format
(
"%s-%s(%s)"
,
"公司间内跨工厂调拨申请"
,
sapStockTransfers
.
getBillCode
(),
fillinDateStr
);
}
@Override
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
return
ClassHelper
.
toMap
(
sapStockTransfersRepository
.
getOne
(
bizId
));
return
ClassHelper
.
toMap
(
sapStockTransfersRepository
.
getOne
(
bizId
));
...
@@ -208,6 +225,7 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
...
@@ -208,6 +225,7 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
resultMap
.
put
(
"parameter"
,
JSON
.
toJSONString
(
sapStockTransfersVO
));
resultMap
.
put
(
"parameter"
,
JSON
.
toJSONString
(
sapStockTransfersVO
));
// List<SapStockTransfersVO> sapStockTransfersVOs = new ArrayList<>();
// List<SapStockTransfersVO> sapStockTransfersVOs = new ArrayList<>();
// sapStockTransfersVOs.add(sapStockTransfersVO);
// sapStockTransfersVOs.add(sapStockTransfersVO);
String
message
=
""
;
try
{
try
{
String
result
=
defaultHttpClient
.
execute
(
sapStockTransfersVO
,
url
);
String
result
=
defaultHttpClient
.
execute
(
sapStockTransfersVO
,
url
);
List
<
SapResult
>
sapResultList
=
JSONObject
.
parseArray
(
result
,
SapResult
.
class
);
List
<
SapResult
>
sapResultList
=
JSONObject
.
parseArray
(
result
,
SapResult
.
class
);
...
@@ -225,7 +243,9 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
...
@@ -225,7 +243,9 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
sapStockTransfers
.
setMessage
(
sapResult
.
getMESSAGE_V1
());
sapStockTransfers
.
setMessage
(
sapResult
.
getMESSAGE_V1
());
sapStockTransfersRepository
.
save
(
sapStockTransfers
);
sapStockTransfersRepository
.
save
(
sapStockTransfers
);
}
else
{
}
else
{
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
sapResult
.
getMESSAGE
());
List
<
String
>
stringList
=
sapResultList
.
stream
().
map
(
SapResult:
:
getMESSAGE
).
collect
(
Collectors
.
toList
());
message
=
String
.
join
(
";"
,
stringList
);
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
message
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"TYPE"
,
"E"
);
resultMap
.
put
(
"TYPE"
,
"E"
);
...
...
topsun/src/main/resources/config/topsun/base/function.xml
View file @
3bd2ba83
...
@@ -60,6 +60,11 @@
...
@@ -60,6 +60,11 @@
o.id IN ( SELECT o.PARENT_ID FROM sa_oporg o LEFT JOIN %s pro ON o.id = pro.person_member_id WHERE pro.id = ? ) ) ) )
o.id IN ( SELECT o.PARENT_ID FROM sa_oporg o LEFT JOIN %s pro ON o.id = pro.person_member_id WHERE pro.id = ? ) ) ) )
AND o.CODE IN ( 'JL', 'ZZ' ,'ZJ'));
AND o.CODE IN ( 'JL', 'ZZ' ,'ZJ'));
</sql>
</sql>
<sql
name=
"findPersonMember"
>
SELECT o.FULL_ID, o.FULL_NAME
FROM sa_oporg o LEFT JOIN sap_cost_reimbursement_base_info t ON t.person_member_id = o.id WHERE t.id = ?
</sql>
</query>
</query>
</query-mappings>
</query-mappings>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/costReimbursement/costReimbursement.xml
View file @
3bd2ba83
...
@@ -29,4 +29,20 @@
...
@@ -29,4 +29,20 @@
AND t.TASK_DEF_KEY_ = 'Apply' ORDER BY t.START_TIME_ desc LIMIT 1
AND t.TASK_DEF_KEY_ = 'Apply' ORDER BY t.START_TIME_ desc LIMIT 1
</sql-query>
</sql-query>
</query>
</query>
<query
name=
"updateActRuTaskExtension"
>
<sql-query>
UPDATE act_ru_task_extension t
SET t.DESCRIPTION_ = CONCAT( ?, t.DESCRIPTION_ ),
t.START_TIME_ = ? WHERE t.BUSINESS_KEY_ = ?
</sql-query>
</query>
<query
name=
"checkzyl06"
>
<sql-query>
SELECT COUNT( d.reimbursement_detail_id ) AS num FROM sap_cost_reimbursement_detail d
LEFT JOIN sap_cost_reimbursement_base_info t ON t.id = d.reimbursement_base_info_id
WHERE t.STATUS IN ( 1, 3 ) AND d.ZYL06 = ?
</sql-query>
</query>
</query-mappings>
</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