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
661921db
Commit
661921db
authored
Feb 22, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产日报页面优化
parent
4eada0c5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
31 deletions
+52
-31
HPBI001.java
src/main/java/com/baosight/hpjx/hp/bi/domain/HPBI001.java
+4
-4
ServiceHPBI001.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI001.java
+25
-5
HPBI001.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
+0
-0
HPBI001.js
src/main/webapp/HP/BI/HPBI001.js
+21
-9
HPBI001.jsp
src/main/webapp/HP/BI/HPBI001.jsp
+2
-13
No files found.
src/main/java/com/baosight/hpjx/hp/bi/domain/HPBI001.java
View file @
661921db
...
...
@@ -62,7 +62,7 @@ public class HPBI001 extends DaoEPBase {
private
String
yearValue
=
" "
;
/* 供应商编码*/
private
String
janValue
=
" "
;
/* 供应商名称*/
private
String
febValue
=
" "
;
/* 地址*/
private
Integer
marValue
=
1
;
/* 状态 0禁用 1启用*/
private
String
marValue
=
" "
;
/* 状态 0禁用 1启用*/
private
String
aprValue
=
" "
;
/* 创建人*/
private
String
mayValue
=
" "
;
/* 创建人名称*/
private
String
junValue
=
" "
;
/* 创建时间*/
...
...
@@ -252,7 +252,7 @@ public class HPBI001 extends DaoEPBase {
* get the marValue - 状态 0禁用 1启用.
* @return the marValue
*/
public
Integer
getmarValue
()
{
public
String
getmarValue
()
{
return
this
.
marValue
;
}
...
...
@@ -261,7 +261,7 @@ public class HPBI001 extends DaoEPBase {
*
* @param marValue - 状态 0禁用 1启用
*/
public
void
setmarValue
(
Integer
marValue
)
{
public
void
setmarValue
(
String
marValue
)
{
this
.
marValue
=
marValue
;
}
/**
...
...
@@ -427,7 +427,7 @@ public class HPBI001 extends DaoEPBase {
setyearValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
YEARVALUE
)),
yearValue
));
setjanValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
JANVALUE
)),
janValue
));
setfebValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FEBVALUE
)),
febValue
));
setmarValue
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
MARVLAUE
)),
marValue
));
setmarValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
MARVLAUE
)),
marValue
));
setaprValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
APRVALUE
)),
aprValue
));
setmayValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
MAYVALUE
)),
mayValue
));
setjunValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
JUNVALUE
)),
junValue
));
...
...
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI001.java
View file @
661921db
...
...
@@ -8,6 +8,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.InventTypeEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.bi.domain.HPBI001
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
...
...
@@ -70,16 +71,34 @@ public class ServiceHPBI001 extends ServiceBase {
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"factory"
,
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
0
,
"factory"
));
params
.
put
(
"date"
,
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
0
,
"date"
));
params
.
put
(
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
params
.
put
(
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
params
.
put
(
"company_code"
,
UserSessionUtils
.
getCompanyCode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"company_code"
,
UserSessionUtils
.
getCompanyCode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
//汇总数据
outInfo
=
super
.
query
(
inInfo
,
"HPBI001.querySum"
,
new
HPBI001
());
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据
List
mrsj
=
super
.
dao
.
query
(
"HPBI001.queryDay"
,
params
);
String
pro_name
=
"***"
;
List
<
Map
>
mrsj
=
dao
.
query
(
"HPBI001.queryDay"
,
params
);
if
(
mrsj
!=
null
){
for
(
Map
obj:
mrsj
)
{
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
pro_name
=
(
String
)
obj
.
get
(
"VALUE"
);
}
}
}
params
.
put
(
"pro_name"
,
pro_name
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_name
);
outInfo
=
super
.
query
(
inInfo
,
"HPBI001.querySum"
,
new
HPBI001
());
//生产月报
List
scyb
=
super
.
dao
.
query
(
"HPBI001.queryMon"
,
params
);
List
scyb
=
dao
.
query
(
"HPBI001.queryMon"
,
params
);
outInfo
.
set
(
"mrsj"
,
mrsj
);
outInfo
.
set
(
"scyb"
,
scyb
);
// }
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -96,6 +115,7 @@ public class ServiceHPBI001 extends ServiceBase {
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
//params.put("loginName", "QY000019");
//汇总数据
...
...
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI001.xml
View file @
661921db
This diff is collapsed.
Click to expand it.
src/main/webapp/HP/BI/HPBI001.js
View file @
661921db
$
(
function
()
{
var
myChart
=
''
;
$
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
"#inqu_status-0-date"
).
data
(
"kendoDatePicker"
).
value
(
new
Date
());
});
//$("#inqu_status-date").data("kendoDatePicker").value(new Date());
//$(element) .data("kendoDatePicker").value(Date)
$
(
"#QUERY"
).
click
();
//
$("#QUERY").click();
/* $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
buildOption("scrb");
...
...
@@ -12,12 +13,15 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
//resultGrid.dataSource.page(1);
var
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"date"
,
$
(
"#inqu_status-0-date"
).
val
());
inInfo
.
set
(
"factory"
,
$
(
"#inqu_status-0-factory"
).
val
());
EiCommunicator
.
send
(
"HPBI001"
,
"query"
,
inInfo
,
{
// 服务调用成功后的回调函数 onSuccess
onSuccess
:
function
(
response
){
$
(
'#mrsj'
).
empty
();
var
mrsj
=
response
.
get
(
'mrsj'
);
var
scyb
=
response
.
get
(
'scyb'
);
if
(
mrsj
.
length
>
0
){
$
.
each
(
mrsj
,
function
(
index
,
item
)
{
str
=
'<tr>'
+
...
...
@@ -26,8 +30,15 @@ $(function () {
'</tr>'
;
$
(
'#mrsj'
).
append
(
str
);
})
buildOption
(
"scrb"
,
scyb
);
resultGrid
.
dataSource
.
page
(
1
);
}
if
(
scyb
.
length
>
0
)
{
buildOption
(
"scrb"
,
scyb
);
}
else
{
if
(
myChart
!=
null
&&
myChart
.
dispose
)
{
myChart
.
dispose
();
}
}
resultGrid
.
setEiInfo
(
response
);
},
// 服务调用失败后的回调函数 onFail
onFail
:
function
(
errorMsg
,
status
,
e
)
{
...
...
@@ -76,14 +87,15 @@ function buildOption(vid,data){
$
.
each
(
data
,
function
(
index
,
item
)
{
if
(
item
.
INDCODE
==
'sccl'
){
x_data
.
push
(
item
.
X
);
y_data1
.
push
(
item
.
VA
UL
E
);
y_data1
.
push
(
item
.
VA
LU
E
);
}
else
if
(
item
.
INDCODE
==
'scrs'
){
y_data2
.
push
(
item
.
VA
UL
E
);
y_data2
.
push
(
item
.
VA
LU
E
);
}
else
if
(
item
.
INDCODE
==
'rjcl'
){
y_data3
.
push
(
item
.
VA
UL
E
);
y_data3
.
push
(
item
.
VA
LU
E
);
}
})
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
vid
));
myChart
=
echarts
.
init
(
document
.
getElementById
(
vid
));
var
colors
=
[
'#5470C6'
,
'#91CC75'
,
'#EE6666'
];
var
option
=
{
title
:
{
...
...
@@ -145,5 +157,5 @@ function buildOption(vid,data){
}
]
};
myChart
.
setOption
(
option
,
tru
e
);
myChart
.
setOption
(
option
,
fals
e
);
}
src/main/webapp/HP/BI/HPBI001.jsp
View file @
661921db
...
...
@@ -13,23 +13,12 @@
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<
%
--
<
EF:EFSelect
cname=
"工厂"
defaultValue=
"0"
ename=
"inqu_status-0-factory"
colWidth=
"3"
>
<EF:EFOption
label=
"黄陂"
value=
"黄陂"
/>
<EF:EFOption
label=
"红安"
value=
"红安"
/>
</EF:EFSelect>
--%>
<EF:EFSelect
cname=
"工厂"
ename=
"inqu_status-0-factory"
colWidth=
"3"
filter=
"contains"
>
<
%
--
<
EF:EFOption
label=
"全部"
value=
""
/>
--%>
<EF:EFSelect
cname=
"工厂"
ename=
"factory"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<
%
--
<
EF:EFSelect
cname=
"仓库名称"
ename=
"inqu_status-0-whCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
--%>
<EF:EFDatePicker
ename=
"inqu_status-0-date"
colWidth=
"3"
cname=
"日期:"
<EF:EFDatePicker
ename=
"date"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
cname=
"日期:"
format=
"yyyy-MM-dd"
/>
</div>
<
%
--
<
EF:EFButton
ename=
"QUERY"
cname=
"查询"
row=
"1"
class=
"btn-align-right"
></EF:EFButton>
--%>
</EF:EFRegion>
<EF:EFRegion
id=
"result1"
title=
"每日数据"
>
...
...
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