Browse Source

资产配置

lmstack 3 years ago
parent
commit
647e9f3683

+ 9 - 0
src/main/java/cn/fastfun/controller/api/ApiAssetConfigureController.java

@@ -70,6 +70,15 @@ public class ApiAssetConfigureController {
         return ApiDTO.ok("删除成功");
     }
 
+    @ApiOperation(value = "查看")
+    @RequestMapping(value = "query", method = RequestMethod.POST)
+    public ApiDTO query(@RequestBody @ApiParam(name = "增加/修改", value = "传入json格式", required = true) AppAssetConf appAssetConf) throws Exception {
+
+        // 查询
+        AppAssetConf assetConf = appAssetConfService.getById(appAssetConf.getId());
+        return ApiDTO.ok("查询成功",assetConf);
+    }
+
     @ApiOperation(value = "列表查询")
     @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
     public ApiDTO pageQuery(@RequestBody @ApiParam(name = "增加/修改", value = "传入json格式", required = true) AssetPageQueryParam appAssetConf) throws Exception {

+ 18 - 0
src/main/java/cn/fastfun/controller/api/ApiAssetProfitController.java

@@ -6,7 +6,11 @@ import cn.fastfun.controller.dto.asset.RentInfoFigureDTO;
 import cn.fastfun.controller.param.*;
 import cn.fastfun.service.SysExcelFieldService;
 import cn.fastfun.service.SysService;
+import cn.fastfun.service.entity.AppAssetConf;
+import cn.fastfun.service.impl.AppAssetConfServiceImpl;
 import cn.fastfun.service.impl.AppAssetProfitServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.bridge.dto.*;
 import com.bridge.exception.ApiRuntimeException;
 import io.swagger.annotations.Api;
@@ -14,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -38,6 +43,10 @@ public class ApiAssetProfitController {
     @Resource
     SysExcelFieldService sysExcelFieldService;
 
+    @Autowired
+    AppAssetConfServiceImpl appAssetConfService;
+
+
     @ApiOperation(value = "基础信息")
     @RequestMapping(value = "getBaseInfo", method = RequestMethod.POST)
     public ApiDTO getBaseInfo(@RequestBody @ApiParam(name = "设备信息对象", value = "传入json格式", required = true) AssetProfitParam param) throws Exception {
@@ -58,6 +67,15 @@ public class ApiAssetProfitController {
             Object rentInfoDTO = appAssetService.getRentInfo(param);
             response = (RentInfoDTO) rentInfoDTO;
         }
+        // 运维信息
+        else if (param.getTableOrder() != null && param.getTableOrder().equals(2)) {
+            QueryWrapper queryWrapper = new QueryWrapper();
+            Page<AppAssetConf> page = new Page<>(param.getIndex(), param.getLength());
+//            if(StringUtils.hasLength(param.getSn())){
+//                queryWrapper.like("sn", )
+//            }
+//            response = (RentInfoDTO) rentInfoDTO;
+        }
 
         return ApiDTO.ok("成功", response);
     }

+ 46 - 0
src/main/java/cn/fastfun/controller/dto/asset/OmInfoDTO.java

@@ -0,0 +1,46 @@
+package cn.fastfun.controller.dto.asset;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreType;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Setter
+@Getter
+@NoArgsConstructor
+public class OmInfoDTO {
+    private static final long serialVersionUID = -1821068317406106793L;
+
+    @JsonIgnoreType
+    @Setter
+    @Getter
+    public static class AllInfo{
+        // 时间
+        private String time;
+
+        // 类型
+        private String type;
+
+        // 金额
+        private BigDecimal amount;
+
+        // 说明
+        private String description;
+    }
+
+
+    // 运维总支出
+    private BigDecimal totalCost;
+
+    // 平台服务费
+    private BigDecimal serviceCost;
+
+    // 故障总支出
+    private BigDecimal faultCost;
+
+
+}