Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
67e69cf8
由
康伟
编写于
2024-10-31 10:52:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei :对外集团展示大厅,生态效益接口
1 个父辈
4204d028
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
82 行增加
和
13 行删除
sk-module-biz/src/main/java/com/skua/SkApplication.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/controller/JTDisplayScreenController.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/IJTDisplayScreenService.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/impl/JTDisplayScreenServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/vo/EcologyBenefitVO.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/ProductDataVO.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/DrugConsumptionAnalusisServiceImpl.java
sk-module-biz/src/main/java/com/skua/SkApplication.java
查看文件 @
67e69cf
...
...
@@ -16,6 +16,7 @@ import java.net.UnknownHostException;
@SpringBootApplication
public
class
SkApplication
{
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
,
SchedulerException
{
ConfigurableApplicationContext
application
=
SpringApplication
.
run
(
SkApplication
.
class
,
args
);
Environment
env
=
application
.
getEnvironment
();
...
...
sk-module-biz/src/main/java/com/skua/modules/threedimensional/controller/JTDisplayScreenController.java
查看文件 @
67e69cf
...
...
@@ -70,4 +70,15 @@ public class JTDisplayScreenController {
result
.
setResult
(
waterTrendVOList
);
return
result
;
}
//生态效益
@AutoLog
(
value
=
"生态效益"
)
@ApiOperation
(
value
=
"生态效益"
,
notes
=
"生态效益"
)
@GetMapping
(
"/ecologyBenefit"
)
private
Result
<
EcologyBenefitVO
>
ecologyBenefit
(
String
departId
,
String
startTime
,
String
endTime
){
Result
<
EcologyBenefitVO
>
result
=
new
Result
<>();
EcologyBenefitVO
data
=
displayScreenService
.
ecologyBenefit
(
departId
,
startTime
,
endTime
);
result
.
setResult
(
data
);
return
result
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/IJTDisplayScreenService.java
查看文件 @
67e69cf
...
...
@@ -49,4 +49,13 @@ public interface IJTDisplayScreenService {
* @return
*/
List
<
WaterQualityChartVO
>
queryWaterQualityChart
(
String
departId
,
String
startTime
,
String
endTime
);
/***
* 生态效益
* @param departId
* @param startTime
* @param endTime
* @return
*/
EcologyBenefitVO
ecologyBenefit
(
String
departId
,
String
startTime
,
String
endTime
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/impl/JTDisplayScreenServiceImpl.java
查看文件 @
67e69cf
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.threedimensional.service.impl;
import
com.skua.common.report.ReportViewUtil
;
import
com.skua.core.context.SpringContextUtils
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.common.vo.DateVO
;
import
com.skua.modules.guest.util.DateUtil
;
import
com.skua.modules.threedimensional.service.IJTDisplayScreenService
;
...
...
@@ -164,6 +165,29 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService {
return
waterTrendList
;
}
/***
* 生态效益
* @param departId
* @param startTime
* @param endTime
* @return
*/
public
EcologyBenefitVO
ecologyBenefit
(
String
departId
,
String
startTime
,
String
endTime
){
//CSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD
String
dataViewName2119
=
ReportViewUtil
.
buildViewLike
(
view2119
,
"JSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN"
,
departId
,
startTime
,
endTime
);
String
sql
=
"select round(sum( aaa.JSCOD -aaa.CSCOD ),2) 'cod', round(sum( aaa.JSZL -aaa.CSZL ),2) 'tp', round(sum( aaa.JSZD -aaa.CSTN ),2) 'tn' from "
+
dataViewName2119
+
" aaa"
;
List
<
Map
<
String
,
Object
>>
mapList
=
getJdbcTemplate
().
queryForList
(
sql
);
EcologyBenefitVO
ecologyBenefitVO
=
new
EcologyBenefitVO
(
0
d
,
0
d
,
0
d
);
if
(
mapList
!=
null
){
for
(
Map
<
String
,
Object
>
map
:
mapList
){
ecologyBenefitVO
.
setCodValue
(
ConvertUtils
.
getDouble
(
map
.
get
(
"cod"
),
0
));
ecologyBenefitVO
.
setTpValue
(
ConvertUtils
.
getDouble
(
map
.
get
(
"tp"
),
0
));
ecologyBenefitVO
.
setTnValue
(
ConvertUtils
.
getDouble
(
map
.
get
(
"tn"
),
0
));
}
}
return
ecologyBenefitVO
;
}
//CSL
/***
* 水质水量图标数据
...
...
sk-module-biz/src/main/java/com/skua/modules/threedimensional/vo/EcologyBenefitVO.java
0 → 100644
查看文件 @
67e69cf
package
com
.
skua
.
modules
.
threedimensional
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"对外集团展示大屏-生态效益"
,
description
=
"对外集团展示大屏-生态效益"
)
public
class
EcologyBenefitVO
{
@ApiModelProperty
(
value
=
"cod总值"
)
public
Double
codValue
;
@ApiModelProperty
(
value
=
"总磷"
)
public
Double
tpValue
;
@ApiModelProperty
(
value
=
"总氮"
)
public
Double
tnValue
;
// @ApiModelProperty(value = "值")
// public String adValue;
public
EcologyBenefitVO
(){
}
public
EcologyBenefitVO
(
Double
codValue
,
Double
tpValue
,
Double
tnValue
)
{
this
.
codValue
=
codValue
;
this
.
tpValue
=
tpValue
;
this
.
tnValue
=
tnValue
;
}
}
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
查看文件 @
67e69cf
...
...
@@ -9,6 +9,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDate
;
...
...
@@ -21,7 +23,7 @@ import java.util.List;
@Service
public
class
OperationReportServiceImpl
implements
IOperationReportService
{
@
Autowired
@
Resource
private
OperationReportMapper
operationReportMapper
;
/***
* 处理月季度数据
...
...
@@ -32,6 +34,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
public
ProductDataVO
handeReportMonthData
(
Integer
year
,
Integer
season
){
ProductDataVO
productDataVO
=
new
ProductDataVO
();
//返回结果
int
lastYear
=
year
-
1
;
//去年
productDataVO
.
setLastYear
(
lastYear
);
SeasonTimeVO
seasonTimeVO
=
new
SeasonTimeVO
(
year
,
season
);
SeasonTimeVO
lastSeasonTimeVO
=
new
SeasonTimeVO
(
lastYear
,
season
);
...
...
@@ -117,15 +120,10 @@ public class OperationReportServiceImpl implements IOperationReportService {
}
}
}
/****************实际水量、统计数量、百分比、平均值***********/
setChargeWater
(
productDataVO
,
chargeWaterVolume
,
lastYearChargeWaterVolume
,
targetWater
,
disparityDay
);
/****************实际水量、统计数量、百分比、平均值***********/
setYsjslWater
(
productDataVO
,
ysjslWaterVolume
,
tqysjslWaterVolume
,
disparityDay
);
}
/***
...
...
@@ -195,8 +193,6 @@ public class OperationReportServiceImpl implements IOperationReportService {
}
}
/***
* 执行查询sql语句返回一个结果
* @param sql
...
...
@@ -208,9 +204,6 @@ public class OperationReportServiceImpl implements IOperationReportService {
String
result
=
masterDB
.
queryForObject
(
sql
,
String
.
class
);
return
result
;
}
/***
* 根据记录获取:季度开始时间
* @param year
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/vo/ProductDataVO.java
查看文件 @
67e69cf
...
...
@@ -14,7 +14,7 @@ import java.util.List;
@ApiModel
(
value
=
"生产运营--运营数据"
,
description
=
"生产运营--月度生产数据报表"
)
public
class
ProductDataVO
{
@ApiModelProperty
(
value
=
"去年"
)
private
String
lastYear
;
private
Integer
lastYear
;
@ApiModelProperty
(
value
=
"季度开始时间"
)
private
String
startTime
;
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/DrugConsumptionAnalusisServiceImpl.java
查看文件 @
67e69cf
...
...
@@ -323,7 +323,7 @@ public class DrugConsumptionAnalusisServiceImpl implements IDrugConsumptionAnaly
for
(
Map
<
String
,
Object
>
map
:
mapList
){
YH
=
ConvertUtils
.
getString
(
map
.
get
(
"YH"
));
}
return
YH
!=
null
?
Double
.
parseDouble
(
YH
)
:
null
;
return
ConvertUtils
.
getDouble
(
YH
,
0
);
//
YH!=null ? Double.parseDouble(YH) : null;
}
private
Double
getCSL
(
String
departId
,
String
startTime
,
String
endTime
){
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论