From ed18b3f85544aea0458495a0eceee00b4c503eed Mon Sep 17 00:00:00 2001 From: lvjiahao Date: Tue, 3 Sep 2024 09:39:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9F=A5=E8=AF=A2=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=88=86=E5=B8=83=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 --- .../NetAssetManagementController.java | 20 ++++++++----- .../domain/NetAssetManagementVTO.java | 30 +++++++++++++++++++ .../mapper/NetAssetManagementMapper.java | 8 +++++ .../service/INetAssetManagementService.java | 8 +++++ .../impl/NetAssetManagementServiceImpl.java | 11 +++++++ .../NetAssetManagementMapper.xml | 11 +++++++ 6 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/domain/NetAssetManagementVTO.java diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/wlsbInformation/NetAssetManagementController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/wlsbInformation/NetAssetManagementController.java index 779f9022..ae6c5e40 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/wlsbInformation/NetAssetManagementController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/wlsbInformation/NetAssetManagementController.java @@ -5,14 +5,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; 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 org.springframework.web.bind.annotation.*; import com.god.common.annotation.Log; import com.god.common.core.controller.BaseController; import com.god.common.core.domain.AjaxResult; @@ -101,4 +94,15 @@ public class NetAssetManagementController extends BaseController { return toAjax(netAssetManagementService.deleteNetAssetManagementByIds(ids)); } + + /** + * 查询资产管理资产类型分布 + * + * @return 资产类型数量 + */ + @GetMapping( "/type-total") + public AjaxResult selectNetAssetManagementTotalByType() + { + return success(netAssetManagementService.selectNetAssetManagementTotalByType()); + } } diff --git a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/domain/NetAssetManagementVTO.java b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/domain/NetAssetManagementVTO.java new file mode 100644 index 00000000..552a1ec3 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/domain/NetAssetManagementVTO.java @@ -0,0 +1,30 @@ +package com.god.wlsbInformation.domain; + + + +/** + * 资产管理资产类型分别对象 net_asset_management_vto + * + * @author lvjiahao + * @date 2024-09-02 + */ +public class NetAssetManagementVTO { + private String assetType; + private int assetTotal; + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public int getAssetTotal() { + return assetTotal; + } + + public void setAssetTotal(int assetTotal) { + this.assetTotal = assetTotal; + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/mapper/NetAssetManagementMapper.java b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/mapper/NetAssetManagementMapper.java index 8836bdfe..acaccc14 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/mapper/NetAssetManagementMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/mapper/NetAssetManagementMapper.java @@ -2,6 +2,7 @@ package com.god.wlsbInformation.mapper; import java.util.List; import com.god.wlsbInformation.domain.NetAssetManagement; +import com.god.wlsbInformation.domain.NetAssetManagementVTO; /** * 资产管理Mapper接口 @@ -58,4 +59,11 @@ public interface NetAssetManagementMapper * @return 结果 */ public int deleteNetAssetManagementByIds(String[] ids); + + /** + * 查询资产管理资产类型分布 + * + * @return 资产类型数量 + */ + public List selectNetAssetManagementTotalByType(); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/INetAssetManagementService.java b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/INetAssetManagementService.java index 76b0b133..2d5e776b 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/INetAssetManagementService.java +++ b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/INetAssetManagementService.java @@ -2,6 +2,7 @@ package com.god.wlsbInformation.service; import java.util.List; import com.god.wlsbInformation.domain.NetAssetManagement; +import com.god.wlsbInformation.domain.NetAssetManagementVTO; /** * 资产管理Service接口 @@ -58,4 +59,11 @@ public interface INetAssetManagementService * @return 结果 */ public int deleteNetAssetManagementById(String id); + + /** + * 查询资产管理资产类型分布 + * + * @return 资产类型数量 + */ + public List selectNetAssetManagementTotalByType(); } diff --git a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/impl/NetAssetManagementServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/impl/NetAssetManagementServiceImpl.java index 96326c58..33ef4db4 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/impl/NetAssetManagementServiceImpl.java +++ b/God-Vue-master/god-system/src/main/java/com/god/wlsbInformation/service/impl/NetAssetManagementServiceImpl.java @@ -3,6 +3,7 @@ package com.god.wlsbInformation.service.impl; import java.util.List; import com.god.common.utils.uuid.IdUtils; +import com.god.wlsbInformation.domain.NetAssetManagementVTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.god.wlsbInformation.mapper.NetAssetManagementMapper; @@ -93,4 +94,14 @@ public class NetAssetManagementServiceImpl implements INetAssetManagementService { return netAssetManagementMapper.deleteNetAssetManagementById(id); } + + /** + * 查询资产管理资产类型分布 + * + * @return 资产类型数量 + */ + @Override + public List selectNetAssetManagementTotalByType(){ + return netAssetManagementMapper.selectNetAssetManagementTotalByType(); + } } diff --git a/God-Vue-master/god-system/src/main/resources/mapper/wlsbInformation/NetAssetManagementMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/wlsbInformation/NetAssetManagementMapper.xml index e6d1e4ae..9941dd66 100644 --- a/God-Vue-master/god-system/src/main/resources/mapper/wlsbInformation/NetAssetManagementMapper.xml +++ b/God-Vue-master/god-system/src/main/resources/mapper/wlsbInformation/NetAssetManagementMapper.xml @@ -21,6 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + select id, asset_id, asset_name, asset_status, asset_model, asset_type, asset_unit, asset_number, asset_value, asset_department, asset_time, asset_total, asset_save, asset_remark from net_asset_management @@ -111,4 +116,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + \ No newline at end of file