Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
7e31164f
由
张雷
编写于
2024-12-31 15:46:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
公式功能迁移
1 个父辈
a747d5d8
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
14 行删除
sk-module-biz/src/main/java/com/skua/modules/algorithm/controller/SysCommandCentreController.java → sk-module-biz/src/main/java/com/skua/modules/dataAnalysis/controller/SysCommandCentreController.java
sk-module-biz/src/main/java/com/skua/modules/
algorithm
/controller/SysCommandCentreController.java
→
sk-module-biz/src/main/java/com/skua/modules/
dataAnalysis
/controller/SysCommandCentreController.java
查看文件 @
7e31164
package
com
.
skua
.
modules
.
algorithm
.
controller
;
package
com
.
skua
.
modules
.
dataAnalysis
.
controller
;
import
com.skua.common.constant.ReportConstant
;
import
com.skua.common.report.ReportViewUtil
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.context.SpringContextUtils
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.
algorithm
.service.ICommandCentreService
;
import
com.skua.modules.
dataAnalysis
.service.ICommandCentreService
;
import
com.skua.modules.algorithm.service.impl.ReportItemvService
;
import
com.skua.modules.algorithm.vo.*
;
import
com.skua.modules.algorithm.vo.DepartLoadRateResultVO
;
import
com.skua.modules.algorithm.vo.ReportItemVO
;
import
com.skua.modules.algorithm.vo.StackedAreaChartDataVO
;
import
com.skua.modules.algorithm.vo.WaterTreatmentVO
;
import
com.skua.modules.common.vo.DateVO
;
import
com.skua.modules.guest.util.DateUtil
;
import
com.skua.modules.report.entity.FReportItemv
;
import
com.skua.modules.report.vo.*
;
import
com.skua.modules.system.service.ISysConfigService
;
import
com.skua.modules.report.vo.DepartDrugResult
;
import
com.skua.modules.report.vo.FRportlCommandCenterVO
;
import
com.skua.modules.report.vo.ReportDateTrendVO
;
import
com.skua.modules.report.vo.ReportItemvParam
;
import
com.skua.modules.system.service.ISysFactoryInfoService
;
import
com.skua.tool.util.DateUtils
;
import
com.skua.tool.util.DigitalUtils
;
import
com.skua.tool.util.JSUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.time.LocalDate
;
import
java.time.YearMonth
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 统计功能配置表
...
...
@@ -42,6 +44,7 @@ import java.util.*;
@RestController
@RequestMapping
(
"/v1/algorithm/commandCentre"
)
public
class
SysCommandCentreController
{
@Autowired
private
ISysFactoryInfoService
factoryInfoService
;
@Autowired
...
...
@@ -56,7 +59,7 @@ public class SysCommandCentreController {
@AutoLog
(
value
=
"指挥中心-水量查询"
)
@ApiOperation
(
value
=
"指挥中心-水量查询"
,
notes
=
"指挥中心-水量查询"
)
@GetMapping
(
value
=
"/statisticsByWaterData"
)
public
Result
<
List
<
FRportlCommandCenterVO
>>
statisticsByWaterData
(
ReportItemvParam
reportItemvParam
)
throws
Exception
{
public
Result
<
List
<
FRportlCommandCenterVO
>>
statisticsByWaterData
(
ReportItemvParam
reportItemvParam
)
throws
Exception
{
Result
<
List
<
FRportlCommandCenterVO
>
>
result
=
new
Result
<>();
List
<
FRportlCommandCenterVO
>
fReportItemvList
=
new
ArrayList
<>();
//返回集合对象
DateVO
dateVO
=
new
DateVO
(
reportItemvParam
.
getStartDate
());
...
...
@@ -70,7 +73,7 @@ public class SysCommandCentreController {
long
nowDifferDay
=
DateUtils
.
differenceDay
(
dateVO
.
getNowMonthStartDate
(),
dateVO
.
getNowMonthEndDate
());
long
lastMonthDifferDay
=
DateUtils
.
differenceDay
(
dateVO
.
getLastMonthStartTime
(),
dateVO
.
getLastMonthEndTime
());
long
lastYearDifferDay
=
DateUtils
.
differenceDay
(
dateVO
.
getLastYearMonthStartTime
(),
dateVO
.
getLastYearMonthEndTime
());
//月对象数据
String value, String valueTb, String
valueHb
//月对象数据
value, valueTb,
valueHb
FRportlCommandCenterVO
monthDataVO
=
new
FRportlCommandCenterVO
(
"月汇总数据"
,
JSUtils
.
divide
(
monthCSL
,
10000
),
JSUtils
.
divide
(
lastMonthCSL
,
10000
),
JSUtils
.
divide
(
lastYearCSL
,
10000
));
//日处理对象
FRportlCommandCenterVO
avgDayDataVO
=
new
FRportlCommandCenterVO
(
"日均处理水量"
,
JSUtils
.
divide
(
monthCSL
,
nowDifferDay
*
10000
),
JSUtils
.
divide
(
lastMonthCSL
,
lastMonthDifferDay
*
10000
),
JSUtils
.
divide
(
lastYearCSL
,
lastYearDifferDay
*
10000
));
...
...
@@ -80,7 +83,6 @@ public class SysCommandCentreController {
//年数据统计:
String
total
=
factoryInfoService
.
querySumProScale
();
total
=
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
total
));
// total = DigitalUtils.multiply(total,"10000");
fReportItemvList
.
add
(
new
FRportlCommandCenterVO
(
total
,
"0"
,
"0"
));
result
.
setSuccess
(
true
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论