From dba810ac57bd3aead18d18be4382f593a0812a74 Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 26 Nov 2024 14:38:50 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20ems=E7=94=B5=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E8=A1=A5=E5=BD=95=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecordDnbInstantController.java | 93 +++++++++---------- .../mapper/record/RecordDnbInstantMapper.xml | 2 +- hw-ui/src/api/ems/base/additionalRecording.js | 8 +- .../ems/base/additionalRecording/index.vue | 2 +- 4 files changed, 52 insertions(+), 53 deletions(-) diff --git a/hw-modules/hw-ems/src/main/java/com/hw/ems/record/controller/RecordDnbInstantController.java b/hw-modules/hw-ems/src/main/java/com/hw/ems/record/controller/RecordDnbInstantController.java index 34e46a50..f8fde580 100644 --- a/hw-modules/hw-ems/src/main/java/com/hw/ems/record/controller/RecordDnbInstantController.java +++ b/hw-modules/hw-ems/src/main/java/com/hw/ems/record/controller/RecordDnbInstantController.java @@ -8,7 +8,6 @@ import com.hw.common.log.annotation.Log; import com.hw.common.log.enums.BusinessType; import com.hw.common.security.annotation.RequiresPermissions; import com.hw.ems.record.domain.RecordDnbInstant; -import com.hw.ems.record.domain.vo.RecordDnbInstantDataVo; import com.hw.ems.record.service.IRecordDnbInstantService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -17,7 +16,6 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** * 电实时数据Controller @@ -33,38 +31,38 @@ public class RecordDnbInstantController extends BaseController { @Autowired private IRecordDnbInstantService recordDnbInstantService; - @RequiresPermissions("record:dnbInstant:view") - @GetMapping() - public String dnbInstant() - { - return prefix + "/dnbInstant"; - } - - /** - * 点钞数据 - * @return - */ - @GetMapping("/dnbCountingData") - public String dnbCountingData() - { - return prefix + "/dnbCountingData"; - } - - @GetMapping("/dnbHistoryData") - public String dnbHistoryData() - { - return prefix + "/dnbHistoryData"; - } - - /** - * 手动抄表 - * @return - */ - @GetMapping("/dnbMeterReading") - public String dnbMeterReading() - { - return prefix + "/dnbMeterReading"; - } +// @RequiresPermissions("record:dnbInstant:view") +// @GetMapping() +// public String dnbInstant() +// { +// return prefix + "/dnbInstant"; +// } +// +// /** +// * 点钞数据 +// * @return +// */ +// @GetMapping("/dnbCountingData") +// public String dnbCountingData() +// { +// return prefix + "/dnbCountingData"; +// } +// +// @GetMapping("/dnbHistoryData") +// public String dnbHistoryData() +// { +// return prefix + "/dnbHistoryData"; +// } +// +// /** +// * 手动抄表 +// * @return +// */ +// @GetMapping("/dnbMeterReading") +// public String dnbMeterReading() +// { +// return prefix + "/dnbMeterReading"; +// } /** * 查询电实时数据列表 @@ -118,14 +116,14 @@ public class RecordDnbInstantController extends BaseController { util.exportExcel(response,list, "电实时数据数据"); } - /** - * 新增电实时数据 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } +// /** +// * 新增电实时数据 +// */ +// @GetMapping("/add") +// public String add() +// { +// return prefix + "/add"; +// } /** * 新增保存电实时数据 @@ -134,7 +132,7 @@ public class RecordDnbInstantController extends BaseController { @Log(title = "电实时数据", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(RecordDnbInstant recordDnbInstant) + public AjaxResult addSave(@RequestBody RecordDnbInstant recordDnbInstant) { return toAjax(recordDnbInstantService.insertRecordDnbInstant(recordDnbInstant)); } @@ -158,7 +156,7 @@ public class RecordDnbInstantController extends BaseController { @Log(title = "电实时数据", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(RecordDnbInstant recordDnbInstant) + public AjaxResult editSave(@RequestBody RecordDnbInstant recordDnbInstant) { return toAjax(recordDnbInstantService.updateRecordDnbInstant(recordDnbInstant)); } @@ -167,10 +165,11 @@ public class RecordDnbInstantController extends BaseController { * 删除电实时数据 */ @Log(title = "电实时数据", businessType = BusinessType.DELETE) - @GetMapping("/dnbRemove/{objids}") - public AjaxResult remove(@PathVariable Long[] objids) + @GetMapping("/remove/{ids}") + @ResponseBody + public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(recordDnbInstantService.deleteRecordDnbInstantByObjids(objids)); + return success(recordDnbInstantService.deleteRecordDnbInstantByObjids(ids)); } /** diff --git a/hw-modules/hw-ems/src/main/resources/mapper/record/RecordDnbInstantMapper.xml b/hw-modules/hw-ems/src/main/resources/mapper/record/RecordDnbInstantMapper.xml index 421995d6..de1bc442 100644 --- a/hw-modules/hw-ems/src/main/resources/mapper/record/RecordDnbInstantMapper.xml +++ b/hw-modules/hw-ems/src/main/resources/mapper/record/RecordDnbInstantMapper.xml @@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and record_dnb_instant.record_time between #{params.beginRecordTime} and #{params.endRecordTime} - and record_dnb_instant.collect_time between #{beginTime} and #{endTime} + and record_dnb_instant.collect_time between #{params.beginTime} and #{params.endTime} and (record_dnb_instant.monitor_id = #{monitorSubset} OR record_dnb_instant.monitor_id IN diff --git a/hw-ui/src/api/ems/base/additionalRecording.js b/hw-ui/src/api/ems/base/additionalRecording.js index 1632cc7c..8895454d 100644 --- a/hw-ui/src/api/ems/base/additionalRecording.js +++ b/hw-ui/src/api/ems/base/additionalRecording.js @@ -37,11 +37,11 @@ export function updateUser(data) { } // 删除用户 -export function delUser(data) { +export function delUser(userIds) { return request({ - url: '/ems/record/dnbInstant/remove', - method: 'post', - data:data + url: '/ems/record/dnbInstant/remove/' + userIds, + method: 'get', + // data:data // data: qs.stringify(data), // contentType:'application/x-www-form-urlencoded', }) diff --git a/hw-ui/src/views/ems/base/additionalRecording/index.vue b/hw-ui/src/views/ems/base/additionalRecording/index.vue index c7fbfc5e..5c350d37 100644 --- a/hw-ui/src/views/ems/base/additionalRecording/index.vue +++ b/hw-ui/src/views/ems/base/additionalRecording/index.vue @@ -692,7 +692,7 @@ export default { .confirm("确定删除该条电实时数据信息吗?") .then(function () { console.log("userIds", userIds); - return delUser({ ids: userIds }); + return delUser(userIds); }) .then(() => { this.getList();