Explorar o código

+ 产能分析接口

chen.cheng hai 1 ano
pai
achega
88f6d6afc9

+ 77 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AdmEmsPvSupplyHController.java

@@ -0,0 +1,77 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.ems.domain.AdmEmsPvSupplyH;
+import com.ruoyi.ems.service.IAdmEmsPvSupplyHService;
+
+/**
+ * 光伏并网计量光伏并网计量-小时Controller
+ *
+ * @author ruoyi
+ * @date 2024-08-02
+ */
+@RestController
+@RequestMapping("/prod")
+public class AdmEmsPvSupplyHController extends BaseController {
+    @Autowired
+    private IAdmEmsPvSupplyHService admEmsPvSupplyHService;
+    /**
+     * 查询光伏并网计量光伏并网计量-小时列表
+     */
+    @RequiresPermissions("ems:prod:list")
+    @GetMapping("/list")
+    public AjaxResult list(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        List<AdmEmsPvSupplyH> list = admEmsPvSupplyHService.selectAdmEmsPvSupplyHList(admEmsPvSupplyH);
+        return success(list);
+    }
+
+    @RequiresPermissions("ems:prod:list")
+    @GetMapping("/list/prod/this/day/index")
+    public AjaxResult listProdIndex(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        admEmsPvSupplyH.setDate(DateUtils.getNowDate());
+        List<AdmEmsPvSupplyH> list = admEmsPvSupplyHService.selectAreaSupplyH(admEmsPvSupplyH);
+        return success(list);
+    }
+
+    @RequiresPermissions("ems:prod:list")
+    @GetMapping("/list/prod/this/month/index")
+    public AjaxResult listProdMonthIndex(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        List<AdmEmsPvSupplyH> list = admEmsPvSupplyHService.selectAreaSupplyH(admEmsPvSupplyH);
+        return success(list);
+    }
+
+    @RequiresPermissions("ems:prod:list")
+    @GetMapping("/list/prod/this/year/index")
+    public AjaxResult listProdYearIndex(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        List<AdmEmsPvSupplyH> list = admEmsPvSupplyHService.selectAreaSupplyH(admEmsPvSupplyH);
+        return success(list);
+    }
+
+    /**
+     * 导出光伏并网计量光伏并网计量-小时列表
+     */
+    @RequiresPermissions("ems:prod:export")
+    @Log(title = "光伏并网计量光伏并网计量-小时", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AdmEmsPvSupplyH admEmsPvSupplyH) {
+        List<AdmEmsPvSupplyH> list = admEmsPvSupplyHService.selectAdmEmsPvSupplyHList(admEmsPvSupplyH);
+        ExcelUtil<AdmEmsPvSupplyH> util = new ExcelUtil<AdmEmsPvSupplyH>(AdmEmsPvSupplyH.class);
+        util.exportExcel(response, list, "光伏并网计量光伏并网计量-小时数据");
+    }
+}

+ 180 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AdmEmsPvSupplyH.java

