Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
c223e47e
由
张雷
编写于
2024-11-05 11:48:01 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master' into master
2 个父辈
0d8961ee
f470c6e2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
7 行删除
sk-module-biz/src/main/java/com/skua/modules/algorithm/controller/SysCommandCentreController.java
sk-module-biz/src/main/java/com/skua/modules/algorithm/service/impl/CommandCentreServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/algorithm/service/impl/ReportItemvService.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/DrugConsumptionAnalysisController.java
sk-module-biz/src/main/java/com/skua/modules/algorithm/controller/SysCommandCentreController.java
查看文件 @
c223e47
...
...
@@ -114,6 +114,7 @@ public class SysCommandCentreController {
return
result
;
}
//cement水泥 electricity
@AutoLog
(
value
=
"指挥中心-泥量统计"
)
@ApiOperation
(
value
=
"指挥中心-泥量统计"
,
notes
=
"指挥中心-泥量统计"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/algorithm/service/impl/CommandCentreServiceImpl.java
查看文件 @
c223e47
...
...
@@ -14,6 +14,7 @@ import com.skua.modules.report.mapper.FReportItemMapper;
import
com.skua.modules.report.vo.*
;
import
com.skua.modules.report.mapper.FReportItemvMapper
;
import
com.skua.tool.util.DateUtils
;
import
com.skua.tool.util.JSUtils
;
import
org.springframework.jdbc.core.BeanPropertyRowMapper
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -201,7 +202,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
for
(
WaterTreatmentVO
waterTreatmentVO
:
dateList
){
waterTreatmentVO
.
setRank
(
index
++);
//设置排名
if
(
waterTreatmentVO
.
getCSL
()
!=
null
){
waterTreatmentVO
.
setDayCsl
(
waterTreatmentVO
.
getCSL
()
/
differenceDay
);
waterTreatmentVO
.
setDayCsl
(
Double
.
parseDouble
(
JSUtils
.
divide
(
waterTreatmentVO
.
getCSL
()
,
differenceDay
))
);
}
/* waterTreatmentVO.setRank( index++);//设置排名
if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){
...
...
@@ -209,10 +210,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
waterTreatmentVO.setDayCsl( waterTreatmentVO.getCsl() / differenceDay );
}*/
if
(
hbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
())
!=
null
){
waterTreatmentVO
.
setHbcsl
(
Double
.
parseDouble
(
hbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
())
)
);
waterTreatmentVO
.
setHbcsl
(
Double
.
parseDouble
(
JSUtils
.
format
(
hbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
()))
)
);
}
if
(
tbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
())
!=
null
){
waterTreatmentVO
.
setTbcsl
(
Double
.
parseDouble
(
tbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
())
)
);
waterTreatmentVO
.
setTbcsl
(
Double
.
parseDouble
(
JSUtils
.
format
(
tbCslMap
.
get
(
waterTreatmentVO
.
getDepartId
()))
)
);
}
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/algorithm/service/impl/ReportItemvService.java
查看文件 @
c223e47
...
...
@@ -313,6 +313,8 @@ public class ReportItemvService {
}
private
String
getStatisticsByLoadRate
(
String
dataViewName2119
,
Integer
loadRateType
){
String
sql
=
"select count(1) from ( "
;
sql
+=
" select aaa.depart_id , round( (sum(aaa.CSL)/(fi.pro_scale*10000) ),2) 'loadRate' from "
+
dataViewName2119
+
" aaa"
;
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/DrugConsumptionAnalysisController.java
查看文件 @
c223e47
...
...
@@ -9,6 +9,7 @@ import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -67,8 +68,8 @@ public class DrugConsumptionAnalysisController {
@GetMapping
(
"/correlation/analysisType"
)
public
Result
<
List
<
DrugConsumptionDisplayVO
>>
analysisType
()
{
Result
<
List
<
DrugConsumptionDisplayVO
>>
result
=
new
Result
<>();
List
<
DrugConsumptionDisplayVO
>
data
=
drugConsumptionAnalysisService
.
analysisType
();
result
.
setResult
(
data
);
List
<
DrugConsumptionDisplayVO
>
data
List
=
drugConsumptionAnalysisService
.
analysisType
();
result
.
setResult
(
data
List
);
return
result
;
}
@AutoLog
(
value
=
"相关性分析"
)
...
...
@@ -76,8 +77,18 @@ public class DrugConsumptionAnalysisController {
@GetMapping
(
"/correlation/analysis"
)
public
Result
<
List
<
CorrelationAnalysisVO
>>
correlationAnalysis
(
String
time
,
String
drugCode
,
String
departId
)
{
Result
<
List
<
CorrelationAnalysisVO
>>
result
=
new
Result
<>();
List
<
CorrelationAnalysisVO
>
data
=
drugConsumptionAnalysisService
.
correlationAnalysis
(
time
,
drugCode
,
departId
);
result
.
setResult
(
data
);
if
(
StringUtils
.
isEmpty
(
drugCode
)){
List
<
DrugConsumptionDisplayVO
>
dataList
=
drugConsumptionAnalysisService
.
analysisType
();
if
(
dataList
!=
null
&&
!
dataList
.
isEmpty
()
){
drugCode
=
dataList
.
get
(
0
).
getDrugCode
();
}
}
if
(
StringUtils
.
isEmpty
(
drugCode
)){
result
.
error500
(
"参数不识别"
);
}
else
{
List
<
CorrelationAnalysisVO
>
list
=
drugConsumptionAnalysisService
.
correlationAnalysis
(
time
,
drugCode
,
departId
);
result
.
setResult
(
list
);
}
return
result
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论