南昌市物联网技防平台-后台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package org.springblade.report.service.impl;
 
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springblade.common.entity.*;
import org.springblade.report.entity.ReportFile;
import org.springblade.report.feign.ReportClient;
import org.springblade.report.mapper.ReportFileMappers;
import org.springblade.report.service.ReportFileService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
 
import java.util.List;
import java.util.Map;
 
 
/**
 * 报表导出服务实现层
 */
@Service
@AllArgsConstructor
public class ReportFileServiceImpl extends ServiceImpl<ReportFileMappers, ReportFile> implements ReportFileService {
 
    private final ReportClient reportClient;
 
 
    /**
     * 导出数据模板列表
     * @param page
     * @param reportFile 对象
     * @return
     */
    @Override
    public IPage<ReportFile> selectReportFilePage(IPage<ReportFile> page, ReportFile reportFile) {
        QueryWrapper<ReportFile> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_deleted",0);
        if (null!=reportFile.getName()) {
            queryWrapper.like("name", reportFile.getName());
        }
        return page.setRecords(baseMapper.selectList(queryWrapper));
    }
 
 
    /**
     * 获取包裹数据集合
     * @param beanName 调用名称
     * @param dataName 返回数据名称
     * @param map map集合数据
     * @return
     */
    public List<AlarmExcel> getAlarmList(String beanName, String dataName, Map<String,Object> map){
        //将map转换为json对象
        String body = JSON.toJSONString(map);
        if (null!=beanName){
            return reportClient.getAlarmList(body);
        }
        return null;
    }
 
    /**
     * 获取健康码数据集合
     * @param beanName 调用名称
     * @param dataName 返回数据名称
     * @param map map集合数据
     * @return
     */
    public List<HealthcodeExcel> getHealthcodeList(String beanName, String dataName, Map<String,Object> map){
        //将map转换为json对象
        String s = JSON.toJSONString(map);
        System.out.println("s = " + s);
        if (null!=beanName){
            return reportClient.getHealthcodeList(s);
        }
        return null;
    }
 
    /**
     * 获取体温数据集合
     * @param beanName 调用名称
     * @param dataName 返回数据名称
     * @param map map集合数据
     * @return
     */
    public List<AnimalHeatExcel> getAnimalHeatList(String beanName, String dataName, Map<String,Object> map){
        //将map转换为json对象
        String body = JSON.toJSONString(map);
        if (null!=beanName){
            return reportClient.getAnimalHeatList(body);
        }
        return null;
    }
 
    /**
     * 获取包裹数据集合
     * @param beanName 调用名称
     * @param dataName 返回数据名称
     * @param map map集合数据
     * @return
     */
    public List<ParcelExcel> getParcelList(String beanName, String dataName, Map<String,Object> map){
        //将map转换为json对象
        String body = JSON.toJSONString(map);
        if (null!=beanName){
            return reportClient.getParcelList(body);
        }
        return null;
    }
 
    /**
     * 获取违禁品数据集合
     * @param beanName 调用名称
     * @param dataName 返回数据名称
     * @param map map集合数据
     * @return
     */
    public List<ParcelKindExcel> getParcelKindList(String beanName, String dataName, Map<String,Object> map){
        //将map转换为json对象
        String body = JSON.toJSONString(map);
        if (null!=beanName){
            return reportClient.getParcelKindList(body);
        }
        return null;
    }
 
 
 
 
 
}