Commit 12dc8390 authored by co_dengxiongwen's avatar co_dengxiongwen

接口调整

parent d9617cfe
......@@ -32,15 +32,11 @@ public class Constants {
*/
public static final String ID_PFJ = "b6af764f2a6e454490a6b1b3c9057e57";
/**
* 机房空调(220V)
* 机房空调
*/
public static final String ID_JFKTP = "ece0b8b2db27411886254e81134988a3";
/**
* 机房空调(380V)
*/
public static final String ID_JFKTG = "b47661ca1d454f9792ba5369f3cb2bc5";
/**
* 电动卷帘门
* 电动门帘
*/
public static final String ID_JLM = "c788ce98c1f248f590434394da485ce4";
/**
......
package com.devplatform.admin.modules.eq.bean;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author dxw
*/
@Data
@ApiModel(value="机房空调(380V)信息对象",description="机房空调(380V)信息对象")
@TableName("jfktg_info")
public class JfktgInfo 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;
/** 站点表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="机房空调(380V)信息-天对象",description="机房空调(380V)信息-天对象")
@TableName("jfktg_info_day")
public class JfktgInfoDay 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="机房空调(380V)信息-时对象",description="机房空调(380V)信息-时对象")
@TableName("jfktg_info_hour")
public class JfktgInfoHour 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="机房空调(380V)信息-月对象",description="机房空调(380V)信息-月对象")
@TableName("jfktg_info_month")
public class JfktgInfoMonth 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="机房空调(380V)信息-年对象",description="机房空调(380V)信息-年对象")
@TableName("jfktg_info_year")
public class JfktgInfoYear 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.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.JfktgInfoModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfo;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
import java.util.Map;
/**
* JfktgInfo Mapper
* 用于机房空调(380V)信息的数据库操作
* @author Administrator
*
*/
@Mapper
public interface JfktgInfoDao extends MyBaseMapper<JfktgInfo> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(JfktgInfoModel model);
/**
* 查询机房空调(380V)信息分页数据
* @param model
* @return
*/
List<JfktgInfo> queryPageList(JfktgInfoModel model);
List<Map<String, Object>> getList();
}
package com.devplatform.admin.modules.eq.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.JfktgInfoDayModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfoDay;
import com.devplatform.common.dao.MyBaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* JfktgInfoDay Mapper
* 用于机房空调(380V)信息-天的数据库操作
* @author Administrator
*
*/
@Mapper
public interface JfktgInfoDayDao extends MyBaseMapper<JfktgInfoDay> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(JfktgInfoDayModel model);
/**
* 查询机房空调(380V)信息-天分页数据
* @param model
* @return
*/
List<JfktgInfoDay> queryPageList(JfktgInfoDayModel model);
/**
* 查询机房空调(380V)信息-天分页数据
* @param params
* @return
*/
Page<Map<String, Object>> queryPageListByParam(@Param("page") Page<Map<String, Object>> page,
@Param("params") Map<String, Object> params);
List<Map<String, Object>> queryListByParam(@Param("startTime")String startTime,@Param("endTime")String endTime);
}
package com.devplatform.admin.modules.eq.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.JfktgInfoHourModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfoHour;
import com.devplatform.common.dao.MyBaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* JfktgInfoHour Mapper
* 用于机房空调(380V)信息-时的数据库操作
* @author Administrator
*
*/
@Mapper
public interface JfktgInfoHourDao extends MyBaseMapper<JfktgInfoHour> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(JfktgInfoHourModel model);
/**
* 查询机房空调(380V)信息-时分页数据
* @param model
* @return
*/
List<JfktgInfoHour> queryPageList(JfktgInfoHourModel model);
Page<Map<String, Object>> queryPageListByParam(@Param("page") Page<Map<String, Object>> page,
@Param("params") Map<String, Object> params);
List<Map<String, Object>> queryListByParam(@Param("startTime")String startTime,@Param("endTime")String endTime);
}
package com.devplatform.admin.modules.eq.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.JfktgInfoMonthModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfoMonth;
import com.devplatform.common.dao.MyBaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* JfktgInfoMonth Mapper
* 用于机房空调(380V)信息-月的数据库操作
* @author Administrator
*
*/
@Mapper
public interface JfktgInfoMonthDao extends MyBaseMapper<JfktgInfoMonth> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(JfktgInfoMonthModel model);
/**
* 查询机房空调(380V)信息-月分页数据
* @param model
* @return
*/
List<JfktgInfoMonth> queryPageList(JfktgInfoMonthModel model);
Page<Map<String, Object>> queryPageListByParam(@Param("page") Page<Map<String, Object>> page,
@Param("params") Map<String, Object> params);
List<Map<String, Object>> queryListByParam(@Param("startTime")String startTime,@Param("endTime")String endTime);
}
package com.devplatform.admin.modules.eq.dao;
import org.apache.ibatis.annotations.Mapper;
import com.devplatform.admin.modules.eq.model.JfktgInfoYearModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfoYear;
import com.devplatform.common.dao.MyBaseMapper;
import java.util.List;
/**
* JfktgInfoYear Mapper
* 用于机房空调(380V)信息-年的数据库操作
* @author Administrator
*
*/
@Mapper
public interface JfktgInfoYearDao extends MyBaseMapper<JfktgInfoYear> {
/**
* 查询分页数量
* @param model
* @return
*/
Integer queryPageByCount(JfktgInfoYearModel model);
/**
* 查询机房空调(380V)信息-年分页数据
* @param model
* @return
*/
List<JfktgInfoYear> queryPageList(JfktgInfoYearModel model);
}
......@@ -46,5 +46,5 @@ public interface SnqxzInfoHourDao extends MyBaseMapper<SnqxzInfoHour> {
List<Map<String, Object>> getListFx(@Param("region")Integer region,@Param("startTime")String startTime,@Param("endTime")String endTime);
List<Map<String, Object>> getParamGroupByRegion();
List<Map<String, Object>> getParamGroupByRegion(@Param("region")Integer region);
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 机房空调(380V)信息-天的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class JfktgInfoDayModel 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;
private String startTime;
private String endTime;
}
package com.devplatform.admin.modules.eq.model;
import com.devplatform.admin.common.model.BaseModel;
import lombok.Data;
/**
* 机房空调(380V)信息-时的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class JfktgInfoHourModel 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;
/**
* 机房空调(380V)信息的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class JfktgInfoModel 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;
/** 站点表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;
/**
* 机房空调(380V)信息-月的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class JfktgInfoMonthModel 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;
/**
* 机房空调(380V)信息-年的Model
* <br>
* @author 代码生成器产生
*/
@Data
public class JfktgInfoYearModel 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.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.JfktgInfoDay;
import com.devplatform.admin.modules.eq.model.JfktgInfoDayModel;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-天的service接口
* <br>
* <b>功能:</b>JfktgInfoDayService<br>
* @author 代码生成器产生
*/
public interface JfktgInfoDayService extends MyBaseService<JfktgInfoDay> {
/**
* 查询机房空调(380V)信息-天分页数据
* @param model
* @return
*/
List<JfktgInfoDay> queryPageList(JfktgInfoDayModel model);
/**
* 查询机房空调(380V)信息-天分页数据
* @param params
* @return
*/
Page<Map<String,Object>> queryPageListByParam(Page<Map<String, Object>> page, Map<String, Object> params);
List<Map<String, Object>> queryListByParam(String startTime,String endTime);
}
package com.devplatform.admin.modules.eq.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.JfktgInfoHour;
import com.devplatform.admin.modules.eq.model.JfktgInfoHourModel;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-时的service接口
* <br>
* <b>功能:</b>JfktgInfoHourService<br>
* @author 代码生成器产生
*/
public interface JfktgInfoHourService extends MyBaseService<JfktgInfoHour> {
/**
* 查询机房空调(380V)信息-时分页数据
* @param model
* @return
*/
List<JfktgInfoHour> queryPageList(JfktgInfoHourModel model);
Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params);
List<Map<String, Object>> queryListByParam(String startTime,String endTime);
}
package com.devplatform.admin.modules.eq.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.JfktgInfoMonth;
import com.devplatform.admin.modules.eq.model.JfktgInfoMonthModel;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-月的service接口
* <br>
* <b>功能:</b>JfktgInfoMonthService<br>
* @author 代码生成器产生
*/
public interface JfktgInfoMonthService extends MyBaseService<JfktgInfoMonth> {
/**
* 查询机房空调(380V)信息-月分页数据
* @param model
* @return
*/
List<JfktgInfoMonth> queryPageList(JfktgInfoMonthModel model);
Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params);
List<Map<String, Object>> queryListByParam(String startTime,String endTime);
}
package com.devplatform.admin.modules.eq.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.admin.modules.eq.bean.JfktgInfo;
import com.devplatform.admin.modules.eq.model.JfktgInfoModel;
import com.devplatform.common.service.MyBaseService;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息的service接口
* <br>
* <b>功能:</b>JfktgInfoService<br>
* @author 代码生成器产生
*/
public interface JfktgInfoService extends MyBaseService<JfktgInfo> {
/**
* 查询机房空调(380V)信息分页数据
* @param model
* @return
*/
List<JfktgInfo> queryPageList(JfktgInfoModel model);
List<Map<String, Object>> getList();
Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params);
List<Map<String, Object>> queryListByParam(String startTime,String endTime);
}
package com.devplatform.admin.modules.eq.service;
import com.devplatform.common.service.MyBaseService;
import com.devplatform.admin.modules.eq.bean.JfktgInfoYear;
import com.devplatform.admin.modules.eq.model.JfktgInfoYearModel;
import java.util.List;
/**
* 机房空调(380V)信息-年的service接口
* <br>
* <b>功能:</b>JfktgInfoYearService<br>
* @author 代码生成器产生
*/
public interface JfktgInfoYearService extends MyBaseService<JfktgInfoYear> {
/**
* 查询机房空调(380V)信息-年分页数据
* @param model
* @return
*/
List<JfktgInfoYear> queryPageList(JfktgInfoYearModel model);
}
......@@ -34,5 +34,5 @@ public interface SnqxzInfoHourService extends MyBaseService<SnqxzInfoHour> {
List<Map<String, Object>> getListFx(Integer region, String startTime,String endTime);
List<Map<String, Object>> getParamGroupByRegion();
List<Map<String, Object>> getParamGroupByRegion(Integer region);
}
......@@ -30,8 +30,6 @@ public class AnalysisServiceImpl implements AnalysisService {
@Autowired
private FlrbInfoService flrbInfoService;
@Autowired
private JfktgInfoService jfktgInfoService;
@Autowired
private JfktpInfoService jfktpInfoService;
@Autowired
private PfjInfoService pfjInfoService;
......@@ -127,8 +125,6 @@ public class AnalysisServiceImpl implements AnalysisService {
page = pfjInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JFKTP.equals(resourceType)){
page = jfktpInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JFKTG.equals(resourceType)){
page = jfktgInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JLM.equals(resourceType)){
}else if(Constants.ID_FLRBJZ.equals(resourceType)){
......@@ -167,8 +163,6 @@ public class AnalysisServiceImpl implements AnalysisService {
list = pfjInfoService.queryListByParam(startTime,endTime);
}else if(Constants.ID_JFKTP.equals(resourceType)){
list = jfktpInfoService.queryListByParam(startTime,endTime);
}else if(Constants.ID_JFKTG.equals(resourceType)){
list = jfktgInfoService.queryListByParam(startTime,endTime);
}else if(Constants.ID_JLM.equals(resourceType)){
}else if(Constants.ID_FLRBJZ.equals(resourceType)){
......
......@@ -22,8 +22,6 @@ public class EquipmentServiceImpl implements EquipmentService {
@Autowired
private FlrbInfoService flrbInfoService;
@Autowired
private JfktgInfoService jfktgInfoService;
@Autowired
private JfktpInfoService jfktpInfoService;
@Autowired
private PfjInfoService pfjInfoService;
......@@ -51,9 +49,7 @@ public class EquipmentServiceImpl implements EquipmentService {
List<Map<String,Object>> dlswjList = dlswjInfoService.getList();
//风冷热泵机组
List<Map<String,Object>> flrbList = flrbInfoService.getList();
//机房空调(380V)
List<Map<String,Object>> jfktgList = jfktgInfoService.getList();
//机房空调(220V)
//机房空调
List<Map<String,Object>> jfktpList = jfktpInfoService.getList();
//排风机
List<Map<String,Object>> pfjList = pfjInfoService.getList();
......@@ -68,7 +64,7 @@ public class EquipmentServiceImpl implements EquipmentService {
//多联新风处理机室内机
List<Map<String,Object>> dlxfsnjList = dlxfsnjInfoService.getList();
List<Map<String,Object>> snqxMaps = snqxzInfoHourService.getParamGroupByRegion();
List<Map<String,Object>> snqxMaps = snqxzInfoHourService.getParamGroupByRegion(null);
for(Map<String,Object> temp : snqxMaps ){
if(Constants.STRING_1.equals(temp.get("region").toString())){
map.put("hcdtSnqx",temp);//候车大厅室内
......@@ -79,7 +75,6 @@ public class EquipmentServiceImpl implements EquipmentService {
map.put("dlsnjList",dlsnjList);//多联室内机
map.put("dlswjList",dlswjList);//多联室外机
map.put("flrbList",flrbList);//风冷热泵机组
map.put("jfktgList",jfktgList);//机房空调(380V)
map.put("jfktpList",jfktpList); //机房空调(220V)
map.put("pfjList",pfjList);//排风机
map.put("sbList",sbList);//水泵
......
package com.devplatform.admin.modules.eq.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.admin.modules.eq.bean.JfktgInfoDay;
import com.devplatform.admin.modules.eq.dao.JfktgInfoDayDao;
import com.devplatform.admin.modules.eq.model.JfktgInfoDayModel;
import com.devplatform.admin.modules.eq.service.JfktgInfoDayService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-天的service接口实现类
* <br>
* <b>功能:</b>JfktgInfoDayServiceImpl<br>
* @author 代码生成器产生
*/
@Service("jfktgInfoDayService")
public class JfktgInfoDayServiceImpl extends MyBaseServiceImpl<JfktgInfoDayDao, JfktgInfoDay> implements JfktgInfoDayService {
@Override
public List<JfktgInfoDay> queryPageList(JfktgInfoDayModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
@Override
public Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> page, Map<String, Object> params) {
return baseMapper.queryPageListByParam(page,params);
}
@Override
public List<Map<String, Object>> queryListByParam(String startTime,String endTime) {
return baseMapper.queryListByParam(startTime,endTime);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.admin.modules.eq.bean.JfktgInfoHour;
import com.devplatform.admin.modules.eq.dao.JfktgInfoHourDao;
import com.devplatform.admin.modules.eq.model.JfktgInfoHourModel;
import com.devplatform.admin.modules.eq.service.JfktgInfoHourService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-时的service接口实现类
* <br>
* <b>功能:</b>JfktgInfoHourServiceImpl<br>
* @author 代码生成器产生
*/
@Service("jfktgInfoHourService")
public class JfktgInfoHourServiceImpl extends MyBaseServiceImpl<JfktgInfoHourDao, JfktgInfoHour> implements JfktgInfoHourService {
@Override
public List<JfktgInfoHour> queryPageList(JfktgInfoHourModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
@Override
public Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params) {
return baseMapper.queryPageListByParam(pageTask,params);
}
@Override
public List<Map<String, Object>> queryListByParam(String startTime,String endTime) {
return baseMapper.queryListByParam(startTime,endTime);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.admin.modules.eq.bean.JfktgInfoMonth;
import com.devplatform.admin.modules.eq.dao.JfktgInfoMonthDao;
import com.devplatform.admin.modules.eq.model.JfktgInfoMonthModel;
import com.devplatform.admin.modules.eq.service.JfktgInfoMonthService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息-月的service接口实现类
* <br>
* <b>功能:</b>JfktgInfoMonthServiceImpl<br>
* @author 代码生成器产生
*/
@Service("jfktgInfoMonthService")
public class JfktgInfoMonthServiceImpl extends MyBaseServiceImpl<JfktgInfoMonthDao, JfktgInfoMonth> implements JfktgInfoMonthService {
@Override
public List<JfktgInfoMonth> queryPageList(JfktgInfoMonthModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
@Override
public Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params) {
return baseMapper.queryPageListByParam(pageTask,params);
}
@Override
public List<Map<String, Object>> queryListByParam(String startTime,String endTime) {
return baseMapper.queryListByParam(startTime,endTime);
}
}
package com.devplatform.admin.modules.eq.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devplatform.admin.common.utils.Constants;
import com.devplatform.admin.common.utils.DateUtil;
import com.devplatform.admin.modules.eq.bean.JfktgInfo;
import com.devplatform.admin.modules.eq.dao.JfktgInfoDao;
import com.devplatform.admin.modules.eq.model.JfktgInfoModel;
import com.devplatform.admin.modules.eq.service.JfktgInfoDayService;
import com.devplatform.admin.modules.eq.service.JfktgInfoHourService;
import com.devplatform.admin.modules.eq.service.JfktgInfoMonthService;
import com.devplatform.admin.modules.eq.service.JfktgInfoService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 机房空调(380V)信息的service接口实现类
* <br>
* <b>功能:</b>JfktgInfoServiceImpl<br>
* @author 代码生成器产生
*/
@Service("jfktgInfoService")
public class JfktgInfoServiceImpl extends MyBaseServiceImpl<JfktgInfoDao, JfktgInfo> implements JfktgInfoService {
@Autowired
private JfktgInfoHourService jfktgInfoHourService;
@Autowired
private JfktgInfoDayService jfktgInfoDayService;
@Autowired
private JfktgInfoMonthService jfktgInfoMonthService;
@Override
public List<JfktgInfo> queryPageList(JfktgInfoModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
@Override
public List<Map<String, Object>> getList() {
return baseMapper.getList();
}
@Override
public Page<Map<String, Object>> queryPageListByParam(Page<Map<String, Object>> pageTask, Map<String, Object> params) {
String startTime = (String) params.get("startTime");
String endTime = (String) params.get("endTime");
int type = DateUtil.checkTimeToType(startTime,endTime);
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
if(type == Constants.INT_1){
page = jfktgInfoHourService.queryPageListByParam(pageTask,params);
}else if(type == Constants.INT_2 || type == Constants.INT_3){
page = jfktgInfoDayService.queryPageListByParam(pageTask,params);
}else if(type == Constants.INT_4){
page = jfktgInfoMonthService.queryPageListByParam(pageTask,params);
}
return page;
}
@Override
public List<Map<String, Object>> queryListByParam(String startTime,String endTime) {
List<Map<String,Object>> list = new ArrayList<>();
int type = DateUtil.checkTimeToType(startTime,endTime);
if(type == Constants.INT_1){
list = jfktgInfoHourService.queryListByParam(startTime,endTime);
}else if(type == Constants.INT_2 || type == Constants.INT_3){
list = jfktgInfoDayService.queryListByParam(startTime,endTime);
}else if(type == Constants.INT_4){
list = jfktgInfoMonthService.queryListByParam(startTime,endTime);
}
return list;
}
}
package com.devplatform.admin.modules.eq.service.impl;
import org.springframework.stereotype.Service;
import com.devplatform.admin.modules.eq.model.JfktgInfoYearModel;
import com.devplatform.admin.modules.eq.bean.JfktgInfoYear;
import com.devplatform.admin.modules.eq.dao.JfktgInfoYearDao;
import com.devplatform.admin.modules.eq.service.JfktgInfoYearService;
import com.devplatform.common.service.impl.MyBaseServiceImpl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 机房空调(380V)信息-年的service接口实现类
* <br>
* <b>功能:</b>JfktgInfoYearServiceImpl<br>
* @author 代码生成器产生
*/
@Service("jfktgInfoYearService")
public class JfktgInfoYearServiceImpl extends MyBaseServiceImpl<JfktgInfoYearDao, JfktgInfoYear> implements JfktgInfoYearService {
@Override
public List<JfktgInfoYear> queryPageList(JfktgInfoYearModel model) {
Integer rowCount = baseMapper.queryPageByCount(model);
model.getPager().setRowCount(rowCount);
return baseMapper.queryPageList(model);
}
}
......@@ -17,8 +17,6 @@ public class KanBanServiceImpl implements KanBanService {
@Autowired
private FlrbInfoService flrbInfoService;
@Autowired
private JfktgInfoService jfktgInfoService;
@Autowired
private JfktpInfoService jfktpInfoService;
@Autowired
private PfjInfoService pfjInfoService;
......@@ -43,8 +41,6 @@ public class KanBanServiceImpl implements KanBanService {
list = pfjInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JFKTP.equals(resourceType)){
list = jfktpInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JFKTG.equals(resourceType)){
list = jfktgInfoService.queryPageListByParam(pageTask,params);
}else if(Constants.ID_JLM.equals(resourceType)){
}else if(Constants.ID_FLRBJZ.equals(resourceType)){
......
......@@ -42,7 +42,7 @@ public class SnqxzInfoHourServiceImpl extends MyBaseServiceImpl<SnqxzInfoHourDao
}
@Override
public List<Map<String, Object>> getParamGroupByRegion() {
return baseMapper.getParamGroupByRegion();
public List<Map<String, Object>> getParamGroupByRegion(Integer region) {
return baseMapper.getParamGroupByRegion(region);
}
}
<?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.JfktgInfoDayDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.JfktgInfoDay">
<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>
<!-- jfktg_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 jfktg_info_day t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from jfktg_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>
<select id="queryPageListByParam" resultType="java.util.Map">
select t.* from jfktg_info_day t
where 1=1
<if test="params.resourceId!=null and params.resourceId!=''">
and t.resource_id = #{params.resourceId}
</if>
<if test="(params.startTime == null or params.startTime == '') and (params.endTime == null or params.endTime == '')">
and TO_DAYS(t.create_time) = TO_DAYS(NOW())
</if>
<if test="params.startTime != null and params.startTime != ''">
and t.create_time &gt;= #{params.startTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
and t.create_time &lt;= #{params.endTime}
</if>
<if test="params.sort != null and params.sort != '' and params.order != null and params.order != ''">
ORDER BY ${params.sort} ${params.order}
</if>
<if test="params.sort == null or params.sort == '' or params.order == null or params.order == ''">
ORDER BY t.create_time
</if>
</select>
<select id="queryListByParam" resultType="java.util.Map">
select create_time,sum(cast(electric_energy as decimal(10, 5))) as electric_energy
from jfktg_info_day
where 1=1
<if test="(startTime == null or startTime == '') and (endTime == null or endTime == '')">
and TO_DAYS(create_time) = TO_DAYS(NOW())
</if>
<if test="startTime != null and startTime != ''">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and create_time &lt;= #{endTime}
</if>
group by create_time
order by create_time
</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.JfktgInfoHourDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.JfktgInfoHour">
<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>
<!-- jfktg_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 jfktg_info_hour t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from jfktg_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>
<select id="queryPageListByParam" resultType="java.util.Map">
select t.* from jfktg_info_hour t
where 1=1
<if test="params.resourceId!=null and params.resourceId!=''">
and t.resource_id = #{params.resourceId}
</if>
<if test="(params.startTime == null or params.startTime == '') and (params.endTime == null or params.endTime == '')">
and TO_DAYS(t.create_time) = TO_DAYS(NOW())
</if>
<if test="params.startTime != null and params.startTime != ''">
and t.create_time &gt;= #{params.startTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
and t.create_time &lt;= #{params.endTime}
</if>
<if test="params.sort != null and params.sort != '' and params.order != null and params.order != ''">
ORDER BY ${params.sort} ${params.order}
</if>
<if test="params.sort == null or params.sort == '' or params.order == null or params.order == ''">
ORDER BY t.create_time
</if>
</select>
<select id="queryListByParam" resultType="java.util.Map">
select create_time,sum(cast(electric_energy as decimal(10, 5))) as electric_energy
from jfktg_info_hour
where 1=1
<if test="(startTime == null or startTime == '') and (endTime == null or endTime == '')">
and TO_DAYS(create_time) = TO_DAYS(NOW())
</if>
<if test="startTime != null and startTime != ''">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and create_time &lt;= #{endTime}
</if>
group by create_time
order by create_time
</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.JfktgInfoDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.JfktgInfo">
<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="station_id" property="stationId"/>
<result column="create_time" property="createTime"/>
</resultMap>
<!-- jfktg_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,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="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="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 jfktg_info t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from jfktg_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 jfktg_info AS t1
INNER JOIN
(SELECT t2.resource_id, MAX(t2.create_time) AS maxdate
FROM jfktg_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 = t1.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.JfktgInfoMonthDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.JfktgInfoMonth">
<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>
<!-- jfktg_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 jfktg_info_month t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from jfktg_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>
<select id="queryPageListByParam" resultType="java.util.Map">
select t.* from jfktg_info_month t
where 1=1
<if test="params.resourceId!=null and params.resourceId!=''">
and t.resource_id = #{params.resourceId}
</if>
<if test="(params.startTime == null or params.startTime == '') and (params.endTime == null or params.endTime == '')">
and TO_DAYS(t.create_time) = TO_DAYS(NOW())
</if>
<if test="params.startTime != null and params.startTime != ''">
and t.create_time &gt;= #{params.startTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
and t.create_time &lt;= #{params.endTime}
</if>
<if test="params.sort != null and params.sort != '' and params.order != null and params.order != ''">
ORDER BY ${params.sort} ${params.order}
</if>
<if test="params.sort == null or params.sort == '' or params.order == null or params.order == ''">
ORDER BY t.create_time
</if>
</select>
<select id="queryListByParam" resultType="java.util.Map">
select create_time,sum(cast(electric_energy as decimal(10, 5))) as electric_energy
from jfktg_info_month
where 1=1
<if test="(startTime == null or startTime == '') and (endTime == null or endTime == '')">
and TO_DAYS(create_time) = TO_DAYS(NOW())
</if>
<if test="startTime != null and startTime != ''">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and create_time &lt;= #{endTime}
</if>
group by create_time
order by create_time
</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.JfktgInfoYearDao">
<!-- Result Map -->
<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.JfktgInfoYear">
<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>
<!-- jfktg_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 jfktg_info_year t
<include refid="Example_Where_Clause"/>
</select>
<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
select t.* from jfktg_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>
......@@ -120,7 +120,13 @@
region
from snqxz_info_hour
where 1=1 and TO_DAYS(create_time) = TO_DAYS(NOW())
group by region
<if test="region!=null">
and region = #{region}
</if>
<if test="region==null">
group by region
</if>
</select>
</mapper>
......
......@@ -47,7 +47,7 @@
(select resource_type,count(1) as value from
sys_fault_alarm
where 1=1
<if test="params.startTime == null or params.startTime == '' or params.endTime == null or params.endTime == ''">
<if test="(params.startTime == null or params.startTime == '') and (params.endTime == null or params.endTime == '')">
and TO_DAYS(start_time) = TO_DAYS(NOW())
</if>
<if test="params.startTime != null and params.startTime != ''">
......@@ -66,7 +66,7 @@
(select resource_id,count(1) as value from
sys_fault_alarm
where 1=1
<if test="params.startTime == null or params.startTime == '' or params.endTime == null or params.endTime == ''">
<if test="(params.startTime == null or params.startTime == '') and (params.endTime == null or params.endTime == '')">
and TO_DAYS(start_time) = TO_DAYS(NOW())
</if>
<if test="params.startTime != null and params.startTime != ''">
......
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