Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
636fed5a
由
张雷
编写于
2024-10-24 23:27:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
大屏组件接口开发
1 个父辈
f3d6fcf1
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
80 行增加
和
3 行删除
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/controller/FactoryCenterController.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryCenterMapper.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryCenterMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IFactoryCenterService.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/controller/FactoryCenterController.java
查看文件 @
636fed5
...
...
@@ -90,10 +90,21 @@ public class FactoryCenterController {
//厂区削减量统计
@ApiOperation
(
value
=
"厂区削减量统计"
,
notes
=
"厂区削减量统计"
)
@GetMapping
(
value
=
"/get
Sz
Xjltj"
)
@GetMapping
(
value
=
"/getXjltj"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
getSzXjltj
(
StatisticsParam
statisticsParam
)
{
Result
<
List
<
Map
<
String
,
Object
>>>
result
=
new
Result
<
List
<
Map
<
String
,
Object
>>>();
List
<
Map
<
String
,
Object
>>
list
=
factoryCenterService
.
getYhtj
(
statisticsParam
);
List
<
Map
<
String
,
Object
>>
list
=
factoryCenterService
.
getSzXjltj
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
list
);
return
result
;
}
//厂区削减量统计
@ApiOperation
(
value
=
"厂区设备统计"
,
notes
=
"厂区设备统计"
)
@GetMapping
(
value
=
"/getEquiptj"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
getEquiptj
(
StatisticsParam
statisticsParam
)
{
Result
<
List
<
Map
<
String
,
Object
>>>
result
=
new
Result
<
List
<
Map
<
String
,
Object
>>>();
List
<
Map
<
String
,
Object
>>
list
=
factoryCenterService
.
getEquiptj
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
list
);
return
result
;
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryCenterMapper.java
查看文件 @
636fed5
...
...
@@ -31,4 +31,9 @@ public interface FactoryCenterMapper {
@Param
(
"startDateTb"
)
String
startDateTb
,
@Param
(
"endDateTb"
)
String
endDateTb
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"view3a24"
)
String
view3a24
,
@Param
(
"view3a24tb"
)
String
view3a24tb
);
List
<
Map
<
String
,
Object
>>
getSzXjltj
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"view2119"
)
String
view2119
);
List
<
Map
<
String
,
Object
>>
getEquiptj
(
@Param
(
"departId"
)
String
departId
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryCenterMapper.xml
查看文件 @
636fed5
...
...
@@ -252,5 +252,45 @@
GROUP BY
LEFT ( v.time, 7 )
</select>
<select
id=
"getSzXjltj"
resultType=
"java.util.HashMap"
>
SELECT
LEFT(v2.time,7) time,
ROUND(SUM(IFNULL(JSCOD,0)) - SUM(IFNULL(CSCOD,0)),2) AS COD,
ROUND(SUM(IFNULL(JSAD,0)) - SUM(IFNULL(CSAD,0)),2) AS NH3N,
ROUND(SUM(IFNULL(JSZD,0)) - SUM(IFNULL(CSTN,0)),2) AS TN,
ROUND(SUM(IFNULL(JSZL,0)) - SUM(IFNULL(CSZL,0)),2) AS TP
FROM
${view2119tb} v2
WHERE
v2.time
>
= #{startDate}
AND v2.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v2.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
GROUP BY LEFT(v2.time,7)
</select>
<select
id=
"getEquiptj"
resultType=
"java.util.HashMap"
>
SELECT
d.id departId,
d.depart_name departName,
IFNULL( t.num, 0 ) total,
IFNULL( y.num, 0 ) one,
IFNULL( r.num, 0 ) two
FROM
sys_depart d
LEFT JOIN ( SELECT depart_id, count( id ) num FROM equipment_info GROUP BY depart_id ) t ON d.id = t.depart_id
LEFT JOIN ( SELECT depart_id, count( id ) num FROM equipment_info WHERE energy_level = 1 GROUP BY depart_id ) y ON d.id = y.depart_id
LEFT JOIN ( SELECT depart_id, count( id ) num FROM equipment_info WHERE energy_level = 2 GROUP BY depart_id ) r ON d.id = r.depart_id
WHERE
d.depart_type = 1
<if
test=
"departId!=null and departId!=''"
>
AND d.id IN
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
</select>
</mapper>
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IFactoryCenterService.java
查看文件 @
636fed5
...
...
@@ -28,5 +28,9 @@ public interface IFactoryCenterService {
Map
<
String
,
Object
>
getMonitorThreshold
(
String
departId
);
Map
<
String
,
Object
>
getHourWaterData
(
StatisticsParam
statisticsParam
);
List
<
Map
<
String
,
Object
>>
getSzXjltj
(
StatisticsParam
statisticsParam
);
List
<
Map
<
String
,
Object
>>
getEquiptj
(
StatisticsParam
statisticsParam
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
查看文件 @
636fed5
...
...
@@ -531,6 +531,23 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
return
map
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSzXjltj
(
StatisticsParam
statisticsParam
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
String
startDate
=
statisticsParam
.
getStartDate
();
String
endDate
=
statisticsParam
.
getEndDate
();
String
dataView2119
=
ReportViewUtil
.
buildView
(
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
list
=
factoryCenterMapper
.
getSzXjltj
(
startDate
,
endDate
,
statisticsParam
.
getDepartId
(),
dataView2119
);
return
list
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
getEquiptj
(
StatisticsParam
statisticsParam
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
=
factoryCenterMapper
.
getEquiptj
(
statisticsParam
.
getDepartId
());
return
list
;
}
/**
* 获取时间之间的月份
* @param start
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论