a3df88fc 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 f8405f1a f5a65866
......@@ -73,7 +73,7 @@ public class DateVO {
//环比时间
this.lastMonth = DateUtils.getHbMonth(this.nowMonth);//
System.out.println(" lastMonth "+lastMonth);
//System.out.println(" lastMonth "+lastMonth);
this.lastMonthStartTime = lastMonth+"-01";
this.lastMonthEndTime = lastMonth+"-31";
......
......@@ -27,6 +27,10 @@ public class JSUtils {
String expression = obj1+ "-" + obj2;
return executeExpression(expression,"0.00");
}
public static String subtract(Object obj1 , Object obj2,Object obj3){
String expression = obj1+ "-" + obj2 + "-" + obj3 ;
return executeExpression(expression,"0.00");
}
public static String multiply(Object obj1 , Object obj2){
String expression = obj1+ "*" + obj2;
return executeExpression(expression,"0.00");
......
package com.skua.modules.algorithm.vo;
import com.skua.core.util.ConvertUtils;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import netscape.javascript.JSUtil;
@Data
@ApiModel(value="指挥中心:运行负荷率分析:处理水量详情", description="指挥中心:运行负荷率分析:处理水量详情)")
......@@ -25,35 +28,35 @@ public class WaterTreatmentVO {
private Double dayCsl;
@ApiModelProperty(value = "环比:处理水量比例")
private Double hbcslbl;
private String hbcslbl;
@ApiModelProperty(value = "同比:处理水量比例")
private Double tbcslbl;
private String tbcslbl;
@ApiModelProperty(value = "负荷率")
private Double fhl;
private String fhl;
@ApiModelProperty(value = "排名")
private Integer rank;
private long monthDayNum = 30;
public Double getFhl() {
public String getFhl() {
if(this.getCSL() != null && this.getProScale() != null && this.getProScale().doubleValue() > 0 ){
fhl = this.getCSL()*100 / (this.getProScale() * this.getMonthDayNum() );
fhl = JSUtils.format( this.getCSL()*100 / (this.getProScale() * this.getMonthDayNum() ) );
}
return fhl;
}
public Double getHbcslbl() {
public String getHbcslbl() {
if(this.getCSL() != null && this.getHbcsl() != null && this.getHbcsl().doubleValue() > 0){
hbcslbl = (this.getCSL() - this.getHbcsl()) * 100 / this.getHbcsl() ;
hbcslbl = JSUtils.format( (this.getCSL() - this.getHbcsl()) * 100 / this.getHbcsl());
}
return hbcslbl;
}
public Double getTbcslbl() {
public String getTbcslbl() {
if(this.getCSL() != null && this.getTbcsl() != null && this.getTbcsl().doubleValue() > 0){
tbcslbl = (this.getCSL() - this.getTbcsl())*100 / this.getTbcsl() ;
tbcslbl = JSUtils.format( (this.getCSL() - this.getTbcsl())*100 / this.getTbcsl());
}
return tbcslbl;
}
......
......@@ -12,10 +12,12 @@ import com.skua.modules.equipment.vo.EquipmentRealTimeVO;
import com.skua.modules.erp.vo.MetricInfoVO;
import com.skua.modules.erp.vo.RealTimeHistoryDataVO;
import com.skua.modules.guest.util.DateUtil;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
......@@ -23,6 +25,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@Api(tags="设备-设备运行台时报表")
......@@ -30,16 +35,20 @@ import java.util.*;
@RequestMapping("/test/metricInfo")
public class TestMetricInfoController {
@Value("${skua.collectionFrequency:}")
private String collectionFrequency;
@Autowired
private IFactoryInfoService iFactoryInfoService;
@AutoLog(value = "设备-设备运行台时报表")
@ApiOperation(value = "设备-设备运行台时报表", notes = "设备-设备运行台时报表")
@ApiOperation(value = "设备-设备运行台时报表(timeType:1 当日数据,=2表示月数据;=3表示年数据)", notes = "设备-设备运行台时报表")
@GetMapping(value = "/realTimeHistoryData")
public Result<RealTimeHistoryDataVO> equipRealTimeHistoryDataCtrl(@RequestParam(value = "departId") String departId,
@RequestParam(value = "startTime") String startTime,
@RequestParam(value = "endTime") String endTime) {
@RequestParam(value = "endTime") String endTime,
@RequestParam(value = "timeType",defaultValue = "1")String timeType) {
if(StringUtils.isEmpty(startTime)){
startTime = DateUtil.getCurrentDate() ;
}
......@@ -52,7 +61,6 @@ public class TestMetricInfoController {
if(endTime != null && endTime.length() < 19){
endTime = endTime+" 23:59:59";
}
Result<RealTimeHistoryDataVO> result = new Result<>();
RealTimeHistoryDataVO realTimeHistoryDataVO = new RealTimeHistoryDataVO();
//String fields = "TCSWSCLC_PLC300_Tag182,TCSWSCLC_PLC300_Tag185";
......@@ -68,7 +76,7 @@ public class TestMetricInfoController {
for(MetricInfoVO metricInfoVO : metricInfoVOList){
String equipmentName = metricInfoVO.getEquipmentName().replaceAll("[^\\u4e00-\\u9fa5]", "");
String equipmentCode = ChineseInital.getAllFirstLetter(equipmentName)+"_"+ RandomUtil.randomNumbers(2);
metricInfoVO.setEquipmentName(equipmentName );
//metricInfoVO.setEquipmentName(equipmentName );
metricInfoVO.setEquipmentCode(equipmentCode );
if(StringUtils.isNotEmpty(metricInfoVO.getGzExpress())){
fields += metricInfoVO.getGzExpress()+",";
......@@ -85,9 +93,10 @@ public class TestMetricInfoController {
if (fields.endsWith(",")) {
fields = fields.substring(0, fields.length() - 1);
}
List<Map<String, Object>> pgDataList = iFactoryInfoService.queryFactoryInfos(departId, fields, startTime, endTime, "1");
List<Map<String, Object>> pgDataList = queryFactoryInfos(departId, fields, startTime, endTime, timeType);
List<Map<String, Object>> dataList = null;
if(pgDataList != null ) {
dataList = new ArrayList<>(pgDataList.size());
Map<String, Object> dataMap = null;
......@@ -95,11 +104,19 @@ public class TestMetricInfoController {
String equipmentCode = null;
for (Map<String, Object> paramMap : pgDataList) {
dataMap = new HashMap<>();
dataMap.put("time",paramMap.get("time") );
if(timeType.equals( "1")){
dataMap.put("time",DateUtils.formatTime(Long.parseLong(paramMap.get("time") + "000")) );
}
for(MetricInfoVO metricInfoVO : metricInfoVOList){
dataMap.put( metricInfoVO.getEquipmentCode()+"_YX" , ConvertUtils.getString(paramMap.get(metricInfoVO.getYxExpress())));//运行
dataMap.put( metricInfoVO.getEquipmentCode()+"_GZ" , ConvertUtils.getString(paramMap.get(metricInfoVO.getGzExpress())));//故障
dataMap.put( metricInfoVO.getEquipmentCode()+"_ZT" ,60 - ConvertUtils.getDouble(paramMap.get(metricInfoVO.getYxExpress()),0) - ConvertUtils.getDouble(paramMap.get(metricInfoVO.getGzExpress()) ,0) );//暂停
dataMap.put( metricInfoVO.getEquipmentCode()+"_YX" , JSUtils.format(paramMap.get(metricInfoVO.getYxExpress()),"0.00"));//运行
dataMap.put( metricInfoVO.getEquipmentCode()+"_GZ" , JSUtils.format(paramMap.get(metricInfoVO.getGzExpress()),"0.00"));//故障
//时数据
if (timeType.equals("1")) dataMap.put( metricInfoVO.getEquipmentCode()+"_ZT" ,JSUtils.subtract( 60, paramMap.get(metricInfoVO.getYxExpress()),paramMap.get(metricInfoVO.getGzExpress()) ) );//暂停
//日数据
if (timeType.equals("2")) dataMap.put( metricInfoVO.getEquipmentCode()+"_ZT" ,JSUtils.subtract( 24*60, paramMap.get(metricInfoVO.getYxExpress()),paramMap.get(metricInfoVO.getGzExpress()) ) );//暂停
//月数据
if (timeType.equals("3")) dataMap.put( metricInfoVO.getEquipmentCode()+"_ZT" ,JSUtils.subtract( 30*24*60, paramMap.get(metricInfoVO.getYxExpress()),paramMap.get(metricInfoVO.getGzExpress()) ) );//暂停
}
dataList.add( dataMap );
......@@ -138,4 +155,92 @@ public class TestMetricInfoController {
return result;
}
public List<Map<String, Object>> queryFactoryInfos(String departId, String fields, String startTime, String endTime, String tableType) {
String fieldSqlPart = "";
String[] fieldsArr = fields.split(",");
for(int i = 0; i < fieldsArr.length; ++i) {
fieldSqlPart = fieldSqlPart + ",'" + fieldsArr[i] + "'";
}
if (!StringUtils.isEmpty(fieldSqlPart)) {
fieldSqlPart = fieldSqlPart.substring(1);
}
JdbcTemplate pgDB = (JdbcTemplate)SpringContextUtils.getBean("pg-db");
JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master");
List<Map<String, Object>> result = new ArrayList();
List<Map<String, Object>> factoryDesign = masterDB.queryForList("select * from sys_factory_device where depart_id = '" + departId + "'");
if (factoryDesign != null && factoryDesign.size() != 0) {
String countTableName = ConvertUtils.getString(((Map)factoryDesign.get(0)).get("device_id"));
String sql = null;
//时数据
if (tableType.equals("1")) {
sql = "select ts as time,nm as monitorId,v as monitorValue from " + countTableName + "_count where nm in(" + fieldSqlPart + ") and ts>=? and ts <? ";
}
//日数据
if (tableType.equals("2")) {
sql = "select aaa.date as time , aaa.monitorId ,SUM( to_number ( aaa.monitorValue, '9999999999999999.99' ) )as monitorValue from (";
sql += "select to_char(to_timestamp(ts::INT8)::DATE,'YYYY-MM-DD') as date, ts as time,nm as monitorId,v as monitorValue from " + countTableName + "_count where nm in(" + fieldSqlPart + ") and ts>=? and ts <? ";
sql += " )aaa group by aaa.date ,aaa.monitorId order by aaa.date asc";
}
//月数据
if (tableType.equals("3")) {
sql = "select aaa.date as time , aaa.monitorId ,SUM( to_number ( aaa.monitorValue, '9999999999999999.99' ) )as monitorValue from (";
sql += "select to_char(to_timestamp(ts::INT8)::DATE,'YYYY-MM') as date, ts as time,nm as monitorId,v as monitorValue from " + countTableName + "_count where nm in(" + fieldSqlPart + ") and ts>=? and ts <? ";
sql += " )aaa group by aaa.date ,aaa.monitorId order by aaa.date asc";
}
try {
String tsStartTime = String.valueOf(DateUtils.getMillis(DateUtils.parseDate(startTime, "yyyy-MM-dd HH:mm:ss")) / 1000L);
String tsEndTime = String.valueOf(DateUtils.getMillis(DateUtils.parseDate(endTime, "yyyy-MM-dd HH:mm:ss")) / 1000L);
List dataList = null;
try {
dataList = pgDB.queryForList(sql, new Object[]{tsStartTime, tsEndTime});
} catch (DataAccessException var23) {
Object pgDbSlaveObject = SpringContextUtils.getBean("pg-db-slave");
if (pgDbSlaveObject != null) {
pgDB = (JdbcTemplate)pgDbSlaveObject;
dataList = pgDB.queryForList(sql, new Object[]{tsStartTime, tsEndTime});
}
}
this.dataRowToCellByTime(result, dataList);
} catch (Exception var24) {
var24.printStackTrace();
}
return result;
} else {
return result;
}
}
private List<Map<String, Object>> dataRowToCellByTime(List<Map<String, Object>> result, List<Map<String, Object>> dataList) {
List<String> orderTsList = new ArrayList();
Map<String, Map<String, Object>> resultMap = new HashMap();
Iterator var5 = dataList.iterator();
while(true) {
while(var5.hasNext()) {
Map<String, Object> tempMap = (Map)var5.next();
String key = tempMap.get("time").toString();
Map<String, Object> fieldDataMap = (Map)resultMap.get(key);
if (fieldDataMap != null && fieldDataMap.size() != 0) {
fieldDataMap.put(tempMap.get("monitorId").toString(), tempMap.get("monitorValue"));
} else {
orderTsList.add(key);
fieldDataMap = new HashMap();
fieldDataMap.put(tempMap.get("monitorId").toString(), tempMap.get("monitorValue"));
resultMap.put(key, fieldDataMap);
}
}
var5 = orderTsList.iterator();
while(var5.hasNext()) {
String order = (String)var5.next();
Map<String, Object> map = (Map)resultMap.get(order);
map.put("time", order);
result.add(map);
}
return result;
}
}
}
......
......@@ -72,6 +72,6 @@ public class ParamFrequencyUtil {
data.put(paramName,paramValue);
});
});
System.out.println(data);
//System.out.println(data);
}
}
......
......@@ -88,7 +88,7 @@ public class DateUtil {
// 再将 Date 对象格式化为字符串
formattedDate = formatter.format(date);
// 输出结果
System.out.println(formattedDate); // 输出: 2024-08-19
//System.out.println(formattedDate); // 输出: 2024-08-19
} catch (Exception e) {
e.printStackTrace();
......
......@@ -112,4 +112,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
* @return
*/
JnhbLargeScreenVO jnhbLargeScreenShow(String departIds,String time);
/**
* 节能环保:大屏展示:头部数据
* @return
*/
JnhbLargeScreenVO jnhbLargeScreenShowHeader(String departIds,String time);
}
......
......@@ -38,7 +38,7 @@ import javax.annotation.Resource;
@Service
public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDatasetMapper, FCustomReportDataset> implements IFCustomReportDatasetService {
@Autowired
@Resource
private FCustomReportDatasetMapper mapper;
@Resource
private CommonSqlMapper commonSqlMapper;
......@@ -334,6 +334,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
c02NumberVO.setName( reportData.getDepartName() );
c02NumberVO.setValue( reportData.getCodxjl() );
//消减量 当月
largeScreenExpressionVO.setReduceStatistics(reportData);
/*************同比环比数据设置****************/
if ( lastMonthReportDataTemp != null ){
......@@ -342,15 +343,16 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
c02NumberVO.setValueHb(lastMonthReportDataTemp.getCodxjl() );
//消减量统计 环比
largeScreenExpressionVO.setReduceStatisticsHB(reportData);
largeScreenExpressionVO.setReduceStatisticsHB(lastMonthReportDataTemp);
}
/*************同比环比数据设置****************/
if ( lastYearReportDataTemp != null ){
loadRateVO.setValueHb(lastYearReportDataTemp.getWsfhl() );
powerConsumeVO.setValueHb(lastYearReportDataTemp.getDsdh() );
c02NumberVO.setValueHb(lastYearReportDataTemp.getCodxjl() );
//消减量统计 同比
largeScreenExpressionVO.setReduceStatisticsTB(reportData);
largeScreenExpressionVO.setReduceStatisticsTB(lastYearReportDataTemp);
}
//loadRateVO.setValue(reportData.getWsfhl(),valueHb,valueTb );
loadRateVOList.add(loadRateVO );
......@@ -365,15 +367,13 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
energyConsumeChart.setDataByZhnyxhl(reportData);
largeScreenVO.getEnergyConsumeChartsList().add( energyConsumeChart ) ;
largeScreenExpressionVO.setReduceStatistics(reportData);
//CO2排放排名
co2DataList.add( c02NumberVO );
//排放指标
// String ybgfcsl, String ybgfczl, String jgwnl, String wfcsl, String wfczl
wasteMaterialList.add( new WasteMaterialVO( reportData.getDepartId(),reportData.getDepartName(),reportData.getYbgfcsl(),reportData.getYbgfczl(),reportData.getJgwnl(),reportData.getWfcsl(),reportData.getWfczl() ) ) ;
}
//设置计算表达式
largeScreenVO.setLargeScreenExpressionVO( largeScreenExpressionVO );
//设置计算表达式:消减量
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
//largeScreenVO.setHeadStatisticsValue( );
largeScreenVO.setHeadStatisticsList( jnhbLargeScreenShowHead(departIds,time) );
......@@ -381,8 +381,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
largeScreenVO.setPowerConsumeVOList( powerConsumeVOList );
//负荷率对象
largeScreenVO.setLoadRateVOList( loadRateVOList );
//消减量统计
largeScreenVO.setReduceStatistics();
//消减量统计--公式计算
largeScreenVO.setReduceStatistics(largeScreenExpressionVO);
//CO2排放排名
largeScreenVO.setCo2DataList( co2DataList ) ;
......@@ -400,6 +400,27 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
//System.out.println("666666---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
return largeScreenVO;
}
/**
* 节能环保:大屏展示:头部数据
* @return
*/
public JnhbLargeScreenVO jnhbLargeScreenShowHeader(String departIds, String time){
JnhbLargeScreenVO largeScreenVO = new JnhbLargeScreenVO();
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
//largeScreenVO.setHeadStatisticsValue( );
largeScreenVO.setHeadStatisticsList( jnhbLargeScreenShowHead(departIds,time) );
//主库数据源
JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master");
int count1 = masterDB.queryForObject("select count(1) from equipment_info where energy_level = 1",Integer.class);
largeScreenVO.setEquipmentL1( count1 );
//System.out.println("55555---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
int count2 = masterDB.queryForObject("select count(1) from equipment_info where energy_level = 2",Integer.class);
largeScreenVO.setEquipmentL2( count2 );
//System.out.println("666666---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
return largeScreenVO;
}
/**转换为Map<部门编号,JnhbReportData> */
private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData>
Map<String,JnhbReportData> dataMap = new HashMap<>();
......
......@@ -200,4 +200,15 @@ public class ReportDataController {
result.setResult(jnhbLargeScreenVO);
return result;
}
@AutoLog(value = "节能环保:大屏展示")
@ApiOperation(value = "节能环保:大屏展示:头部数据", notes = "节能环保:大屏展示(time:yyyy-MM)")
@GetMapping(value = "/jnhbLargeScreenShow_header")
public Result<JnhbLargeScreenVO> jnhbLargeScreenShowHeader( @RequestParam(name="time") String time) { //time
Result<JnhbLargeScreenVO> result = new Result<>();
String departIds = BaseContextHandler.getDeparts();
JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShow(departIds,time);
result.setResult(jnhbLargeScreenVO);
return result;
}
}
......
......@@ -45,60 +45,14 @@ public class JnhbLargeScreenVO {
@ApiModelProperty(value = "二级能耗设备")
private Integer equipmentL2;
private JnhbLargeScreenExpressionVO largeScreenExpressionVO;
/***
* 设置:消减统计记录
*/
public void setReduceStatistics(){
this.getReduceStatisticsList().add( getResultNumberVO( "cod","cod","",this.getLargeScreenExpressionVO().getReduce_statistics_cod() , this.getLargeScreenExpressionVO().getReduce_statistics_cod_hb() , this.getLargeScreenExpressionVO().getReduce_statistics_cod_tb()) );//吨水电耗
this.getReduceStatisticsList().add( getResultNumberVO( "NH3-N","NH3-N","",this.getLargeScreenExpressionVO().getReduce_statistics_nh3n() , this.getLargeScreenExpressionVO().getReduce_statistics_nh3n_hb() , this.getLargeScreenExpressionVO().getReduce_statistics_nh3n_tb()) );//吨水电耗
this.getReduceStatisticsList().add( getResultNumberVO( "TP","TP","",this.getLargeScreenExpressionVO().getReduce_statistics_tp() , this.getLargeScreenExpressionVO().getReduce_statistics_tp_hb() , this.getLargeScreenExpressionVO().getReduce_statistics_tp_tb()) );//吨水电耗
this.getReduceStatisticsList().add( getResultNumberVO( "TN","TN","",this.getLargeScreenExpressionVO().getReduce_statistics_tn() , this.getLargeScreenExpressionVO().getReduce_statistics_tn_hb() , this.getLargeScreenExpressionVO().getReduce_statistics_tn_tb()) );//吨水电耗
}
private ResultNumberVO getResultNumberVO(String name ,String code ,String unit ,String valueExpression ,String valueHbExpression,String valueTbExpression){
ResultNumberVO head_wssjcll = new ResultNumberVO();//污水处理量
head_wssjcll.setName( name);
head_wssjcll.setUnit( unit );
head_wssjcll.setValue( JSUtils.executeExpression(valueExpression , "0") );
head_wssjcll.setValueHb( JSUtils.executeExpression( valueHbExpression , "0") );
head_wssjcll.setValueTb(JSUtils.executeExpression( valueTbExpression , "0") );
return head_wssjcll;
}
public void setReduceStatistics(int index , ResultNumberVO resultNumberVO){
ResultNumberVO resultNumberVOTemp = reduceStatisticsList.get( index - 1);
resultNumberVOTemp.setValue(DigitalUtils.add(resultNumberVOTemp.getValue() , resultNumberVO.getValue() ) );
resultNumberVOTemp.setValueHb( DigitalUtils.add(resultNumberVOTemp.getValueHb() , resultNumberVO.getValueHb() ) );
resultNumberVOTemp.setValueTb( DigitalUtils.add(resultNumberVOTemp.getValueTb() , resultNumberVO.getValueTb() ) );
}
public JnhbLargeScreenVO(){
/*//头部数值统计
String names = "污水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水";
String unit = "万吨,%,万千瓦时,吨,吨,吨标准煤,吨CO2当量,千瓦时/吨";
String[] nameList = names.split(",");
String[] unitList = unit.split(",");
ResultNumberVO numberVO = null;
for(int i = 0 ; i< nameList.length ; i++){
numberVO = new ResultNumberVO();
numberVO.setName( nameList[i]);
numberVO.setUnit(unitList[i] );
this.getHeadStatisticsList().add(numberVO) ;
}
//消减量统计
names= "COD,NH3-N,TP,TN";
nameList = names.split(",");
for(String name : nameList){
numberVO = new ResultNumberVO();
numberVO.setName( name);
this.getReduceStatisticsList().add(numberVO) ;
}*/
public void setReduceStatistics(JnhbLargeScreenExpressionVO largeScreenExpressionVO){
this.getReduceStatisticsList().add( new ResultNumberVO( "cod","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod(),"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod_tb(),"0")) );//吨水电耗
this.getReduceStatisticsList().add( new ResultNumberVO( "NH3-N","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n_tb(),"0")) );//吨水电耗
this.getReduceStatisticsList().add( new ResultNumberVO( "TP","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp_tb(),"0")) );//吨水电耗
this.getReduceStatisticsList().add( new ResultNumberVO( "TN","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn_tb(),"0")) );//吨水电耗
}
}
......
......@@ -94,4 +94,16 @@ public class ResultNumberVO {
if(result == null ) result = true;
return result;
}
public ResultNumberVO(){
}
public ResultNumberVO(String name, String unit, String value, String valueTb, String valueHb) {
this.name = name;
this.unit = unit;
this.value = value;
this.valueTb = valueTb;
this.valueHb = valueHb;
}
}
......
......@@ -10,13 +10,16 @@
select d.depart_name as 'departIdName', sw.depart_id,sw.warehouse_code ,sw.warehouse_name ,sw.warehouse_address ,sw.principal ,es.*
from equipment_sparepart es , supplies_Warehouse sw
left join sys_depart d on sw.depart_id = d.id
where es.supplies_warehouse_id = sw.id and sw.depart_id in (${param.+departIds})
where es.supplies_warehouse_id = sw.id and sw.depart_id in (${param.departIds})
<if test="param.suppliesWarehouseId != null and param.suppliesWarehouseId !=''"> and sw.id =#{param.suppliesWarehouseId}</if>
<if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code like '%' #{param.sparepartCode}'%'</if>
<if test="param.sparepartType != null and param.sparepartType !=''">and es.sparepart_type in (${param.sparepartType}) </if>
<if test="param.sparepartName != null and param.sparepartName !=''">and es.sparepart_name like '%' #{param.sparepartName}'%'</if>
<if test="param.specification != null and param.specification !=''">and es.specification like '%' #{param.specification}'%'</if>
order by inventory_update_time desc
order by es.inventory_update_time desc
</select>
<!-- <if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code =#{param.sparepartCode}</if>
<if test="param.sparepartType != null and param.sparepartType !=''">and es.sparepart_type in (${param.sparepartType}) </if>
<if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%' #{param.sparepartName}'%'</if>
<!-- </if>
suppliesWarehouseId-->
</mapper>
......
......@@ -36,16 +36,4 @@ public class EquipmentSparepartSearchVO {
@ApiModelProperty(value = "规格")
private String specification ;
@ApiModelProperty(value = "用途")
private String purpose;
@ApiModelProperty(value = "开始时间")
private String startTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
}
......
......@@ -286,7 +286,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
items.add(item);
}
long end = System.currentTimeMillis();
System.out.println(end - startTime);
//System.out.println(end - startTime);
return items;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!