il y a 5 ans
Parent
commit
3a5c429f5b

+ 13 - 4
center-data/src/main/java/com/hssx/centerdata/controller/TDataSizeInfoWarehouseUnitsController.java

@@ -33,10 +33,19 @@ public class TDataSizeInfoWarehouseUnitsController {
     @ApiOperation(value = "中心库数据模块数据", notes = "中心库数据模块数据")
     @RequestMapping("/centralRepository")
     @ResponseBody
-    public HttpRespMsg add() {
-        HttpRespMsg msg = new HttpRespMsg();
-        msg = tDataSizeInfoWarehouseUnitsService.getCenterData();
-        return msg;
+    public HttpRespMsg centralRepository() {
+        return tDataSizeInfoWarehouseUnitsService.getCenterData();
+    }
+
+    /**
+     * 数据交换模块数据
+     * @return
+     */
+    @ApiOperation(value = "数据交换模块数据")
+    @RequestMapping("/dataExchange")
+    @ResponseBody
+    public HttpRespMsg dataExchange() {
+        return tDataSizeInfoWarehouseUnitsService.dataExchange();
     }
 
 

+ 2 - 0
center-data/src/main/java/com/hssx/centerdata/service/TDataSizeInfoWarehouseUnitsService.java

@@ -15,4 +15,6 @@ import com.hssx.centerdata.util.HttpRespMsg;
 public interface TDataSizeInfoWarehouseUnitsService extends IService<TDataSizeInfoWarehouseUnits> {
 
     HttpRespMsg getCenterData();
+
+    HttpRespMsg dataExchange();
 }

+ 22 - 8
center-data/src/main/java/com/hssx/centerdata/service/impl/TDataSizeInfoWarehouseUnitsServiceImpl.java

@@ -2,14 +2,8 @@ package com.hssx.centerdata.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.additional.query.impl.QueryChainWrapper;
-import com.hssx.centerdata.entity.TDataSizeInfoCenterStorage;
-import com.hssx.centerdata.entity.TDataSizeInfoWarehouseUnits;
-import com.hssx.centerdata.entity.TDataSizeStatistics;
-import com.hssx.centerdata.entity.TDataTypeStatistics;
-import com.hssx.centerdata.mapper.TDataSizeInfoCenterStorageMapper;
-import com.hssx.centerdata.mapper.TDataSizeInfoWarehouseUnitsMapper;
-import com.hssx.centerdata.mapper.TDataSizeStatisticsMapper;
-import com.hssx.centerdata.mapper.TDataTypeStatisticsMapper;
+import com.hssx.centerdata.entity.*;
+import com.hssx.centerdata.mapper.*;
 import com.hssx.centerdata.service.TDataSizeInfoWarehouseUnitsService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.hssx.centerdata.util.HttpRespMsg;
@@ -38,6 +32,14 @@ public class TDataSizeInfoWarehouseUnitsServiceImpl extends ServiceImpl<TDataSiz
     private TDataTypeStatisticsMapper tDataTypeStatisticsMapper;
     @Resource
     private TDataSizeStatisticsMapper tDataSizeStatisticsMapper;
+    @Resource
+    private TCatalogDataChangeNumMapper tCatalogDataChangeNumMapper;
+    @Resource
+    private TCatalogApiApplyMapper tCatalogApiApplyMapper;
+    @Resource
+    private TCatalogSupplyApplyTop5Mapper tCatalogSupplyApplyTop5Mapper;
+    @Resource
+    private TResourceCatalogNumMapper tResourceCatalogNumMapper;
 
     @Override
     public HttpRespMsg getCenterData() {
@@ -50,4 +52,16 @@ public class TDataSizeInfoWarehouseUnitsServiceImpl extends ServiceImpl<TDataSiz
         msg.data = map;
         return msg;
     }
+
+    @Override
+    public HttpRespMsg dataExchange() {
+        HttpRespMsg msg = new HttpRespMsg();
+        Map<String,Object> map = new HashMap<>();
+        map.put("catalogDataChangeNum",tCatalogDataChangeNumMapper.selectOne(new QueryWrapper<TCatalogDataChangeNum>().last("limit 1")));
+        map.put("catalogApiApply",tCatalogApiApplyMapper.selectList(new QueryWrapper<TCatalogApiApply>().orderByAsc("show_day")));
+        map.put("catalogSupplyApplyTop5",tCatalogSupplyApplyTop5Mapper.selectList(new QueryWrapper<TCatalogSupplyApplyTop5>()));
+        map.put("resourceCatalogNum",tResourceCatalogNumMapper.selectList(new QueryWrapper<TResourceCatalogNum>().orderByAsc("create_time")));
+        msg.data = map;
+        return msg;
+    }
 }