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
50404c5a
Commit
50404c5a
authored
Feb 26, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计指标接口
parent
00498be4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
28 deletions
+41
-28
statsIndicators.js
.../webapp/biz/topsun/sap/statsIndicators/statsIndicators.js
+19
-15
statsIndicators.jsp
...webapp/biz/topsun/sap/statsIndicators/statsIndicators.jsp
+1
-1
statsIndicatorsList.js
...app/biz/topsun/sap/statsIndicators/statsIndicatorsList.js
+2
-2
SapDictionaryApplicationImpl.java
...ionary/application/impl/SapDictionaryApplicationImpl.java
+1
-1
SapStatsIndicatorsApplicationImpl.java
...s/application/impl/SapStatsIndicatorsApplicationImpl.java
+14
-5
SapStatsIndicatorsDetail.java
.../sap/statsIndicators/domain/SapStatsIndicatorsDetail.java
+4
-4
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/statsIndicators/statsIndicators.js
View file @
50404c5a
...
...
@@ -14,7 +14,7 @@ function initialize(){
function
loadStatsIndicatorsDetailListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
,{
zlenr
:
g
etZlenr
()
});
UICtrl
.
addGridRow
(
gridManager
,{
zlenr
:
g
ridManager
.
getData
().
length
+
1
});
},
deleteHandler
:
function
()
{
gridManager
.
deleteSelectedRow
();
...
...
@@ -24,45 +24,49 @@ function loadStatsIndicatorsDetailListGrid() {
columns
:
[
{
display
:
"行号"
,
name
:
"zlenr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'spinner'
,
min
:
1
,
max
:
100
,
mask
:
'nnn'
}
//
editor: { type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
display
:
"成本中心"
,
name
:
"
e
kostl"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
fals
e
,
type
:
"select"
,
required
:
tru
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"queryCostCenter"
,
back
:
{
kostl
:
"
e
kostl"
,
kostl
:
"kostl"
,
// ktext:"ekostlTextView",
null
:
"
e
aufnr"
null
:
"aufnr"
}
},
}
},
{
display
:
"订单"
,
name
:
"
e
aufnr"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"订单"
,
name
:
"aufnr"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"
selec
t"
,
data
:
{
required
:
false
,
type
:
"
tex
t"
,
/*
data: {
type: 'system',
name: "sapMaterialSelect",
back: {
null
:
"
e
kostl"
,
materialId
:
"
e
aufnr"
null:"kostl",
materialId:"aufnr"
}
},
},
*/
}
},
{
display
:
"统计指标"
,
name
:
"stagr"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
/*
editor: {
required: true,
type: 'dictionary',
data: {name:'sex'} ,
textField:'stagrTextView',
valueField:'sex'
}*/
editor
:
{
required
:
true
,
type
:
'text'
}
},
{
...
...
@@ -149,11 +153,11 @@ function getExtendedData(processAction) {
//获取最新子序号(维护实体的标识)
function
getZlenr
(){
let
result
=
gridManager
.
getData
();
let
zlenr
=
"
00
1"
;
let
zlenr
=
"1"
;
if
(
result
.
length
>
0
){
//获取上一个节点的子序值
let
wornNo
=
parseInt
(
result
[
result
.
length
-
1
][
"zlenr"
],
10
);
zlenr
=
(
"00"
+
(
wornNo
+
1
)).
slice
(
-
3
);
zlenr
=
((
wornNo
+
1
)).
slice
(
-
3
);
}
return
zlenr
;
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/statsIndicators/statsIndicators.jsp
View file @
50404c5a
...
...
@@ -34,7 +34,7 @@
wrapper=
"date"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"bltxt"
required=
"
fals
e"
label=
"凭证文本"
labelCol=
"2"
fieldCol=
"6"
/>
<x:inputC
name=
"bltxt"
required=
"
tru
e"
label=
"凭证文本"
labelCol=
"2"
fieldCol=
"6"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/statsIndicators/statsIndicatorsList.js
View file @
50404c5a
...
...
@@ -28,14 +28,14 @@ function loadStatsIndicatorsListGrid() {
{
display
:
"NUMBER"
,
name
:
"number"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"MESSAGE"
,
name
:
"message"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"LOG_NO"
,
name
:
"logNo"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"LOG_MSG_NO"
,
name
:
"logMsgNo"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
/*
{display: "LOG_MSG_NO", name: "logMsgNo", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "MESSAGE_V1", name: "messageV1", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "MESSAGE_V2", name: "messageV2", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "MESSAGE_V3", name: "messageV3", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "MESSAGE_V4", name: "messageV4", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "ROW", name: "row", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "FIELD", name: "field", width: 140, minWidth: 60, type: "string", align: "left"},
{
display
:
"SYSTEM"
,
name
:
"system"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{display: "SYSTEM", name: "system", width: 140, minWidth: 60, type: "string", align: "left"},
*/
{
display
:
"BELNR"
,
name
:
"belnr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
...
...
topsun/src/main/java/com/huigou/topsun/sap/dictionary/application/impl/SapDictionaryApplicationImpl.java
View file @
50404c5a
...
...
@@ -33,7 +33,7 @@ public class SapDictionaryApplicationImpl implements SapDictionaryApplication {
try
{
execute
=
httpClient
.
execute
(
map
,
url
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
String
.
format
(
"查询“%s数据字典出错”。"
,
fieldName
));
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/statsIndicators/application/impl/SapStatsIndicatorsApplicationImpl.java
View file @
50404c5a
...
...
@@ -41,6 +41,7 @@ import java.beans.IntrospectionException;
import
java.beans.Introspector
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -187,24 +188,32 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
}
List
<
SapStatsIndicatorsDetail
>
all
=
sapStatsIndicatorsDetailRepository
.
findAllByStatsIndicatorsId
(
bizId
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicators
,
true
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
if
(
sapStatsIndicators
.
getBldat
()
!=
null
){
String
bldat
=
dateFormat
.
format
(
sapStatsIndicators
.
getBldat
());
map
.
put
(
"BLDAT"
,
bldat
);
}
if
(
sapStatsIndicators
.
getBudat
()
!=
null
){
String
budat
=
dateFormat
.
format
(
sapStatsIndicators
.
getBudat
());
map
.
put
(
"BUDAT"
,
budat
);
}
//封装参数
for
(
SapStatsIndicatorsDetail
sapStatsIndicatorsDetail
:
all
)
{
Map
<
String
,
Object
>
detailMap
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicatorsDetail
,
true
);
map
.
put
(
"ITEM"
,
detailMap
);
list
.
add
(
map
);
list
.
add
(
detailMap
);
}
map
.
put
(
"ITEM"
,
list
);
String
url
=
"cud_kb31n/kb31n"
;
SapStatsIndicatorsResult
sapStatsIndicatorsResult
=
new
SapStatsIndicatorsResult
();
try
{
String
result
=
defaultHttpClient
.
execute
(
list
,
url
);
String
result
=
defaultHttpClient
.
execute
(
map
,
url
);
List
<
SapStatsIndicatorsResult
>
resultList
=
JSONObject
.
parseArray
(
result
,
SapStatsIndicatorsResult
.
class
);
//List<SapStatsIndicatorsResult> resultList = objectMapper.readValue(result, new TypeReference<List<SapStatsIndicatorsResult>>() {});
sapStatsIndicatorsResult
=
resultList
.
get
(
0
);
if
(!
"
s
"
.
equals
(
sapStatsIndicatorsResult
.
getTYPE
()))
{
if
(!
"
S
"
.
equals
(
sapStatsIndicatorsResult
.
getTYPE
()))
{
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
);
}
}
catch
(
IOException
e
)
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/statsIndicators/domain/SapStatsIndicatorsDetail.java
View file @
50404c5a
...
...
@@ -50,14 +50,14 @@ public class SapStatsIndicatorsDetail {
/**
* 成本中心
*/
@Column
(
name
=
"
E
KOSTL"
)
private
String
e
kostl
;
@Column
(
name
=
"KOSTL"
)
private
String
kostl
;
/**
* 订单
*/
@Column
(
name
=
"
E
AUFNR"
)
private
String
e
aufnr
;
@Column
(
name
=
"AUFNR"
)
private
String
aufnr
;
/**
* 统计指标
...
...
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