kangwei : 能环保态势大屏-后端接口
正在显示
20 个修改的文件
包含
743 行增加
和
155 行删除
... | @@ -29,12 +29,17 @@ public class ReportViewUtil { | ... | @@ -29,12 +29,17 @@ public class ReportViewUtil { |
29 | */ | 29 | */ |
30 | public static String buildView(String reportId,String fields,String departIds,String startTime,String endTime) { | 30 | public static String buildView(String reportId,String fields,String departIds,String startTime,String endTime) { |
31 | 31 | ||
32 | String[] departIdArray = departIds.split(","); | 32 | |
33 | String inSqlPart = ""; | 33 | String inSqlPart = ""; |
34 | String inItemSqlPart = ""; | 34 | String inItemSqlPart = ""; |
35 | for(String departId : departIdArray) { | 35 | if(StringUtils.isNotEmpty(departIds)){ |
36 | inSqlPart = inSqlPart + ",'"+departId+"'"; | 36 | String[] departIdArray = departIds.split(","); |
37 | for(String departId : departIdArray) { | ||
38 | inSqlPart = inSqlPart + ",'"+departId+"'"; | ||
39 | } | ||
40 | inSqlPart = inSqlPart.substring(1); | ||
37 | } | 41 | } |
42 | |||
38 | if(!StringUtils.isEmpty(fields)) { | 43 | if(!StringUtils.isEmpty(fields)) { |
39 | String[] fieldArray = fields.split(","); | 44 | String[] fieldArray = fields.split(","); |
40 | for(String field : fieldArray) { | 45 | for(String field : fieldArray) { |
... | @@ -49,7 +54,7 @@ public class ReportViewUtil { | ... | @@ -49,7 +54,7 @@ public class ReportViewUtil { |
49 | } | 54 | } |
50 | inItemSqlPart = inItemSqlPart.substring(1); | 55 | inItemSqlPart = inItemSqlPart.substring(1); |
51 | } | 56 | } |
52 | inSqlPart = inSqlPart.substring(1); | 57 | |
53 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); | 58 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); |
54 | String itemSql = "select item_code,id from f_report_item where report_id = '"+reportId+"' and required = 1 "; | 59 | String itemSql = "select item_code,id from f_report_item where report_id = '"+reportId+"' and required = 1 "; |
55 | if(!StringUtils.isEmpty(inItemSqlPart)) { | 60 | if(!StringUtils.isEmpty(inItemSqlPart)) { |
... | @@ -71,11 +76,14 @@ public class ReportViewUtil { | ... | @@ -71,11 +76,14 @@ public class ReportViewUtil { |
71 | } | 76 | } |
72 | sb.append("`a`.`depart_id` AS `depart_id`,`a`.`data_id` AS `id`,`a`.`data_time` AS `time` from (( "); | 77 | sb.append("`a`.`depart_id` AS `depart_id`,`a`.`data_id` AS `id`,`a`.`data_time` AS `time` from (( "); |
73 | 78 | ||
74 | sb.append("SELECT data_id,reit_id,item_value,data_time,depart_id FROM f_report_itemv v WHERE depart_id in ("+inSqlPart+") "); | 79 | sb.append("SELECT data_id,reit_id,item_value,data_time,depart_id FROM f_report_itemv v WHERE 1=1 "); |
80 | if(StringUtils.isNotEmpty(inSqlPart)){ | ||
81 | sb.append(" depart_id in (\"+inSqlPart+\") "); | ||
82 | } | ||
75 | if(!StringUtils.isEmpty(startTime)) { | 83 | if(!StringUtils.isEmpty(startTime)) { |
76 | sb.append("and data_time>='"+startTime+"' and data_time<='"+endTime+"' "); | 84 | sb.append(" and data_time>='"+startTime+"' and data_time<='"+endTime+"' "); |
77 | } | 85 | } |
78 | sb.append("and reit_id in ("+itemIds+")) `a` left join `f_report_item` `d` on((`a`.`reit_id` = `d`.`id`))) where 1=1 group by `a`.`data_id`,`a`.`depart_id`,`a`.`data_time` order by `a`.`data_time`)"); | 86 | sb.append(" and reit_id in ("+itemIds+")) `a` left join `f_report_item` `d` on((`a`.`reit_id` = `d`.`id`))) where 1=1 group by `a`.`data_id`,`a`.`depart_id`,`a`.`data_time` order by `a`.`data_time`)"); |
79 | return sb.toString(); | 87 | return sb.toString(); |
80 | } | 88 | } |
81 | 89 | ||
... | @@ -146,11 +154,14 @@ public class ReportViewUtil { | ... | @@ -146,11 +154,14 @@ public class ReportViewUtil { |
146 | 154 | ||
147 | 155 | ||
148 | public static String buildViewLike(String reportId,String fields,String departIds,String startTime,String endTime) { | 156 | public static String buildViewLike(String reportId,String fields,String departIds,String startTime,String endTime) { |
149 | String[] departIdArray = departIds.split(","); | ||
150 | String inSqlPart = ""; | 157 | String inSqlPart = ""; |
151 | String inItemSqlPart = ""; | 158 | String inItemSqlPart = ""; |
152 | for(String departId : departIdArray) { | 159 | if(StringUtils.isNotEmpty(departIds)){ |
153 | inSqlPart = inSqlPart + ",'"+departId+"'"; | 160 | String[] departIdArray = departIds.split(","); |
161 | for(String departId : departIdArray) { | ||
162 | inSqlPart = inSqlPart + ",'"+departId+"'"; | ||
163 | } | ||
164 | inSqlPart = inSqlPart.substring(1); | ||
154 | } | 165 | } |
155 | if(!StringUtils.isEmpty(fields)) { | 166 | if(!StringUtils.isEmpty(fields)) { |
156 | String[] fieldArray = fields.split(","); | 167 | String[] fieldArray = fields.split(","); |
... | @@ -166,7 +177,7 @@ public class ReportViewUtil { | ... | @@ -166,7 +177,7 @@ public class ReportViewUtil { |
166 | } | 177 | } |
167 | inItemSqlPart = inItemSqlPart.substring(1); | 178 | inItemSqlPart = inItemSqlPart.substring(1); |
168 | } | 179 | } |
169 | inSqlPart = inSqlPart.substring(1); | 180 | |
170 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); | 181 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); |
171 | String itemSql = "select item_code,id from f_report_item where report_id = '"+reportId+"' and required = 1 "; | 182 | String itemSql = "select item_code,id from f_report_item where report_id = '"+reportId+"' and required = 1 "; |
172 | if(!StringUtils.isEmpty(inItemSqlPart)) { | 183 | if(!StringUtils.isEmpty(inItemSqlPart)) { | ... | ... |
1 | package com.skua.tool.util; | 1 | package com.skua.tool.util; |
2 | 2 | ||
3 | import org.apache.commons.lang3.StringUtils; | 3 | import org.apache.commons.lang3.StringUtils; |
4 | import org.bytedeco.libfreenect2.Logger; | ||
4 | 5 | ||
5 | import java.math.BigDecimal; | 6 | import java.math.BigDecimal; |
6 | import java.math.RoundingMode; | 7 | import java.math.RoundingMode; |
... | @@ -42,15 +43,16 @@ public class DigitalUtils { | ... | @@ -42,15 +43,16 @@ public class DigitalUtils { |
42 | * @return | 43 | * @return |
43 | */ | 44 | */ |
44 | public static String add(String val1 , String val2){ | 45 | public static String add(String val1 , String val2){ |
45 | String resultStr = "0"; | 46 | BigDecimal result = BigDecimal.ZERO; |
46 | if(val1 != null ){ | 47 | if(StringUtils.isNotEmpty(val1)){ |
47 | BigDecimal original = new BigDecimal(val1); | 48 | result = new BigDecimal(val1); |
48 | BigDecimal num2 = new BigDecimal(val2); | ||
49 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); | 49 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); |
50 | resultStr = original.add( num2 ).toString(); | ||
51 | } | 50 | } |
52 | 51 | if(StringUtils.isNotEmpty(val2)){ | |
53 | return resultStr; | 52 | BigDecimal num2 = new BigDecimal(val2); |
53 | result = result.add( num2 ); | ||
54 | } | ||
55 | return result.toString(); | ||
54 | } | 56 | } |
55 | 57 | ||
56 | 58 | ||
... | @@ -66,9 +68,38 @@ public class DigitalUtils { | ... | @@ -66,9 +68,38 @@ public class DigitalUtils { |
66 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); | 68 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); |
67 | resultStr = original.multiply( num2 ).toString(); | 69 | resultStr = original.multiply( num2 ).toString(); |
68 | } | 70 | } |
71 | return resultStr; | ||
72 | } | ||
69 | 73 | ||
74 | public static String subtract(String num1 , String num2){ | ||
75 | String resultStr = null ; | ||
76 | if(StringUtils.isNotEmpty(num1) && StringUtils.isNotEmpty(num2) ){ | ||
77 | BigDecimal num1_b = new BigDecimal(num1); | ||
78 | BigDecimal num2_b = new BigDecimal(num2); | ||
79 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); | ||
80 | resultStr = num1_b.subtract( num2_b ).toString(); | ||
81 | } | ||
70 | return resultStr; | 82 | return resultStr; |
71 | } | 83 | } |
84 | |||
85 | /*** | ||
86 | * 比较两个数 | ||
87 | * @param num1 | ||
88 | * @param num2 | ||
89 | * @return comparisonResult=0 相等; 大于返回1 ,小于返回-1 | ||
90 | */ | ||
91 | public static Integer compareTo(String num1 , String num2){ | ||
92 | Integer comparisonResult = null ; | ||
93 | if(StringUtils.isNotEmpty(num1) && StringUtils.isNotEmpty(num2) ){ | ||
94 | BigDecimal num1_b = new BigDecimal(num1); | ||
95 | BigDecimal num2_b = new BigDecimal(num2); | ||
96 | // BigDecimal rounded = original.multiply( num2).setScale(2, BigDecimal.ROUND_HALF_UP); | ||
97 | comparisonResult = num1_b.compareTo( num2_b ); | ||
98 | } | ||
99 | return comparisonResult ; | ||
100 | } | ||
101 | |||
102 | |||
72 | /** | 103 | /** |
73 | * 除法 保留两位小数 | 104 | * 除法 保留两位小数 |
74 | * @param dividend 请输入被除数 | 105 | * @param dividend 请输入被除数 |
... | @@ -76,17 +107,18 @@ public class DigitalUtils { | ... | @@ -76,17 +107,18 @@ public class DigitalUtils { |
76 | * @return | 107 | * @return |
77 | */ | 108 | */ |
78 | public static String division(String dividend , String divisor ){ | 109 | public static String division(String dividend , String divisor ){ |
79 | String resultStr = dividend; | 110 | String resultStr = null; |
80 | if( dividend != null && dividend.length()>0 && divisor != null && divisor.length()>0){ | 111 | try{ |
81 | double dividendD = Double.parseDouble(dividend); | 112 | if( isNumber(dividend) && isNumber( divisor) && Double.parseDouble(divisor) != 0 ){ |
82 | double divisorD = Double.parseDouble(divisor); | 113 | BigDecimal dividend_BD = new BigDecimal(dividend); |
83 | if(divisorD != 0 ){ | 114 | BigDecimal divisor_BD = new BigDecimal(divisor); |
84 | double result = dividendD /divisorD; | 115 | BigDecimal result = dividend_BD.divide(divisor_BD).setScale(2, RoundingMode.HALF_UP); |
85 | BigDecimal bd = new BigDecimal(result); | 116 | resultStr = result.toString(); |
86 | BigDecimal roundedResult = bd.setScale(2, BigDecimal.ROUND_HALF_UP); | ||
87 | resultStr = roundedResult.toString(); | ||
88 | } | 117 | } |
118 | }catch(Exception e){ | ||
119 | e.printStackTrace(); | ||
89 | } | 120 | } |
121 | |||
90 | //System.out.print("请输入被除数:");double dividend =scanner.nextDouble(); | 122 | //System.out.print("请输入被除数:");double dividend =scanner.nextDouble(); |
91 | // System.out.print("请输入除数:");double divisor =scanner.nextDouble(); | 123 | // System.out.print("请输入除数:");double divisor =scanner.nextDouble(); |
92 | 124 | ||
... | @@ -100,16 +132,31 @@ public class DigitalUtils { | ... | @@ -100,16 +132,31 @@ public class DigitalUtils { |
100 | * @return | 132 | * @return |
101 | */ | 133 | */ |
102 | public static boolean isNumeric(String str) { | 134 | public static boolean isNumeric(String str) { |
103 | Pattern pattern = Pattern.compile("-?[0-9]+.?[0-9]*"); | 135 | if(org.apache.commons.lang.StringUtils.isNotEmpty(str) ){ |
104 | // 科学计数法 | 136 | Pattern pattern = Pattern.compile("-?[0-9]+.?[0-9]*"); |
105 | Pattern pattern2 = Pattern.compile("^[+-]?[\\d]+([.][\\d]*)?([Ee][+-]?[\\d]+)?$"); | 137 | // 科学计数法 |
106 | if (StringUtils.isEmpty(str)) { | 138 | Pattern pattern2 = Pattern.compile("^[+-]?[\\d]+([.][\\d]*)?([Ee][+-]?[\\d]+)?$"); |
107 | return false; | 139 | if (StringUtils.isEmpty(str)) { |
108 | } else { | 140 | return false; |
109 | Matcher isNum = pattern.matcher(str); | 141 | } else { |
110 | Matcher isNum2 = pattern2.matcher(str); | 142 | Matcher isNum = pattern.matcher(str); |
111 | return isNum.matches() || isNum2.matches(); | 143 | Matcher isNum2 = pattern2.matcher(str); |
144 | return isNum.matches() || isNum2.matches(); | ||
145 | } | ||
146 | } | ||
147 | return false; | ||
148 | } | ||
149 | |||
150 | |||
151 | public static boolean isNumber(String str) { | ||
152 | // Pattern pattern = Pattern.compile("^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$"); // 判断小数点后2位的数字的正则表达式 | ||
153 | if(org.apache.commons.lang.StringUtils.isNotEmpty(str) ){ | ||
154 | String reg = "^(\\-|\\+)?\\d+(\\.\\d+)?$"; | ||
155 | Pattern pattern = Pattern.compile(reg); | ||
156 | Matcher match = pattern.matcher(str); | ||
157 | return match.matches(); | ||
112 | } | 158 | } |
159 | return false; | ||
113 | } | 160 | } |
114 | 161 | ||
115 | } | 162 | } | ... | ... |
1 | package com.skua.modules.edu.controller; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
6 | import com.skua.common.report.ReportViewUtil; | ||
7 | import com.skua.core.api.vo.Result; | ||
8 | import com.skua.core.aspect.annotation.AutoLog; | ||
9 | import com.skua.core.query.QueryGenerator; | ||
10 | import com.skua.modules.edu.entity.Paper; | ||
11 | import io.swagger.annotations.Api; | ||
12 | import io.swagger.annotations.ApiOperation; | ||
13 | import lombok.extern.slf4j.Slf4j; | ||
14 | import org.springframework.web.bind.annotation.GetMapping; | ||
15 | import org.springframework.web.bind.annotation.RequestMapping; | ||
16 | import org.springframework.web.bind.annotation.RequestParam; | ||
17 | import org.springframework.web.bind.annotation.RestController; | ||
18 | |||
19 | import javax.servlet.http.HttpServletRequest; | ||
20 | |||
21 | /** | ||
22 | * @auther kangwei | ||
23 | * @create 2024-10-14-16:46 | ||
24 | */ | ||
25 | @Slf4j | ||
26 | @Api(tags="在线考试-试卷") | ||
27 | @RestController("testReportController") | ||
28 | @RequestMapping("/web/edu/paper") | ||
29 | public class TestReportSqlController { | ||
30 | |||
31 | @AutoLog(value = "在线考试--构造填报报表视图") | ||
32 | @ApiOperation(value="在线考试-构造填报报表视图", notes="在线考试-构造填报报表视图") | ||
33 | @GetMapping(value = "/testReportSql") | ||
34 | public Result<String> testReportSql( | ||
35 | @RequestParam(name="reportId") String reportId, | ||
36 | @RequestParam(name="fields") String fields, | ||
37 | @RequestParam(name="departIds") String departIds , | ||
38 | @RequestParam(name="startTime") String startTime, | ||
39 | @RequestParam(name="endTime") String endTime, | ||
40 | HttpServletRequest req) { | ||
41 | Result<String> result = new Result(); | ||
42 | String dataViewName2 = ReportViewUtil.buildViewLike(reportId,fields,departIds, startTime, endTime); | ||
43 | //String dataViewName3 = ReportViewUtil.buildViewByStatistics("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", startTime, endTime); | ||
44 | |||
45 | result.setSuccess(true); | ||
46 | result.setResult(dataViewName2); | ||
47 | return result; | ||
48 | } | ||
49 | } |
... | @@ -127,7 +127,7 @@ mybatis-plus: | ... | @@ -127,7 +127,7 @@ mybatis-plus: |
127 | configuration: | 127 | configuration: |
128 | call-setters-on-nulls: true | 128 | call-setters-on-nulls: true |
129 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 | 129 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 |
130 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | 130 | #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
131 | #数矿专用配置 | 131 | #数矿专用配置 |
132 | skua: | 132 | skua: |
133 | web-url: http://103.85.171.27:8096 | 133 | web-url: http://103.85.171.27:8096 | ... | ... |
... | @@ -6,6 +6,8 @@ import java.util.Map; | ... | @@ -6,6 +6,8 @@ import java.util.Map; |
6 | import com.baomidou.mybatisplus.extension.service.IService; | 6 | import com.baomidou.mybatisplus.extension.service.IService; |
7 | import com.skua.modules.custom.entity.FCustomReportDataset; | 7 | import com.skua.modules.custom.entity.FCustomReportDataset; |
8 | import com.skua.modules.custom.vo.FCustomReportDatasetVO; | 8 | import com.skua.modules.custom.vo.FCustomReportDatasetVO; |
9 | import com.skua.modules.report.vo.DataVO; | ||
10 | import com.skua.modules.report.vo.JnhbLargeScreenVO; | ||
9 | import com.skua.modules.report.vo.JnhbReportData; | 11 | import com.skua.modules.report.vo.JnhbReportData; |
10 | 12 | ||
11 | /** | 13 | /** |
... | @@ -104,4 +106,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData | ... | @@ -104,4 +106,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData |
104 | 106 | ||
105 | //节能环保统计报表明细 | 107 | //节能环保统计报表明细 |
106 | Map<String, Object> jnhbReportDetails(String departId, String month); | 108 | Map<String, Object> jnhbReportDetails(String departId, String month); |
109 | |||
110 | /** | ||
111 | * 节能环保 大屏展示 | ||
112 | * @return | ||
113 | */ | ||
114 | JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO); | ||
107 | } | 115 | } | ... | ... |
... | @@ -15,10 +15,9 @@ import java.time.temporal.WeekFields; | ... | @@ -15,10 +15,9 @@ import java.time.temporal.WeekFields; |
15 | import java.util.*; | 15 | import java.util.*; |
16 | import java.util.stream.Collectors; | 16 | import java.util.stream.Collectors; |
17 | 17 | ||
18 | import com.skua.modules.report.vo.JnhbReportData; | 18 | import com.skua.modules.report.vo.*; |
19 | import com.skua.modules.report.vo.JnhbReportDetailsDy; | 19 | import com.skua.modules.report.vo.largeScreen.*; |
20 | import com.skua.modules.report.vo.JnhbReportDetailsHj; | 20 | import io.swagger.annotations.ApiModelProperty; |
21 | import com.skua.modules.report.vo.JnhbReportDetailsJs; | ||
22 | import org.springframework.beans.factory.annotation.Autowired; | 21 | import org.springframework.beans.factory.annotation.Autowired; |
23 | import org.springframework.jdbc.core.JdbcTemplate; | 22 | import org.springframework.jdbc.core.JdbcTemplate; |
24 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
... | @@ -277,6 +276,122 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -277,6 +276,122 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
277 | return map; | 276 | return map; |
278 | } | 277 | } |
279 | 278 | ||
279 | //节能环保 大屏展示 | ||
280 | public JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO){ | ||
281 | JnhbLargeScreenVO largeScreenVO = new JnhbLargeScreenVO(); | ||
282 | //当月数据 | ||
283 | String dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); | ||
284 | String dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); | ||
285 | List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(), dataVO.getNowEndTime()); | ||
286 | |||
287 | // 上月数据 同比 | ||
288 | dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); | ||
289 | dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); | ||
290 | List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); | ||
291 | |||
292 | Map<String,JnhbReportData> lastMonthMapData= convertJnhbReportDataMap(lastMonthReportDataList); | ||
293 | // 去年数据 环比 | ||
294 | dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); | ||
295 | dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); | ||
296 | List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); | ||
297 | Map<String,JnhbReportData> lastYearMapData= convertJnhbReportDataMap(lastYearReportDataList); | ||
298 | |||
299 | LoadRateVO loadRateVO = null; | ||
300 | PowerConsumeVO powerConsumeVO = null; | ||
301 | ResultNumberVO c02NumberVO = null;//CO2排放对象 | ||
302 | ResultNumberVO cod_NumberVO = null;//COD | ||
303 | ResultNumberVO nh3n_NumberVO = null;//NH3-N | ||
304 | ResultNumberVO tp_NumberVO = null;//TP | ||
305 | ResultNumberVO tn_NumberVO = null;//TN | ||
306 | |||
307 | JnhbReportData lastMonthReportDataTemp ;//lastMonthMapData | ||
308 | JnhbReportData lastYearReportDataTemp ;//lastYearMapData | ||
309 | ResultChartsVO energyConsumeChart = null; | ||
310 | for(JnhbReportData reportData : jnhbReportDataList){ | ||
311 | //头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水 | ||
312 | largeScreenVO.setHeadStatisticsValue( reportData); | ||
313 | lastMonthReportDataTemp = lastMonthMapData.get(reportData.getDepartId()); | ||
314 | lastYearReportDataTemp = lastYearMapData.get(reportData.getDepartId()); | ||
315 | //各站点系统负荷率排名: | ||
316 | loadRateVO = new LoadRateVO(reportData.getDepartId(),reportData.getDepartName(),reportData.getWsclgm(),reportData.getWssjcll(),reportData.getWsfhl()); | ||
317 | //各站点能源消耗排名: | ||
318 | powerConsumeVO = new PowerConsumeVO(reportData.getDepartId(),reportData.getDepartName(),reportData.getDh(), reportData.getGffdl(), reportData.getQy(), reportData.getZhnyxhl() , reportData.getEyhtpfl() , reportData.getDsdh() ); | ||
319 | |||
320 | c02NumberVO = new ResultNumberVO(); | ||
321 | c02NumberVO.setValue( reportData.getCodxjl() ); | ||
322 | cod_NumberVO = new ResultNumberVO();cod_NumberVO.setValue(reportData.getCodxjl()); | ||
323 | nh3n_NumberVO = new ResultNumberVO();nh3n_NumberVO.setValue(reportData.getTnxjl()); | ||
324 | tp_NumberVO = new ResultNumberVO();tp_NumberVO.setValue(reportData.getTpxjl()); | ||
325 | tn_NumberVO = new ResultNumberVO();tn_NumberVO.setValue(reportData.getTnxjl()); | ||
326 | /*************同比环比数据设置****************/ | ||
327 | if ( lastMonthReportDataTemp != null ){ | ||
328 | //头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水 | ||
329 | largeScreenVO.setHeadStatisticsValueHB( lastMonthReportDataTemp); | ||
330 | |||
331 | loadRateVO.setValueHb(lastMonthReportDataTemp.getWsfhl() ); | ||
332 | powerConsumeVO.setValueHb(lastMonthReportDataTemp.getDsdh() ); | ||
333 | c02NumberVO.setValueHb(lastMonthReportDataTemp.getCodxjl() ); | ||
334 | |||
335 | cod_NumberVO.setValueHb(reportData.getCodxjl()); | ||
336 | nh3n_NumberVO.setValueHb(reportData.getTnxjl()); | ||
337 | tp_NumberVO.setValueHb(reportData.getTpxjl()); | ||
338 | tn_NumberVO.setValueHb(reportData.getTnxjl()); | ||
339 | } | ||
340 | if ( lastYearReportDataTemp != null ){ | ||
341 | //头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水 | ||
342 | largeScreenVO.setHeadStatisticsValueTB( lastYearReportDataTemp); | ||
343 | |||
344 | loadRateVO.setValueHb(lastYearReportDataTemp.getWsfhl() ); | ||
345 | powerConsumeVO.setValueHb(lastYearReportDataTemp.getDsdh() ); | ||
346 | c02NumberVO.setValueHb(lastYearReportDataTemp.getCodxjl() ); | ||
347 | |||
348 | cod_NumberVO.setValueHb(reportData.getCodxjl()); | ||
349 | nh3n_NumberVO.setValueHb(reportData.getTnxjl()); | ||
350 | tp_NumberVO.setValueHb(reportData.getTpxjl()); | ||
351 | tn_NumberVO.setValueHb(reportData.getTnxjl()); | ||
352 | } | ||
353 | //loadRateVO.setValue(reportData.getWsfhl(),valueHb,valueTb ); | ||
354 | largeScreenVO.getLoadRateVOList().add(loadRateVO ); | ||
355 | largeScreenVO.getPowerConsumeVOList().add( powerConsumeVO ); | ||
356 | |||
357 | //ESG减排趋势 | ||
358 | energyConsumeChart = new ResultChartsVO(); | ||
359 | energyConsumeChart.setData(reportData); | ||
360 | largeScreenVO.getEsgChartsList().add(energyConsumeChart); | ||
361 | //吨消减能耗 | ||
362 | largeScreenVO.getEnergyConsumeChartsList().add( energyConsumeChart ) ; | ||
363 | |||
364 | //消减量统计 | ||
365 | largeScreenVO.setReduceStatistics(1,cod_NumberVO); | ||
366 | largeScreenVO.setReduceStatistics(2,nh3n_NumberVO); | ||
367 | largeScreenVO.setReduceStatistics(3,tp_NumberVO); | ||
368 | largeScreenVO.setReduceStatistics(4,tn_NumberVO); | ||
369 | //CO2排放排名 | ||
370 | largeScreenVO.getCo2DataList().add( c02NumberVO ) ; | ||
371 | //排放指标 | ||
372 | // String ybgfcsl, String ybgfczl, String jgwnl, String wfcsl, String wfczl | ||
373 | largeScreenVO.getWasteMaterialList().add( new WasteMaterialVO( reportData.getDepartId(),reportData.getDepartName(),reportData.getYbgfcsl(),reportData.getYbgfczl(),reportData.getJgwnl(),reportData.getWfcsl(),reportData.getWfczl() ) ) ; | ||
374 | } | ||
375 | |||
376 | //主库数据源 | ||
377 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); | ||
378 | int count1 = masterDB.queryForObject("select count(1) from equipment_info where energy_level = 1",Integer.class); | ||
379 | largeScreenVO.setEquipmentL1( count1 ); | ||
380 | |||
381 | int count2 = masterDB.queryForObject("select count(1) from equipment_info where energy_level = 2",Integer.class); | ||
382 | largeScreenVO.setEquipmentL2( count2 ); | ||
383 | return largeScreenVO; | ||
384 | } | ||
385 | /**转换为Map<部门编号,JnhbReportData> */ | ||
386 | private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData> | ||
387 | Map<String,JnhbReportData> dataMap = new HashMap<>(); | ||
388 | |||
389 | for(JnhbReportData reportData : dataList){ | ||
390 | dataMap.put( reportData.getDepartId(),reportData ); | ||
391 | } | ||
392 | return dataMap; | ||
393 | } | ||
394 | |||
280 | @Override | 395 | @Override |
281 | public Map<String, Object> reportWeekShow(String dataTime, String week) { | 396 | public Map<String, Object> reportWeekShow(String dataTime, String week) { |
282 | Map<String, Object> map = new HashMap<>(); | 397 | Map<String, Object> map = new HashMap<>(); | ... | ... |
... | @@ -9,6 +9,8 @@ import com.skua.core.util.ConvertUtils; | ... | @@ -9,6 +9,8 @@ import com.skua.core.util.ConvertUtils; |
9 | import com.skua.core.util.DateUtils; | 9 | import com.skua.core.util.DateUtils; |
10 | import com.skua.modules.custom.service.IFCustomReportDatasetService; | 10 | import com.skua.modules.custom.service.IFCustomReportDatasetService; |
11 | import com.skua.modules.report.service.IReportDataService; | 11 | import com.skua.modules.report.service.IReportDataService; |
12 | import com.skua.modules.report.vo.DataVO; | ||
13 | import com.skua.modules.report.vo.JnhbLargeScreenVO; | ||
12 | import com.skua.modules.report.vo.JnhbReportData; | 14 | import com.skua.modules.report.vo.JnhbReportData; |
13 | import io.swagger.annotations.Api; | 15 | import io.swagger.annotations.Api; |
14 | import io.swagger.annotations.ApiOperation; | 16 | import io.swagger.annotations.ApiOperation; |
... | @@ -187,4 +189,14 @@ public class ReportDataController { | ... | @@ -187,4 +189,14 @@ public class ReportDataController { |
187 | return result; | 189 | return result; |
188 | } | 190 | } |
189 | 191 | ||
192 | @AutoLog(value = "节能环保:大屏展示") | ||
193 | @ApiOperation(value = "节能环保:大屏展示", notes = "节能环保:大屏展示(time:yyyy-MM)") | ||
194 | @GetMapping(value = "/jnhbLargeScreenShow") | ||
195 | public Result<JnhbLargeScreenVO> jnhbLargeScreenShow( @RequestParam(name="time") String time) { //time | ||
196 | Result<JnhbLargeScreenVO> result = new Result<>(); | ||
197 | DataVO dataVO = new DataVO(time); | ||
198 | JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShow(dataVO); | ||
199 | result.setResult(jnhbLargeScreenVO); | ||
200 | return result; | ||
201 | } | ||
190 | } | 202 | } | ... | ... |
... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
5 | <!-- --> | 5 | <!-- --> |
6 | <select id="queryReportMonthData" resultType="com.skua.modules.report.vo.FReportMonthDataVO"> | 6 | <select id="queryReportMonthData" resultType="com.skua.modules.report.vo.FReportMonthDataVO"> |
7 | SELECT | 7 | SELECT |
8 | a.depart_id,tc.target_water,tc. target_power,tc.target_drug ,tc.target_charge_water, | 8 | a.depart_id,tc.target_water,tc. target_power,tc.target_drug, |
9 | (select t.depart_name from sys_depart t where t.id = a.depart_id ) 'depart_name', | 9 | (select t.depart_name from sys_depart t where t.id = a.depart_id ) 'depart_name', |
10 | ( | 10 | ( |
11 | select sum(fiv.item_value)/10000 from f_report_itemv fiv ,f_report_item fi | 11 | select sum(fiv.item_value)/10000 from f_report_itemv fiv ,f_report_item fi | ... | ... |
... | @@ -4,6 +4,7 @@ import com.skua.core.context.SpringContextUtils; | ... | @@ -4,6 +4,7 @@ import com.skua.core.context.SpringContextUtils; |
4 | import com.skua.modules.report.mapper.OperationReportMapper; | 4 | import com.skua.modules.report.mapper.OperationReportMapper; |
5 | import com.skua.modules.report.service.IOperationReportService; | 5 | import com.skua.modules.report.service.IOperationReportService; |
6 | import com.skua.modules.report.vo.*; | 6 | import com.skua.modules.report.vo.*; |
7 | import com.skua.tool.util.DigitalUtils; | ||
7 | import org.apache.commons.lang3.StringUtils; | 8 | import org.apache.commons.lang3.StringUtils; |
8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
9 | import org.springframework.jdbc.core.JdbcTemplate; | 10 | import org.springframework.jdbc.core.JdbcTemplate; |
... | @@ -35,7 +36,7 @@ public class OperationReportServiceImpl implements IOperationReportService { | ... | @@ -35,7 +36,7 @@ public class OperationReportServiceImpl implements IOperationReportService { |
35 | SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season ); | 36 | SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season ); |
36 | 37 | ||
37 | //水务公司总数 | 38 | //水务公司总数 |
38 | String sql = "select * from sys_depart where depart_type = 1"; | 39 | String sql = "select count(1) from sys_depart where depart_type = 1"; |
39 | String deptartCount = queryForString(sql); | 40 | String deptartCount = queryForString(sql); |
40 | productDataVO.setDeptartCount( deptartCount ); | 41 | productDataVO.setDeptartCount( deptartCount ); |
41 | 42 | ||
... | @@ -59,45 +60,44 @@ public class OperationReportServiceImpl implements IOperationReportService { | ... | @@ -59,45 +60,44 @@ public class OperationReportServiceImpl implements IOperationReportService { |
59 | 60 | ||
60 | private void handeReportMonthData(ProductDataVO productDataVO,List<FReportMonthDataVO> reportMonthDataVOList,String disparityDay){ | 61 | private void handeReportMonthData(ProductDataVO productDataVO,List<FReportMonthDataVO> reportMonthDataVOList,String disparityDay){ |
61 | // 遍历月数据报表获取 | 62 | // 遍历月数据报表获取 |
62 | BigDecimal chargeWaterVolume = BigDecimal.ZERO;//收费水量 总量 | 63 | String chargeWaterVolume = "0";//收费水量 总量 |
63 | BigDecimal lastYearChargeWaterVolume = BigDecimal.ZERO;//去年收费水量 总量 | 64 | String lastYearChargeWaterVolume = "0";//去年收费水量 总量 |
64 | 65 | String ysjslWaterVolume = "0";//月实际水量 总量 | |
65 | BigDecimal ysjslWaterVolume = BigDecimal.ZERO;//月实际水量 总量 | 66 | String tqysjslWaterVolume = "0";//同期月实际水量 总量 |
66 | BigDecimal tqysjslWaterVolume = BigDecimal.ZERO;//同期月实际水量 总量 | 67 | String targetWater = "0";//水目标 |
67 | |||
68 | BigDecimal targetWater = BigDecimal.ZERO;;//水目标 | ||
69 | 68 | ||
70 | FReportWaterMonthDataVO reportMonthItemDataVO = null; | 69 | FReportWaterMonthDataVO reportMonthItemDataVO = null; |
71 | FReportPowerMonthDataVO reportPowerMonthDataVO = null; | ||
72 | //同期月实际水量 | 70 | //同期月实际水量 |
73 | if(reportMonthDataVOList != null && !reportMonthDataVOList.isEmpty()){ | 71 | if(reportMonthDataVOList != null && !reportMonthDataVOList.isEmpty()){ |
74 | for(FReportMonthDataVO monthDataVO : reportMonthDataVOList){ | 72 | for(FReportMonthDataVO monthDataVO : reportMonthDataVOList){ |
75 | /**********************收费水量********************************/ | 73 | /**********************收费水量********************************/ |
76 | if(StringUtils.isNotEmpty(monthDataVO.getYsfsl())){//ysfsl 月收费水量 | 74 | if(StringUtils.isNotEmpty(monthDataVO.getYsfsl())){//ysfsl 月收费水量 |
77 | chargeWaterVolume = chargeWaterVolume.add(new BigDecimal(monthDataVO.getYsfsl())); | 75 | chargeWaterVolume = DigitalUtils.add( chargeWaterVolume , monthDataVO.getYsfsl()); |
78 | } | 76 | } |
79 | if(StringUtils.isNotEmpty(monthDataVO.getQntqsfsl())){//qntqsfsl 去年同期收费水量 | 77 | if(StringUtils.isNotEmpty(monthDataVO.getQntqsfsl())){//qntqsfsl 去年同期收费水量 |
80 | lastYearChargeWaterVolume = lastYearChargeWaterVolume.add(new BigDecimal(monthDataVO.getQntqsfsl())); | 78 | lastYearChargeWaterVolume = DigitalUtils.add( lastYearChargeWaterVolume , monthDataVO.getQntqsfsl()); |
81 | } | 79 | } |
82 | if(StringUtils.isNotEmpty(monthDataVO.getTargetWater())){//ysfsl 收费水量目标 | 80 | if(StringUtils.isNotEmpty(monthDataVO.getTargetWater())){//ysfsl 收费水量目标 |
83 | targetWater = targetWater.add(new BigDecimal(monthDataVO.getTargetWater())); | 81 | targetWater = DigitalUtils.add( targetWater , monthDataVO.getTargetWater()); |
84 | } | 82 | } |
85 | /********************实际水量**********************************/ | 83 | /********************实际水量**********************************/ |
86 | if(StringUtils.isNotEmpty(monthDataVO.getYsjsl())){//ysjsl 月实际水量 | 84 | if(StringUtils.isNotEmpty(monthDataVO.getYsjsl())){//ysjsl 月实际水量 |
87 | ysjslWaterVolume = ysjslWaterVolume.add(new BigDecimal(monthDataVO.getYsjsl())); | 85 | ysjslWaterVolume = DigitalUtils.add( ysjslWaterVolume , monthDataVO.getYsjsl()); |
88 | } | 86 | } |
89 | if(StringUtils.isNotEmpty(monthDataVO.getQntqsfsl())){//qntqsfsl 去年同期收费水量 | 87 | if(StringUtils.isNotEmpty(monthDataVO.getQntqsfsl())){//qntqsfsl 去年同期收费水量 |
90 | tqysjslWaterVolume = tqysjslWaterVolume.add(new BigDecimal(monthDataVO.getQntqsfsl())); | 88 | tqysjslWaterVolume = DigitalUtils.add( tqysjslWaterVolume , monthDataVO.getQntqsfsl()); |
91 | } | 89 | } |
92 | //同比下降的部门 | 90 | //同比下降的部门 |
93 | int comparisonResult = ysjslWaterVolume.compareTo(tqysjslWaterVolume ); | 91 | Integer comparisonResult_water = DigitalUtils.compareTo(ysjslWaterVolume , tqysjslWaterVolume) ; |
94 | if(comparisonResult < 0){//同比下降 | 92 | if(comparisonResult_water != null && comparisonResult_water < 0 ){//同比下降 |
95 | // 部门名称,下降比例,下降原因 | 93 | // 部门名称,下降比例,下降原因 |
96 | BigDecimal ratio = ysjslWaterVolume.divide( tqysjslWaterVolume ,2, RoundingMode.HALF_UP).multiply( BigDecimal.valueOf(100)); | 94 | String ratio = DigitalUtils.division( ysjslWaterVolume ,tqysjslWaterVolume ) ; |
95 | ratio = DigitalUtils.multiply( ratio , "100"); | ||
97 | reportMonthItemDataVO = new FReportWaterMonthDataVO(monthDataVO.getDeptartName(),ratio,monthDataVO.getYsjsldyqntqyy()) ; | 96 | reportMonthItemDataVO = new FReportWaterMonthDataVO(monthDataVO.getDeptartName(),ratio,monthDataVO.getYsjsldyqntqyy()) ; |
98 | productDataVO.getWaterDeptartList().add( reportMonthItemDataVO ); | 97 | productDataVO.getWaterDeptartList().add( reportMonthItemDataVO ); |
99 | } | 98 | } |
100 | 99 | ||
100 | |||
101 | /********************电**********************************/ | 101 | /********************电**********************************/ |
102 | String consume = checkPowerConsume(monthDataVO.getYdh(),monthDataVO.getYsjsl() ,monthDataVO.getTargetPower());//部门电耗 | 102 | String consume = checkPowerConsume(monthDataVO.getYdh(),monthDataVO.getYsjsl() ,monthDataVO.getTargetPower());//部门电耗 |
103 | if(consume != null){ | 103 | if(consume != null){ |
... | @@ -107,13 +107,10 @@ public class OperationReportServiceImpl implements IOperationReportService { | ... | @@ -107,13 +107,10 @@ public class OperationReportServiceImpl implements IOperationReportService { |
107 | /********************药剂**********************************/ | 107 | /********************药剂**********************************/ |
108 | productDataVO.setTargetDrug(monthDataVO.getTargetDrug() );//目标药剂 | 108 | productDataVO.setTargetDrug(monthDataVO.getTargetDrug() );//目标药剂 |
109 | if(StringUtils.isNotEmpty(monthDataVO.getYyf()) && StringUtils.isNotEmpty(monthDataVO.getYsjsl()) ){ | 109 | if(StringUtils.isNotEmpty(monthDataVO.getYyf()) && StringUtils.isNotEmpty(monthDataVO.getYsjsl()) ){ |
110 | Double ysjslD = Double.parseDouble(monthDataVO.getYsjsl() ); | 110 | String drugCost = DigitalUtils.division( monthDataVO.getYyf() , monthDataVO.getYsjsl() ); |
111 | if( ysjslD.doubleValue() > 0 ){ | 111 | Integer comparison_drug = DigitalUtils.compareTo( drugCost , monthDataVO.getTargetDrug() ) ; |
112 | Double drugCost = Double.parseDouble(monthDataVO.getYyf()) / ysjslD; | 112 | if(comparison_drug != null && comparison_drug > 0){ |
113 | Double targetDrugD = Double.parseDouble(monthDataVO.getTargetDrug()); | 113 | productDataVO.getDrugDeptartList().add( new FReportPowerMonthDataVO( monthDataVO.getDeptartName(), monthDataVO.getTargetDrug(),drugCost.toString(),monthDataVO.getYhcyqyy() ) ); |
114 | if( drugCost.longValue() > targetDrugD.longValue()){ | ||
115 | productDataVO.getDrugDeptartList().add( new FReportPowerMonthDataVO( monthDataVO.getDeptartName(), monthDataVO.getTargetDrug(),drugCost.toString(),monthDataVO.getYhcyqyy() ) ); | ||
116 | } | ||
117 | } | 114 | } |
118 | } | 115 | } |
119 | } | 116 | } |
... | @@ -155,28 +152,25 @@ public class OperationReportServiceImpl implements IOperationReportService { | ... | @@ -155,28 +152,25 @@ public class OperationReportServiceImpl implements IOperationReportService { |
155 | * @param tqysjslWaterVolume | 152 | * @param tqysjslWaterVolume |
156 | * @param disparityDay | 153 | * @param disparityDay |
157 | */ | 154 | */ |
158 | public void setChargeWater(ProductDataVO productDataVO,BigDecimal chargeWaterVolume, BigDecimal tqysjslWaterVolume,BigDecimal targetChargeWater, String disparityDay) { | 155 | public void setChargeWater(ProductDataVO productDataVO,String chargeWaterVolume, String tqysjslWaterVolume,String targetChargeWater, String disparityDay) { |
159 | productDataVO.setChargeWaterVolume(chargeWaterVolume);//收费水量 总量 | 156 | productDataVO.setChargeWaterVolume(chargeWaterVolume);//收费水量 总量 |
160 | // 除法运算,保留两位小数 | 157 | // 除法运算,保留两位小数 |
161 | BigDecimal avgDayWaterVolume = chargeWaterVolume.divide( new BigDecimal(disparityDay) , 2, RoundingMode.HALF_UP); | 158 | String avgDayWaterVolume = DigitalUtils.division(chargeWaterVolume ,disparityDay ); |
162 | productDataVO.setAvgDayWaterVolume( avgDayWaterVolume );//收费水量 日均值 | 159 | productDataVO.setAvgDayWaterVolume( avgDayWaterVolume );//收费水量 日均值 |
163 | //完成年度目标 | 160 | //完成年度目标 |
164 | if(targetChargeWater != null ){ | 161 | if(targetChargeWater != null ){ |
165 | BigDecimal completeRatio = chargeWaterVolume.divide( targetChargeWater ,2, RoundingMode.HALF_UP).multiply( BigDecimal.valueOf(100)); | 162 | String completeRatio = DigitalUtils.division(chargeWaterVolume ,targetChargeWater ); |
166 | productDataVO.setCompleteRatio( completeRatio );//完成年度目标 | 163 | productDataVO.setCompleteRatio( completeRatio );//完成年度目标 |
167 | int comparisonResult = completeRatio.compareTo(BigDecimal.valueOf(25) ); | 164 | |
165 | int comparisonResult = DigitalUtils.compareTo(completeRatio ,"25" ); | ||
168 | if(comparisonResult > 0 ){ | 166 | if(comparisonResult > 0 ){ |
169 | productDataVO.setSequentialProgress("超额完成时序进度"); | 167 | productDataVO.setSequentialProgress("超额完成时序进度"); |
170 | } else { | 168 | } else { |
171 | productDataVO.setSequentialProgress("基本满足时序进度"); | 169 | productDataVO.setSequentialProgress("基本满足时序进度"); |
172 | } | 170 | } |
173 | } | 171 | } |
174 | if(tqysjslWaterVolume != null ){ //增长率 | 172 | String chargeWaterRatio = DigitalUtils.division(chargeWaterVolume , tqysjslWaterVolume ) ; //增长率 |
175 | BigDecimal chargeWaterRatio = chargeWaterVolume.divide( tqysjslWaterVolume ,2, RoundingMode.HALF_UP); | 173 | productDataVO.setChargeWaterRatio( chargeWaterRatio ); |
176 | productDataVO.setChargeWaterRatio( chargeWaterRatio ); | ||
177 | } | ||
178 | |||
179 | |||
180 | } | 174 | } |
181 | 175 | ||
182 | /*** | 176 | /*** |
... | @@ -185,26 +179,22 @@ public class OperationReportServiceImpl implements IOperationReportService { | ... | @@ -185,26 +179,22 @@ public class OperationReportServiceImpl implements IOperationReportService { |
185 | * @param tqysjslWaterVolume | 179 | * @param tqysjslWaterVolume |
186 | * @param disparityDay | 180 | * @param disparityDay |
187 | */ | 181 | */ |
188 | public void setYsjslWater(ProductDataVO productDataVO,BigDecimal ysjslWaterVolume, BigDecimal tqysjslWaterVolume, String disparityDay) { | 182 | public void setYsjslWater(ProductDataVO productDataVO,String ysjslWaterVolume, String tqysjslWaterVolume, String disparityDay) { |
189 | productDataVO.setYsjslWaterVolume( ysjslWaterVolume );//实际水量 | 183 | productDataVO.setYsjslWaterVolume( ysjslWaterVolume );//实际水量 |
190 | 184 | ||
191 | // 除法运算,保留两位小数 | 185 | // 除法运算,保留两位小数 |
192 | BigDecimal avgDayWaterVolume = ysjslWaterVolume.divide( new BigDecimal(disparityDay) , 2, RoundingMode.HALF_UP); | 186 | String avgDayWaterVolume = DigitalUtils.division(ysjslWaterVolume ,disparityDay ); |
193 | productDataVO.setAvgDayWaterVolume( avgDayWaterVolume );//实际水量 日均值 | 187 | productDataVO.setAvgDayWaterVolume( avgDayWaterVolume );//实际水量 日均值 |
194 | 188 | ||
195 | //增长率 | 189 | //增长率 |
196 | if(tqysjslWaterVolume != null ){ | 190 | if(tqysjslWaterVolume != null ){ |
197 | BigDecimal chargeWaterRatio = ysjslWaterVolume.divide( tqysjslWaterVolume ,2, RoundingMode.HALF_UP); | 191 | String chargeWaterRatio = DigitalUtils.division(ysjslWaterVolume ,tqysjslWaterVolume ); |
198 | productDataVO.setYsjslWaterRatio( chargeWaterRatio );//完成年度目标 | 192 | productDataVO.setYsjslWaterRatio( chargeWaterRatio );//完成年度目标 |
199 | } | 193 | } |
200 | 194 | ||
201 | } | 195 | } |
202 | 196 | ||
203 | 197 | ||
204 | |||
205 | |||
206 | |||
207 | |||
208 | /*** | 198 | /*** |
209 | * 执行查询sql语句返回一个结果 | 199 | * 执行查询sql语句返回一个结果 |
210 | * @param sql | 200 | * @param sql | ... | ... |
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import com.skua.core.util.DateUtils; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | /** | ||
8 | * @auther kangwei | ||
9 | * @create 2024-10-15-9:45 | ||
10 | */ | ||
11 | @Data | ||
12 | public class DataVO { | ||
13 | |||
14 | @ApiModelProperty(value = "当月(yyyy-MM)") | ||
15 | private String nowMonth; | ||
16 | |||
17 | @ApiModelProperty(value = "去年(yyyy-MM)") | ||
18 | private String lastYear; | ||
19 | @ApiModelProperty(value = "上月(yyyy-MM)") | ||
20 | private String lastMonth; | ||
21 | |||
22 | @ApiModelProperty(value = "当月的开始时间(yyyy-MM-dd)") | ||
23 | private String nowStartTime; | ||
24 | @ApiModelProperty(value = "当月的结束时间(yyyy-MM-dd)") | ||
25 | private String nowEndTime; | ||
26 | |||
27 | |||
28 | @ApiModelProperty(value = "上月的开始时间(yyyy-MM-dd)") | ||
29 | private String lastMonthStartTime; | ||
30 | @ApiModelProperty(value = "上月的结束时间(yyyy-MM-dd)") | ||
31 | private String lastMonthEndTime; | ||
32 | |||
33 | |||
34 | @ApiModelProperty(value = "去年的开始时间(yyyy-MM-dd)") | ||
35 | private String lastYearStartTime; | ||
36 | @ApiModelProperty(value = "去年的结束时间(yyyy-MM-dd)") | ||
37 | private String lastYearEndTime; | ||
38 | |||
39 | public DataVO(String nowMonth) { | ||
40 | this.nowMonth = nowMonth; | ||
41 | this.lastYear = DateUtils.getLastYearMonthOfMonth(nowMonth); | ||
42 | this.lastMonth = DateUtils.getLastMonthOfMonth(nowMonth); | ||
43 | |||
44 | this.nowStartTime = nowMonth+"-01"; | ||
45 | this.nowEndTime = nowMonth+"-31"; | ||
46 | |||
47 | this.lastMonthStartTime = lastMonth+"-01"; | ||
48 | this.lastMonthEndTime = lastMonth+"-31"; | ||
49 | |||
50 | this.lastYearStartTime = lastYear+"-01"; | ||
51 | this.lastYearEndTime = lastYear +"-31"; | ||
52 | |||
53 | |||
54 | } | ||
55 | } |
... | @@ -14,12 +14,12 @@ public class FReportWaterMonthDataVO { | ... | @@ -14,12 +14,12 @@ public class FReportWaterMonthDataVO { |
14 | private String deptartName; | 14 | private String deptartName; |
15 | 15 | ||
16 | @ApiModelProperty(value = "比例") | 16 | @ApiModelProperty(value = "比例") |
17 | private BigDecimal ratio; | 17 | private String ratio; |
18 | 18 | ||
19 | @ApiModelProperty(value = "原因分析") | 19 | @ApiModelProperty(value = "原因分析") |
20 | private String causeAnalysis; | 20 | private String causeAnalysis; |
21 | 21 | ||
22 | public FReportWaterMonthDataVO(String deptartName, BigDecimal ratio, String causeAnalysis) { | 22 | public FReportWaterMonthDataVO(String deptartName, String ratio, String causeAnalysis) { |
23 | this.deptartName = deptartName; | 23 | this.deptartName = deptartName; |
24 | this.ratio = ratio; | 24 | this.ratio = ratio; |
25 | this.causeAnalysis = causeAnalysis; | 25 | this.causeAnalysis = causeAnalysis; | ... | ... |
1 | package com.skua.modules.report.vo; | 1 | package com.skua.modules.report.vo; |
2 | 2 | ||
3 | import com.skua.modules.report.vo.largeScreen.*; | ||
4 | import com.skua.tool.util.DigitalUtils; | ||
3 | import io.swagger.annotations.ApiModel; | 5 | import io.swagger.annotations.ApiModel; |
4 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; |
5 | import lombok.Data; | 7 | import lombok.Data; |
6 | 8 | ||
9 | import java.util.ArrayList; | ||
10 | import java.util.List; | ||
11 | |||
7 | /** | 12 | /** |
8 | * 月度生产数据报表 | 13 | * 月度生产数据报表 |
9 | */ | 14 | */ |
10 | @Data | 15 | @Data |
11 | @ApiModel(value="生产运营--大屏对象", description="生产运营--月度生产数据报表") | 16 | @ApiModel(value="生产运营--大屏对象", description="生产运营--月度生产数据报表") |
12 | public class JnhbLargeScreenVO { | 17 | public class JnhbLargeScreenVO { |
18 | @ApiModelProperty(value = "头部统计数值") | ||
19 | private List<ResultNumberVO> headStatisticsList = new ArrayList<>(8); | ||
20 | |||
21 | @ApiModelProperty(value = "各站点能源消耗排名") | ||
22 | private List<PowerConsumeVO> powerConsumeVOList = new ArrayList(); | ||
23 | |||
24 | |||
25 | @ApiModelProperty(value = "负荷率对象") | ||
26 | private List<LoadRateVO> loadRateVOList = new ArrayList<>(); | ||
27 | |||
28 | @ApiModelProperty(value = "CO2排放排名") | ||
29 | private List<ResultNumberVO> co2DataList = new ArrayList<>(); | ||
30 | |||
31 | |||
32 | @ApiModelProperty(value = "消减量统计") | ||
33 | private List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4); | ||
34 | |||
35 | @ApiModelProperty(value = "ESG减排趋势") | ||
36 | private List<ResultChartsVO> esgChartsList= new ArrayList<>(); | ||
37 | |||
38 | @ApiModelProperty(value = "吨消减能耗") | ||
39 | private List<ResultChartsVO> energyConsumeChartsList= new ArrayList<>(); | ||
40 | |||
41 | @ApiModelProperty(value = "废物处理对象集合") | ||
42 | private List<WasteMaterialVO> wasteMaterialList = new ArrayList<>();//废物处理对象集合 | ||
43 | @ApiModelProperty(value = "一级能耗设备数量") | ||
44 | private Integer equipmentL1; | ||
45 | @ApiModelProperty(value = "二级能耗设备") | ||
46 | private Integer equipmentL2; | ||
47 | /*** | ||
48 | * 设置消减统计记录 | ||
49 | */ | ||
50 | public void setHeadStatisticsValue(JnhbReportData reportData){ | ||
51 | // wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh | ||
52 | ////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水 | ||
53 | this.getHeadStatisticsList().get(0).setValue( reportData.getWssjcll() ); | ||
54 | this.getHeadStatisticsList().get(1).setValue( reportData.getWsfhl() ); | ||
55 | this.getHeadStatisticsList().get(2).setValue( reportData.getDh() ); | ||
56 | this.getHeadStatisticsList().get(3).setValue( reportData.getQy() ); | ||
57 | //this.getHeadStatisticsList().get(4).setValue( reportData.getWssjcll() ); | ||
58 | this.getHeadStatisticsList().get(5).setValue( reportData.getZhnyxhl() ); | ||
59 | this.getHeadStatisticsList().get(6).setValue( reportData.getEyhtpfl() ); | ||
60 | this.getHeadStatisticsList().get(7).setValue( reportData.getDsdh() ); | ||
61 | } | ||
62 | public void setHeadStatisticsValueTB(JnhbReportData reportData){ | ||
63 | // wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh | ||
64 | ////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水 | ||
65 | this.getHeadStatisticsList().get(0).setValueTb( reportData.getWssjcll() ); | ||
66 | this.getHeadStatisticsList().get(1).setValueTb( reportData.getWsfhl() ); | ||
67 | this.getHeadStatisticsList().get(2).setValueTb( reportData.getDh() ); | ||
68 | this.getHeadStatisticsList().get(3).setValueTb( reportData.getQy() ); | ||
69 | //this.getHeadStatisticsList().get(4).setValueTb( reportData.getWssjcll() ); | ||
70 | this.getHeadStatisticsList().get(5).setValueTb( reportData.getZhnyxhl() ); | ||
71 | this.getHeadStatisticsList().get(6).setValueTb( reportData.getEyhtpfl() ); | ||
72 | this.getHeadStatisticsList().get(7).setValueTb( reportData.getDsdh() ); | ||
73 | } | ||
74 | public void setHeadStatisticsValueHB(JnhbReportData reportData){ | ||
75 | // wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh | ||
76 | ////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水 | ||
77 | this.getHeadStatisticsList().get(0).setValueHb( reportData.getWssjcll() ); | ||
78 | this.getHeadStatisticsList().get(1).setValueHb( reportData.getWsfhl() ); | ||
79 | this.getHeadStatisticsList().get(2).setValueHb( reportData.getDh() ); | ||
80 | this.getHeadStatisticsList().get(3).setValueHb( reportData.getQy() ); | ||
81 | //this.getHeadStatisticsList().get(4).setValueHb( reportData.getWssjcll() ); | ||
82 | this.getHeadStatisticsList().get(5).setValueHb( reportData.getZhnyxhl() ); | ||
83 | this.getHeadStatisticsList().get(6).setValueHb( reportData.getEyhtpfl() ); | ||
84 | this.getHeadStatisticsList().get(7).setValueHb( reportData.getDsdh() ); | ||
85 | } | ||
86 | |||
87 | /*** | ||
88 | * 设置消减统计记录 | ||
89 | */ | ||
90 | public void setReduceStatistics(int index , ResultNumberVO resultNumberVO){ | ||
91 | ResultNumberVO resultNumberVOTemp = reduceStatisticsList.get( index - 1); | ||
92 | resultNumberVOTemp.setValue(DigitalUtils.add(resultNumberVOTemp.getValue() , resultNumberVO.getValue() ) ); | ||
93 | resultNumberVOTemp.setValueHb( DigitalUtils.add(resultNumberVOTemp.getValueHb() , resultNumberVO.getValueHb() ) ); | ||
94 | resultNumberVOTemp.setValueTb( DigitalUtils.add(resultNumberVOTemp.getValueTb() , resultNumberVO.getValueTb() ) ); | ||
95 | } | ||
96 | |||
97 | |||
98 | public JnhbLargeScreenVO(){ | ||
99 | //头部数值统计 | ||
100 | String names = "污水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水"; | ||
101 | String[] nameList = names.split(","); | ||
102 | ResultNumberVO numberVO = null; | ||
103 | for(String name : nameList){ | ||
104 | numberVO = new ResultNumberVO(); | ||
105 | numberVO.setName( name); | ||
106 | this.getHeadStatisticsList().add(numberVO) ; | ||
107 | } | ||
108 | //消减量统计 | ||
109 | names= "COD,NH3-N,TP,TN"; | ||
110 | nameList = names.split(","); | ||
111 | for(String name : nameList){ | ||
112 | numberVO = new ResultNumberVO(); | ||
113 | numberVO.setName( name); | ||
114 | this.getReduceStatisticsList().add(numberVO) ; | ||
115 | } | ||
116 | |||
117 | |||
13 | 118 | ||
14 | /**所属厂区*/ | 119 | } |
15 | @ApiModelProperty(value = "所属厂区") | ||
16 | private String departId; | ||
17 | /**厂区名称*/ | ||
18 | @ApiModelProperty(value = "厂区名称") | ||
19 | private String departName; | ||
20 | /**污水处理量规模*/ | ||
21 | @ApiModelProperty(value = "污水处理量规模(万吨)") | ||
22 | private String wsclgm; | ||
23 | /**实际污水处理量*/ | ||
24 | @ApiModelProperty(value = "实际污水处理量(万吨)") | ||
25 | private String wssjcll; | ||
26 | /**系统负荷率*/ | ||
27 | @ApiModelProperty(value = "系统负荷率(%)") | ||
28 | private String wsfhl; | ||
29 | /**电耗*/ | ||
30 | @ApiModelProperty(value = "电耗(万千瓦时)") | ||
31 | private String dh; | ||
32 | /**光伏发电量(万千瓦时)*/ | ||
33 | @ApiModelProperty(value = "光伏发电量(万千瓦时)") | ||
34 | private String gffdl; | ||
35 | /**汽油*/ | ||
36 | @ApiModelProperty(value = "汽油(吨)") | ||
37 | private String qy; | ||
38 | /**综合能源消费量*/ | ||
39 | @ApiModelProperty(value = "综合能源消费量(吨标准煤)") | ||
40 | private String zhnyxhl; | ||
41 | /**二氧化碳排放量*/ | ||
42 | @ApiModelProperty(value = "二氧化碳排放量(吨CO2当量)") | ||
43 | private String eyhtpfl; | ||
44 | /**吨水电耗*/ | ||
45 | @ApiModelProperty(value = "吨水电耗(千瓦时/吨)") | ||
46 | private String dsdh; | ||
47 | /**COD消减量*/ | ||
48 | @ApiModelProperty(value = "COD消减量(吨)") | ||
49 | private String codxjl; | ||
50 | /**NH3-N消减量*/ | ||
51 | @ApiModelProperty(value = "NH3-N消减量(吨)") | ||
52 | private String adxjl; | ||
53 | /**TP消减量*/ | ||
54 | @ApiModelProperty(value = "TP消减量(吨)") | ||
55 | private String tpxjl; | ||
56 | /**TN消减量*/ | ||
57 | @ApiModelProperty(value = "TN消减量(吨)") | ||
58 | private String tnxjl; | ||
59 | /**一般固废产生量*/ | ||
60 | @ApiModelProperty(value = "一般固废产生量(吨)") | ||
61 | private String ybgfcsl; | ||
62 | /**一般固废处置量*/ | ||
63 | @ApiModelProperty(value = "一般固废处置量(吨)") | ||
64 | private String ybgfczl; | ||
65 | /**绝干泥量*/ | ||
66 | @ApiModelProperty(value = "绝干泥量(吨)") | ||
67 | private String jgwnl; | ||
68 | /**危险废物产生量*/ | ||
69 | @ApiModelProperty(value = "危险废物产生量(吨)") | ||
70 | private String wfcsl; | ||
71 | /**危险废物处置量*/ | ||
72 | @ApiModelProperty(value = "危险废物处置量(吨)") | ||
73 | private String wfczl; | ||
74 | 120 | ||
75 | } | 121 | } | ... | ... |
... | @@ -15,6 +15,8 @@ public class JnhbReportData { | ... | @@ -15,6 +15,8 @@ public class JnhbReportData { |
15 | /**厂区名称*/ | 15 | /**厂区名称*/ |
16 | @ApiModelProperty(value = "厂区名称") | 16 | @ApiModelProperty(value = "厂区名称") |
17 | private String departName; | 17 | private String departName; |
18 | |||
19 | |||
18 | /**污水处理量规模*/ | 20 | /**污水处理量规模*/ |
19 | @ApiModelProperty(value = "污水处理量规模(万吨)") | 21 | @ApiModelProperty(value = "污水处理量规模(万吨)") |
20 | private String wsclgm; | 22 | private String wsclgm; | ... | ... |
... | @@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel; | ... | @@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel; |
4 | import io.swagger.annotations.ApiModelProperty; | 4 | import io.swagger.annotations.ApiModelProperty; |
5 | import lombok.Data; | 5 | import lombok.Data; |
6 | 6 | ||
7 | import java.math.BigDecimal; | ||
8 | import java.util.ArrayList; | 7 | import java.util.ArrayList; |
9 | import java.util.List; | 8 | import java.util.List; |
10 | 9 | ||
... | @@ -19,24 +18,24 @@ public class ProductDataVO { | ... | @@ -19,24 +18,24 @@ public class ProductDataVO { |
19 | @ApiModelProperty(value = "水务厂站数量") | 18 | @ApiModelProperty(value = "水务厂站数量") |
20 | private String deptartCount; | 19 | private String deptartCount; |
21 | @ApiModelProperty(value = "收费水量") | 20 | @ApiModelProperty(value = "收费水量") |
22 | private BigDecimal chargeWaterVolume;//收费水量9854.012552万吨 | 21 | private String chargeWaterVolume;//收费水量9854.012552万吨 |
23 | @ApiModelProperty(value = "收费水量-日均值") | 22 | @ApiModelProperty(value = "收费水量-日均值") |
24 | private BigDecimal avgDayWaterVolume;//平均108.29万吨/天 | 23 | private String avgDayWaterVolume;//平均108.29万吨/天 |
25 | @ApiModelProperty(value = "收费水量-同比增长") | 24 | @ApiModelProperty(value = "收费水量-同比增长") |
26 | private BigDecimal chargeWaterRatio; | 25 | private String chargeWaterRatio; |
27 | @ApiModelProperty(value = "收费水量-完成率") | 26 | @ApiModelProperty(value = "收费水量-完成率") |
28 | private BigDecimal completeRatio; | 27 | private String completeRatio; |
29 | @ApiModelProperty(value = "序时进度") | 28 | @ApiModelProperty(value = "序时进度") |
30 | private String sequentialProgress; | 29 | private String sequentialProgress; |
31 | 30 | ||
32 | 31 | ||
33 | 32 | ||
34 | @ApiModelProperty(value = "实际处理水量") | 33 | @ApiModelProperty(value = "实际处理水量") |
35 | private BigDecimal ysjslWaterVolume; | 34 | private String ysjslWaterVolume; |
36 | @ApiModelProperty(value = "实际处理水量-日均值") | 35 | @ApiModelProperty(value = "实际处理水量-日均值") |
37 | private BigDecimal avgYsjslWaterVolume;//平均99.76万吨/天 | 36 | private String avgYsjslWaterVolume;//平均99.76万吨/天 |
38 | @ApiModelProperty(value = "实际处理水量--同比增长") | 37 | @ApiModelProperty(value = "实际处理水量--同比增长") |
39 | private BigDecimal ysjslWaterRatio; | 38 | private String ysjslWaterRatio; |
40 | 39 | ||
41 | 40 | ||
42 | @ApiModelProperty(value = "药量目标") | 41 | @ApiModelProperty(value = "药量目标") |
... | @@ -73,7 +72,7 @@ public class ProductDataVO { | ... | @@ -73,7 +72,7 @@ public class ProductDataVO { |
73 | 72 | ||
74 | 73 | ||
75 | public String getWaterDeptartName() { | 74 | public String getWaterDeptartName() { |
76 | return getDeptName(waterDeptartList); | 75 | return getDeptName(waterDeptartList); |
77 | } | 76 | } |
78 | 77 | ||
79 | public String getPowerDeptartName() { | 78 | public String getPowerDeptartName() { |
... | @@ -104,5 +103,4 @@ public class ProductDataVO { | ... | @@ -104,5 +103,4 @@ public class ProductDataVO { |
104 | } | 103 | } |
105 | return deptName; | 104 | return deptName; |
106 | } | 105 | } |
107 | |||
108 | } | 106 | } | ... | ... |
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | import java.util.List; | ||
7 | |||
8 | /** | ||
9 | * @auther kangwei | ||
10 | * @create 2024-10-15-14:19 | ||
11 | */ | ||
12 | @Data | ||
13 | public class ChartData { | ||
14 | @ApiModelProperty(value = "机构名称或日期") | ||
15 | public String name; | ||
16 | @ApiModelProperty(value = "数值") | ||
17 | public List<String> data; | ||
18 | } |
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | |||
8 | @Data | ||
9 | @ApiModel(value="统计结果接收对象-负荷率对象", description="统计结果接收对象-负荷率对象") | ||
10 | public class LoadRateVO extends ResultNumberVO{ | ||
11 | |||
12 | /**所属厂区*/ | ||
13 | @ApiModelProperty(value = "所属厂区") | ||
14 | private String departId; | ||
15 | /**厂区名称*/ | ||
16 | @ApiModelProperty(value = "厂区名称") | ||
17 | private String departName; | ||
18 | /**污水处理量规模*/ | ||
19 | @ApiModelProperty(value = "污水处理量规模(万吨)") | ||
20 | private String wsclgm; | ||
21 | /**实际污水处理量*/ | ||
22 | @ApiModelProperty(value = "实际污水处理量(万吨)") | ||
23 | private String wssjcll; | ||
24 | /**系统负荷率*/ | ||
25 | @ApiModelProperty(value = "系统负荷率(%)") | ||
26 | private String wsfhl; | ||
27 | |||
28 | |||
29 | public LoadRateVO(){ | ||
30 | |||
31 | } | ||
32 | |||
33 | public LoadRateVO( String departId, String departName, String wsclgm, String wssjcll, String wsfhl) { | ||
34 | this.departId = departId; | ||
35 | this.departName = departName; | ||
36 | this.wsclgm = wsclgm; | ||
37 | this.wssjcll = wssjcll; | ||
38 | this.wsfhl = wsfhl; | ||
39 | } | ||
40 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/vo/largeScreen/PowerConsumeVO.java
0 → 100644
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | |||
4 | /** | ||
5 | * 电耗统计 | ||
6 | */ | ||
7 | |||
8 | import io.swagger.annotations.ApiModel; | ||
9 | import io.swagger.annotations.ApiModelProperty; | ||
10 | import lombok.Data; | ||
11 | |||
12 | @Data | ||
13 | @ApiModel(value="统计结果接收对象-各站点能源消耗排名", description="统计结果接收对象-各站点能源消耗排名") | ||
14 | public class PowerConsumeVO extends ResultNumberVO{ | ||
15 | |||
16 | /**所属厂区*/ | ||
17 | @ApiModelProperty(value = "所属厂区") | ||
18 | private String departId; | ||
19 | /**厂区名称*/ | ||
20 | @ApiModelProperty(value = "厂区名称") | ||
21 | private String departName; | ||
22 | |||
23 | /**电耗*/ | ||
24 | @ApiModelProperty(value = "电耗(万千瓦时)") | ||
25 | private String dh; | ||
26 | /**光伏发电量(万千瓦时)*/ | ||
27 | @ApiModelProperty(value = "光伏发电量(万千瓦时)") | ||
28 | private String gffdl; | ||
29 | /**汽油*/ | ||
30 | @ApiModelProperty(value = "汽油(吨)") | ||
31 | private String qy; | ||
32 | /**综合能源消费量*/ | ||
33 | @ApiModelProperty(value = "综合能源消费量(吨标准煤)") | ||
34 | private String zhnyxhl; | ||
35 | /**二氧化碳排放量*/ | ||
36 | @ApiModelProperty(value = "二氧化碳排放量(吨CO2当量)") | ||
37 | private String eyhtpfl; | ||
38 | /**吨水电耗*/ | ||
39 | @ApiModelProperty(value = "吨水电耗(千瓦时/吨)") | ||
40 | private String dsdh; | ||
41 | |||
42 | public PowerConsumeVO( String departId, String departName, String dh, String gffdl, String qy, String zhnyxhl, String eyhtpfl, String dsdh) { | ||
43 | this.departId = departId; | ||
44 | this.departName = departName; | ||
45 | this.dh = dh; | ||
46 | this.gffdl = gffdl; | ||
47 | this.qy = qy; | ||
48 | this.zhnyxhl = zhnyxhl; | ||
49 | this.eyhtpfl = eyhtpfl; | ||
50 | this.dsdh = dsdh; | ||
51 | } | ||
52 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/vo/largeScreen/ResultChartsVO.java
0 → 100644
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | import com.skua.modules.report.vo.JnhbReportData; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | |||
8 | import java.util.ArrayList; | ||
9 | import java.util.HashMap; | ||
10 | import java.util.List; | ||
11 | import java.util.Map; | ||
12 | |||
13 | /** | ||
14 | * 统计功能配置表 | ||
15 | */ | ||
16 | @Data | ||
17 | @ApiModel(value="统计结果接收对象-图表型", description="统计结果接收对象-图表型") | ||
18 | public class ResultChartsVO { | ||
19 | @ApiModelProperty(value = "x轴") | ||
20 | private List<String> xLine = new ArrayList<>(); | ||
21 | @ApiModelProperty(value = "COD数据集合") | ||
22 | private List<String> codDataList = new ArrayList<>();//COD、NH3-N、TP、TN | ||
23 | @ApiModelProperty(value = "NH3-N数据集合") | ||
24 | private List<String> nh3DataList = new ArrayList<>();//COD、NH3-N、TP、TN | ||
25 | @ApiModelProperty(value = "TP数据集合") | ||
26 | private List<String> tpDataList = new ArrayList<>();//COD、NH3-N、TP、TN | ||
27 | @ApiModelProperty(value = "TN数据集合") | ||
28 | private List<String> tnDataList = new ArrayList<>();//COD、NH3-N、TP、TN | ||
29 | //X轴 data: ['A厂','B厂','C厂','D厂','E厂','F厂'] | ||
30 | //Y轴 data: [name: 'COD',data: [120, 200, 150, 80, 70, 110, 130], type: 'bar',stack: "check",}] | ||
31 | |||
32 | public void setData(JnhbReportData reportData ){ | ||
33 | this.getXLine().add( reportData.getDepartName() ) ; | ||
34 | this.getCodDataList().add( reportData.getCodxjl() ) ; | ||
35 | this.getNh3DataList().add( reportData.getTnxjl() ) ; | ||
36 | this.getTpDataList().add( reportData.getTpxjl() ) ; | ||
37 | this.getTnDataList().add( reportData.getTnxjl() ) ; | ||
38 | } | ||
39 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/vo/largeScreen/ResultNumberVO.java
0 → 100644
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | import com.skua.tool.util.DigitalUtils; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | |||
8 | /** | ||
9 | * 统计功能配置表 | ||
10 | */ | ||
11 | @Data | ||
12 | @ApiModel(value="统计对象--同比、环比数据", description="统计对象--同比、环比数据") | ||
13 | public class ResultNumberVO { | ||
14 | |||
15 | @ApiModelProperty(value = "名称") | ||
16 | private String name; | ||
17 | |||
18 | @ApiModelProperty(value = "结果") | ||
19 | private String value; | ||
20 | |||
21 | @ApiModelProperty(value = "同比(去年同期)") | ||
22 | private String valueTb; | ||
23 | |||
24 | @ApiModelProperty(value = "环比(上月)") | ||
25 | private String valueHb; | ||
26 | |||
27 | @ApiModelProperty(value = "同比(去年同期)排名") | ||
28 | private String valueTbRank; | ||
29 | |||
30 | @ApiModelProperty(value = "环比(上月)排名") | ||
31 | private String valueHbRank; | ||
32 | |||
33 | |||
34 | @ApiModelProperty(value = "同比比例") | ||
35 | private String valueTbRatio; | ||
36 | @ApiModelProperty(value = "环比比例") | ||
37 | private String valueHbRatio; | ||
38 | |||
39 | public String getValueTbRatio() { | ||
40 | this.valueTbRatio = DigitalUtils.division( this.value , this.valueTb) ; | ||
41 | return valueTbRatio; | ||
42 | } | ||
43 | |||
44 | public String getValueHbRatio() { | ||
45 | this.valueHbRatio = DigitalUtils.division( this.value , this.valueHb) ; | ||
46 | return valueHbRatio; | ||
47 | } | ||
48 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/vo/largeScreen/WasteMaterialVO.java
0 → 100644
1 | package com.skua.modules.report.vo.largeScreen; | ||
2 | |||
3 | import com.skua.tool.util.DigitalUtils; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | |||
8 | /** | ||
9 | * 统计功能配置表 | ||
10 | */ | ||
11 | @Data | ||
12 | @ApiModel(value="统计结果接收对象-废物处理对象", description="统计结果接收对象-废物处理对象") | ||
13 | public class WasteMaterialVO { | ||
14 | |||
15 | /**所属厂区*/ | ||
16 | @ApiModelProperty(value = "所属厂区") | ||
17 | private String departId; | ||
18 | /**厂区名称*/ | ||
19 | @ApiModelProperty(value = "厂区名称") | ||
20 | private String departName; | ||
21 | /**一般固废产生量*/ | ||
22 | @ApiModelProperty(value = "一般固废产生量(吨)") | ||
23 | private String ybgfcsl; | ||
24 | /**一般固废处置量*/ | ||
25 | @ApiModelProperty(value = "一般固废处置量(吨)") | ||
26 | private String ybgfczl; | ||
27 | /**绝干泥量*/ | ||
28 | @ApiModelProperty(value = "绝干泥量(吨)") | ||
29 | private String jgwnl; | ||
30 | /**危险废物产生量*/ | ||
31 | @ApiModelProperty(value = "危险废物产生量(吨)") | ||
32 | private String wfcsl; | ||
33 | /**危险废物处置量*/ | ||
34 | @ApiModelProperty(value = "危险废物处置量(吨)") | ||
35 | private String wfczl; | ||
36 | |||
37 | @ApiModelProperty(value = "一般固废产生处理率") | ||
38 | private String ybgfcslRate; | ||
39 | |||
40 | @ApiModelProperty(value = "危险废物-处理率") | ||
41 | private String wfcslRate; | ||
42 | |||
43 | public WasteMaterialVO(String departId, String departName, String ybgfcsl, String ybgfczl, String jgwnl, String wfcsl, String wfczl) { | ||
44 | this.departId = departId; | ||
45 | this.departName = departName; | ||
46 | this.ybgfcsl = ybgfcsl; | ||
47 | this.ybgfczl = ybgfczl; | ||
48 | this.jgwnl = jgwnl; | ||
49 | this.wfcsl = wfcsl; | ||
50 | this.wfczl = wfczl; | ||
51 | |||
52 | ybgfcslRate = DigitalUtils.division( ybgfczl,ybgfcsl ); | ||
53 | wfcslRate = DigitalUtils.division( wfczl,wfcsl ); | ||
54 | } | ||
55 | |||
56 | |||
57 | |||
58 | } |
-
请 注册 或 登录 后发表评论