chen.cheng 1 anno fa
parent
commit
709b7ca4b4

+ 105 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AdmEmsPgSupplyHController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+import java.io.IOException;
+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.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+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.AdmEmsPgSupplyH;
+import com.ruoyi.ems.service.IAdmEmsPgSupplyHService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 电网供应计量-小时Controller
+ *
+ * @author ruoyi
+ * @date 2024-08-09
+ */
+@RestController
+@RequestMapping("/pgSupplyH")
+public class AdmEmsPgSupplyHController extends BaseController
+{
+    @Autowired
+    private IAdmEmsPgSupplyHService admEmsPgSupplyHService;
+
+    /**
+     * 查询电网供应计量-小时列表
+     */
+    @RequiresPermissions("power-mgr:pg:list")
+    @GetMapping("/list")
+    public TableDataInfo list(AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        startPage();
+        List<AdmEmsPgSupplyH> list = admEmsPgSupplyHService.selectAdmEmsPgSupplyHList(admEmsPgSupplyH);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出电网供应计量-小时列表
+     */
+    @RequiresPermissions("power-mgr:pg:export")
+    @Log(title = "电网供应计量-小时", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        List<AdmEmsPgSupplyH> list = admEmsPgSupplyHService.selectAdmEmsPgSupplyHList(admEmsPgSupplyH);
+        ExcelUtil<AdmEmsPgSupplyH> util = new ExcelUtil<AdmEmsPgSupplyH>(AdmEmsPgSupplyH.class);
+        util.exportExcel(response, list, "电网供应计量-小时数据");
+    }
+
+    /**
+     * 获取电网供应计量-小时详细信息
+     */
+    @RequiresPermissions("power-mgr:pg:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(admEmsPgSupplyHService.selectAdmEmsPgSupplyHById(id));
+    }
+
+    /**
+     * 新增电网供应计量-小时
+     */
+    @RequiresPermissions("power-mgr:pg:add")
+    @Log(title = "电网供应计量-小时", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        return toAjax(admEmsPgSupplyHService.insertAdmEmsPgSupplyH(admEmsPgSupplyH));
+    }
+
+    /**
+     * 修改电网供应计量-小时
+     */
+    @RequiresPermissions("power-mgr:pg:edit")
+    @Log(title = "电网供应计量-小时", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        return toAjax(admEmsPgSupplyHService.updateAdmEmsPgSupplyH(admEmsPgSupplyH));
+    }
+
+    /**
+     * 删除电网供应计量-小时
+     */
+    @RequiresPermissions("power-mgr:pg:remove")
+    @Log(title = "电网供应计量-小时", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(admEmsPgSupplyHService.deleteAdmEmsPgSupplyHByIds(ids));
+    }
+}

+ 223 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AdmEmsPgSupplyH.java

@@ -0,0 +1,223 @@
+package com.ruoyi.ems.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 电网供应计量-小时对象 adm_ems_pg_supply_h
+ *
+ * @author ruoyi
+ * @date 2024-08-09
+ */
+public class AdmEmsPgSupplyH extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 园区代码 */
+    @Excel(name = "园区代码")
+    private String areaCode;
+
+    /** 设施代码 */
+    @Excel(name = "设施代码")
+    private String facsCode;
+
+    /** 日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date date;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date time;
+
+    /** 时间序列 */
+    @Excel(name = "时间序列")
+    private Integer timeIndex;
+
+    /** 计量类型 */
+    @Excel(name = "计量类型")
+    private Integer meterType;
+
+    /** 单位电价 */
+    @Excel(name = "单位电价")
+    private Double meterUnitPrice;
+
+    /** 用电读数 */
+    @Excel(name = "用电读数")
+    private Double useElecReading;
+
+    /** 用电量(kW-h) */
+    @Excel(name = "用电量", readConverterExp = "k=W-h")
+    private Double useElecQuantity;
+
+    /** 用电电费(元) */
+    @Excel(name = "用电电费", readConverterExp = "元=")
+    private Double useElecCost;
+
+    /** 上网读数 */
+    @Excel(name = "上网读数")
+    private Double upElecReading;
+
+    /** 上网电量(kW-h) */
+    @Excel(name = "上网电量", readConverterExp = "k=W-h")
+    private Double upElecQuantity;
+
+    /** 上网收益(元) */
+    @Excel(name = "上网收益", readConverterExp = "元=")
+    private Double upElecEarn;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setAreaCode(String areaCode)
+    {
+        this.areaCode = areaCode;
+    }
+
+    public String getAreaCode()
+    {
+        return areaCode;
+    }
+    public void setFacsCode(String facsCode)
+    {
+        this.facsCode = facsCode;
+    }
+
+    public String getFacsCode()
+    {
+        return facsCode;
+    }
+    public void setDate(Date date)
+    {
+        this.date = date;
+    }
+
+    public Date getDate()
+    {
+        return date;
+    }
+    public void setTime(Date time)
+    {
+        this.time = time;
+    }
+
+    public Date getTime()
+    {
+        return time;
+    }
+    public void setTimeIndex(Integer timeIndex)
+    {
+        this.timeIndex = timeIndex;
+    }
+
+    public Integer getTimeIndex()
+    {
+        return timeIndex;
+    }
+    public void setMeterType(Integer meterType)
+    {
+        this.meterType = meterType;
+    }
+
+    public Integer getMeterType()
+    {
+        return meterType;
+    }
+    public void setMeterUnitPrice(Double meterUnitPrice)
+    {
+        this.meterUnitPrice = meterUnitPrice;
+    }
+
+    public Double getMeterUnitPrice()
+    {
+        return meterUnitPrice;
+    }
+    public void setUseElecReading(Double useElecReading)
+    {
+        this.useElecReading = useElecReading;
+    }
+
+    public Double getUseElecReading()
+    {
+        return useElecReading;
+    }
+    public void setUseElecQuantity(Double useElecQuantity)
+    {
+        this.useElecQuantity = useElecQuantity;
+    }
+
+    public Double getUseElecQuantity()
+    {
+        return useElecQuantity;
+    }
+    public void setUseElecCost(Double useElecCost)
+    {
+        this.useElecCost = useElecCost;
+    }
+
+    public Double getUseElecCost()
+    {
+        return useElecCost;
+    }
+    public void setUpElecReading(Double upElecReading)
+    {
+        this.upElecReading = upElecReading;
+    }
+
+    public Double getUpElecReading()
+    {
+        return upElecReading;
+    }
+    public void setUpElecQuantity(Double upElecQuantity)
+    {
+        this.upElecQuantity = upElecQuantity;
+    }
+
+    public Double getUpElecQuantity()
+    {
+        return upElecQuantity;
+    }
+    public void setUpElecEarn(Double upElecEarn)
+    {
+        this.upElecEarn = upElecEarn;
+    }
+
+    public Double getUpElecEarn()
+    {
+        return upElecEarn;
+    }
+
+    @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("useElecReading", getUseElecReading())
+                .append("useElecQuantity", getUseElecQuantity())
+                .append("useElecCost", getUseElecCost())
+                .append("upElecReading", getUpElecReading())
+                .append("upElecQuantity", getUpElecQuantity())
+                .append("upElecEarn", getUpElecEarn())
+                .toString();
+    }
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AdmEmsPgSupplyHMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsPgSupplyH;
+
+/**
+ * 电网供应计量-小时Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-09
+ */
+public interface AdmEmsPgSupplyHMapper 
+{
+    /**
+     * 查询电网供应计量-小时
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 电网供应计量-小时
+     */
+    public AdmEmsPgSupplyH selectAdmEmsPgSupplyHById(Long id);
+
+    /**
+     * 查询电网供应计量-小时列表
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 电网供应计量-小时集合
+     */
+    public List<AdmEmsPgSupplyH> selectAdmEmsPgSupplyHList(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 新增电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    public int insertAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 修改电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    public int updateAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 删除电网供应计量-小时
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 结果
+     */
+    public int deleteAdmEmsPgSupplyHById(Long id);
+
+    /**
+     * 批量删除电网供应计量-小时
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAdmEmsPgSupplyHByIds(Long[] ids);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAdmEmsPgSupplyHService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsPgSupplyH;
+
+/**
+ * 电网供应计量-小时Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-09
+ */
+public interface IAdmEmsPgSupplyHService 
+{
+    /**
+     * 查询电网供应计量-小时
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 电网供应计量-小时
+     */
+    public AdmEmsPgSupplyH selectAdmEmsPgSupplyHById(Long id);
+
+    /**
+     * 查询电网供应计量-小时列表
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 电网供应计量-小时集合
+     */
+    public List<AdmEmsPgSupplyH> selectAdmEmsPgSupplyHList(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 新增电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    public int insertAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 修改电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    public int updateAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH);
+
+    /**
+     * 批量删除电网供应计量-小时
+     * 
+     * @param ids 需要删除的电网供应计量-小时主键集合
+     * @return 结果
+     */
+    public int deleteAdmEmsPgSupplyHByIds(Long[] ids);
+
+    /**
+     * 删除电网供应计量-小时信息
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 结果
+     */
+    public int deleteAdmEmsPgSupplyHById(Long id);
+}

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

@@ -0,0 +1,93 @@
+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.AdmEmsPgSupplyHMapper;
+import com.ruoyi.ems.domain.AdmEmsPgSupplyH;
+import com.ruoyi.ems.service.IAdmEmsPgSupplyHService;
+
+/**
+ * 电网供应计量-小时Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-08-09
+ */
+@Service
+public class AdmEmsPgSupplyHServiceImpl implements IAdmEmsPgSupplyHService 
+{
+    @Autowired
+    private AdmEmsPgSupplyHMapper admEmsPgSupplyHMapper;
+
+    /**
+     * 查询电网供应计量-小时
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 电网供应计量-小时
+     */
+    @Override
+    public AdmEmsPgSupplyH selectAdmEmsPgSupplyHById(Long id)
+    {
+        return admEmsPgSupplyHMapper.selectAdmEmsPgSupplyHById(id);
+    }
+
+    /**
+     * 查询电网供应计量-小时列表
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 电网供应计量-小时
+     */
+    @Override
+    public List<AdmEmsPgSupplyH> selectAdmEmsPgSupplyHList(AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        return admEmsPgSupplyHMapper.selectAdmEmsPgSupplyHList(admEmsPgSupplyH);
+    }
+
+    /**
+     * 新增电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    @Override
+    public int insertAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        return admEmsPgSupplyHMapper.insertAdmEmsPgSupplyH(admEmsPgSupplyH);
+    }
+
+    /**
+     * 修改电网供应计量-小时
+     * 
+     * @param admEmsPgSupplyH 电网供应计量-小时
+     * @return 结果
+     */
+    @Override
+    public int updateAdmEmsPgSupplyH(AdmEmsPgSupplyH admEmsPgSupplyH)
+    {
+        return admEmsPgSupplyHMapper.updateAdmEmsPgSupplyH(admEmsPgSupplyH);
+    }
+
+    /**
+     * 批量删除电网供应计量-小时
+     * 
+     * @param ids 需要删除的电网供应计量-小时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsPgSupplyHByIds(Long[] ids)
+    {
+        return admEmsPgSupplyHMapper.deleteAdmEmsPgSupplyHByIds(ids);
+    }
+
+    /**
+     * 删除电网供应计量-小时信息
+     * 
+     * @param id 电网供应计量-小时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsPgSupplyHById(Long id)
+    {
+        return admEmsPgSupplyHMapper.deleteAdmEmsPgSupplyHById(id);
+    }
+}

+ 116 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AdmEmsPgSupplyHMapper.xml

@@ -0,0 +1,116 @@
+<?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.AdmEmsPgSupplyHMapper">
+
+    <resultMap type="com.ruoyi.ems.domain.AdmEmsPgSupplyH" id="AdmEmsPgSupplyHResult">
+        <result property="id"    column="id"    />
+        <result property="areaCode"    column="area_code"    />
+        <result property="facsCode"    column="facs_code"    />
+        <result property="date"    column="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="useElecReading"    column="use_elec_reading"    />
+        <result property="useElecQuantity"    column="use_elec_quantity"    />
+        <result property="useElecCost"    column="use_elec_cost"    />
+        <result property="upElecReading"    column="up_elec_reading"    />
+        <result property="upElecQuantity"    column="up_elec_quantity"    />
+        <result property="upElecEarn"    column="up_elec_earn"    />
+    </resultMap>
+
+    <sql id="selectAdmEmsPgSupplyHVo">
+        select id, area_code, facs_code, date, time, time_index, meter_type, meter_unit_price, use_elec_reading, use_elec_quantity, use_elec_cost, up_elec_reading, up_elec_quantity, up_elec_earn from adm_ems_pg_supply_h
+    </sql>
+
+    <select id="selectAdmEmsPgSupplyHList" parameterType="com.ruoyi.ems.domain.AdmEmsPgSupplyH" resultMap="AdmEmsPgSupplyHResult">
+        <include refid="selectAdmEmsPgSupplyHVo"/>
+        <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="useElecReading != null "> and use_elec_reading = #{useElecReading}</if>
+            <if test="useElecQuantity != null "> and use_elec_quantity = #{useElecQuantity}</if>
+            <if test="useElecCost != null "> and use_elec_cost = #{useElecCost}</if>
+            <if test="upElecReading != null "> and up_elec_reading = #{upElecReading}</if>
+            <if test="upElecQuantity != null "> and up_elec_quantity = #{upElecQuantity}</if>
+            <if test="upElecEarn != null "> and up_elec_earn = #{upElecEarn}</if>
+        </where>
+    </select>
+
+    <select id="selectAdmEmsPgSupplyHById" parameterType="Long" resultMap="AdmEmsPgSupplyHResult">
+        <include refid="selectAdmEmsPgSupplyHVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertAdmEmsPgSupplyH" parameterType="com.ruoyi.ems.domain.AdmEmsPgSupplyH" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_ems_pg_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="useElecReading != null">use_elec_reading,</if>
+            <if test="useElecQuantity != null">use_elec_quantity,</if>
+            <if test="useElecCost != null">use_elec_cost,</if>
+            <if test="upElecReading != null">up_elec_reading,</if>
+            <if test="upElecQuantity != null">up_elec_quantity,</if>
+            <if test="upElecEarn != null">up_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="useElecReading != null">#{useElecReading},</if>
+            <if test="useElecQuantity != null">#{useElecQuantity},</if>
+            <if test="useElecCost != null">#{useElecCost},</if>
+            <if test="upElecReading != null">#{upElecReading},</if>
+            <if test="upElecQuantity != null">#{upElecQuantity},</if>
+            <if test="upElecEarn != null">#{upElecEarn},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAdmEmsPgSupplyH" parameterType="com.ruoyi.ems.domain.AdmEmsPgSupplyH">
+        update adm_ems_pg_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="useElecReading != null">use_elec_reading = #{useElecReading},</if>
+            <if test="useElecQuantity != null">use_elec_quantity = #{useElecQuantity},</if>
+            <if test="useElecCost != null">use_elec_cost = #{useElecCost},</if>
+            <if test="upElecReading != null">up_elec_reading = #{upElecReading},</if>
+            <if test="upElecQuantity != null">up_elec_quantity = #{upElecQuantity},</if>
+            <if test="upElecEarn != null">up_elec_earn = #{upElecEarn},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAdmEmsPgSupplyHById" parameterType="Long">
+        delete from adm_ems_pg_supply_h where id = #{id}
+    </delete>
+
+    <delete id="deleteAdmEmsPgSupplyHByIds" parameterType="String">
+        delete from adm_ems_pg_supply_h where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 7 - 0
ems-cloud/sql/ems_sys.sql

@@ -340,6 +340,13 @@ INSERT INTO `sys_menu` VALUES (2002, 'query', 103, 1, '', NULL, NULL, 1, 0, 'F',
 INSERT INTO `sys_menu` VALUES (2003, 'add', 103, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:strategy:add', '#', 'admin', sysdate(), '', NULL, '');
 INSERT INTO `sys_menu` VALUES (2004, 'edit', 103, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:strategy:edit', '#', 'admin', sysdate(), '', NULL, '');
 INSERT INTO `sys_menu` VALUES (2005, 'remove', 103, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:strategy:remove', '#', 'admin', sysdate(), '', NULL, '');
+-- 源网协调按钮
+INSERT INTO `sys_menu` VALUES ( null, 'list',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES ( null, 'export',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES ( null, 'query',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES ( null, 'add',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES ( null, 'edit',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES ( null, 'remove',104, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:pg:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 -- ----------------------------
 -- 6、用户和角色关联表  用户N-1角色