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