소스 검색

自动抄表

lv.wenbin 11 달 전
부모
커밋
bf0da47133

+ 4 - 4
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaController.java

@@ -65,7 +65,7 @@ public class AreaController extends BaseController {
      * 导出服务区列表
      */
     @RequiresPermissions("basecfg:area:export")
-    @Log(title = "服务区", businessType = BusinessType.EXPORT)
+    @Log(title = "区块划分", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, Area area) {
         List<Area> list = areaService.selectAreaList(area);
@@ -110,7 +110,7 @@ public class AreaController extends BaseController {
      * 新增服务区
      */
     @RequiresPermissions("basecfg:area:add")
-    @Log(title = "服务区", businessType = BusinessType.INSERT)
+    @Log(title = "区块划分", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody Area area) {
         return toAjax(areaService.insertArea(area));
@@ -120,7 +120,7 @@ public class AreaController extends BaseController {
      * 修改服务区
      */
     @RequiresPermissions("basecfg:area:edit")
-    @Log(title = "服务区", businessType = BusinessType.UPDATE)
+    @Log(title = "区块划分", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody Area area) {
         return toAjax(areaService.updateArea(area));
@@ -130,7 +130,7 @@ public class AreaController extends BaseController {
      * 删除服务区
      */
     @RequiresPermissions("basecfg:area:remove")
-    @Log(title = "服务区", businessType = BusinessType.DELETE)
+    @Log(title = "区块划分", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(areaService.deleteAreaByIds(ids));

+ 4 - 4
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/ElecAttrController.java

@@ -54,7 +54,7 @@ public class ElecAttrController extends BaseController {
      * 导出服务区用电属性列表
      */
     @RequiresPermissions("basecfg:price:export")
-    @Log(title = "导出服务区用电属性", businessType = BusinessType.EXPORT)
+    @Log(title = "服务区用电属性", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, ElecAttr areaElectricityAttr) {
         List<ElecAttr> list = attrService.selectElecAttrList(areaElectricityAttr);
@@ -75,7 +75,7 @@ public class ElecAttrController extends BaseController {
      * 新增服务区用电属性
      */
     @RequiresPermissions("basecfg:price:add")
-    @Log(title = "新增服务区用电属性", businessType = BusinessType.INSERT)
+    @Log(title = "服务区用电属性", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody ElecAttr areaElectricityAttr) {
         return toAjax(attrService.insertElecAttr(areaElectricityAttr));
@@ -85,7 +85,7 @@ public class ElecAttrController extends BaseController {
      * 修改服务区用电属性
      */
     @RequiresPermissions("basecfg:price:edit")
-    @Log(title = "更新服务区用电属性", businessType = BusinessType.UPDATE)
+    @Log(title = "服务区用电属性", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody ElecAttr areaElectricityAttr) {
         return toAjax(attrService.updateElecAttr(areaElectricityAttr));
@@ -95,7 +95,7 @@ public class ElecAttrController extends BaseController {
      * 删除服务区用电属性
      */
     @RequiresPermissions("basecfg:price:remove")
-    @Log(title = "删除服务区用电属性", businessType = BusinessType.DELETE)
+    @Log(title = "服务区用电属性", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(attrService.deleteElecAttrByIds(ids));

+ 13 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/MeterReadingManualController.java

@@ -9,7 +9,9 @@ import com.ruoyi.ems.domain.MeterReadingManual;
 import com.ruoyi.ems.domain.vo.QueryMeterReading;
 import com.ruoyi.ems.service.IMeterReadingManualService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -68,4 +70,15 @@ public class MeterReadingManualController extends BaseController {
     public AjaxResult edit(@RequestBody MeterReadingManual meterReadingManual) {
         return toAjax(meterReadingManualService.update(meterReadingManual));
     }
+
+    /**
+     * 删除动力箱柜
+     */
+    @RequiresPermissions("ems:meterReading:remove")
+    @Log(title = "手动抄记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{id}")
+    public AjaxResult remove(@PathVariable Long id)
+    {
+        return toAjax(meterReadingManualService.deleteById(id));
+    }
 }

+ 9 - 0
ems-cloud/sql/ems_init_data.sql

@@ -238,3 +238,12 @@ INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_tim
 INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3001', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
 INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3002', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
 
+-- 抄表demo数据
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202401', 0, '2024-02-29', 100, '2024-01-31', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202402', 100, '2024-02-29', 200, '2024-02-28', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202403', 200, '2024-02-29', 300, '2024-03-31', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202404', 300, '2024-03-31', 400, '2024-04-30', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202405', 400, '2024-04-30', 500, '2024-05-31', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202406', 500, '2024-05-31', 600, '2024-06-30', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202407', 600, '2024-06-30', 700, '2024-07-31', 100, NULL, NULL);
+INSERT INTO adm_meter_reading_manual (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', 2024, '202408', 700, '2024-07-31', 800, '2024-08-31', 100, NULL, NULL);