Commit 23f6c6ff authored by ZWT's avatar ZWT

feat(零碳): 长庆演示系统新增功能

1.修改第三方日累计数据推送表表结构,增加日累计储能放电量字段,同时修改代码对应实体及mapper文件,修改相关接口增加储能日累计放电量接收逻辑;
2.修改首页井场收益分析模块接口,修改获取储能累计放电量逻辑;
3.设计并创建井口日用电趋势表,生成对应实体类及mapper文件;
4.统计分析模块,新增本月累计节电经济效益查询接口,添加线上接口文档并完成接口冒烟测试;
5.统计分析模块,新增本月累计减碳量查询接口,添加线上接口文档并完成接口冒烟测试;
6.统计分析模块,新增光伏发电趋势查询接口,添加线上接口文档并完成接口冒烟测试;
7.统计分析模块,新增月度总览查询接口,添加线上接口文档并完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 48355e35
package pps.cloud.base.service;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
/**
* 油田配置Cloud模块
*
* @author ZWT
* @date 2024/06/25 14:09
*/
@XService
@XText("油田配置Cloud模块")
public interface IConfigOilFieldCloudService {
}
\ No newline at end of file
package pps.cloud.base.service.data.config_oil_field;
import lombok.Data;
import xstartup.annotation.XText;
/**
* 油田配置输出
*
* @author ZWT
* @date 2024/06/25
*/
@Data
public class GetConfigOilFieldOutput {
@XText("ID")
private Long id;
@XText("是否启用(1_否,0_是)")
private Integer isEnable;
@XText("油田名称")
private String oilFieldName;
@XText("首页路由")
private String homePagePath;
@XText("接口任务是否启用(1_否,0_是)")
private Integer apiTaskIsEnable;
}
package pps.core.base.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
/**
* 油田配置表
*
* @author ZWT
* @date 2024/06/25
*/
@Data
@TableName("config_oil_field")
public class ConfigOilFieldEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
private Long id;
@XText("是否启用(1_否,0_是)")
@TableField
private Integer isEnable;
@XText("油田名称")
@TableField
private String oilFieldName;
@XText("首页路由")
@TableField
private String homePagePath;
@XText("接口任务是否启用(1_否,0_是)")
@TableField
private Integer apiTaskIsEnable;
}
\ No newline at end of file
package pps.core.base.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
/**
* 油田配置表
*
* @author ZWT
* @date 2024/06/25
*/
@Data
public class ConfigOilFieldView implements Serializable {
@XText("ID")
@TableField
private Long id;
@XText("是否启用(1_否,0_是)")
@TableField
private Integer isEnable;
@XText("油田名称")
@TableField
private String oilFieldName;
@XText("首页路由")
@TableField
private String homePagePath;
@XText("接口任务是否启用(1_否,0_是)")
@TableField
private Integer apiTaskIsEnable;
}
package pps.core.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.ConfigOilFieldEnt;
/**
* 油田配置表
*
* @author ZWT
* @date 2024/06/25
*/
@Repository(value="pps.core.base.mapper.ConfigOilFieldMapper")
public interface ConfigOilFieldMapper extends BaseMapper<ConfigOilFieldEnt> {
}
package pps.core.base.mapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.ConfigOilFieldView;
import java.util.List;
/**
* 油田配置表
*
* @author ZWT
* @date 2024/06/25
*/
@Repository(value = "pps.core.base.mapper.ConfigOilFieldViewMapper")
public interface ConfigOilFieldViewMapper {
ConfigOilFieldView selectOne(ConfigOilFieldView record);
List<ConfigOilFieldView> selectList(ConfigOilFieldView record);
}
package pps.core.base.service;
import pps.cloud.base.service.IConfigOilFieldCloudService;
import xstartup.annotation.XService;
/**
* 油田配置Cloud模块
*
* @author ZWT
* @date 2024/06/25 14:13
*/
@XService
public class ConfigOilFieldCloudServiceImpl implements IConfigOilFieldCloudService {
}
package pps.core.base.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import pps.core.base.entity.ConfigOilFieldEnt;
import pps.core.base.mapper.ConfigOilFieldMapper;
import pps.core.base.service.data.config_oil_field.GetConfigOilFieldOutput;
import pps.core.common.constant.BusinessConstant;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XSingleResult;
import xstartup.feature.api.annotation.XApiGet;
/**
* 油田配置模块
*
* @author ZWT
* @date 2024/06/25
*/
@XService
public class ConfigOilFieldService {
/**
* 获取当前配置
*
* @param context 上下文
* @return {@link XSingleResult }<{@link GetConfigOilFieldOutput }>
*/
@XApiGet(anonymous = true)
public XSingleResult<GetConfigOilFieldOutput> getCurrentConfig(XContext context) {
ConfigOilFieldMapper mapper = context.getBean(ConfigOilFieldMapper.class);
ConfigOilFieldEnt ent = mapper.selectOne(new LambdaQueryWrapper<ConfigOilFieldEnt>()
.eq(ConfigOilFieldEnt::getIsEnable, BusinessConstant.ZERO)
.last("LIMIT 1")
);
GetConfigOilFieldOutput output;
if (ObjectUtil.isNull(ent)) {
output = new GetConfigOilFieldOutput();
} else {
output = XCopyUtils.copyNewObject(ent, GetConfigOilFieldOutput.class);
}
return XSingleResult.success(output);
}
}
\ No newline at end of file
package pps.core.base.service.data.config_oil_field;
import lombok.Data;
import xstartup.annotation.XText;
/**
* 油田配置输出
*
* @author ZWT
* @date 2024/06/25
*/
@Data
public class GetConfigOilFieldOutput {
@XText("油田名称")
private String oilFieldName;
@XText("首页路由")
private String homePagePath;
@XText("接口任务是否启用(1_否,0_是)")
private Integer apiTaskIsEnable;
}
<?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="pps.core.base.mapper.ConfigOilFieldViewMapper">
<resultMap id="BaseResultMap" type="pps.core.base.entity.ConfigOilFieldView">
<id column="id" property="id" jdbcType="BIGINT" />
<result column="is_enable" property="isEnable" jdbcType="TINYINT" />
<result column="oil_field_name" property="oilFieldName" jdbcType="VARCHAR" />
<result column="home_page_path" property="homePagePath" jdbcType="VARCHAR" />
<result column="api_task_is_enable" property="apiTaskIsEnable" jdbcType="TINYINT" />
</resultMap>
<sql id="Base_Column_List">
id
,
is_enable,
oil_field_name,
home_page_path,
api_task_is_enable
</sql>
<select id="selectOne" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from config_oil_field
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from config_oil_field
where
id=#{id}
</select>
</mapper>
\ No newline at end of file
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