5e864231 张雷

大屏组件接口修改

1 个父辈 978f1a06
......@@ -66,6 +66,16 @@ public class FactoryCenterController {
return result;
}
@ApiOperation(value="厂区驾驶舱耗电量分析", notes="厂区驾驶舱耗电量分析")
@GetMapping(value = "/getDhData")
public Result<Map<String, Object>> getDhData(StatisticsParam statisticsParam) {
Result<Map<String, Object>> result = new Result<Map<String, Object>>();
Map<String, Object> map = factoryCenterService.getDhData(statisticsParam);
result.setSuccess(true);
result.setResult(map);
return result;
}
//污水处理水量统计
@ApiOperation(value="厂区驾驶舱污水处理水量统计", notes="厂区驾驶舱污水处理水量统计")
@GetMapping(value = "/getWssltj")
......@@ -77,6 +87,26 @@ public class FactoryCenterController {
return result;
}
@ApiOperation(value="厂区驾驶舱处理水量分析", notes="厂区驾驶舱处理水量分析")
@GetMapping(value = "/getSlData")
public Result<Map<String, Object>> getSlData(StatisticsParam statisticsParam) {
Result<Map<String, Object>> result = new Result<Map<String, Object>>();
Map<String, Object> map = factoryCenterService.getSlData(statisticsParam);
result.setSuccess(true);
result.setResult(map);
return result;
}
@ApiOperation(value="厂区驾驶舱污水电耗统计", notes="厂区驾驶舱污水电耗统计")
@GetMapping(value = "/getWsDhTj")
public Result<Map<String, Object>> getWsDhTj(StatisticsParam statisticsParam) {
Result<Map<String, Object>> result = new Result<Map<String, Object>>();
Map<String, Object> map = factoryCenterService.getWsDhTj(statisticsParam);
result.setSuccess(true);
result.setResult(map);
return result;
}
//厂区驾驶舱药耗统计
@ApiOperation(value="厂区驾驶舱药耗统计", notes="厂区驾驶舱药耗统计")
@GetMapping(value = "/getYhtj")
......@@ -88,6 +118,17 @@ public class FactoryCenterController {
return result;
}
//厂区驾驶舱药耗分析
@ApiOperation(value="厂区驾驶舱药耗分析", notes="厂区驾驶舱药耗分析")
@GetMapping(value = "/getYhData")
public Result<Map<String, Object>> getYhData(StatisticsParam statisticsParam) {
Result<Map<String, Object>> result = new Result<Map<String, Object>>();
Map<String, Object> map = factoryCenterService.getYhData(statisticsParam);
result.setSuccess(true);
result.setResult(map);
return result;
}
//厂区削减量统计
@ApiOperation(value="厂区削减量统计", notes="厂区削减量统计")
@GetMapping(value = "/getXjltj")
......
......@@ -36,4 +36,19 @@ public interface FactoryCenterMapper {
@Param("departId") String departId, @Param("view2119") String view2119);
List<Map<String, Object>> getEquiptj(@Param("departId") String departId);
Map<String, Object> getYhData(@Param("startDate") String startDate, @Param("endDate") String endDate,
@Param("departId") String departId,
@Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119);
Map<String, Object> getDhData(@Param("startDate") String startDate, @Param("endDate") String endDate,
@Param("departId") String departId,
@Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119);
Map<String, Object> getSlData(@Param("startDate") String startDate, @Param("endDate") String endDate,
@Param("departId") String departId, @Param("dataView2119") String dataView2119);
List<Map<String, Object>> getDsdhListGroupByDepart(@Param("startDate") String startDate, @Param("endDate") String endDate,
@Param("departId") String departId,
@Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119);
}
......
......@@ -6,13 +6,16 @@
SELECT
LEFT ( v.time, 7 ) AS time,
round( sum( v.CSL ) / 10000, 2 ) AS clsl,
ifnull(v2.clsl,0) as clsl_tb
ifnull(v2.clsl,0) as clsl_tb,
round( sum( v.JSL ) / 10000, 2 ) AS jsl,
ifnull(v2.jsl,0) as jsl_tb
FROM
${view2119} v
left join (
SELECT
RIGHT( LEFT ( v2119.time, 7 ), 2 ) AS time,
round( sum( v2119.CSL ) / 10000, 2 ) AS clsl
round( sum( v2119.CSL ) / 10000, 2 ) AS clsl,
round( sum( v2119.JSL ) / 10000, 2 ) AS jsl
FROM
${view2119tb} v2119
WHERE
......@@ -293,4 +296,110 @@
</foreach>
</if>
</select>
<select id="getYhData" resultType="java.util.HashMap">
select
v3.zyh,v3.rjyh,ROUND(v3.zyh/v2.clsl,2) AS dsyh
from (select ROUND(SUM(v.CSL),2) as clsl,'yh' as type from ${dataView2119} v
where time &gt;= #{startDate} and time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>) v2
left join (select ROUND(SUM(IFNULL(v.PAMRJ,0)+IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+
IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+
IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS zyh,ROUND(AVG(IFNULL(v.PAMRJ,0)+
IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+
IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+
IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS rjyh,'yh' as type from ${dataView3a24} v
where v.time &gt;= #{startDate} and v.time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>) v3 ON v2.type = v3.type
</select>
<select id="getDhData" resultType="java.util.HashMap">
select
v3.zdh,v3.rjdh,ROUND(v3.zdh/v2.clsl,2) AS dsdh
from (select ROUND(SUM(v.CSL),2) as clsl,'dh' as type from ${dataView2119} v
where time &gt;= #{startDate} and time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>) v2
left join (select ROUND(SUM(IFNULL(v.DLHJ,0)),2) AS zdh,
ROUND(AVG(IFNULL(v.DLHJ,0)),2) AS rjdh,'dh' as type from ${dataView3a24} v
where v.time &gt;= #{startDate} and v.time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>) v3 ON v2.type = v3.type
</select>
<select id="getSlData" resultType="java.util.HashMap">
select
f.sjgm,
v2.clsl,
v2.rjclsl
from (select ROUND(SUM(pro_scale),2) AS sjgm,'sl' AS type from sys_factory_info
<if test="departId!=null and departId!=''">
WHERE depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
) f
left join (
select
ROUND(SUM(v.CSL)/10000,2) as clsl,
ROUND(AVG(v.CSL)/10000,2) as rjclsl,
'sl' AS type
from ${dataView2119} v
where v.time &gt;= #{startDate} and v.time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
) v2 ON f.type = v2.type
</select>
<select id="getDsdhListGroupByDepart" resultType="java.util.HashMap">
select
d.id AS depart_id,
IFNULL(ROUND(IFNULL(v3.dlhj,0)/IFNULL(v2.clsl,2),2),0) AS dsdh
from sys_depart d
left join (
select SUM(v.DLHJ) AS dlhj,v.depart_id from ${dataView3a24} v
where v.time &gt;= #{startDate} and v.time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
GROUP BY v.depart_id
) v3 on d.id = v3.depart_id
left join (
select SUM(v.CSL) AS clsl,v.depart_id from ${dataView2119} v
where v.time &gt;= #{startDate} and v.time &lt;= #{endDate}
<if test="departId!=null and departId!=''">
AND v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
GROUP BY v.depart_id
) v2 on d.id = v2.depart_id
where depart_type = '1'
</select>
</mapper>
......
......@@ -32,5 +32,13 @@ public interface IFactoryCenterService {
List<Map<String, Object>> getSzXjltj(StatisticsParam statisticsParam);
List<Map<String, Object>> getEquiptj(StatisticsParam statisticsParam);
Map<String, Object> getYhData(StatisticsParam statisticsParam);
Map<String, Object> getDhData(StatisticsParam statisticsParam);
Map<String, Object> getSlData(StatisticsParam statisticsParam);
Map<String, Object> getWsDhTj(StatisticsParam statisticsParam);
}
......
package com.skua.modules.report.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.skua.core.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -46,6 +44,92 @@ public class ReportTargetConfig {
@Excel(name = "药量目标", width = 15)
@ApiModelProperty(value = "药量目标")
private String targetDrug;
/**PAC(液)目标*/
@Excel(name = "PAC(液)目标", width = 15)
@ApiModelProperty(value = "PAC(液)目标")
private String targetPacyt;
/**PAC(固)目标*/
@Excel(name = "PAC(固)目标", width = 15)
@ApiModelProperty(value = "PAC(固)目标")
private String targetPacgt;
/**NaClO目标*/
@Excel(name = "NaClO目标", width = 15)
@ApiModelProperty(value = "NaClO目标")
private String targetNaclo;
/**水处理PAM(-)目标*/
@Excel(name = "水处理PAM(-)目标", width = 15)
@ApiModelProperty(value = "水处理PAM(-)目标")
private String targetSclpamf;
/**水处理PAM(+)目标*/
@Excel(name = "水处理PAM(+)目标", width = 15)
@ApiModelProperty(value = "水处理PAM(+)目标")
private String targetSclpamz;
/**污脱PAM乳剂目标*/
@Excel(name = "污脱PAM乳剂目标", width = 15)
@ApiModelProperty(value = "污脱PAM乳剂目标")
private String targetPamrj;
/**污脱PAM(-)目标*/
@Excel(name = "污脱PAM(-)目标", width = 15)
@ApiModelProperty(value = "污脱PAM(-)目标")
private String targetPamf;
/**污脱PAM(+)目标*/
@Excel(name = "污脱PAM(+)目标", width = 15)
@ApiModelProperty(value = "污脱PAM(+)目标")
private String targetPamz;
/**PFS目标*/
@Excel(name = "PFS目标", width = 15)
@ApiModelProperty(value = "PFS目标")
private String targetPfs;
/**复合铁盐目标*/
@Excel(name = "复合铁盐目标", width = 15)
@ApiModelProperty(value = "复合铁盐目标")
private String targetFhty;
/**乳液絮凝剂目标*/
@Excel(name = "乳液絮凝剂目标", width = 15)
@ApiModelProperty(value = "乳液絮凝剂目标")
private String targetRyxnj;
/**益维磷目标*/
@Excel(name = "益维磷目标", width = 15)
@ApiModelProperty(value = "益维磷目标")
private String targetYwl;
/**高效除磷剂目标*/
@Excel(name = "高效除磷剂目标", width = 15)
@ApiModelProperty(value = "高效除磷剂目标")
private String targetGxclj;
/**CH₃COONa目标*/
@Excel(name = "CH₃COONa目标", width = 15)
@ApiModelProperty(value = "CH₃COONa目标")
private String targetCh3coona;
/**活性炭目标*/
@Excel(name = "活性炭目标", width = 15)
@ApiModelProperty(value = "活性炭目标")
private String targetHxt;
/**FeCl3目标*/
@Excel(name = "FeCl3目标", width = 15)
@ApiModelProperty(value = "FeCl3目标")
private String targetFecl3;
/**石灰目标*/
@Excel(name = "石灰目标", width = 15)
@ApiModelProperty(value = "石灰目标")
private String targetSh;
/**CH3COOH目标*/
@Excel(name = "CH3COOH目标", width = 15)
@ApiModelProperty(value = "CH3COOH目标")
private String targetCh3cooh;
/**FeSO4固目标*/
@Excel(name = "FeSO4固目标", width = 15)
@ApiModelProperty(value = "FeSO4固目标")
private String targetFeso4g;
/**FeSO4液目标*/
@Excel(name = "FeSO4液目标", width = 15)
@ApiModelProperty(value = "FeSO4液目标")
private String targetFeso4y;
/**H2O2目标*/
@Excel(name = "H2O2目标", width = 15)
@ApiModelProperty(value = "H2O2目标")
private String targetH2o2;
/**所属厂区*/
@Excel(name = "所属厂区", width = 15)
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!