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
b11825c4
Commit
b11825c4
authored
Jan 11, 2024
by
wanghang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
c4406e1d
984fb72c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
403 additions
and
139 deletions
+403
-139
materialDetail.js
...src/main/webapp/biz/topsun/sap/material/materialDetail.js
+31
-0
materialDetail.jsp
...rc/main/webapp/biz/topsun/sap/material/materialDetail.jsp
+38
-0
materialList.js
...t/src/main/webapp/biz/topsun/sap/material/materialList.js
+99
-0
materialList.jsp
.../src/main/webapp/biz/topsun/sap/material/materialList.jsp
+24
-0
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+109
-14
sapPurchaseDetail.jsp
...main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
+1
-0
sapPurchaseList.js
...rc/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
+1
-0
SapDictionaryApplicationImpl.java
...ionary/application/impl/SapDictionaryApplicationImpl.java
+7
-2
SapPurchaseApplicationImpl.java
...purchase/application/impl/SapPurchaseApplicationImpl.java
+27
-5
SapPurchase.java
...va/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
+7
-0
SapPurchaseVo.java
...m/huigou/topsun/sap/purchase/domain/vo/SapPurchaseVo.java
+59
-118
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/material/materialDetail.js
0 → 100644
View file @
b11825c4
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initializateUI
();
});
function
initializateUI
()
{
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
/**
* 流程引擎回调设置物料申请的id
* @param value 物料申请的id
*/
function
setId
(
materialId
)
{
$
(
"#materialId"
).
val
(
materialId
);
// 为文件上传控件绑定业务id
$
(
'#fileList'
).
fileList
({
bizId
:
materialId
});
}
/**
* 流程引擎获取物料申请id的回掉方法。
* @return 物料申请的id
*/
function
getId
()
{
return
$
(
"#materialId"
).
val
()
||
""
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/material/materialDetail.jsp
0 → 100644
View file @
b11825c4
<%@ page
contentType=
"text/html; charset=utf-8"
language=
"java"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"date,layout,grid,combox,tree,comboDialog,attachment"
/>
<x:script
src=
'/biz/topsun/sap/material/materialDetail.js'
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"物料详情单"
needStatus=
"false"
needPerson=
"true"
/>
<div
class=
"blank_div clearfix"
></div>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
id=
"materialId"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
type=
"datetime"
/>
<x:hidden
name=
"fullId"
/>
<x:hidden
name=
"organId"
/>
<x:hidden
name=
"organName"
/>
<x:hidden
name=
"deptId"
/>
<x:hidden
name=
"deptName"
/>
<x:hidden
name=
"positionId"
/>
<x:hidden
name=
"positionName"
/>
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"name"
title=
"物料名称"
required=
"true"
label=
"物料名称"
labelCol=
"2"
fieldCol=
"6"
maxlength=
"32"
/>
</div>
</div>
</form>
<div
class=
"blank_div clearfix"
></div>
<x:fileList
id=
"fileList"
bizCode=
"demoLeave"
title=
"附件"
bizId=
"id"
/>
<div
id=
"showAttachmentExplain"
></div>
</div>
</body>
</html>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/material/materialList.js
0 → 100644
View file @
b11825c4
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initializateUI
();
loadMaterialListGrid
();
});
function
initializateUI
()
{
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
function
loadMaterialListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
addHandler
();
},
updateHandler
:
function
()
{
updateHandler
();
},
deleteHandler
:
deleteHandler
,
testHandler
:
{
id
:
'test'
,
text
:
'测试接口'
,
img
:
'fa-clipboard'
,
click
:
function
()
{
Public
.
ajax
(
web_app
.
name
+
"/technology/testSap.ajax"
,{},
function
(
data
){
})
}
}
});
gridManager
=
UICtrl
.
grid
(
"#materialListGrid"
,
{
columns
:
[
{
display
:
"物料名称"
,
name
:
"technologyName"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"物料编码"
,
name
:
"productId"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/material/slicedMaterialList.ajax'
,
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
width
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
updateHandler
(
data
);
}
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
}
function
reloadGrid
()
{
gridManager
.
loadData
();
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'materialDetail'
,
text
:
"新增物料"
,
url
:
web_app
.
name
+
'/material/forwardAddMaterialDetail.job'
})
}
function
updateHandler
(
row
)
{
if
(
!
row
)
{
row
=
DataUtil
.
getUpdateRow
(
gridManager
);
if
(
!
row
)
{
return
;
}
}
UICtrl
.
addTabItem
({
tabid
:
'materialDetail'
+
row
.
id
,
text
:
"新增工艺"
,
url
:
web_app
.
name
+
'/material/showMaterialDetail.job?id='
+
row
.
id
})
}
//删除按钮
function
deleteHandler
()
{
DataUtil
.
del
({
action
:
'material/deleteTechnologyByTechnologyId.ajax'
,
gridManager
:
gridManager
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
topsun-xt/src/main/webapp/biz/topsun/sap/material/materialList.jsp
0 → 100644
View file @
b11825c4
<%@ 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"
/>
<x:script
src=
'/biz/topsun/sap/material/materialList.js'
/>
</head>
<body>
<div
class=
"container-fluid"
>
<div
id=
"layout"
>
<div
position=
"center"
title=
"物料管理"
>
<x:title
title=
"common.button.search"
hideTable=
"queryMainForm"
isHide=
"true"
/>
<form
class=
"hg-form ui-hide"
method=
"post"
action=
""
id=
"queryMainForm"
>
<x:inputC
name=
"name"
required=
"false"
label=
"物料名称"
labelCol=
"1"
/>
<x:searchButtons />
</form>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"materialListGrid"
style=
"margin: 2px;"
></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
b11825c4
...
...
@@ -80,10 +80,25 @@ function getGridColumns() {
},
}
},
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
"WERKS"
}
},
back
:
{
WERKS
:
"werks"
,
NAME1
:
"name1"
}
},
}
},
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
/*editor: {
required: true, type: "select",
...
...
@@ -96,23 +111,78 @@ function getGridColumns() {
back: {meins: "unit"}
},
}*/
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
"LGORT"
}
},
back
:
{
LGORT
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
},
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "text"}
},
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,},
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
"MATKL"
}
},
back
:
{
MATKL
:
"matkl"
}
},
}
},
{
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"申购数量单位"
,
name
:
"meins"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
/*editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "MEINS"}
},
back: {
MEINS: "meins"
}
},
}*/
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
"EKGRP"
}
},
back
:
{
EKGRP
:
"ekgrp"
}
},
}
},
{
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
...
...
@@ -167,7 +237,19 @@ function getGridColumns() {
editor
:
{
type
:
'text'
,
mask
:
'9999999'
,
required
:
false
}
},
{
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
paramValue
:
"WAERS"
}
},
back
:
{
WAERS
:
"waers"
}
},
}
},
{
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
){
...
...
@@ -180,33 +262,33 @@ function getGridColumns() {
},
{
display
:
"会计分配序号"
,
name
:
"zebkn"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
){
/*
render:function (item){
//申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
if (item.knttp != ''){
ZEBKN_NUM = ZEBKN_NUM + 1;
}
return item.zebkn = ZEBKN_NUM;
}
}
*/
},
{
display
:
"多重科目分配"
,
name
:
"vrtkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
)
{
/*
render : function (item) {
var bsart =$("#bsart").val();
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if (bsart == "ZNE1" && item.menge > 1){
return item.vrtkz = 1;
}
}
}
*/
},
{
display
:
"部分发票"
,
name
:
"twrkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
)
{
/*
render : function (item) {
var bsart =$("#bsart").val();
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if (bsart == "ZNE1" && item.menge > 1){
return item.twrkz = 1;
}
}
}
*/
},
{
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
...
...
@@ -217,7 +299,20 @@ function getGridColumns() {
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
/*editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KOSTL"}
},
back: {
KOSTL: "kostl"
}
},
}*/
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
View file @
b11825c4
...
...
@@ -25,6 +25,7 @@
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"frgdt"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
View file @
b11825c4
...
...
@@ -21,6 +21,7 @@ function initPurchaseListGrid() {
,
{
display
:
"需求跟踪编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"PR类型"
,
name
:
"bsartTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"采购申请编号"
,
name
:
"banfn"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"批准时间"
,
name
:
"frgdt"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
],
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchase/slicedSapPurchaseList.ajax?'
,
...
...
topsun/src/main/java/com/huigou/topsun/sap/dictionary/application/impl/SapDictionaryApplicationImpl.java
View file @
b11825c4
...
...
@@ -25,11 +25,16 @@ public class SapDictionaryApplicationImpl implements SapDictionaryApplication {
private
HttpClient
httpClient
;
@Override
public
List
<
Map
<
String
,
Object
>>
getSapDictionary
(
String
fieldName
)
throws
IOException
{
public
List
<
Map
<
String
,
Object
>>
getSapDictionary
(
String
fieldName
)
{
String
url
=
SystemCache
.
getParameter
(
"sap.service.dictionary.url"
,
String
.
class
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"FIELDNAME"
,
fieldName
);
String
execute
=
httpClient
.
execute
(
map
,
url
);
String
execute
=
null
;
try
{
execute
=
httpClient
.
execute
(
map
,
url
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
String
.
format
(
"查询“%s数据字典出错”。"
,
fieldName
));
}
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
JSONArray
.
parse
(
execute
);
return
mapList
;
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/impl/SapPurchaseApplicationImpl.java
View file @
b11825c4
...
...
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseApplication
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseItemApplication
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
...
...
@@ -20,7 +21,9 @@ import org.activiti.engine.delegate.DelegateTask;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -35,6 +38,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
private
SapPurchaseRepository
sapPurchaseRepository
;
@Resource
private
SapPurchaseItemApplication
sapPurchaseItemApplication
;
@Resource
private
HttpClient
httpClient
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
...
...
@@ -48,7 +53,13 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
List
<
SapPurchaseItem
>
sapPurchaseItems
=
getBizEntities
(
SapPurchaseItem
.
class
,
"sapPurchaseItems"
);
sapPurchaseItemApplication
.
saveSapPurchaseItems
(
sapPurchase
.
getId
(),
sapPurchaseItems
);
String
sapPurchaseVoJson
=
this
.
getSapPurchaseVoJson
(
sapPurchase
);
List
<
SapPurchaseVo
>
purchaseVoList
=
this
.
getSapPurchaseVoJson
(
sapPurchase
);
try
{
String
execute
=
httpClient
.
execute
(
purchaseVoList
,
"sap.purchase.url"
);
System
.
out
.
println
(
"返回结果:"
+
execute
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
sapPurchase
.
getId
();
}
...
...
@@ -67,7 +78,16 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
SapPurchase
sapPurchase
=
sapPurchaseRepository
.
findOne
(
bizId
);
sapPurchase
.
setStatusId
(
status
.
getId
());
sapPurchase
.
setFrgdt
(
new
Date
());
sapPurchaseRepository
.
save
(
sapPurchase
);
List
<
SapPurchaseVo
>
sapPurchaseVoList
=
this
.
getSapPurchaseVoJson
(
sapPurchase
);
try
{
String
execute
=
httpClient
.
execute
(
sapPurchaseVoList
,
"sap.purchase.url"
);
System
.
out
.
println
(
"返回结果:"
+
execute
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
/**
...
...
@@ -75,7 +95,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
* @param sapPurchase
* @return
*/
public
String
getSapPurchaseVoJson
(
SapPurchase
sapPurchase
){
public
List
<
SapPurchaseVo
>
getSapPurchaseVoJson
(
SapPurchase
sapPurchase
){
List
<
SapPurchaseItem
>
sapPurchaseItemList
=
this
.
sapPurchaseItemApplication
.
findBySapPurchaseId
(
sapPurchase
.
getId
());
List
<
SapPurchaseVo
>
sapPurchaseVoList
=
new
ArrayList
<>();
sapPurchaseItemList
.
forEach
(
sapPurchaseItem
->
{
...
...
@@ -83,16 +103,18 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
BeanUtil
.
copyProperties
(
sapPurchaseItem
,
sapPurchaseVo
);
sapPurchaseVo
.
setBillCode
(
sapPurchase
.
getBillCode
());
sapPurchaseVo
.
setBsart
(
sapPurchase
.
getBsart
());
sapPurchaseVo
.
setFrgdt
(
sapPurchase
.
getFrgdt
());
sapPurchaseVo
.
setErnam
(
sapPurchase
.
getPersonMemberName
());
sapPurchaseVoList
.
add
(
sapPurchaseVo
);
});
ObjectMapper
objectMapper
=
new
ObjectMapper
();
/*
ObjectMapper objectMapper = new ObjectMapper();
String returnJson = null;
try {
returnJson = objectMapper.writeValueAsString(sapPurchaseVoList);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
return
returnJson
;
}
*/
return
sapPurchaseVoList
;
}
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
View file @
b11825c4
...
...
@@ -5,6 +5,7 @@ import javax.persistence.*;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -28,6 +29,12 @@ public class SapPurchase extends FlowBillAbstractEntity {
@Column
(
name
=
"BANFN"
)
private
String
banfn
;
/**
*批准日期
*/
@Column
(
name
=
"FRGDT"
)
private
Date
frgdt
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/vo/SapPurchaseVo.java
View file @
b11825c4
...
...
@@ -16,259 +16,260 @@ public class SapPurchaseVo implements Serializable {
/**
* 需求跟踪号
*/
@JsonProperty
(
"
BEDNR
"
)
@JsonProperty
(
"
bednr
"
)
private
String
billCode
;
/**
* pr类型
*/
@JsonProperty
(
"
BSART
"
)
@JsonProperty
(
"
bsart
"
)
private
String
bsart
;
/**
* 采购申请编号
*/
@JsonProperty
(
"BANFN
"
)
private
String
banfn
;
//@JsonProperty("banfn
")
//
private String banfn;
/**
* 申购项次号
*/
@JsonProperty
(
"
BNFPO
"
)
@JsonProperty
(
"
bnfpo
"
)
private
Integer
bnfpo
;
/**
* 项次类别
*/
@JsonProperty
(
"
PSTYP
"
)
@JsonProperty
(
"
pstyp
"
)
private
String
pstyp
;
/**
* 科目分配类别
*/
@JsonProperty
(
"
KNTTP
"
)
@JsonProperty
(
"
knttp
"
)
private
String
knttp
;
/**
* 工厂
*/
@JsonProperty
(
"
WERKS
"
)
@JsonProperty
(
"
werks
"
)
private
String
werks
;
/**
* 工厂名称
*/
@JsonProperty
(
"NAME1"
)
private
String
name1
;
//
@JsonProperty("NAME1")
//
private String name1;
/**
* 库存地点
*/
@JsonProperty
(
"
LGORT
"
)
@JsonProperty
(
"
lgort
"
)
private
String
lgort
;
/**
* 库存地点名称
*/
@JsonProperty
(
"LGOBE"
)
private
String
lgobe
;
//
@JsonProperty("LGOBE")
//
private String lgobe;
/**
* 物料编号
*/
@JsonProperty
(
"
MATNR
"
)
@JsonProperty
(
"
matnr
"
)
private
String
matnr
;
/**
* 短文本
*/
@JsonProperty
(
"
TXZ
01"
)
@JsonProperty
(
"
txz
01"
)
private
String
txz01
;
/**
* 物料组
*/
@JsonProperty
(
"
MATKL
"
)
@JsonProperty
(
"
matkl
"
)
private
String
matkl
;
/**
* 申购数量
*/
@JsonProperty
(
"
MENGE
"
)
@JsonProperty
(
"
menge
"
)
private
BigDecimal
menge
;
/**
* 申购数量单位
*/
@JsonProperty
(
"
MEINS
"
)
@JsonProperty
(
"
meins
"
)
private
String
meins
;
/**
* 采购组
*/
@JsonProperty
(
"
EKGRP
"
)
@JsonProperty
(
"
ekgrp
"
)
private
String
ekgrp
;
/**
* 申请日期
*/
@JsonProperty
(
"
BADAT
"
)
@JsonProperty
(
"
badat
"
)
private
Date
badat
;
/**
* 创建日期
*/
@JsonProperty
(
"
ERDAT
"
)
@JsonProperty
(
"
erdat
"
)
private
Date
erdat
;
/**
* 批准日期
*/
@JsonProperty
(
"
FRGDT
"
)
@JsonProperty
(
"
frgdt
"
)
private
Date
frgdt
;
/**
* 要求交货日期
*/
@JsonProperty
(
"
LFDAT
"
)
@JsonProperty
(
"
lfdat
"
)
private
Date
lfdat
;
/**
* 服务主数据编号
*/
@JsonProperty
(
"SRVPOS"
)
private
String
srvpos
;
//
@JsonProperty("SRVPOS")
//
private String srvpos;
/**
* 服务短文本
*/
@JsonProperty
(
"KTEXT1"
)
private
String
ktext1
;
//
@JsonProperty("KTEXT1")
//
private String ktext1;
/**
* 服务条目数量
*/
@JsonProperty
(
"ESLL_MENGE"
)
private
BigDecimal
esllMenge
;
//
@JsonProperty("ESLL_MENGE")
//
private BigDecimal esllMenge;
/**
* 服务计量单位
*/
@JsonProperty
(
"ESLL_MEINS"
)
private
String
esllMeins
;
//
@JsonProperty("ESLL_MEINS")
//
private String esllMeins;
/**
* 定价基数
*/
@JsonProperty
(
"PEINH"
)
private
Integer
peinh
;
//
@JsonProperty("PEINH")
//
private Integer peinh;
/**
* 服务预估单价
*/
@JsonProperty
(
"BRTWR"
)
private
BigDecimal
brtwr
;
//
@JsonProperty("BRTWR")
//
private BigDecimal brtwr;
/**
* 服务预估金额
*/
@JsonProperty
(
"NETWR"
)
private
BigDecimal
netwr
;
//
@JsonProperty("NETWR")
//
private BigDecimal netwr;
/**
* 创建者
*/
@JsonProperty
(
"
ERNAM
"
)
@JsonProperty
(
"
ernam
"
)
private
String
ernam
;
/**
* 申请人
*/
@JsonProperty
(
"
AFNAM
"
)
@JsonProperty
(
"
afnam
"
)
private
String
afnam
;
/**
* 评估价格
*/
@JsonProperty
(
"PREIS"
)
private
BigDecimal
preis
;
//
@JsonProperty("PREIS")
//
private BigDecimal preis;
/**
* 价格基数
*/
@JsonProperty
(
"EBAN_PEINH"
)
private
Integer
ebanPeinh
;
//
@JsonProperty("EBAN_PEINH")
//
private Integer ebanPeinh;
/**
* 币种
*/
@JsonProperty
(
"
WAERS
"
)
@JsonProperty
(
"
waers
"
)
private
String
waers
;
/**
* 评估金额
*/
@JsonProperty
(
"EBAN_NETWR"
)
private
BigDecimal
ebanNetwr
;
//
@JsonProperty("EBAN_NETWR")
//
private BigDecimal ebanNetwr;
/**
* 会计分配序号
*/
@JsonProperty
(
"
ZEBKN
"
)
@JsonProperty
(
"
zebkn
"
)
private
Integer
zebkn
;
/**
* 多重科目分配
*/
@JsonProperty
(
"
VRTKZ
"
)
@JsonProperty
(
"
vrtkz
"
)
private
String
vrtkz
;
/**
* 部分发票
*/
@JsonProperty
(
"
TWRKZ
"
)
@JsonProperty
(
"
twrkz
"
)
private
String
twrkz
;
/**
* PR分解数量
*/
@JsonProperty
(
"EKBN_MENGE"
)
private
Long
ekbnMenge
;
//
@JsonProperty("EKBN_MENGE")
//
private Long ekbnMenge;
/**
* 总账科目
*/
@JsonProperty
(
"
SAKTO
"
)
@JsonProperty
(
"
sakto
"
)
private
String
sakto
;
/**
* 成本中心
*/
@JsonProperty
(
"
KOSTL
"
)
@JsonProperty
(
"
kostl
"
)
private
String
kostl
;
/**
* 订单号
*/
@JsonProperty
(
"
AUFNR
"
)
@JsonProperty
(
"
aufnr
"
)
private
String
aufnr
;
/**
* 主资产号
*/
@JsonProperty
(
"
ANLN
1"
)
@JsonProperty
(
"
anln
1"
)
private
String
anln1
;
/**
* 子资产号
*/
@JsonProperty
(
"
ANLN
2"
)
@JsonProperty
(
"
anln
2"
)
private
String
anln2
;
/**
* 审批处理状态
*/
@JsonProperty
(
"BANPR"
)
private
String
banpr
;
//@JsonProperty("banpr")
//private String banpr;
public
void
setBillCode
(
String
billCode
)
{
this
.
billCode
=
billCode
;
...
...
@@ -278,10 +279,6 @@ public class SapPurchaseVo implements Serializable {
this
.
bsart
=
bsart
;
}
public
void
setBanfn
(
String
banfn
)
{
this
.
banfn
=
banfn
;
}
public
void
setBnfpo
(
Integer
bnfpo
)
{
this
.
bnfpo
=
bnfpo
;
}
...
...
@@ -298,18 +295,10 @@ public class SapPurchaseVo implements Serializable {
this
.
werks
=
werks
;
}
public
void
setName1
(
String
name1
)
{
this
.
name1
=
name1
;
}
public
void
setLgort
(
String
lgort
)
{
this
.
lgort
=
lgort
;
}
public
void
setLgobe
(
String
lgobe
)
{
this
.
lgobe
=
lgobe
;
}
public
void
setMatnr
(
String
matnr
)
{
this
.
matnr
=
matnr
;
}
...
...
@@ -350,34 +339,6 @@ public class SapPurchaseVo implements Serializable {
this
.
lfdat
=
lfdat
;
}
public
void
setSrvpos
(
String
srvpos
)
{
this
.
srvpos
=
srvpos
;
}
public
void
setKtext1
(
String
ktext1
)
{
this
.
ktext1
=
ktext1
;
}
public
void
setEsllMenge
(
BigDecimal
esllMenge
)
{
this
.
esllMenge
=
esllMenge
;
}
public
void
setEsllMeins
(
String
esllMeins
)
{
this
.
esllMeins
=
esllMeins
;
}
public
void
setPeinh
(
Integer
peinh
)
{
this
.
peinh
=
peinh
;
}
public
void
setBrtwr
(
BigDecimal
brtwr
)
{
this
.
brtwr
=
brtwr
;
}
public
void
setNetwr
(
BigDecimal
netwr
)
{
this
.
netwr
=
netwr
;
}
public
void
setErnam
(
String
ernam
)
{
this
.
ernam
=
ernam
;
}
...
...
@@ -386,22 +347,10 @@ public class SapPurchaseVo implements Serializable {
this
.
afnam
=
afnam
;
}
public
void
setPreis
(
BigDecimal
preis
)
{
this
.
preis
=
preis
;
}
public
void
setEbanPeinh
(
Integer
ebanPeinh
)
{
this
.
ebanPeinh
=
ebanPeinh
;
}
public
void
setWaers
(
String
waers
)
{
this
.
waers
=
waers
;
}
public
void
setEbanNetwr
(
BigDecimal
ebanNetwr
)
{
this
.
ebanNetwr
=
ebanNetwr
;
}
public
void
setZebkn
(
Integer
zebkn
)
{
this
.
zebkn
=
zebkn
;
}
...
...
@@ -414,10 +363,6 @@ public class SapPurchaseVo implements Serializable {
this
.
twrkz
=
twrkz
;
}
public
void
setEkbnMenge
(
Long
ekbnMenge
)
{
this
.
ekbnMenge
=
ekbnMenge
;
}
public
void
setSakto
(
String
sakto
)
{
this
.
sakto
=
sakto
;
}
...
...
@@ -437,8 +382,4 @@ public class SapPurchaseVo implements Serializable {
public
void
setAnln2
(
String
anln2
)
{
this
.
anln2
=
anln2
;
}
public
void
setBanpr
(
String
banpr
)
{
this
.
banpr
=
banpr
;
}
}
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