Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
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
platform
hp-smart
Commits
c4ca7466
Commit
c4ca7466
authored
Feb 23, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报屏获取公司代码优化
parent
caaee74d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
30 deletions
+19
-30
ServiceHPBI001.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI001.java
+19
-30
HPBI001.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
+0
-0
No files found.
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI001.java
View file @
c4ca7466
...
@@ -80,17 +80,17 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -80,17 +80,17 @@ public class ServiceHPBI001 extends ServiceBase {
//汇总数据
//汇总数据
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据
//每日数据
String
pro_
nam
e
=
"***"
;
String
pro_
cod
e
=
"***"
;
List
<
Map
>
mrsj
=
dao
.
query
(
"HPBI001.queryDay"
,
params
);
List
<
Map
>
mrsj
=
dao
.
query
(
"HPBI001.queryDay"
,
params
);
if
(
mrsj
!=
null
){
if
(
mrsj
!=
null
){
for
(
Map
obj:
mrsj
)
{
for
(
Map
obj:
mrsj
)
{
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
pro_
name
=
(
String
)
obj
.
get
(
"VALU
E"
);
pro_
code
=
(
String
)
obj
.
get
(
"PROJ_COD
E"
);
}
}
}
}
}
}
params
.
put
(
"pro_name"
,
pro_
nam
e
);
params
.
put
(
"pro_name"
,
pro_
cod
e
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_
nam
e
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_
cod
e
);
outInfo
=
super
.
query
(
inInfo
,
"HPBI001.querySum"
,
new
HPBI001
());
outInfo
=
super
.
query
(
inInfo
,
"HPBI001.querySum"
,
new
HPBI001
());
//生产月报
//生产月报
...
@@ -142,12 +142,9 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -142,12 +142,9 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
user_params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
List
<
Map
>
company_codes
=
super
.
dao
.
query
(
"HPBI001.queryCompanyCode"
,
user_params
);
String
company_code
=
"%"
;
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
().
trim
())){
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
();
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
@@ -201,12 +198,16 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -201,12 +198,16 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
/*
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%";
String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString();
company_code = company_codes.get(0).get("COMPANY_CODE").toString();
}*/
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
@@ -262,12 +263,9 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -262,12 +263,9 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
user_params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
List
<
Map
>
company_codes
=
super
.
dao
.
query
(
"HPBI001.queryCompanyCode"
,
user_params
);
String
company_code
=
"%"
;
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
().
trim
())){
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
();
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
@@ -321,12 +319,9 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -321,12 +319,9 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
user_params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
List
<
Map
>
company_codes
=
super
.
dao
.
query
(
"HPBI001.queryCompanyCode"
,
user_params
);
String
company_code
=
"%"
;
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
().
trim
())){
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
();
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
@@ -385,12 +380,9 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -385,12 +380,9 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
user_params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
List
<
Map
>
company_codes
=
super
.
dao
.
query
(
"HPBI001.queryCompanyCode"
,
user_params
);
String
company_code
=
"%"
;
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
().
trim
())){
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
();
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
@@ -453,12 +445,9 @@ public class ServiceHPBI001 extends ServiceBase {
...
@@ -453,12 +445,9 @@ public class ServiceHPBI001 extends ServiceBase {
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
Map
user_params
=
new
HashMap
();
user_params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
List
<
Map
>
company_codes
=
super
.
dao
.
query
(
"HPBI001.queryCompanyCode"
,
user_params
);
String
company_code
=
"%"
;
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
().
trim
())){
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
company_code
=
company_codes
.
get
(
0
).
get
(
"COMPANY_CODE"
).
toString
();
company_code
=
UserSessionUtils
.
getCompanyCode
();
}
}
//数据集入参
//数据集入参
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
...
...
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
View file @
c4ca7466
This diff is collapsed.
Click to expand it.
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