@@ -0,0 +1,180 @@
+package com.ruoyi.ems.domain;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 光伏并网计量光伏并网计量-小时对象 adm_ems_pv_supply_h
+ *
+ * @author ruoyi
+ * @date 2024-08-02
+ */
+public class AdmEmsPvSupplyH extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 序号
+     */
+    private Long id;
+
+    /**
+     * 园区代码
+     */
+    @Excel(name = "园区代码")
+    private String areaCode;
+
+    /**
+     * 设施代码
+     */
+    @Excel(name = "设施代码")
+    private String facsCode;
+
+    /**
+     * 日期 yyyy-MM-dd
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date date;
+
+    /**
+     * 时间 HH:mm:ss
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "时间 HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date time;
+
+    /**
+     * 时间序列
+     */
+    @Excel(name = "时间序列")
+    private Long timeIndex;
+
+    /**
+     * 计量类型 1:峰电计量  2:谷电计量
+     */
+    @Excel(name = "计量类型 1:峰电计量  2:谷电计量")
+    private Long meterType;
+
+    /**
+     * 单位电价(1度电)
+     */
+    @Excel(name = "单位电价", readConverterExp = "1=度电")
+    private Double meterUnitPrice;
+
+    /**
+     * 用电读数
+     */
+    @Excel(name = "用电读数")
+    private Double elecReading;
+
+    /**
+     * 发电量 单位:kW-h(千瓦时)
+     */
+    @Excel(name = "发电量 单位:kW-h", readConverterExp = "千=瓦时")
+    private Double elecQuantity;
+
+    /**
+     * 发电收益 单位: ¥(元)
+     */
+    @Excel(name = "发电收益 单位: ¥", readConverterExp = "元=")
+    private Double elecEarn;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getAreaCode() {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
+    public String getFacsCode() {
+        return facsCode;
+    }
+
+    public void setFacsCode(String facsCode) {
+        this.facsCode = facsCode;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+
+    public Long getTimeIndex() {
+        return timeIndex;
+    }
+
+    public void setTimeIndex(Long timeIndex) {
+        this.timeIndex = timeIndex;
+    }
+
+    public Long getMeterType() {
+        return meterType;
+    }
+
+    public void setMeterType(Long meterType) {
+        this.meterType = meterType;
+    }
+
+    public Double getMeterUnitPrice() {
+        return meterUnitPrice;
+    }
+
+    public void setMeterUnitPrice(Double meterUnitPrice) {
+        this.meterUnitPrice = meterUnitPrice;
+    }
+
+    public Double getElecReading() {
+        return elecReading;
+    }
+
+    public void setElecReading(Double elecReading) {
+        this.elecReading = elecReading;
+    }
+
+    public Double getElecQuantity() {
+        return elecQuantity;
+    }
+
+    public void setElecQuantity(Double elecQuantity) {
+        this.elecQuantity = elecQuantity;
+    }
+
+    public Double getElecEarn() {
+        return elecEarn;
+    }
+
+    public void setElecEarn(Double elecEarn) {
+        this.elecEarn = elecEarn;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("areaCode", getAreaCode()).append("facsCode", getFacsCode()).append("date", getDate()).append("time", getTime()).append("timeIndex", getTimeIndex()).append("meterType", getMeterType()).append("meterUnitPrice", getMeterUnitPrice()).append("elecReading", getElecReading()).append("elecQuantity", getElecQuantity()).append("elecEarn", getElecEarn()).toString();
+    }
+}

+ 64 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AdmEmsPvSupplyHMapper.java

@@ -0,0 +1,64 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsPvSupplyH;
+
+/**
+ * 光伏并网计量光伏并网计量-小时Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-08-02
+ */
+public interface AdmEmsPvSupplyHMapper
+{
+    /**
+     * 查询光伏并网计量光伏并网计量-小时
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 光伏并网计量光伏并网计量-小时
+     */
+    public AdmEmsPvSupplyH selectAdmEmsPvSupplyHById(Long id);
+
+    /**
+     * 查询光伏并网计量光伏并网计量-小时列表
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 光伏并网计量光伏并网计量-小时集合
+     */
+    public List<AdmEmsPvSupplyH> selectAdmEmsPvSupplyHList(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+    public List<AdmEmsPvSupplyH> selectAreaSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+
+    /**
+     * 新增光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    public int insertAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+    /**
+     * 修改光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    public int updateAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+    /**
+     * 删除光伏并网计量光伏并网计量-小时
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 结果
+     */
+    public int deleteAdmEmsPvSupplyHById(Long id);
+
+    /**
+     * 批量删除光伏并网计量光伏并网计量-小时
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAdmEmsPvSupplyHByIds(Long[] ids);
+}

+ 63 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAdmEmsPvSupplyHService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsPvSupplyH;
+
+/**
+ * 光伏并网计量光伏并网计量-小时Service接口
+ *
+ * @author ruoyi
+ * @date 2024-08-02
+ */
+public interface IAdmEmsPvSupplyHService
+{
+    /**
+     * 查询光伏并网计量光伏并网计量-小时
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 光伏并网计量光伏并网计量-小时
+     */
+    public AdmEmsPvSupplyH selectAdmEmsPvSupplyHById(Long id);
+
+    /**
+     * 查询光伏并网计量光伏并网计量-小时列表
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 光伏并网计量光伏并网计量-小时集合
+     */
+    public List<AdmEmsPvSupplyH> selectAdmEmsPvSupplyHList(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+
+    public List<AdmEmsPvSupplyH> selectAreaSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+    /**
+     * 新增光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    public int insertAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+    /**
+     * 修改光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    public int updateAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH);
+
+    /**
+     * 批量删除光伏并网计量光伏并网计量-小时
+     *
+     * @param ids 需要删除的光伏并网计量光伏并网计量-小时主键集合
+     * @return 结果
+     */
+    public int deleteAdmEmsPvSupplyHByIds(Long[] ids);
+
+    /**
+     * 删除光伏并网计量光伏并网计量-小时信息
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 结果
+     */
+    public int deleteAdmEmsPvSupplyHById(Long id);
+}

+ 91 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AdmEmsPvSupplyHServiceImpl.java

@@ -0,0 +1,91 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.ems.mapper.AdmEmsPvSupplyHMapper;
+import com.ruoyi.ems.domain.AdmEmsPvSupplyH;
+import com.ruoyi.ems.service.IAdmEmsPvSupplyHService;
+
+/**
+ * 光伏并网计量光伏并网计量-小时Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-08-02
+ */
+@Service
+public class AdmEmsPvSupplyHServiceImpl implements IAdmEmsPvSupplyHService {
+    @Autowired
+    private AdmEmsPvSupplyHMapper admEmsPvSupplyHMapper;
+
+    /**
+     * 查询光伏并网计量光伏并网计量-小时
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 光伏并网计量光伏并网计量-小时
+     */
+    @Override
+    public AdmEmsPvSupplyH selectAdmEmsPvSupplyHById(Long id) {
+        return admEmsPvSupplyHMapper.selectAdmEmsPvSupplyHById(id);
+    }
+
+    /**
+     * 查询光伏并网计量光伏并网计量-小时列表
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 光伏并网计量光伏并网计量-小时
+     */
+    @Override
+    public List<AdmEmsPvSupplyH> selectAdmEmsPvSupplyHList(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        return admEmsPvSupplyHMapper.selectAdmEmsPvSupplyHList(admEmsPvSupplyH);
+    }
+
+    @Override
+    public List<AdmEmsPvSupplyH> selectAreaSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        return admEmsPvSupplyHMapper.selectAreaSupplyH(admEmsPvSupplyH);
+    }
+
+    /**
+     * 新增光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    @Override
+    public int insertAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        return admEmsPvSupplyHMapper.insertAdmEmsPvSupplyH(admEmsPvSupplyH);
+    }
+
+    /**
+     * 修改光伏并网计量光伏并网计量-小时
+     *
+     * @param admEmsPvSupplyH 光伏并网计量光伏并网计量-小时
+     * @return 结果
+     */
+    @Override
+    public int updateAdmEmsPvSupplyH(AdmEmsPvSupplyH admEmsPvSupplyH) {
+        return admEmsPvSupplyHMapper.updateAdmEmsPvSupplyH(admEmsPvSupplyH);
+    }
+
+    /**
+     * 批量删除光伏并网计量光伏并网计量-小时
+     *
+     * @param ids 需要删除的光伏并网计量光伏并网计量-小时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsPvSupplyHByIds(Long[] ids) {
+        return admEmsPvSupplyHMapper.deleteAdmEmsPvSupplyHByIds(ids);
+    }
+
+    /**
+     * 删除光伏并网计量光伏并网计量-小时信息
+     *
+     * @param id 光伏并网计量光伏并网计量-小时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsPvSupplyHById(Long id) {
+        return admEmsPvSupplyHMapper.deleteAdmEmsPvSupplyHById(id);
+    }
+}

+ 2 - 1
ems-cloud/ems-modules/ems-server/src/main/resources/application-local.yml

@@ -50,4 +50,5 @@ mybatis:
 # swagger配置
 swagger:
   title: 能源模块接口文档
-  license: Powered By huashe
+  license: Powered By huashe
+  enabled: true

+ 4 - 1
ems-cloud/ems-modules/ems-server/src/main/resources/bootstrap.yml

@@ -29,4 +29,7 @@ spring:
         file-extension: yml
         # 共享配置
         shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+logging:
+  level:
+    com.ruoyi.ems: debug

+ 2 - 2
ems-cloud/ems-modules/ems-server/src/main/resources/logback.xml

@@ -65,10 +65,10 @@
 	<root level="info">
 		<appender-ref ref="console" />
 	</root>
-	
+
 	<!--系统操作日志-->
     <root level="info">
         <appender-ref ref="file_info" />
         <appender-ref ref="file_error" />
     </root>
-</configuration>
+</configuration>

+ 113 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AdmEmsPvSupplyHMapper.xml

@@ -0,0 +1,113 @@
+<?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.ruoyi.ems.mapper.AdmEmsPvSupplyHMapper">
+    <resultMap type="com.ruoyi.ems.domain.AdmEmsPvSupplyH" id="AdmEmsPvSupplyHResult">
+        <result property="id"    column="id"    />
+        <result property="areaCode"    column="area_code"    />
+        <result property="facsCode"    column="facs_code"    />
+        <result property="date"    column="date"  jdbcType="DATE"  />
+        <result property="time"    column="time"    />
+        <result property="timeIndex"    column="time_index"    />
+        <result property="meterType"    column="meter_type"    />
+        <result property="meterUnitPrice"    column="meter_unit_price"    />
+        <result property="elecReading"    column="elec_reading"    />
+        <result property="elecQuantity"    column="elec_quantity"    />
+        <result property="elecEarn"    column="elec_earn"    />
+    </resultMap>
+
+    <sql id="selectAdmEmsPvSupplyHVo">
+        select id, area_code, facs_code, date, time, time_index, meter_type, meter_unit_price, elec_reading, elec_quantity, elec_earn from adm_ems_pv_supply_h
+    </sql>
+
+    <select id="selectAdmEmsPvSupplyHList" parameterType="com.ruoyi.ems.domain.AdmEmsPvSupplyH" resultMap="AdmEmsPvSupplyHResult">
+        <include refid="selectAdmEmsPvSupplyHVo"/>
+        <where>
+            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
+            <if test="facsCode != null  and facsCode != ''"> and facs_code = #{facsCode}</if>
+            <if test="date != null "> and date = #{date}</if>
+            <if test="time != null "> and time = #{time}</if>
+            <if test="timeIndex != null "> and time_index = #{timeIndex}</if>
+            <if test="meterType != null "> and meter_type = #{meterType}</if>
+            <if test="meterUnitPrice != null "> and meter_unit_price = #{meterUnitPrice}</if>
+            <if test="elecReading != null "> and elec_reading = #{elecReading}</if>
+            <if test="elecQuantity != null "> and elec_quantity = #{elecQuantity}</if>
+            <if test="elecEarn != null "> and elec_earn = #{elecEarn}</if>
+        </where>
+    </select>
+    <select id="selectAreaSupplyH" parameterType="com.ruoyi.ems.domain.AdmEmsPvSupplyH" resultMap="AdmEmsPvSupplyHResult">
+        SELECT area_code, DATE, time_index, SUM( elec_quantity ) elec_quantity
+        FROM
+            adm_ems_pv_supply_h
+        WHERE
+            area_code = #{areaCode}
+          AND DATE = #{date,jdbcType=DATE}
+        GROUP BY
+            area_code,
+            time_index
+        ORDER BY
+            time_index ASC
+    </select>
+
+    <select id="selectAdmEmsPvSupplyHById" parameterType="Long" resultMap="AdmEmsPvSupplyHResult">
+        <include refid="selectAdmEmsPvSupplyHVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertAdmEmsPvSupplyH" parameterType="com.ruoyi.ems.domain.AdmEmsPvSupplyH" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_ems_pv_supply_h
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code,</if>
+            <if test="facsCode != null and facsCode != ''">facs_code,</if>
+            <if test="date != null">date,</if>
+            <if test="time != null">time,</if>
+            <if test="timeIndex != null">time_index,</if>
+            <if test="meterType != null">meter_type,</if>
+            <if test="meterUnitPrice != null">meter_unit_price,</if>
+            <if test="elecReading != null">elec_reading,</if>
+            <if test="elecQuantity != null">elec_quantity,</if>
+            <if test="elecEarn != null">elec_earn,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
+            <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
+            <if test="date != null">#{date},</if>
+            <if test="time != null">#{time},</if>
+            <if test="timeIndex != null">#{timeIndex},</if>
+            <if test="meterType != null">#{meterType},</if>
+            <if test="meterUnitPrice != null">#{meterUnitPrice},</if>
+            <if test="elecReading != null">#{elecReading},</if>
+            <if test="elecQuantity != null">#{elecQuantity},</if>
+            <if test="elecEarn != null">#{elecEarn},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAdmEmsPvSupplyH" parameterType="com.ruoyi.ems.domain.AdmEmsPvSupplyH">
+        update adm_ems_pv_supply_h
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
+            <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
+            <if test="date != null">date = #{date},</if>
+            <if test="time != null">time = #{time},</if>
+            <if test="timeIndex != null">time_index = #{timeIndex},</if>
+            <if test="meterType != null">meter_type = #{meterType},</if>
+            <if test="meterUnitPrice != null">meter_unit_price = #{meterUnitPrice},</if>
+            <if test="elecReading != null">elec_reading = #{elecReading},</if>
+            <if test="elecQuantity != null">elec_quantity = #{elecQuantity},</if>
+            <if test="elecEarn != null">elec_earn = #{elecEarn},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAdmEmsPvSupplyHById" parameterType="Long">
+        delete from adm_ems_pv_supply_h where id = #{id}
+    </delete>
+
+    <delete id="deleteAdmEmsPvSupplyHByIds" parameterType="String">
+        delete from adm_ems_pv_supply_h where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>