Commit 9c609a99 authored by co_dengxiongwen's avatar co_dengxiongwen

接口

parent 46e31e37
package com.devplatform.admin.modules.eq.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ApiModel(value="多联室外机记录信息对象",description="多联室外机记录信息对象")
@TableName("dlswj_info")
public class DlswjInfo implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键id */
@ApiModelProperty(value="主键ID",name="id")
@TableId
private java.lang.String id;
/** 资源点id */
@ApiModelProperty(value="资源点id",name="resourceId")
private java.lang.String resourceId;
/** A相电压 */
@ApiModelProperty(value="A相电压",name="phaseAVoltage")
private java.lang.String phaseAVoltage;
/** B相电压 */
@ApiModelProperty(value="B相电压",name="phaseBVoltage")
private java.lang.String phaseBVoltage;
/** C相电压 */
@ApiModelProperty(value="C相电压",name="phaseCVoltage")
private java.lang.String phaseCVoltage;
/** A相电流 */
@ApiModelProperty(value="A相电流",name="phaseACurrent")
private java.lang.String phaseACurrent;
/** B相电流 */
@ApiModelProperty(value="B相电流",name="phaseBCurrent")
private java.lang.String phaseBCurrent;
/** C相电流 */
@ApiModelProperty(value="C相电流",name="phaseCCurrent")
private java.lang.String phaseCCurrent;
/** A相功率因数 */
@ApiModelProperty(value="A相功率因数",name="phaseAPowerFactor")
private java.lang.String phaseAPowerFactor;
/** B相功率因数 */
@ApiModelProperty(value="B相功率因数",name="phaseBPowerFactor")
private java.lang.String phaseBPowerFactor;
/** C相功率因数 */
@ApiModelProperty(value="C相功率因数",name="phaseCPowerFactor")
private java.lang.String phaseCPowerFactor;
/** A相功率 */
@ApiModelProperty(value="A相功率",name="phaseAPower")
private java.lang.String phaseAPower;
/** B相功率 */
@ApiModelProperty(value="B相功率",name="phaseBPower")
private java.lang.String phaseBPower;
/** C相功率 */
@ApiModelProperty(value="C相功率",name="phaseCPower")
private java.lang.String phaseCPower;
/** 电能 */
@ApiModelProperty(value="电能",name="electricEnergy")
private java.lang.String electricEnergy;
/** 电表通讯故障 */
@ApiModelProperty(value="电表通讯故障",name="communicationFailure")
private java.lang.String communicationFailure;
/** 状态(1手动,2节能) */
@ApiModelProperty(value="状态(1手动,2节能)",name="type")
private Integer type;
/** 创建时间 */
@ApiModelProperty(value="创建时间",name="createTime")
private java.util.Date createTime;
/** 站点表id */
@ApiModelProperty(value="站点表id",name="stationId")
private java.lang.String stationId;
}
package com.devplatform.admin.modules.eq.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ApiModel(value="多联室外机信息-天对象",description="多联室外机信息-天对象")
@TableName("dlswj_info_day")
public class DlswjInfoDay implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键id */
@ApiModelProperty(value="主键ID",name="id")
@TableId
private java.lang.String id;
/** 资源点id */
@ApiModelProperty(value="资源点id",name="resourceId")
private java.lang.String resourceId;
/** 电能 */
@ApiModelProperty(value="电能",name="electricEnergy")
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
@ApiModelProperty(value="类型(1手动,2节能)",name="type")
private Integer type;
/** 站点表id */
@ApiModelProperty(value="站点表id",name="stationId")
private java.lang.String stationId;
/** 创建时间 */
@ApiModelProperty(value="创建时间",name="createTime")
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ApiModel(value="多联室外机信息-时对象",description="多联室外机信息-时对象")
@TableName("dlswj_info_hour")
public class DlswjInfoHour implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键id */
@ApiModelProperty(value="主键ID",name="id")
@TableId
private java.lang.String id;
/** 资源点id */
@ApiModelProperty(value="资源点id",name="resourceId")
private java.lang.String resourceId;
/** 电能 */
@ApiModelProperty(value="电能",name="electricEnergy")
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
@ApiModelProperty(value="类型(1手动,2节能)",name="type")
private Integer type;
/** 站点表id */
@ApiModelProperty(value="站点表id",name="stationId")
private java.lang.String stationId;
/** 创建时间 */
@ApiModelProperty(value="创建时间",name="createTime")
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ApiModel(value="多联室外机信息-月对象",description="多联室外机信息-月对象")
@TableName("dlswj_info_month")
public class DlswjInfoMonth implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键id */
@ApiModelProperty(value="主键ID",name="id")
@TableId
private java.lang.String id;
/** 资源点id */
@ApiModelProperty(value="资源点id",name="resourceId")
private java.lang.String resourceId;
/** 电能 */
@ApiModelProperty(value="电能",name="electricEnergy")
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
@ApiModelProperty(value="类型(1手动,2节能)",name="type")
private Integer type;
/** 站点表id */
@ApiModelProperty(value="站点表id",name="stationId")
private java.lang.String stationId;
/** 创建时间 */
@ApiModelProperty(value="创建时间",name="createTime")
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ApiModel(value="多联室外机信息-年对象",description="多联室外机信息-年对象")
@TableName("dlswj_info_year")
public class DlswjInfoYear implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键id */
@ApiModelProperty(value="主键ID",name="id")
@TableId
private java.lang.String id;
/** 资源点id */
@ApiModelProperty(value="资源点id",name="resourceId")
private java.lang.String resourceId;
/** 电能 */
@ApiModelProperty(value="电能",name="electricEnergy")
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
@ApiModelProperty(value="类型(1手动,2节能)",name="type")
private Integer type;
/** 站点表id */
@ApiModelProperty(value="站点表id",name="stationId")
private java.lang.String stationId;
/** 创建时间 */
@ApiModelProperty(value="创建时间",name="createTime")
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.controller; package com.devplatform.admin.modules.eq.controller;
import com.devplatform.admin.common.utils.AbstractController; import com.devplatform.admin.common.utils.AbstractController;
import com.devplatform.admin.common.utils.Constants;
import com.devplatform.admin.modules.sys.bean.SysSystemParams;
import com.devplatform.admin.modules.sys.service.SysFaulalarmService; import com.devplatform.admin.modules.sys.service.SysFaulalarmService;
import com.devplatform.admin.modules.sys.service.SysSystemParamsService;
import com.devplatform.common.util.R; import com.devplatform.common.util.R;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -27,6 +30,8 @@ import java.util.Map; ...@@ -27,6 +30,8 @@ import java.util.Map;
public class AnalysisController extends AbstractController { public class AnalysisController extends AbstractController {
@Autowired @Autowired
private SysFaulalarmService sysFaulalarmService; private SysFaulalarmService sysFaulalarmService;
@Autowired
private SysSystemParamsService sysSystemParamsService;
/** /**
* 首页 * 首页
...@@ -35,35 +40,78 @@ public class AnalysisController extends AbstractController { ...@@ -35,35 +40,78 @@ public class AnalysisController extends AbstractController {
@ApiOperation(value="获取首页展示数据", notes="获取首页展示数据") @ApiOperation(value="获取首页展示数据", notes="获取首页展示数据")
@GetMapping("/getSyParam") @GetMapping("/getSyParam")
public R getSyParam() { public R getSyParam() {
SysSystemParams sysSystemParams = sysSystemParamsService.getById(Constants.STRING_1);
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
//系统运行时间 //系统运行时间
map.put("systemRunningTime",10); map.put("systemRunningTime",sysSystemParams.getSystemRunningTime());
//报警总数 //报警总数
map.put("faultAlarm",2); map.put("faultAlarm",2);
//供暖模式
map.put("sun",1);
//机械通风模式
map.put("fan",2);
//自然通风模式
map.put("nan",2);
//能耗 //能耗
Map<String,Object> energy = new HashMap<>(); Map<String,Object> energy = new HashMap<>();
//当天 //当天
energy.put("sdSystemRunningTimeDay",10); //手动运行时间-天
energy.put("jnSystemRunningTimeDay",11); energy.put("sdSystemRunningTimeDay",sysSystemParams.getSdSystemRunningTimeDay());
//节能运行时间-天
energy.put("jnSystemRunningTimeDay",sysSystemParams.getJnSystemRunningTimeDay());
energy.put("sdEnergyDay",100); energy.put("sdEnergyDay",100);
energy.put("jnEnergyDay",100); energy.put("jnEnergyDay",100);
energy.put("totalEnergyDay",200); energy.put("totalEnergyDay",200);
//当月 //当月
energy.put("sdSystemRunningTimeMonth",10); //手动运行时间-月
energy.put("jnSystemRunningTimeMonth",10); energy.put("sdSystemRunningTimeMonth",sysSystemParams.getSdSystemRunningTimeMonth());
//节能运行时间-月
energy.put("jnSystemRunningTimeMonth",sysSystemParams.getJnSystemRunningTimeMonth());
energy.put("sdEnergyMonth",100); energy.put("sdEnergyMonth",100);
energy.put("jnEnergyMonth",100); energy.put("jnEnergyMonth",100);
energy.put("totalEnergyMonth",200); energy.put("totalEnergyMonth",200);
map.put("energy",energy); map.put("energy",energy);
//能耗统计 //能耗统计
List<String> list = new ArrayList<String>(); List<List<String>> list = new ArrayList<List<String>>();
list.add("111"); List<String> listDetail = new ArrayList<String>();
list.add("222"); listDetail.add("2021-04-12 8:00:00");
list.add("333"); listDetail.add("100");
list.add("444"); List<String> listDetail1 = new ArrayList<String>();
listDetail1.add("2021-04-12 9:00:00");
listDetail1.add("200");
List<String> listDetail2 = new ArrayList<String>();
listDetail2.add("2021-04-12 10:00:00");
listDetail2.add("300");
List<String> listDetail3 = new ArrayList<String>();
listDetail3.add("2021-04-12 11:00:00");
listDetail3.add("400");
list.add(listDetail);
list.add(listDetail1);
list.add(listDetail2);
list.add(listDetail3);
List<List<String>> listMonth = new ArrayList<List<String>>();
List<String> listDetailMonth = new ArrayList<String>();
listDetailMonth.add("2021-04-12 8:00:00");
listDetailMonth.add("100");
List<String> listDetailMonth1 = new ArrayList<String>();
listDetailMonth1.add("2021-04-12 9:00:00");
listDetailMonth1.add("200");
List<String> listDetailMonth2 = new ArrayList<String>();
listDetailMonth2.add("2021-04-12 10:00:00");
listDetailMonth2.add("300");
List<String> listDetailMonth3 = new ArrayList<String>();
listDetailMonth3.add("2021-04-12 11:00:00");
listDetailMonth3.add("400");
listMonth.add(listDetailMonth);
listMonth.add(listDetailMonth1);
listMonth.add(listDetailMonth2);
listMonth.add(listDetailMonth3);
map.put("energyList",list); map.put("energyList",list);
map.put("energyListMonth",listMonth);
return R.ok().put("bean", map); return R.ok().put("bean", map);
} }
......
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.DlswjInfoModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfo;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
import java.util.Map;
/**
* DlswjInfo Mapper
* 用于多联室外机记录信息的数据库操作
* @author Administrator
*
*/
@Mapper
public interface DlswjInfoDao extends MyBaseMapper<DlswjInfo> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(DlswjInfoModel model);
/**
* 查询多联室外机记录信息分页数据
* @param model
* @return
*/
List<DlswjInfo> queryPageList(DlswjInfoModel model);
List<Map<String, Object>> getList();
}
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.DlswjInfoDayModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoDay;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
/**
* DlswjInfoDay Mapper
* 用于多联室外机信息-天的数据库操作
* @author Administrator
*
*/
@Mapper
public interface DlswjInfoDayDao extends MyBaseMapper<DlswjInfoDay> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(DlswjInfoDayModel model);
/**
* 查询多联室外机信息-天分页数据
* @param model
* @return
*/
List<DlswjInfoDay> queryPageList(DlswjInfoDayModel model);
}
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.DlswjInfoHourModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoHour;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
/**
* DlswjInfoHour Mapper
* 用于多联室外机信息-时的数据库操作
* @author Administrator
*
*/
@Mapper
public interface DlswjInfoHourDao extends MyBaseMapper<DlswjInfoHour> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(DlswjInfoHourModel model);
/**
* 查询多联室外机信息-时分页数据
* @param model
* @return
*/
List<DlswjInfoHour> queryPageList(DlswjInfoHourModel model);
}
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.DlswjInfoMonthModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoMonth;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
/**
* DlswjInfoMonth Mapper
* 用于多联室外机信息-月的数据库操作
* @author Administrator
*
*/
@Mapper
public interface DlswjInfoMonthDao extends MyBaseMapper<DlswjInfoMonth> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(DlswjInfoMonthModel model);
/**
* 查询多联室外机信息-月分页数据
* @param model
* @return
*/
List<DlswjInfoMonth> queryPageList(DlswjInfoMonthModel model);
}
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.DlswjInfoYearModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoYear;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
/**
* DlswjInfoYear Mapper
* 用于多联室外机信息-年的数据库操作
* @author Administrator
*
*/
@Mapper
public interface DlswjInfoYearDao extends MyBaseMapper<DlswjInfoYear> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(DlswjInfoYearModel model);
/**
* 查询多联室外机信息-年分页数据
* @param model
* @return
*/
List<DlswjInfoYear> queryPageList(DlswjInfoYearModel model);
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 多联室外机信息-天的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class DlswjInfoDayModel extends BaseModel {
/** 主键id */
private java.lang.String id;
/** 资源点id */
private java.lang.String resourceId;
/** 电能 */
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
private Integer type;
/** 站点表id */
private java.lang.String stationId;
/** 创建时间 */
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 多联室外机信息-时的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class DlswjInfoHourModel extends BaseModel {
/** 主键id */
private java.lang.String id;
/** 资源点id */
private java.lang.String resourceId;
/** 电能 */
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
private Integer type;
/** 站点表id */
private java.lang.String stationId;
/** 创建时间 */
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 多联室外机记录信息的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class DlswjInfoModel extends BaseModel {
/** 主键id */
private java.lang.String id;
/** 资源点id */
private java.lang.String resourceId;
/** A相电压 */
private java.lang.String phaseAVoltage;
/** B相电压 */
private java.lang.String phaseBVoltage;
/** C相电压 */
private java.lang.String phaseCVoltage;
/** A相电流 */
private java.lang.String phaseACurrent;
/** B相电流 */
private java.lang.String phaseBCurrent;
/** C相电流 */
private java.lang.String phaseCCurrent;
/** A相功率因数 */
private java.lang.String phaseAPowerFactor;
/** B相功率因数 */
private java.lang.String phaseBPowerFactor;
/** C相功率因数 */
private java.lang.String phaseCPowerFactor;
/** A相功率 */
private java.lang.String phaseAPower;
/** B相功率 */
private java.lang.String phaseBPower;
/** C相功率 */
private java.lang.String phaseCPower;
/** 电能 */
private java.lang.String electricEnergy;
/** 电表通讯故障 */
private java.lang.String communicationFailure;
/** 状态(1手动,2节能) */
private Integer type;
/** 创建时间 */
private java.util.Date createTime;
/** 站点表id */
private java.lang.String stationId;
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 多联室外机信息-月的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class DlswjInfoMonthModel extends BaseModel {
/** 主键id */
private java.lang.String id;
/** 资源点id */
private java.lang.String resourceId;
/** 电能 */
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
private Integer type;
/** 站点表id */
private java.lang.String stationId;
/** 创建时间 */
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 多联室外机信息-年的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class DlswjInfoYearModel extends BaseModel {
/** 主键id */
private java.lang.String id;
/** 资源点id */
private java.lang.String resourceId;
/** 电能 */
private java.lang.String electricEnergy;
/** 类型(1手动,2节能) */
private Integer type;
/** 站点表id */
private java.lang.String stationId;
/** 创建时间 */
private java.util.Date createTime;
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.DlswjInfoDay;
import com.devplatform.admin.modules.eq.model.DlswjInfoDayModel;
import java.util.List;
/**
* 多联室外机信息-天的service接口
* <br>
* <b>功能:</b>DlswjInfoDayService<br>
* @author 代码生成器产生
*/
public interface DlswjInfoDayService extends MyBaseService<DlswjInfoDay> {
/**
* 查询多联室外机信息-天分页数据
* @param model
* @return
*/
List<DlswjInfoDay> queryPageList(DlswjInfoDayModel model);
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.DlswjInfoHour;
import com.devplatform.admin.modules.eq.model.DlswjInfoHourModel;
import java.util.List;
/**
* 多联室外机信息-时的service接口
* <br>
* <b>功能:</b>DlswjInfoHourService<br>
* @author 代码生成器产生
*/
public interface DlswjInfoHourService extends MyBaseService<DlswjInfoHour> {
/**
* 查询多联室外机信息-时分页数据
* @param model
* @return
*/
List<DlswjInfoHour> queryPageList(DlswjInfoHourModel model);
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.DlswjInfoMonth;
import com.devplatform.admin.modules.eq.model.DlswjInfoMonthModel;
import java.util.List;
/**
* 多联室外机信息-月的service接口
* <br>
* <b>功能:</b>DlswjInfoMonthService<br>
* @author 代码生成器产生
*/
public interface DlswjInfoMonthService extends MyBaseService<DlswjInfoMonth> {
/**
* 查询多联室外机信息-月分页数据
* @param model
* @return
*/
List<DlswjInfoMonth> queryPageList(DlswjInfoMonthModel model);
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.DlswjInfo;
import com.devplatform.admin.modules.eq.model.DlswjInfoModel;
import java.util.List;
import java.util.Map;
/**
* 多联室外机记录信息的service接口
* <br>
* <b>功能:</b>DlswjInfoService<br>
* @author 代码生成器产生
*/
public interface DlswjInfoService extends MyBaseService<DlswjInfo> {
/**
* 查询多联室外机记录信息分页数据
* @param model
* @return
*/
List<DlswjInfo> queryPageList(DlswjInfoModel model);
List<Map<String, Object>> getList();
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.DlswjInfoYear;
import com.devplatform.admin.modules.eq.model.DlswjInfoYearModel;
import java.util.List;
/**
* 多联室外机信息-年的service接口
* <br>
* <b>功能:</b>DlswjInfoYearService<br>
* @author 代码生成器产生
*/
public interface DlswjInfoYearService extends MyBaseService<DlswjInfoYear> {
/**
* 查询多联室外机信息-年分页数据
* @param model
* @return
*/
List<DlswjInfoYear> queryPageList(DlswjInfoYearModel model);
}
package com.devplatform.admin.modules.eq.service.impl;
import com.devplatform.admin.modules.eq.bean.DlswjInfoDay;
import com.devplatform.admin.modules.eq.dao.DlswjInfoDayDao;
import com.devplatform.admin.modules.eq.model.DlswjInfoDayModel;
import com.devplatform.admin.modules.eq.service.DlswjInfoDayService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 多联室外机信息-天的service接口实现类
* <br>
* <b>功能:</b>DlswjInfoDayServiceImpl<br>
* @author 代码生成器产生
*/
@Service("dlswjInfoDayService")
public class DlswjInfoDayServiceImpl extends MyBaseServiceImpl<DlswjInfoDayDao, DlswjInfoDay> implements DlswjInfoDayService {
@Override
public List<DlswjInfoDay> queryPageList(DlswjInfoDayModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import org.springframework.stereotype.Service;
import com.devplatform.admin.modules.eq.model.DlswjInfoHourModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoHour;
import com.devplatform.admin.modules.eq.dao.DlswjInfoHourDao;
import com.devplatform.admin.modules.eq.service.DlswjInfoHourService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 多联室外机信息-时的service接口实现类
* <br>
* <b>功能:</b>DlswjInfoHourServiceImpl<br>
* @author 代码生成器产生
*/
@Service("dlswjInfoHourService")
public class DlswjInfoHourServiceImpl extends MyBaseServiceImpl<DlswjInfoHourDao, DlswjInfoHour> implements DlswjInfoHourService {
@Override
public List<DlswjInfoHour> queryPageList(DlswjInfoHourModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import org.springframework.stereotype.Service;
import com.devplatform.admin.modules.eq.model.DlswjInfoMonthModel;
import com.devplatform.admin.modules.eq.bean.DlswjInfoMonth;
import com.devplatform.admin.modules.eq.dao.DlswjInfoMonthDao;
import com.devplatform.admin.modules.eq.service.DlswjInfoMonthService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 多联室外机信息-月的service接口实现类
* <br>
* <b>功能:</b>DlswjInfoMonthServiceImpl<br>
* @author 代码生成器产生
*/
@Service("dlswjInfoMonthService")
public class DlswjInfoMonthServiceImpl extends MyBaseServiceImpl<DlswjInfoMonthDao, DlswjInfoMonth> implements DlswjInfoMonthService {
@Override
public List<DlswjInfoMonth> queryPageList(DlswjInfoMonthModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import com.devplatform.admin.modules.eq.bean.DlswjInfo;
import com.devplatform.admin.modules.eq.dao.DlswjInfoDao;
import com.devplatform.admin.modules.eq.model.DlswjInfoModel;
import com.devplatform.admin.modules.eq.service.DlswjInfoService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 多联室外机记录信息的service接口实现类
* <br>
* <b>功能:</b>DlswjInfoServiceImpl<br>
* @author 代码生成器产生
*/
@Service("dlswjInfoService")
public class DlswjInfoServiceImpl extends MyBaseServiceImpl<DlswjInfoDao, DlswjInfo> implements DlswjInfoService {
@Override
public List<DlswjInfo> queryPageList(DlswjInfoModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
@Override
public List<Map<String, Object>> getList() {
return baseMapper.getList();
}
}
package com.devplatform.admin.modules.eq.service.impl;
import com.devplatform.admin.modules.eq.bean.DlswjInfoYear;
import com.devplatform.admin.modules.eq.dao.DlswjInfoYearDao;
import com.devplatform.admin.modules.eq.model.DlswjInfoYearModel;
import com.devplatform.admin.modules.eq.service.DlswjInfoYearService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 多联室外机信息-年的service接口实现类
* <br>
* <b>功能:</b>DlswjInfoYearServiceImpl<br>
* @author 代码生成器产生
*/
@Service("dlswjInfoYearService")
public class DlswjInfoYearServiceImpl extends MyBaseServiceImpl<DlswjInfoYearDao, DlswjInfoYear> implements DlswjInfoYearService {
@Override
public List<DlswjInfoYear> queryPageList(DlswjInfoYearModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
}
...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -17,6 +18,8 @@ public class EquipmentServiceImpl implements EquipmentService { ...@@ -17,6 +18,8 @@ public class EquipmentServiceImpl implements EquipmentService {
@Autowired @Autowired
private DlsnjInfoService dlsnjInfoService; private DlsnjInfoService dlsnjInfoService;
@Autowired @Autowired
private DlswjInfoService dlswjInfoService;
@Autowired
private FlrbInfoService flrbInfoService; private FlrbInfoService flrbInfoService;
@Autowired @Autowired
private JfktgInfoService jfktgInfoService; private JfktgInfoService jfktgInfoService;
...@@ -35,27 +38,40 @@ public class EquipmentServiceImpl implements EquipmentService { ...@@ -35,27 +38,40 @@ public class EquipmentServiceImpl implements EquipmentService {
@Override @Override
public List<Map<String, Object>> getList() { public List<Map<String, Object>> getList() {
Map<String,Object> map = new HashMap<String,Object>(16);
List<Map<String,Object>> list = new ArrayList<>(); List<Map<String,Object>> list = new ArrayList<>();
//多联室内机
List<Map<String,Object>> dlsnjList = dlsnjInfoService.getList(); List<Map<String,Object>> dlsnjList = dlsnjInfoService.getList();
//多联室外机
List<Map<String,Object>> dlswjList = dlswjInfoService.getList();
//风冷热泵机组
List<Map<String,Object>> flrbList = flrbInfoService.getList(); List<Map<String,Object>> flrbList = flrbInfoService.getList();
//机房空调(380V)
List<Map<String,Object>> jfktgList = jfktgInfoService.getList(); List<Map<String,Object>> jfktgList = jfktgInfoService.getList();
//机房空调(220V)
List<Map<String,Object>> jfktpList = jfktpInfoService.getList(); List<Map<String,Object>> jfktpList = jfktpInfoService.getList();
//排风机
List<Map<String,Object>> pfjList = pfjInfoService.getList(); List<Map<String,Object>> pfjList = pfjInfoService.getList();
//水泵
List<Map<String,Object>> sbList = sbInfoService.getList(); List<Map<String,Object>> sbList = sbInfoService.getList();
//室内机风柜
List<Map<String,Object>> sljfgList = sljfgInfoService.getList(); List<Map<String,Object>> sljfgList = sljfgInfoService.getList();
//室内气象站
List<Map<String,Object>> snqxzList = snqxzInfoService.getList(); List<Map<String,Object>> snqxzList = snqxzInfoService.getList();
//室外气象站
List<Map<String,Object>> swqxzList = swqxzInfoService.getList(); List<Map<String,Object>> swqxzList = swqxzInfoService.getList();
list.addAll(dlsnjList); // list.addAll(dlsnjList);
list.addAll(flrbList); // list.addAll(flrbList);
list.addAll(jfktgList); // list.addAll(jfktgList);
list.addAll(jfktpList); // list.addAll(jfktpList);
list.addAll(pfjList); // list.addAll(pfjList);
list.addAll(sbList); // list.addAll(sbList);
list.addAll(sljfgList); // list.addAll(sljfgList);
list.addAll(snqxzList); // list.addAll(snqxzList);
list.addAll(swqxzList); // list.addAll(swqxzList);
return list; return list;
} }
} }
#######################mysql c3p0 DataSource################################ #######################mysql c3p0 DataSource################################
gpt.url=jdbc:mysql://10.20.72.31:3306/energy gpt.url=jdbc:mysql://47.94.207.62:3306/energy
#gpt.username=root #gpt.username=root
#gpt.password=superAdmin&321 #gpt.password=superAdmin&321
gpt.minPoolSize=10 gpt.minPoolSize=10
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.devplatform.admin.modules.eq.dao.DlswjInfoDayDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.DlswjInfoDay">
<result column="id" property="id"/>
<result column="resource_id" property="resourceId"/>
<result column="electric_energy" property="electricEnergy"/>
<result column="type" property="type"/>
<result column="station_id" property="stationId"/>
<result column="create_time" property="createTime"/>
</resultMap>
<!-- dlswj_info_day table all fields -->
<sql id="Base_Column_List">
id,resource_id,electric_energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where t.deleted=0
<if test="id!=null and id!=''">and t.id = #{id}</if>
<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
<if test="electricEnergy!=null and electricEnergy!=''">and t.electric_energy = #{electricEnergy}</if>
<if test="type!=null ">and t.type = #{type}</if>
<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
<if test="createTime!=null ">and t.create_time = #{createTime}</if>
</sql>
<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
select count(1) from dlswj_info_day t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from dlswj_info_day t
<include refid="Example_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
${pager.mysqlQueryCondition}
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.devplatform.admin.modules.eq.dao.DlswjInfoHourDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.DlswjInfoHour">
<result column="id" property="id"/>
<result column="resource_id" property="resourceId"/>
<result column="electric_energy" property="electricEnergy"/>
<result column="type" property="type"/>
<result column="station_id" property="stationId"/>
<result column="create_time" property="createTime"/>
</resultMap>
<!-- dlswj_info_hour table all fields -->
<sql id="Base_Column_List">
id,resource_id,electric_energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where t.deleted=0
<if test="id!=null and id!=''">and t.id = #{id}</if>
<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
<if test="electricEnergy!=null and electricEnergy!=''">and t.electric_energy = #{electricEnergy}</if>
<if test="type!=null ">and t.type = #{type}</if>
<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
<if test="createTime!=null ">and t.create_time = #{createTime}</if>
</sql>
<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
select count(1) from dlswj_info_hour t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from dlswj_info_hour t
<include refid="Example_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
${pager.mysqlQueryCondition}
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.devplatform.admin.modules.eq.dao.DlswjInfoDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.DlswjInfo">
<result column="id" property="id"/>
<result column="resource_id" property="resourceId"/>
<result column="phase_a_voltage" property="phaseAVoltage"/>
<result column="phase_b_voltage" property="phaseBVoltage"/>
<result column="phase_c_voltage" property="phaseCVoltage"/>
<result column="phase_a_current" property="phaseACurrent"/>
<result column="phase_b_current" property="phaseBCurrent"/>
<result column="phase_c_current" property="phaseCCurrent"/>
<result column="phase_a_power_factor" property="phaseAPowerFactor"/>
<result column="phase_b_power_factor" property="phaseBPowerFactor"/>
<result column="phase_c_power_factor" property="phaseCPowerFactor"/>
<result column="phase_a_power" property="phaseAPower"/>
<result column="phase_b_power" property="phaseBPower"/>
<result column="phase_c_power" property="phaseCPower"/>
<result column="electric_energy" property="electricEnergy"/>
<result column="communication_failure" property="communicationFailure"/>
<result column="type" property="type"/>
<result column="create_time" property="createTime"/>
<result column="station_id" property="stationId"/>
</resultMap>
<!-- dlswj_info table all fields -->
<sql id="Base_Column_List">
id,resource_id,phase_a_voltage,phase_b_voltage,phase_c_voltage,phase_a_current,phase_b_current,phase_c_current,phase_a_power_factor,phase_b_power_factor,phase_c_power_factor,phase_a_power,phase_b_power,phase_c_power,electric_energy,communication_failure,type,create_time,station_id
</sql>
<!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where t.deleted=0
<if test="id!=null and id!=''">and t.id = #{id}</if>
<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
<if test="phaseAVoltage!=null and phaseAVoltage!=''">and t.phase_a_voltage = #{phaseAVoltage}</if>
<if test="phaseBVoltage!=null and phaseBVoltage!=''">and t.phase_b_voltage = #{phaseBVoltage}</if>
<if test="phaseCVoltage!=null and phaseCVoltage!=''">and t.phase_c_voltage = #{phaseCVoltage}</if>
<if test="phaseACurrent!=null and phaseACurrent!=''">and t.phase_a_current = #{phaseACurrent}</if>
<if test="phaseBCurrent!=null and phaseBCurrent!=''">and t.phase_b_current = #{phaseBCurrent}</if>
<if test="phaseCCurrent!=null and phaseCCurrent!=''">and t.phase_c_current = #{phaseCCurrent}</if>
<if test="phaseAPowerFactor!=null and phaseAPowerFactor!=''">and t.phase_a_power_factor = #{phaseAPowerFactor}</if>
<if test="phaseBPowerFactor!=null and phaseBPowerFactor!=''">and t.phase_b_power_factor = #{phaseBPowerFactor}</if>
<if test="phaseCPowerFactor!=null and phaseCPowerFactor!=''">and t.phase_c_power_factor = #{phaseCPowerFactor}</if>
<if test="phaseAPower!=null and phaseAPower!=''">and t.phase_a_power = #{phaseAPower}</if>
<if test="phaseBPower!=null and phaseBPower!=''">and t.phase_b_power = #{phaseBPower}</if>
<if test="phaseCPower!=null and phaseCPower!=''">and t.phase_c_power = #{phaseCPower}</if>
<if test="electricEnergy!=null and electricEnergy!=''">and t.electric_energy = #{electricEnergy}</if>
<if test="communicationFailure!=null and communicationFailure!=''">and t.communication_failure = #{communicationFailure}</if>
<if test="type!=null ">and t.type = #{type}</if>
<if test="createTime!=null ">and t.create_time = #{createTime}</if>
<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
</sql>
<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
select count(1) from dlswj_info t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from dlswj_info t
<include refid="Example_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
${pager.mysqlQueryCondition}
</if>
</select>
<select id="getList" resultType="java.util.Map">
SELECT t1.*,li.name as resourceName,li.remark as remark,li.deploy_location as deployLocation,li.status as status,li.region as region
FROM dlswj_info AS t1
INNER JOIN
(SELECT t2.resource_id, MAX(t2.create_time) AS maxdate
FROM dlswj_info AS t2
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = resource_id
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.devplatform.admin.modules.eq.dao.DlswjInfoMonthDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.DlswjInfoMonth">
<result column="id" property="id"/>
<result column="resource_id" property="resourceId"/>
<result column="electric_energy" property="electricEnergy"/>
<result column="type" property="type"/>
<result column="station_id" property="stationId"/>
<result column="create_time" property="createTime"/>
</resultMap>
<!-- dlswj_info_month table all fields -->
<sql id="Base_Column_List">
id,resource_id,electric_energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where t.deleted=0
<if test="id!=null and id!=''">and t.id = #{id}</if>
<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
<if test="electricEnergy!=null and electricEnergy!=''">and t.electric_energy = #{electricEnergy}</if>
<if test="type!=null ">and t.type = #{type}</if>
<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
<if test="createTime!=null ">and t.create_time = #{createTime}</if>
</sql>
<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
select count(1) from dlswj_info_month t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from dlswj_info_month t
<include refid="Example_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
${pager.mysqlQueryCondition}
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.devplatform.admin.modules.eq.dao.DlswjInfoYearDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.DlswjInfoYear">
<result column="id" property="id"/>
<result column="resource_id" property="resourceId"/>
<result column="electric_energy" property="electricEnergy"/>
<result column="type" property="type"/>
<result column="station_id" property="stationId"/>
<result column="create_time" property="createTime"/>
</resultMap>
<!-- dlswj_info_year table all fields -->
<sql id="Base_Column_List">
id,resource_id,electric_energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where t.deleted=0
<if test="id!=null and id!=''">and t.id = #{id}</if>
<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
<if test="electricEnergy!=null and electricEnergy!=''">and t.electric_energy = #{electricEnergy}</if>
<if test="type!=null ">and t.type = #{type}</if>
<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
<if test="createTime!=null ">and t.create_time = #{createTime}</if>
</sql>
<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
select count(1) from dlswj_info_year t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from dlswj_info_year t
<include refid="Example_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
${pager.mysqlQueryCondition}
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment