82ff0e94 张雷

节能环保报表开发

1 个父辈 89067cfb
正在显示 17 个修改的文件 包含 616 行增加24 行删除
......@@ -22,8 +22,15 @@ public class DangerDatabaseResult {
/**最近风险点*/
@ApiModelProperty(value = "最近风险点")
private String dangerLocation;
/**隐患排查事件数量*/
@ApiModelProperty(value = "隐患排查事件数量")
/**是否异常*/
@ApiModelProperty(value = "是否异常")
private String isFault;
/**巡查人员*/
@ApiModelProperty(value = "巡查人员")
private String dangerUser;
/**巡查照片*/
@ApiModelProperty(value = "巡查照片")
private String dangerImg;
}
......
......@@ -116,10 +116,8 @@ public class ThreeDController {
List<Object> list = new ArrayList<>();
for (Map<String, Object> deviceMap : deviceList) {
String status = "offline";
String id = String.valueOf(deviceMap.get("departId"));
String departName = String.valueOf(deviceMap.get("departName"));
String deviceId = String.valueOf(deviceMap.get("deviceId"));
String deviceStatus = String.valueOf(deviceMap.get("deviceStatus"));
String sql = "SELECT count(1) FROM realtimedata WHERE factoryname ='" + deviceId + "' AND nm like'" + "%IoStatus%'" + " AND v = '" + "1'";
Map<String, Object> countMap = pgDb.queryForMap(sql);
Integer count = Integer.parseInt(String.valueOf(countMap.get("count")));
......
......@@ -89,7 +89,8 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
# url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
username: root
password: jkauto@123
driver-class-name: com.mysql.jdbc.Driver
......
......@@ -46,10 +46,7 @@ public class FCustomReportDatasetController {
private ISequenceService sequenceService;
/**
* 获取数据填报配置报表
* @param fCustomReportDataset
* @param pageNo
* @param pageSize
* @param req
* @param reportId
* @return
*/
@AutoLog(value = "数据集管理-填报报表数据集获取")
......@@ -64,21 +61,17 @@ public class FCustomReportDatasetController {
}
/**
* 分页列表查询
* @param fCustomReportDataset
* @param pageNo
* @param pageSize
* @param req
* @param reportId
* @return
*/
@AutoLog(value = "数据集管理-数据集信息树获取")
@ApiOperation(value="数据集管理-数据集信息树获取", notes="数据集管理-数据集信息树获取")
@GetMapping(value = "/datasetTree")
public Result<List<TreeData>> getDatasetTree(String reportId,
HttpServletRequest req) {
public Result<List<TreeData>> getDatasetTree(String reportId) {
Result<List<TreeData>> result = new Result<>();
//获取数据列表
List<FCustomReportDatasetVO> fieldList=fCustomReportDatasetService.getDatasetTree(reportId);
List<FCustomReportDatasetVO> list=new ArrayList<FCustomReportDatasetVO>();
//数据集默认添加时间、厂站字段
for(FCustomReportDatasetVO vo : fieldList) {
......@@ -104,7 +97,7 @@ public class FCustomReportDatasetController {
}
/**
* 将SysDeptUserVO对象数据填充到TransTreeModel中
* @param sysDeptUserVO
* @param fCustomReportDatasetVO
* @return
*/
private TransTreeModel convertToTreeModel(FCustomReportDatasetVO fCustomReportDatasetVO) {
......@@ -137,7 +130,7 @@ public class FCustomReportDatasetController {
}
return result;
}
/**
* 通过id删除
* @param id
......@@ -155,10 +148,10 @@ public class FCustomReportDatasetController {
}
return Result.ok("删除成功!");
}
/**
* 通过填报报表id删除
* @param id
* @param reportId
* @return
*/
@AutoLog(value = "数据集管理-通过填报报表id删除")
......@@ -173,7 +166,7 @@ public class FCustomReportDatasetController {
}
return Result.ok("删除成功!");
}
/**
* 批量删除
* @param ids
......
......@@ -4,6 +4,10 @@ import java.util.List;
import java.util.Map;
import com.skua.modules.custom.vo.DepartWeekReportVO;
import com.skua.modules.report.vo.JnhbReportData;
import com.skua.modules.report.vo.JnhbReportDetailsDy;
import com.skua.modules.report.vo.JnhbReportDetailsHj;
import com.skua.modules.report.vo.JnhbReportDetailsJs;
import org.apache.ibatis.annotations.Param;
import com.skua.modules.custom.entity.FCustomReportDataset;
......@@ -89,4 +93,18 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
@Param(value="week") String week,@Param(value="startDate") String startDate,@Param(value="endDate") String endDate);
List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate);
List<JnhbReportData> getJnhbReport(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
@Param(value="start") String start, @Param(value="end") String end);
String getChildDepartId(@Param(value="departId") String departId);
List<JnhbReportDetailsDy> getDyList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
@Param(value="departId") String departId, @Param(value="year") String year);
List<JnhbReportDetailsJs> getJsList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
@Param(value="departId") String departId, @Param(value="year") String year);
List<JnhbReportDetailsHj> getHjList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
@Param(value="departId") String departId, @Param(value="year") String year);
}
......
......@@ -254,4 +254,214 @@
d.depart_order
</select>
<select id="getJnhbReport" resultType="com.skua.modules.report.vo.JnhbReportData">
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
f.pro_scale * v2.day_num AS wsclgm,
v2.clsl AS wssjcll,
round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl,
v3.dh,
v3.qy,
ROUND(0.123*v3.dh+1.4286*v3.qy,4) AS zhnyxhl,
ROUND(3*v3.qy+0.703*10*v3.dh,4) AS eyhtpfl,
ROUND( v3.dh / v2.clsl, 2 ) AS dsdh,
v3.wnl AS ybgfcsl,
v3.ybgfczl AS ybgfczl,
ROUND(v3.wnl*(1-v3.wnhsl/100),2) AS jgwnl,
v3.wfcsl AS wfcsl,
v3.wfczl AS wfczl
FROM
sys_depart d
LEFT JOIN sys_factory_info f ON f.depart_id = d.id
LEFT JOIN (
SELECT
v.depart_id,
ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl,
count( v.id ) AS day_num
FROM
${dataViewName2} v
WHERE
v.time &gt;= #{start} AND v.time &lt;= #{end}
GROUP BY
v.depart_id
) v2 ON v2.depart_id = d.id
LEFT JOIN (
SELECT
v.depart_id,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dh,
ROUND( SUM( v.GFFDL ) / 10000, 2 ) AS gffdl,
ROUND( SUM( v.QY ) / 10000, 2 ) AS qy,
ROUND( SUM( v.WNL ), 2 ) AS wnl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybgfczl,
ROUND( SUM( v.WFCSL ), 2 ) AS wfcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wfczl
FROM
${dataViewName3} v
WHERE
v.time &gt;= #{start} AND v.time &lt;= #{end}
GROUP BY
v.depart_id
) v3 ON v3.depart_id = d.id
WHERE
d.depart_type = 1
ORDER BY
d.depart_order
</select>
<select id="getChildDepartId" resultType="java.lang.String">
SELECT
GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
FROM
sys_depart
WHERE
parent_id IN
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
OR id IN
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
)
</select>
<select id="getDyList" resultType="com.skua.modules.report.vo.JnhbReportDetailsDy">
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
<select id="getJsList" resultType="com.skua.modules.report.vo.JnhbReportDetailsJs">
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
<select id="getHjList" resultType="com.skua.modules.report.vo.JnhbReportDetailsHj">
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
</mapper>
......
......@@ -6,6 +6,7 @@ import java.util.Map;
import com.baomidou.mybatisplus.extension.service.IService;
import com.skua.modules.custom.entity.FCustomReportDataset;
import com.skua.modules.custom.vo.FCustomReportDatasetVO;
import com.skua.modules.report.vo.JnhbReportData;
/**
* 数据集管理
......@@ -91,4 +92,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
Map<String, Object> getWeekReport(String dataTime, String departId, String week);
Map<String, Object> reportWeekShow(String dataTime, String week);
//节能环保统计报表
List<JnhbReportData> jnhbReportShow(String departId, String month);
//节能环保统计报表明细
Map<String, Object> jnhbReportDetails(String departId, String month);
}
......
......@@ -13,13 +13,20 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.time.temporal.WeekFields;
import java.util.*;
import java.util.stream.Collectors;
import com.skua.modules.report.vo.JnhbReportData;
import com.skua.modules.report.vo.JnhbReportDetailsDy;
import com.skua.modules.report.vo.JnhbReportDetailsHj;
import com.skua.modules.report.vo.JnhbReportDetailsJs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* 数据集管理
*/
......@@ -208,6 +215,35 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
}
@Override
public List<JnhbReportData> jnhbReportShow(String departId, String month) {
String start = month.substring(0,4)+"-01-31";
String end = month + "-31";
String departIds = mapper.getChildDepartId(departId);
String dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", departIds, start, end);
String dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end);
List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end);
return list;
}
@Override
public Map<String, Object> jnhbReportDetails(String departId, String month) {
Map<String, Object> map = new HashMap<>();
List<JnhbReportDetailsDy> dyList = new ArrayList<>();
List<JnhbReportDetailsJs> jsList = new ArrayList<>();
List<JnhbReportDetailsHj> hjList = new ArrayList<>();
String year = month.substring(0,4);
String dataViewName2 = ReportViewUtil.buildViewLike("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", departId, year);
String dataViewName3 = ReportViewUtil.buildViewLike("3a243d5715b9e1a3753c180872ca0df9","", departId, year);
dyList = mapper.getDyList(dataViewName2, dataViewName3, departId, year);
jsList = mapper.getJsList(dataViewName2, dataViewName3, departId, year);
hjList = mapper.getHjList(dataViewName2, dataViewName3, departId, year);
map.put("zbtj",dyList);
map.put("zbfx",jsList);
map.put("zblj",hjList);
return map;
}
@Override
public Map<String, Object> reportWeekShow(String dataTime, String week) {
Map<String, Object> map = new HashMap<>();
List<DepartWeekReportVO> list = new ArrayList<>();
......@@ -231,4 +267,5 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
return map;
}
}
......
......@@ -9,6 +9,7 @@ import com.skua.core.util.ConvertUtils;
import com.skua.core.util.DateUtils;
import com.skua.modules.custom.service.IFCustomReportDatasetService;
import com.skua.modules.report.service.IReportDataService;
import com.skua.modules.report.vo.JnhbReportData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -166,4 +167,24 @@ public class ReportDataController {
return result;
}
@AutoLog(value = "能源节约与生态环境保护统计表展示")
@ApiOperation(value = "能源节约与生态环境保护统计表展示", notes = "能源节约与生态环境保护统计表展示")
@GetMapping(value = "/jnhbReportShow")
public Result<List<JnhbReportData>> jnhbReportShow(String departId, String month) {
Result<List<JnhbReportData>> result = new Result<>();
List<JnhbReportData> list = fCustomReportDatasetService.jnhbReportShow(departId,month);
result.setResult(list);
return result;
}
@AutoLog(value = "能源节约与生态环境保护统计表明细展示")
@ApiOperation(value = "能源节约与生态环境保护统计表明细展示", notes = "能源节约与生态环境保护统计表明细展示")
@GetMapping(value = "/jnhbReportDetails")
public Result<Map<String,Object>> jnhbReportDetails(String departId, String month) {
Result<Map<String,Object>> result = new Result<>();
Map<String,Object> map = fCustomReportDatasetService.jnhbReportDetails(departId,month);
result.setResult(map);
return result;
}
}
......
package com.skua.modules.report.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 报表展示
*/
@Data
public class JnhbReportData {
/**所属厂区*/
@ApiModelProperty(value = "所属厂区")
private String departId;
/**厂区名称*/
@ApiModelProperty(value = "厂区名称")
private String departName;
/**污水处理量规模*/
@ApiModelProperty(value = "污水处理量规模(万吨)")
private String wsclgm;
/**实际污水处理量*/
@ApiModelProperty(value = "实际污水处理量(万吨)")
private String wssjcll;
/**系统负荷率*/
@ApiModelProperty(value = "系统负荷率(%)")
private String wsfhl;
/**电耗*/
@ApiModelProperty(value = "电耗(万千瓦时)")
private String dh;
/**光伏发电量(万千瓦时)*/
@ApiModelProperty(value = "光伏发电量(万千瓦时)")
private String gffdl;
/**汽油*/
@ApiModelProperty(value = "汽油(吨)")
private String qy;
/**综合能源消费量*/
@ApiModelProperty(value = "综合能源消费量(吨标准煤)")
private String zhnyxhl;
/**二氧化碳排放量*/
@ApiModelProperty(value = "二氧化碳排放量(吨CO2当量)")
private String eyhtpfl;
/**吨水电耗*/
@ApiModelProperty(value = "吨水电耗(千瓦时/吨)")
private String dsdh;
/**COD消减量*/
@ApiModelProperty(value = "COD消减量(吨)")
private String codxjl;
/**NH3-N消减量*/
@ApiModelProperty(value = "NH3-N消减量(吨)")
private String adxjl;
/**TP消减量*/
@ApiModelProperty(value = "TP消减量(吨)")
private String tpxjl;
/**TN消减量*/
@ApiModelProperty(value = "TN消减量(吨)")
private String tnxjl;
/**一般固废产生量*/
@ApiModelProperty(value = "一般固废产生量(吨)")
private String ybgfcsl;
/**一般固废处置量*/
@ApiModelProperty(value = "一般固废处置量(吨)")
private String ybgfczl;
/**绝干泥量*/
@ApiModelProperty(value = "绝干泥量(吨)")
private String jgwnl;
/**危险废物产生量*/
@ApiModelProperty(value = "危险废物产生量(吨)")
private String wfcsl;
/**危险废物处置量*/
@ApiModelProperty(value = "危险废物处置量(吨)")
private String wfczl;
}
package com.skua.modules.report.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 报表展示
*/
@Data
public class JnhbReportDetailsDy {
@ApiModelProperty(value = "生产时间(天)")
private String scsj;
@ApiModelProperty(value = "日污水处理能力(万吨/天)")
private String rwscll;
@ApiModelProperty(value = "污水处理能力(万吨/月)")
private String wsclnl;
@ApiModelProperty(value = "实际污水处理量(万吨)")
private String sjwscll;
@ApiModelProperty(value = "电力(万千瓦时)")
private String dl;
@ApiModelProperty(value = "光伏发电量(万千瓦时)")
private String gffdl;
@ApiModelProperty(value = "汽油(吨)")
private String qy;
@ApiModelProperty(value = "活性炭使用量(吨)")
private String hxtsyl;
@ApiModelProperty(value = "石灰使用量(吨)")
private String shsyl;
@ApiModelProperty(value = "絮凝剂PAM(按浓度折减后,吨)")
private String xnjpam;
@ApiModelProperty(value = "絮凝剂PAC(按浓度折减后,吨)")
private String xnjpac;
@ApiModelProperty(value = "絮凝剂其他(按浓度折减后,吨)")
private String xnjqt;
@ApiModelProperty(value = "新水使用量(吨)")
private String xssyl;
@ApiModelProperty(value = "一般固废产生量(含水份,吨)")
private String ybgfcsl;
@ApiModelProperty(value = "一般固废处置量(含水份,吨)")
private String ybgfczl;
@ApiModelProperty(value = "污泥含水率(%)")
private String wnhsl;
@ApiModelProperty(value = "绝干泥量(吨)")
private String jgnl;
@ApiModelProperty(value = "危险废物产生量(吨)")
private String wxfwcsl;
@ApiModelProperty(value = "危险废物处置量(吨)")
private String wxfwczl;
@ApiModelProperty(value = "进水COD量(吨)")
private String jscodl;
@ApiModelProperty(value = "出水COD量(吨)")
private String cscodl;
@ApiModelProperty(value = "进水NH3-N量(吨)")
private String jsadl;
@ApiModelProperty(value = "出水NH3-N量(吨)")
private String csadl;
@ApiModelProperty(value = "进水TP量(吨)")
private String jstpl;
@ApiModelProperty(value = "出水TP量(吨)")
private String cstpl;
@ApiModelProperty(value = "进水TN量(吨)")
private String jstnl;
@ApiModelProperty(value = "出水TN量(吨)")
private String cstnl;
}
package com.skua.modules.report.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 报表展示
*/
@Data
public class JnhbReportDetailsHj {
@ApiModelProperty(value = "污水处理设计能力(万吨/月)")
private String wsclsjnl;
@ApiModelProperty(value = "实际污水处理量(万吨)")
private String scsj;
@ApiModelProperty(value = "电力(万千瓦时)")
private String dl;
@ApiModelProperty(value = "光伏发电量(万千瓦时)")
private String gffdl;
@ApiModelProperty(value = "汽油(吨)")
private String qy;
@ApiModelProperty(value = "活性炭使用量(吨)")
private String hxtsyl;
@ApiModelProperty(value = "石灰使用量(吨)")
private String shsyl;
@ApiModelProperty(value = "絮凝剂PAM(按浓度折减后,吨)")
private String xnjpam;
@ApiModelProperty(value = "絮凝剂PAC(按浓度折减后,吨)")
private String xnjpac;
@ApiModelProperty(value = "絮凝剂其他(按浓度折减后,吨)")
private String xnjqt;
@ApiModelProperty(value = "絮凝剂合计(吨)")
private String xnjhj;
@ApiModelProperty(value = "新水使用量(吨)")
private String xssyl;
@ApiModelProperty(value = "绝干泥量(吨)")
private String jgnl;
@ApiModelProperty(value = "危险废物产生量(吨)")
private String wxfwcsl;
@ApiModelProperty(value = "危险废物处置量(吨)")
private String wxfwczl;
@ApiModelProperty(value = "综合能源消费量(吨标准煤)")
private String zhnyxfl;
@ApiModelProperty(value = "二氧化碳排放量(吨二氧化碳当量)")
private String eyhtpfl;
@ApiModelProperty(value = "一般固废产生量(含水份,吨)")
private String ybgfcsl;
@ApiModelProperty(value = "一般固废处置量(含水份,吨)")
private String ybgfczl;
@ApiModelProperty(value = "COD消减量(吨)")
private String codxjl;
@ApiModelProperty(value = "NH3-N消减量(吨)")
private String adxjl;
@ApiModelProperty(value = "TP消减量(吨)")
private String tpxjl;
@ApiModelProperty(value = "TN消减量(吨)")
private String tnxjl;
}
package com.skua.modules.report.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 报表展示
*/
@Data
public class JnhbReportDetailsJs {
@ApiModelProperty(value = "月污水处理量环比")
private String ywscllhb;
@ApiModelProperty(value = "日均污水处理量环比")
private String rjwscllhb;
@ApiModelProperty(value = "日均电耗环比")
private String rjdhhb;
@ApiModelProperty(value = "吨水电耗环比")
private String dsdhhb;
@ApiModelProperty(value = "综合能源消费量(吨标准煤)")
private String zhnyxfl;
@ApiModelProperty(value = "二氧化碳排放量(吨二氧化碳当量)")
private String eyhtpfl;
@ApiModelProperty(value = "系统负荷率(%)")
private String wsfhl;
@ApiModelProperty(value = "吨COD消减能耗(吨标准煤/COD吨)")
private String dcodxjnh;
@ApiModelProperty(value = "吨NH3-N消减能耗(吨标准煤/NH3-N吨)")
private String dadxjnh;
@ApiModelProperty(value = "吨TP消减能耗(吨标准煤/TP吨)")
private String dtpxjnh;
@ApiModelProperty(value = "吨TN消减能耗(吨标准煤/TP吨)")
private String dtnxjnh;
@ApiModelProperty(value = "吨水电耗(千瓦时/吨)")
private String dsdh;
@ApiModelProperty(value = "万吨水综合能耗(吨标准煤/万吨)")
private String wdszhnh;
@ApiModelProperty(value = "万吨水CO2排放(吨二氧化碳当量/万吨)")
private String wdseyhtpf;
@ApiModelProperty(value = "一般固废处置率(%)")
private String ybgfcsl;
@ApiModelProperty(value = "危废处置率(%)")
private String wfczl;
@ApiModelProperty(value = "万吨水固废产生量(吨/万吨水)")
private String wdsgfcsl;
@ApiModelProperty(value = "万吨水污泥产生量(吨/万吨水)")
private String wdswncsl;
@ApiModelProperty(value = "COD消减量(吨)")
private String codxjl;
@ApiModelProperty(value = "NH3-N消减量(吨)")
private String adxjl;
@ApiModelProperty(value = "TP消减量(吨)")
private String tpxjl;
@ApiModelProperty(value = "TN消减量(吨)")
private String tnxjl;
}
......@@ -787,4 +787,22 @@ public class SysFactoryInfoController {
return result;
}
@AutoLog(value = "获取厂区进出水标准")
@ApiOperation(value = "获取厂区进出水标准", notes = "获取厂区进出水标准")
@GetMapping(value = "/queryLevel")
public Result<Map<String,Object>> queryLevel(String departId) {
Result<Map<String,Object>> result = new Result<>();
Map<String,Object> map = new HashMap<>();
SysFactoryInfo sysFactoryInfo = sysFactoryInfoService.queryInfoByDeaprtId(departId);
if (sysFactoryInfo == null) {
result.error500("未找到对应实体");
} else {
map = sysFactoryInfoService.queryLevel(sysFactoryInfo.getInLevel(),sysFactoryInfo.getOutLevel());
result.setResult(map);
result.setSuccess(true);
}
return result;
}
}
......
......@@ -112,7 +112,7 @@ public class SysFactoryUserInfoController {
if(list.size()>0){
map.put("total", list.size());
for (SysFactoryUserInfo factoryUserInfo : list) {
if("1".equals(factoryUserInfo.getSex())){
if("2".equals(factoryUserInfo.getSex())){
female++;
}else{
male++;
......
......@@ -70,7 +70,7 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> {
* @return
*/
List<SysFactoryTreeVO> queryFactoryTreeListForVideo();
List<SysFactoryTreeVO> queryFactoryTreeListForCustom();
/**
* <pre>
......@@ -108,5 +108,11 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> {
*/
public String querySumProScale();
/**
* 获取进出水标准
* @param inLevel
* @param outLevel
* @return
*/
Map<String, Object> queryLevel(String inLevel, String outLevel);
}
......
......@@ -14,6 +14,7 @@ import com.skua.core.excel.CustomExcelUtil.FieldType;
import com.skua.core.excel.entity.HeadEntity;
import com.skua.core.excel.entity.SheetEntity;
import com.skua.modules.alarmtmp.entity.*;
import com.skua.modules.alarmtmp.service.AlarmParamStandardConfigService;
import com.skua.modules.alarmtmp.service.AlarmRuleConfigService;
import com.skua.modules.alarmtmp.service.AlarmRuleLevelConfigService;
import com.skua.modules.alarmtmp.service.IAlarmRuleLevelConfigTemplateService;
......@@ -63,6 +64,8 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
private AlarmRuleLevelConfigService alarmRuleLevelConfigService;
@Autowired
private AlarmRuleConfigService alarmRuleConfigService;
@Autowired
private AlarmParamStandardConfigService alarmParamStandardConfigService;
@Override
public SysFactoryInfoVO getByDepartId(String departId) {
SysFactoryInfoVO sysFactoryInfo = new SysFactoryInfoVO();
......@@ -673,4 +676,18 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
public String querySumProScale(){
return sysFactoryInfoMapper.querySumProScale();
}
@Override
public Map<String, Object> queryLevel(String inLevel, String outLevel) {
Map<String, Object> map = new HashMap<>();
QueryWrapper<AlarmParamStandardConfig> inQueryWrapper = new QueryWrapper<>();
inQueryWrapper.eq("del_flag", 1).eq("alarm_level_standard_id", inLevel);
List<AlarmParamStandardConfig> inList = alarmParamStandardConfigService.list(inQueryWrapper);
QueryWrapper<AlarmParamStandardConfig> outQueryWrapper = new QueryWrapper<>();
outQueryWrapper.eq("del_flag", 1).eq("alarm_level_standard_id", outLevel);
List<AlarmParamStandardConfig> outList = alarmParamStandardConfigService.list(outQueryWrapper);
map.put("in",inList);
map.put("out",outList);
return map;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!