Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
c6392105
由
康伟
编写于
2025-02-24 17:40:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei:MTTR&MTBF 详情页面bug
1 个父辈
bba284f8
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
15 行删除
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/ProductionEquipmentMapper.xml
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IProductionEquipmentService.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/ContrastDetailVO.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
查看文件 @
c639210
...
...
@@ -48,8 +48,9 @@ public class OperationReportServiceImpl implements IOperationReportService {
ProductDataVO
productDataVO
=
new
ProductDataVO
();
//返回结果
int
lastYear
=
year
-
1
;
//去年
productDataVO
.
setLastYear
(
lastYear
);
productDataVO
.
setYear
(
year
);
SeasonTimeVO
seasonTimeVO
=
new
SeasonTimeVO
(
year
,
season
);
SeasonTimeVO
lastSeasonTimeVO
=
new
SeasonTimeVO
(
lastYear
,
season
);
//
SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season );
productDataVO
.
setSeansonEndDay
(
seasonTimeVO
.
getEndTime
());
//季度最后一天
productDataVO
.
setStartTime
(
seasonTimeVO
.
getStartTime
());
//季度开始时间
productDataVO
.
setEndTime
(
seasonTimeVO
.
getEndTime
());
//季度结束时间
...
...
@@ -63,7 +64,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
productDataVO
.
setSequentialProgress
(
"基本满足时序进度"
);
// ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量
String
dataViewName4411
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view4411
,
"ysfsl,ysjsl,yyf"
,
departId
,
seasonTimeVO
.
getStartTime
(),
seasonTimeVO
.
getEndTime
());
sql
=
"select
sum(aaa.ysfsl) 'ysfsl' , sum(aaa.yyf) 'yyf' ,sum(aaa.ysjsl
) 'ysjsl' from "
+
dataViewName4411
+
" aaa"
;
sql
=
"select
round(sum(aaa.ysfsl),2) 'ysfsl' , round(sum(aaa.yyf),2) 'yyf' ,round(sum(aaa.ysjsl),2
) 'ysjsl' from "
+
dataViewName4411
+
" aaa"
;
String
ysfsl
=
null
;
//月收费水量 ;
String
ysjsl
=
null
;
//月实际水量;
Map
<
String
,
Object
>
dataMap
=
getJdbcTemplate
().
queryForMap
(
sql
);
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/ProductionEquipmentMapper.xml
查看文件 @
c639210
...
...
@@ -669,11 +669,11 @@
SELECT eor.factory_id ,IFNULL( SUM( SUBSTRING( run_time, 1, 2 ) ), 0 ) / 24 AS runTime
FROM equipment_operation_record eor
WHERE 1=1
<if
test=
"start
Date != null and startDat
e != ''"
>
and eor.create_time
>
= #{start
Dat
e}
<if
test=
"start
Time != null and startTim
e != ''"
>
and eor.create_time
>
= #{start
Tim
e}
</if>
<if
test=
"end
Date != null and endDat
e != ''"
>
and eor.create_time
<
= #{end
Dat
e}
<if
test=
"end
Time != null and endTim
e != ''"
>
and eor.create_time
<
= #{end
Tim
e}
</if>
group by eor.factory_id
)aaa on aaa.factory_id = d.id
...
...
@@ -682,17 +682,16 @@
SELECT er.depart_id,COUNT( DISTINCT info_id ) AS equips,COUNT( er.id ) AS failures, round( IFNULL(SUM( UNIX_TIMESTAMP( er.reality_maintenance_end_time )- UNIX_TIMESTAMP( er.repair_date ) ),0)/60/60/24 ,2) AS downtime
FROM equipment_repair er
WHERE er.del_flag = 1
<if
test=
"start
Date != null and startDat
e != ''"
>
and er.create_time
>
= #{start
Dat
e}
<if
test=
"start
Time != null and startTim
e != ''"
>
and er.create_time
>
= #{start
Tim
e}
</if>
<if
test=
"end
Date != null and endDat
e != ''"
>
and er.create_time
<
= #{end
Dat
e}
<if
test=
"end
Time != null and endTim
e != ''"
>
and er.create_time
<
= #{end
Tim
e}
</if>
AND
)bbb on bbb.depart_id = d.id
where d.depart_type = 1
<if
test=
"departIds != null "
>
and d.depart_
id in(${departIds})
and d.
id in(${departIds})
</if>
</select>
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IProductionEquipmentService.java
查看文件 @
c639210
...
...
@@ -51,7 +51,7 @@ public interface IProductionEquipmentService {
// MF 详情
List
<
Map
>
getEquipmentMFDetails
(
ReportStatisticsDTO
reportStatisticsDTO
);
public
List
<
ContrastDetailVO
>
getEquipmentMFDetailsNew
(
String
departIds
,
String
startTime
,
String
endTime
);
List
<
ContrastDetailVO
>
getEquipmentMFDetailsNew
(
String
departIds
,
String
startTime
,
String
endTime
);
//维护完成率趋势
List
<
ContrastVO
>
getMaintainCompleteRate
(
ReportStatisticsDTO
reportStatisticsDTO
);
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/ContrastDetailVO.java
查看文件 @
c639210
...
...
@@ -47,7 +47,7 @@ public class ContrastDetailVO {
public
Double
getRepairNum
()
{
repairNum
=
0.00d
;
if
(
StringUtils
.
isNotEmpty
(
failures
)
&&
StringUtils
.
isNotEmpty
(
equips
)
&&
!
failures
.
equals
(
"0"
)
&&
!
equips
.
equals
(
"0"
))
{
if
(
StringUtils
.
isNotEmpty
(
runTime
)
&&
StringUtils
.
isNotEmpty
(
failures
)
&&
StringUtils
.
isNotEmpty
(
equips
)
&&
!
failures
.
equals
(
"0"
)
&&
!
equips
.
equals
(
"0"
))
{
repairNum
=
Double
.
parseDouble
(
runTime
)
/
Integer
.
parseInt
(
failures
)
/
Integer
.
parseInt
(
equips
);
repairNum
=
DoubleOperaUtils
.
bigDecimalRound
(
repairNum
,
2
);
}
...
...
@@ -56,7 +56,7 @@ public class ContrastDetailVO {
public
Double
getMaintainNum
()
{
maintainNum
=
0.00d
;
if
(
StringUtils
.
isNotEmpty
(
increase
)
&&
!
increase
.
equals
(
"0"
))
{
if
(
StringUtils
.
isNotEmpty
(
downtime
)
&&
StringUtils
.
isNotEmpty
(
increase
)
&&
!
increase
.
equals
(
"0"
))
{
maintainNum
=
Double
.
parseDouble
(
downtime
)
/
Integer
.
parseInt
(
increase
);
maintainNum
=
DoubleOperaUtils
.
bigDecimalRound
(
maintainNum
,
2
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论