From 9ec93992435d254b372ad401408758decbecc994 Mon Sep 17 00:00:00 2001 From: likehai Date: Tue, 3 Sep 2024 16:24:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=AE=BE=E5=A4=87-3-?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E6=95=B0=E9=87=8F=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GodUniversalElectricMeterController.java | 33 ++++++------ .../GodUniversalElectricMeterMapper.java | 2 + .../IGodUniversalElectricMeterService.java | 4 ++ .../GodUniversalElectricMeterServiceImpl.java | 9 ++++ .../GodUniversalElectricMeterMapper.xml | 54 +++++++++++++++++++ 5 files changed, 86 insertions(+), 16 deletions(-) diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java index 2952a029..ff769bc7 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java @@ -16,14 +16,13 @@ import java.util.List; /** * AI识别算法开发Controller - * + * * @author Lxz * @date 2023-12-11 */ @RestController @RequestMapping("/aiRecognition/godUniversalElectricMeter") -public class GodUniversalElectricMeterController extends BaseController -{ +public class GodUniversalElectricMeterController extends BaseController { @Resource private IGodUniversalElectricMeterService godUniversalElectricMeterService; @@ -32,8 +31,7 @@ public class GodUniversalElectricMeterController extends BaseController */ //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:list')") @GetMapping("/list") - public TableDataInfo list(GodUniversalElectricMeter godUniversalElectricMeter) - { + public TableDataInfo list(GodUniversalElectricMeter godUniversalElectricMeter) { startPage(); List list = godUniversalElectricMeterService.selectGodUniversalElectricMeterList(godUniversalElectricMeter); return getDataTable(list); @@ -45,8 +43,7 @@ public class GodUniversalElectricMeterController extends BaseController //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:export')") @Log(title = "AI识别算法开发", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, GodUniversalElectricMeter godUniversalElectricMeter) - { + public void export(HttpServletResponse response, GodUniversalElectricMeter godUniversalElectricMeter) { List list = godUniversalElectricMeterService.selectGodUniversalElectricMeterList(godUniversalElectricMeter); ExcelUtil util = new ExcelUtil(GodUniversalElectricMeter.class); util.exportExcel(response, list, "AI识别算法开发数据"); @@ -57,8 +54,7 @@ public class GodUniversalElectricMeterController extends BaseController */ //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") String id) - { + public AjaxResult getInfo(@PathVariable("id") String id) { return success(godUniversalElectricMeterService.selectGodUniversalElectricMeterById(id)); } @@ -68,8 +64,7 @@ public class GodUniversalElectricMeterController extends BaseController //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:add')") @Log(title = "AI识别算法开发", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody GodUniversalElectricMeter godUniversalElectricMeter) - { + public AjaxResult add(@RequestBody GodUniversalElectricMeter godUniversalElectricMeter) { return toAjax(godUniversalElectricMeterService.insertGodUniversalElectricMeter(godUniversalElectricMeter)); } @@ -79,8 +74,7 @@ public class GodUniversalElectricMeterController extends BaseController //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:edit')") @Log(title = "AI识别算法开发", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody GodUniversalElectricMeter godUniversalElectricMeter) - { + public AjaxResult edit(@RequestBody GodUniversalElectricMeter godUniversalElectricMeter) { return toAjax(godUniversalElectricMeterService.updateGodUniversalElectricMeter(godUniversalElectricMeter)); } @@ -89,9 +83,16 @@ public class GodUniversalElectricMeterController extends BaseController */ //@PreAuthorize("@ss.hasPermi('aiRecognition:godUniversalElectricMeter:remove')") @Log(title = "AI识别算法开发", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable String[] ids) - { + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) { return toAjax(godUniversalElectricMeterService.deleteGodUniversalElectricMeterByIds(ids)); } + + /** + * 根据条件查询对应数量 + */ + @GetMapping("/getCountBySome") + public AjaxResult getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter) { + return success(godUniversalElectricMeterService.getCountBySome(godUniversalElectricMeter)); + } } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java index b9088e6f..29a86189 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java @@ -61,4 +61,6 @@ public interface GodUniversalElectricMeterMapper public int deleteGodUniversalElectricMeterByIds(String[] ids); String getMaxSnByPrefix(String yyyyMM); + + Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java index 01b27098..0507d9d4 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java @@ -58,4 +58,8 @@ public interface IGodUniversalElectricMeterService * @return 结果 */ public int deleteGodUniversalElectricMeterById(String id); + /** + *根据条件查询对应数量 + */ + Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java index 00de2ffc..26df5721 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java @@ -101,4 +101,13 @@ public class GodUniversalElectricMeterServiceImpl implements IGodUniversalElectr { return godUniversalElectricMeterMapper.deleteGodUniversalElectricMeterById(id); } + + /** + *根据条件查询对应数量 + */ + @Override + public Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter) { + return godUniversalElectricMeterMapper.getCountBySome(godUniversalElectricMeter); + } + } diff --git a/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml index ccdecf49..5672c786 100644 --- a/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml +++ b/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml @@ -97,6 +97,60 @@ WHERE reserve_one LIKE CONCAT(#{prefix}, '%') order by reserve_one desc limit 1 + insert into god_universal_electric_meter From 7881937faad8684d416b80ffff091a46ef604f77 Mon Sep 17 00:00:00 2001 From: likehai Date: Tue, 3 Sep 2024 16:37:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=AE=BE=E5=A4=87-3-?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E6=95=B0=E9=87=8F=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GodUniversalElectricMeterController.java | 8 +++ .../GodUniversalElectricMeterMapper.java | 12 ++++ .../IGodUniversalElectricMeterService.java | 7 +++ .../GodUniversalElectricMeterServiceImpl.java | 6 ++ .../GodUniversalElectricMeterMapper.xml | 55 +++++++++++++++++++ 5 files changed, 88 insertions(+) diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java index ff769bc7..11f24ce2 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/aiRecognition/GodUniversalElectricMeterController.java @@ -95,4 +95,12 @@ public class GodUniversalElectricMeterController extends BaseController { public AjaxResult getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter) { return success(godUniversalElectricMeterService.getCountBySome(godUniversalElectricMeter)); } + + /** + * 根据条件查询折线图横纵坐标 + */ + @GetMapping("/getCountEChartBySome") + public AjaxResult getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter) { + return success(godUniversalElectricMeterService.getCountEChartBySome(godUniversalElectricMeter)); + } } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java index 29a86189..c1678c5a 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/mapper/GodUniversalElectricMeterMapper.java @@ -3,6 +3,7 @@ package com.god.aiRecognition.mapper; import com.god.aiRecognition.domain.GodUniversalElectricMeter; import java.util.List; +import java.util.Map; /** * AI识别算法开发Mapper接口 @@ -62,5 +63,16 @@ public interface GodUniversalElectricMeterMapper String getMaxSnByPrefix(String yyyyMM); + /** + * 根据条件查询对应数量 + * @param godUniversalElectricMeter 查询条件实体 + * @return 统计结果 + */ Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter); + + + /** + *根据条件查询折线图横纵坐标 + */ + List> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java index 0507d9d4..599435cd 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/IGodUniversalElectricMeterService.java @@ -1,6 +1,8 @@ package com.god.aiRecognition.service; import java.util.List; +import java.util.Map; + import com.god.aiRecognition.domain.GodUniversalElectricMeter; /** @@ -62,4 +64,9 @@ public interface IGodUniversalElectricMeterService *根据条件查询对应数量 */ Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter); + + /** + *根据条件查询折线图横纵坐标 + */ + List> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java index 26df5721..20f6bbe6 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java +++ b/God-Vue-master/god-system/src/main/java/com/god/aiRecognition/service/impl/GodUniversalElectricMeterServiceImpl.java @@ -11,6 +11,7 @@ import javax.annotation.Resource; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import java.util.Map; /** * AI识别算法开发Service业务层处理 @@ -110,4 +111,9 @@ public class GodUniversalElectricMeterServiceImpl implements IGodUniversalElectr return godUniversalElectricMeterMapper.getCountBySome(godUniversalElectricMeter); } + @Override + public List> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter) { + return godUniversalElectricMeterMapper.getCountEChartBySome(godUniversalElectricMeter); + } + } diff --git a/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml index 5672c786..b941551f 100644 --- a/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml +++ b/God-Vue-master/god-system/src/main/resources/mapper/aiRecognition/GodUniversalElectricMeterMapper.xml @@ -151,6 +151,61 @@ + insert into god_universal_electric_meter