Commit dca4d2be authored by kiritoausna's avatar kiritoausna

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	eladmin-system/src/main/resources/config/application.yml
parents 1d2be9a9 d1b68e88
...@@ -55,4 +55,6 @@ public interface CacheKey { ...@@ -55,4 +55,6 @@ public interface CacheKey {
* 数据字典 * 数据字典
*/ */
String DICT_NAME = "dict::name:"; String DICT_NAME = "dict::name:";
String CHULIANG_TOKEN="chuliang:token";
} }
...@@ -18,7 +18,10 @@ package me.zhengjie.utils; ...@@ -18,7 +18,10 @@ package me.zhengjie.utils;
import java.time.*; import java.time.*;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author: liaojinlong * @author: liaojinlong
...@@ -157,4 +160,20 @@ public class DateUtil { ...@@ -157,4 +160,20 @@ public class DateUtil {
public static LocalDateTime parseLocalDateTimeFormatyMdHms(String localDateTime) { public static LocalDateTime parseLocalDateTimeFormatyMdHms(String localDateTime) {
return LocalDateTime.from(DFY_MD_HMS.parse(localDateTime)); return LocalDateTime.from(DFY_MD_HMS.parse(localDateTime));
} }
/**
* 计算起止日期所有日期(年月日),并返回字符串格式的日期列表
*
* @param startDate 开始日期
* @param endDate 结束日期
* @return 包含所有日期的字符串列表
*/
public static List<String> getAllDatesBetweenAsString(LocalDate startDate, LocalDate endDate) {
List<String> dateStrings = new ArrayList<>();
long numOfDaysBetween = ChronoUnit.DAYS.between(startDate, endDate);
for (long i = 0; i <= numOfDaysBetween; i++) {
LocalDate currentDate = startDate.plusDays(i);
dateStrings.add(currentDate.toString()); // 将日期转换为字符串格式
}
return dateStrings;
}
} }
...@@ -32,6 +32,7 @@ import javax.servlet.ServletOutputStream; ...@@ -32,6 +32,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.net.URLEncoder;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -156,7 +157,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { ...@@ -156,7 +157,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
/** /**
* inputStream 转 File * inputStream 转 File
*/ */
static File inputStreamToFile(InputStream ins, String name) { public static File inputStreamToFile(InputStream ins, String name) {
File file = new File(SYS_TEM_DIR + name); File file = new File(SYS_TEM_DIR + name);
if (file.exists()) { if (file.exists()) {
return file; return file;
...@@ -415,6 +416,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { ...@@ -415,6 +416,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
File file = new File(path); File file = new File(path);
// 取得文件名。 // 取得文件名。
String filename = file.getName(); String filename = file.getName();
filename = URLEncoder.encode(filename,"UTF-8");
// 取得文件的后缀名。 // 取得文件的后缀名。
String ext = filename.substring(filename.lastIndexOf(".") + 1).toUpperCase(); String ext = filename.substring(filename.lastIndexOf(".") + 1).toUpperCase();
...@@ -426,11 +428,13 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { ...@@ -426,11 +428,13 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
// 清空response // 清空response
response.reset(); response.reset();
// 设置response的Header // 设置response的Header
//response.addHeader("Access-Control-Allow-Origin", "*"); response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE");
response.addHeader("Access-Control-Allow-Headers", "Content-Type");
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes())); response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes()));
response.addHeader("Content-Length", "" + file.length()); response.addHeader("Content-Length", "" + file.length());
OutputStream toClient = new BufferedOutputStream(response.getOutputStream()); OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream;charset=utf-8");
toClient.write(buffer); toClient.write(buffer);
toClient.flush(); toClient.flush();
toClient.close(); toClient.close();
......
...@@ -15,12 +15,11 @@ ...@@ -15,12 +15,11 @@
*/ */
package me.zhengjie.utils; package me.zhengjie.utils;
import cn.hutool.db.PageResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import java.util.ArrayList; import java.util.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/** /**
* 分页工具 * 分页工具
...@@ -53,7 +52,12 @@ public class PageUtil extends cn.hutool.core.util.PageUtil { ...@@ -53,7 +52,12 @@ public class PageUtil extends cn.hutool.core.util.PageUtil {
map.put("totalElements",page.getTotalElements()); map.put("totalElements",page.getTotalElements());
return map; return map;
} }
public static <T> Map toPage(IPage<T> page) {
HashMap<String, Object> stringObjectHashMap = new HashMap<>();
stringObjectHashMap.put("list",page.getRecords());
stringObjectHashMap.put("total",page.getTotal());
return stringObjectHashMap;
}
/** /**
* 自定义分页 * 自定义分页
*/ */
......
...@@ -18,14 +18,17 @@ package me.zhengjie.utils; ...@@ -18,14 +18,17 @@ package me.zhengjie.utils;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.config.ElAdminProperties;
import net.dreamlu.mica.ip2region.core.Ip2regionSearcher;
import net.dreamlu.mica.ip2region.core.IpInfo;
import nl.basjes.parse.useragent.UserAgent; import nl.basjes.parse.useragent.UserAgent;
import nl.basjes.parse.useragent.UserAgentAnalyzer; import nl.basjes.parse.useragent.UserAgentAnalyzer;
import org.lionsoul.ip2region.DataBlock;
import org.lionsoul.ip2region.DbConfig;
import org.lionsoul.ip2region.DbSearcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.NetworkInterface; import java.net.NetworkInterface;
import java.net.UnknownHostException; import java.net.UnknownHostException;
...@@ -37,25 +40,95 @@ import java.util.Enumeration; ...@@ -37,25 +40,95 @@ import java.util.Enumeration;
* @author Zheng Jie * @author Zheng Jie
* 字符串工具类, 继承org.apache.commons.lang3.StringUtils类 * 字符串工具类, 继承org.apache.commons.lang3.StringUtils类
*/ */
@Slf4j
public class StringUtils extends org.apache.commons.lang3.StringUtils { public class StringUtils extends org.apache.commons.lang3.StringUtils {
private static final Logger log = LoggerFactory.getLogger(StringUtils.class);
private static boolean ipLocal = false;
private static File file = null;
private static DbConfig config;
private static final char SEPARATOR = '_'; private static final char SEPARATOR = '_';
private static final char YAML_SEPARATOR = '-';
private static final String UNKNOWN = "unknown"; private static final String UNKNOWN = "unknown";
/** /**
* 注入bean * * 判断一个对象是否非空
*
* @param object Object
* @return true:非空 false:空
*/ */
private final static Ip2regionSearcher IP_SEARCHER = SpringContextHolder.getBean(Ip2regionSearcher.class); public static boolean isNotNull(Object object) {
return !isNull(object);
}
/**
* * 判断一个对象是否为空
*
* @param object Object
* @return true:为空 false:非空
*/
public static boolean isNull(Object object) {
return object == null;
}
private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer
private static final UserAgentAnalyzer userAgentAnalyzer = UserAgentAnalyzer
.newBuilder() .newBuilder()
.hideMatcherLoadStats() .hideMatcherLoadStats()
.withCache(10000) .withCache(10000)
.withField(UserAgent.AGENT_NAME_VERSION) .withField(UserAgent.AGENT_NAME_VERSION)
.build(); .build();
static {
SpringContextHolder.addCallBacks(() -> {
StringUtils.ipLocal = SpringContextHolder.getProperties("ip.local-parsing", false, Boolean.class);
if (ipLocal) {
/*
* 此文件为独享 ,不必关闭
*/
String path = "ip2region/ip2region.db";
String name = "ip2region.db";
try {
config = new DbConfig();
file = FileUtil.inputStreamToFile(new ClassPathResource(path).getInputStream(), name);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
});
}
/**
* Yaml key 驼峰命名法工具
*
* @return yamlToCamelCase(" hello - world ") == "helloWorld"
*/
public static String yamlToCamelCase(String s) {
if (s == null) {
return null;
}
if (StringUtils.containsAny(s, YAML_SEPARATOR)) {
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean yamlUpperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == YAML_SEPARATOR) {
yamlUpperCase = true;
} else if (yamlUpperCase) {
sb.append(Character.toUpperCase(c));
yamlUpperCase = false;
} else {
sb.append(c);
}
}
return sb.toString();
}
return s;
}
/** /**
* 驼峰命名法工具 * 驼峰命名法工具
* *
...@@ -175,15 +248,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { ...@@ -175,15 +248,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
* 根据ip获取详细地址 * 根据ip获取详细地址
*/ */
public static String getCityInfo(String ip) { public static String getCityInfo(String ip) {
try { // if (ipLocal) {
if (ElAdminProperties.ipLocal) { // return getLocalCityInfo(ip);
return getLocalCityInfo(ip); // } else {
} else { // return getHttpCityInfo(ip);
return getHttpCityInfo(ip); // }
} return "";
} catch (Exception e) {
return "解析失败";
}
} }
/** /**
...@@ -191,7 +261,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { ...@@ -191,7 +261,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
*/ */
public static String getHttpCityInfo(String ip) { public static String getHttpCityInfo(String ip) {
String api = String.format(ElAdminConstant.Url.IP_URL, ip); String api = String.format(ElAdminConstant.Url.IP_URL, ip);
System.out.println("api = " + api);
JSONObject object = JSONUtil.parseObj(HttpUtil.get(api)); JSONObject object = JSONUtil.parseObj(HttpUtil.get(api));
return object.get("addr", String.class); return object.get("addr", String.class);
} }
...@@ -200,16 +269,24 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { ...@@ -200,16 +269,24 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
* 根据ip获取详细地址 * 根据ip获取详细地址
*/ */
public static String getLocalCityInfo(String ip) { public static String getLocalCityInfo(String ip) {
IpInfo ipInfo = IP_SEARCHER.memorySearch(ip); try {
if(ipInfo != null){ DataBlock dataBlock = new DbSearcher(config, file.getPath())
return ipInfo.getAddress(); .binarySearch(ip);
String region = dataBlock.getRegion();
String address = region.replace("0|", "");
char symbol = '|';
if (address.charAt(address.length() - 1) == symbol) {
address = address.substring(0, address.length() - 1);
}
return address.equals(ElAdminConstant.REGION) ? "内网IP" : address;
} catch (Exception e) {
log.error(e.getMessage(), e);
} }
return null; return "";
} }
public static String getBrowser(HttpServletRequest request) { public static String getBrowser(HttpServletRequest request) {
UserAgent.ImmutableUserAgent userAgent = USER_AGENT_ANALYZER.parse(request.getHeader("User-Agent")); UserAgent.ImmutableUserAgent userAgent = userAgentAnalyzer.parse(request.getHeader("User-Agent"));
return userAgent.get(UserAgent.AGENT_NAME_VERSION).getValue(); return userAgent.get(UserAgent.AGENT_NAME_VERSION).getValue();
} }
...@@ -237,10 +314,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { ...@@ -237,10 +314,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
try { try {
InetAddress candidateAddress = null; InetAddress candidateAddress = null;
// 遍历所有的网络接口 // 遍历所有的网络接口
for (Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements();) { for (Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements(); ) {
NetworkInterface anInterface = interfaces.nextElement(); NetworkInterface anInterface = interfaces.nextElement();
// 在所有的接口下再遍历IP // 在所有的接口下再遍历IP
for (Enumeration<InetAddress> inetAddresses = anInterface.getInetAddresses(); inetAddresses.hasMoreElements();) { for (Enumeration<InetAddress> inetAddresses = anInterface.getInetAddresses(); inetAddresses.hasMoreElements(); ) {
InetAddress inetAddr = inetAddresses.nextElement(); InetAddress inetAddr = inetAddresses.nextElement();
// 排除loopback类型地址 // 排除loopback类型地址
if (!inetAddr.isLoopbackAddress()) { if (!inetAddr.isLoopbackAddress()) {
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin</artifactId>
<version>2.6</version>
</parent>
<artifactId>eladmin-ruibo</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-common</artifactId>
<version>2.6</version>
<scope>compile</scope>
</dependency>
<!-- tools 模块包含了 common 和 logging 模块 -->
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-tools</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.4</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package me.zhengjie.rbscreen.controller;
import me.zhengjie.rbscreen.service.PerHistoryService;
import me.zhengjie.rbscreen.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("api/per/screen")
@RestController
public class PerScreenController {
@Autowired
private PerHistoryService perHistoryService;
// 查询所有人员实时位置
@GetMapping("real")
public ResponseEntity getAllReal() {
return ResponseEntity.ok(AjaxResult.success(perHistoryService.getAllReal()));
}
}
package me.zhengjie.rbscreen.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import me.zhengjie.ruibo.domain.PerInfo;
@Data
public class PerInfoRealDto {
private Integer id;
private String perName;
private String phone;
private String perImei;
private String perSex;
private String perTel;
private String perNumber;
private String perDept;
private String perOffice;
private String lat;
private String lng;
private String hight;
}
package me.zhengjie.rbscreen.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.HashMap;
import java.util.List;
@Mapper
public interface PerHistoryMapper {
List<HashMap<String, Object>> getAllReal(String time);
}
package me.zhengjie.rbscreen.service;
public interface PerHistoryService {
Object getAllReal();
}
package me.zhengjie.rbscreen.service.impl;
import me.zhengjie.rbscreen.mapper.PerHistoryMapper;
import me.zhengjie.rbscreen.service.PerHistoryService;
import me.zhengjie.ruibo.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
@Service
public class PerHistoryServiceImpl implements PerHistoryService {
@Autowired
private PerHistoryMapper perHistoryMapper;
@Override
public Object getAllReal() {
String nowMonthInt = StringUtils.getNowMonthInt();
List<HashMap<String, Object>> allReal = perHistoryMapper.getAllReal(nowMonthInt);
return allReal;
}
}
package me.zhengjie.ruibo.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.rbscreen.domain.vo.DataQueryCriteria;
import me.zhengjie.rbscreen.util.AjaxResult;
import me.zhengjie.ruibo.domain.DiBangMysql;
import me.zhengjie.ruibo.service.DiBangMysqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("api/diBang")
public class DiBangController {
@Autowired
private DiBangMysqlService diBangMysqlService;
// 初始化单位字符串
public static final String UNIT_STRING = "t";
@RequestMapping("list")
@AnonymousAccess
public ResponseEntity getDiBang() {
List<DiBangMysql> list = diBangMysqlService.list();
return ResponseEntity.ok(AjaxResult.success(list));
}
/**
* 分页查询
*
* @return
*/
@GetMapping("page")
public ResponseEntity getDiBangPage(DataQueryCriteria dataQueryCriteria, @RequestParam(defaultValue = "0") Long page, @RequestParam(defaultValue = "10") Long size) {
Page diBangMysqlPage = new Page<DiBangMysql>(page, size);
Page diBangPage = diBangMysqlService.getDiBangPage(dataQueryCriteria, diBangMysqlPage);
//统计day
int day = diBangMysqlService.cycleStatistics("day");
//统计 周
int week = diBangMysqlService.cycleStatistics("week");
// 统计 月
int month = diBangMysqlService.cycleStatistics("month");
// 统计 年
int year = diBangMysqlService.cycleStatistics("year");
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("当天称重量: ").append(day).append(UNIT_STRING).append("; ")
.append("本周称重量: ").append(week).append(UNIT_STRING).append("; ")
.append("本月称重量: ").append(month).append(UNIT_STRING).append("; ")
.append("本年称重量: ").append(year).append(UNIT_STRING);
AjaxResult success = AjaxResult.success(diBangPage);
success.put("cycleStatistics", stringBuffer.toString());
return ResponseEntity.ok(success);
}
@GetMapping("real")
public ResponseEntity getRealDiBang() {
DiBangMysql diBang = diBangMysqlService.getRealDiBang();
return ResponseEntity.ok(AjaxResult.success(diBang));
}
@GetMapping("cycleStatistics")
public ResponseEntity cycleStatistics(String dateRange) {
return ResponseEntity.ok(AjaxResult.success(diBangMysqlService.cycleStatistics(dateRange)));
}
}
package me.zhengjie.ruibo.controller;
import me.zhengjie.rbscreen.domain.vo.BadRequestException;
import me.zhengjie.rbscreen.util.AjaxResult;
import me.zhengjie.ruibo.domain.PerInfo;
import me.zhengjie.ruibo.service.PerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/perInfo")
public class PerInfoController {
@Autowired
private PerInfoService perInfoService;
// 查询所有人员信息
@GetMapping
public List<PerInfo> getAllPerInfo() {
return perInfoService.list();
}
// 分页查询
@GetMapping("page")
public ResponseEntity<Object> pageAll(Long page, Long size, PerInfo perInfo) {
Map result = perInfoService.pageAll(page, size, perInfo);
return ResponseEntity.ok(AjaxResult.success(result));
}
// 根据 ID 查询人员信息
@GetMapping("/{id}")
public PerInfo getPerInfoById(@PathVariable Integer id) {
return perInfoService.getById(id);
}
// 添加人员信息
@PostMapping
public ResponseEntity<Object> addPerInfo(@RequestBody PerInfo perInfo) {
try {
perInfoService.save(perInfo);
} catch (Exception e) {
if (e instanceof SQLIntegrityConstraintViolationException) {
boolean duplicate = e.getMessage().contains("Duplicate");
if (duplicate) {
throw new BadRequestException(" 存在重复手机号或者定位卡ID!");
}
}
}
return ResponseEntity.ok(AjaxResult.success());
}
// 导出人员基本信息模版文件
@GetMapping("exportTemplate")
public void exportTemplate(HttpServletResponse response) {
perInfoService.exportTemplate(response);
}
// 导入人员基本信息
@PostMapping("import")
public ResponseEntity<Object> importPerInfo(MultipartFile file) throws IOException {
perInfoService.importPerInfo(file);
return ResponseEntity.ok(AjaxResult.success("导入成功"));
}
// 更新人员信息
@PutMapping
public ResponseEntity<Object> updatePerInfo(@RequestBody PerInfo perInfo) {
try {
perInfoService.updateById(perInfo);
} catch (Exception e) {
if (e instanceof SQLIntegrityConstraintViolationException) {
boolean duplicate = e.getMessage().contains("Duplicate");
if (duplicate) {
throw new BadRequestException(" 存在重复手机号或者定位卡ID!");
}
}
}
return ResponseEntity.ok(AjaxResult.success());
}
// 根据 ID 删除人员信息
@DeleteMapping("/{ids}")
public ResponseEntity<Object> deletePerInfo(@PathVariable Long[] ids) {
for (Long id : ids) {
perInfoService.removeById(id);
}
return ResponseEntity.ok(AjaxResult.success());
}
}
\ No newline at end of file
package me.zhengjie.ruibo.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.base.AjaxResult;
import me.zhengjie.rbscreen.domain.vo.BadRequestException;
import me.zhengjie.ruibo.netty.NettyServerHandler;
import me.zhengjie.ruibo.service.ScreenAlarmService;
import me.zhengjie.ruibo.utils.StringUtils;
import me.zhengjie.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
@RestController
@RequestMapping("api/screenAlarm")
public class ScreenAlarmController {
@Autowired
private ScreenAlarmService screenAlarmService;
@Autowired
RedisUtils redisUtils;
//报警器状态
public static final String STATUS_CODE = "STATUS_CODE";
//启动命令
public static final String OPEN_COMMAND = "010600100003C80E";
//停止指令
public static final String STOP_COMMAND = "010600100000880F";
//关闭音量
public static final String CLOSE_VOLUME = "010600110000D9CF";
//音量最大
public static final String MAX_VOLUME = "01060011001E59C7";
//音量最小
public static final String MIN_VOLUME = "010600110001180F";
// 开启报警器声光报警
@PostMapping("openAlarm")
public ResponseEntity<Object> openAlarm(String command) {
boolean status = false;
// toDo 查询报警设备编号
// 获取netty 记录的链接对象信息
HashMap<ChannelHandlerContext, String> nettyChannelMap = NettyServerHandler.nettyChannelMap;
// 非空判断
if (ObjectUtils.isNull(nettyChannelMap)) {
return ResponseEntity.ok(AjaxResult.error("请求失败", "未查询到设备链接"));
}
// 收集失效 的链接
ArrayList<Channel> objects = new ArrayList<>();
// 遍历链接对象 发送指令
nettyChannelMap.forEach((key, value) -> {
// 拼接redis key 默认为 2
String redisKey = STATUS_CODE + ":" + value;
redisUtils.set(redisKey, "2");
// 非空判断
if (ObjectUtils.isNotNull(key)) {
Channel channel = key.channel();
// 活跃判断
if (channel.isActive()) {
channel
.writeAndFlush(Unpooled.wrappedBuffer(StringUtils.hexString2Bytes(ObjectUtils.isNotNull(command) ? command : OPEN_COMMAND)));
} else {
objects.add(channel);
}
}
}
);
if (ObjectUtils.isNotNull(objects) )objects.forEach(item -> item.close());
// 启动超时检查
try {
if (!checkClientResponses(2, TimeUnit.SECONDS)) {
String unresponsiveClients = nettyChannelMap.entrySet().stream()
.filter(entry -> {
String value = entry.getValue();
String redisKey = STATUS_CODE + ":" + value;
Object o = redisUtils.get(redisKey);
if (org.springframework.util.ObjectUtils.isEmpty(o)) {
return true;
}
if (!"1".equals(o.toString())) {
return true;
}
return false;
})
.map(entry -> entry.getKey().channel().remoteAddress().toString())
.collect(Collectors.joining(","));
return ResponseEntity.ok(AjaxResult.error("请求完成", "但有以下客户端未响应: " + unresponsiveClients));
}
} catch (TimeoutException e) {
return ResponseEntity.ok(AjaxResult.error("请求失败", "超时: " + e.getMessage()));
}
return ResponseEntity.ok(AjaxResult.success("请求成功", "报警器已打开"));
}
//关闭声光报警
@PostMapping("closeAlarm")
public ResponseEntity<Object> closeAlarm(String command) {
boolean status = false;
// toDo 查询报警设备编号
//获取netty 记录的链接对象信息
HashMap<ChannelHandlerContext, String> nettyChannelMap = NettyServerHandler.nettyChannelMap;
// 非空判断
if (ObjectUtils.isNull(nettyChannelMap)) {
return ResponseEntity.ok(AjaxResult.error("请求失败", "未查询到设备链接"));
}
// 收集失效 的链接
ArrayList<Channel> objects = new ArrayList<>();
// 遍历链接对象 发送指令
nettyChannelMap.forEach((key, value) -> {
// 拼接redis key 默认为 2
String redisKey = STATUS_CODE + ":" + value;
redisUtils.set(redisKey, "2");
// 非空判断
if (ObjectUtils.isNotNull(key)) {
Channel channel = key.channel();
// 活跃判断
if (channel.isActive()) {
channel
.writeAndFlush(Unpooled.wrappedBuffer(StringUtils.hexString2Bytes(ObjectUtils.isNotNull(command) ? command : STOP_COMMAND)));
}else {
objects.add(channel);
}
}
}
);
if (ObjectUtils.isNotNull(objects) )objects.forEach(item -> item.close());
// 启动超时检查
try {
if (!checkClientResponses(2, TimeUnit.SECONDS)) {
String unresponsiveClients = nettyChannelMap.entrySet().stream()
.filter(entry -> {
String value = entry.getValue();
String redisKey = STATUS_CODE + ":" + value;
Object o = redisUtils.get(redisKey);
if (org.springframework.util.ObjectUtils.isEmpty(o)) {
return true;
}
if (!"0".equals(o.toString())) {
return true;
}
return false;
})
.map(entry -> entry.getKey().channel().remoteAddress().toString())
.collect(Collectors.joining(","));
return ResponseEntity.ok(AjaxResult.error("请求完成", "但有以下客户端未响应: " + unresponsiveClients));
}
} catch (TimeoutException e) {
return ResponseEntity.ok(AjaxResult.error("请求失败", "超时: " + e.getMessage()));
}
return ResponseEntity.ok(AjaxResult.success("请求成功", "报警器已关闭"));
}
private boolean checkClientResponses(long timeout, TimeUnit unit) throws TimeoutException {
Object lock = new Object();
try {
synchronized (lock) {
unit.timedWait(lock, timeout);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new BadRequestException("检查客户端响应时被中断");
}
for (Map.Entry<ChannelHandlerContext, String> entry : NettyServerHandler.nettyChannelMap.entrySet()) {
String value = entry.getValue();
String redisKey = STATUS_CODE + ":" + value;
Object o = redisUtils.get(redisKey);
if (org.springframework.util.ObjectUtils.isEmpty(o)) {
return false;
}
if (!"1".equals(o.toString()) && !"0".equals(o.toString())) {
return false;
}
}
return true;
}
}
package me.zhengjie.ruibo.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
@Data
@TableName(value = "tbl_back_record")
public class DiBang {
@TableField("ID")
private Integer id;
@TableField("Weight")
private String weight;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@TableField("Weight_time")
private LocalDateTime weightTime;
}
package me.zhengjie.ruibo.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
@Data
@TableName(value = "tbl_back_record")
public class DiBangMysql {
private Integer id;
@TableField(value = "weight")
private String weight;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@TableField(value = "weight_time")
private LocalDateTime weightTime;
}
package me.zhengjie.ruibo.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("per_info")
public class PerInfo {
@TableId(type = IdType.AUTO)
private Integer id;
@TableField(value = "per_name")
private String perName;
private String phone;
@TableField(value = "per_imei")
private String perImei;
@TableField(value = "per_sex")
private Integer perSex;
@TableField(value = "per_tel")
private String perTel;
@TableField(value = "per_number")
private String perNumber;
@TableField(value = "per_dept")
private String perDept;
@TableField(value = "per_office")
private String perOffice;
@TableField(value = "safe_educate")
private String safeEducate;
private String temporary;
}
\ No newline at end of file
package me.zhengjie.ruibo.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import me.zhengjie.ruibo.excel.converter.SexConverter;
@Data
public class PerInfoExcelDto {
@ExcelProperty(value = "姓名", index = 0)
private String perName;
@ExcelProperty(value = "性别", index = 1, converter = SexConverter.class)
private Integer perSex;
@ExcelProperty(value = "工号", index = 2)
private String perNumber;
@ExcelProperty(value = "部门", index = 3)
private String perDept;
@ExcelProperty(value = "职务", index = 4)
private String perOffice;
@ExcelProperty(value = "人员手机号", index = 5)
private String perTel;
@ExcelProperty(value = "定位卡ID", index = 6)
private String phone;
@ExcelProperty(value = "定位卡IMEI", index = 7)
private String perImei;
@ExcelProperty(value = "三级安全教育是否通过", index = 8)
private String safeEducate;
@ExcelProperty(value = "是否为临时卡", index = 9)
private String temporary;
}
package me.zhengjie.ruibo.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.exception.ExcelDataConvertException;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.util.ListUtils;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.rbscreen.domain.vo.BadRequestException;
import me.zhengjie.ruibo.service.mapper.PerInfoMapper;
import org.springframework.util.ObjectUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
// 有个很重要的点 PerInfoExcelDtoListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去
@Slf4j
public class PerInfoExcelDtoListener implements ReadListener<PerInfoExcelDto> {
/**
* 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 100;
private static List<String> phoneList = null;
private static boolean phoneFlag = true;
private static List<String> perTelList = null;
private static boolean perTelFlag = true;
/**
* 缓存的数据
*/
private List<PerInfoExcelDto> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
private PerInfoMapper perInfoMapper;
/**
* 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
*
* @param perInfoMapper
*/
public PerInfoExcelDtoListener(PerInfoMapper perInfoMapper) {
this.phoneFlag = true;
this.phoneList = null;
this.perTelFlag = true;
this.perTelList = null;
this.perInfoMapper = perInfoMapper;
}
/**
* 这个每一条数据解析都会来调用
*
* @param data one row value. Is is same as {@link AnalysisContext#readRowHolder()}
* @param context
*/
@Override
public void invoke(PerInfoExcelDto data, AnalysisContext context) {
// log.info("解析到一条数据:{}", JSON.toJSONString(data));
boolean lineNullValue = this.isLineNullValue(data);
if (lineNullValue) {
return;
}
cachedDataList.add(data);
// 新增一条之前先要去比对 数据库是否存在相同的手机号
if (phoneFlag && ObjectUtils.isEmpty(phoneList)) {
List<String> strings = perInfoMapper.selectPhoneAll();
if (ObjectUtils.isEmpty(strings)) {
phoneFlag = false;
} else {
phoneList = strings;
}
}
if (!ObjectUtils.isEmpty(phoneList)) {
if (phoneList.contains(data.getPhone())) {
Field phone = null;
try {
phone = data.getClass().getDeclaredField("phone");
} catch (NoSuchFieldException e) {
}
ExcelProperty excelProperty = phone.getAnnotation(ExcelProperty.class);
int index = excelProperty.index();
throw new BadRequestException("第" + context.readRowHolder().getRowIndex() + "行" +
",第" + (index + 1) + "列 存在和数据库重复的定位卡ID!");
}
}
if (perTelFlag && ObjectUtils.isEmpty(perTelList)) {
List<String> strings = perInfoMapper.selectPerTelAll();
if (ObjectUtils.isEmpty(strings)) {
perTelFlag = false;
} else {
perTelList = strings;
}
}
if (!ObjectUtils.isEmpty(perTelList)) {
if (perTelList.contains(data.getPerTel())) {
Field phone = null;
try {
phone = data.getClass().getDeclaredField("perTel");
} catch (NoSuchFieldException e) {
}
ExcelProperty excelProperty = phone.getAnnotation(ExcelProperty.class);
int index = excelProperty.index();
throw new BadRequestException("第" + context.readRowHolder().getRowIndex() + "行" +
",第" + (index + 1) + "列 存在和数据库重复的手机号码!");
}
}
}
/**
* 异常方法 (类型转换异常也会执行此方法) (读取一行抛出异常也会执行此方法)
*
* @param exception
* @param context
* @throws Exception
*/
@Override
public void onException(Exception exception, AnalysisContext context) {
// 如果是某一个单元格的转换异常 能获取到具体行号
// 如果要获取头的信息 配合invokeHeadMap使用
if (exception instanceof ExcelDataConvertException) {
ExcelDataConvertException excelDataConvertException = (ExcelDataConvertException) exception;
log.error("第{}行,第{}列解析异常,数据为:{}", excelDataConvertException.getRowIndex(),
excelDataConvertException.getColumnIndex(), excelDataConvertException.getCellData());
throw new RuntimeException("第" + excelDataConvertException.getRowIndex() + "行" +
",第" + (excelDataConvertException.getColumnIndex() + 1) + "列读取错误");
} else if (exception instanceof BadRequestException) {
throw new BadRequestException(exception.getMessage());
}
}
/**
* 所有数据解析完成了 都会来调用
*
* @param context
*/
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 这里也要保存数据,确保最后遗留的数据也存储到数据库
saveData();
log.info("所有数据解析完成!");
}
/**
* 加上存储数据库
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
perInfoMapper.insertBatchExcel(cachedDataList);
log.info("存储数据库成功!");
}
/**
* 判断整行单元格数据是否均为空
*/
private boolean isLineNullValue(PerInfoExcelDto data) {
try {
List<Field> fields = Arrays.stream(data.getClass().getDeclaredFields())
.filter(f -> f.isAnnotationPresent(ExcelProperty.class))
.collect(Collectors.toList());
List<Boolean> lineNullList = new ArrayList<>(fields.size());
for (Field field : fields) {
field.setAccessible(true);
Object value = field.get(data);
if (ObjectUtils.isEmpty(value)) {
lineNullList.add(Boolean.TRUE);
} else {
lineNullList.add(Boolean.FALSE);
}
}
return lineNullList.stream().allMatch(Boolean.TRUE::equals);
} catch (Exception e) {
log.error("读取数据行[{}]解析失败: {}", data, e.getMessage());
}
return true;
}
}
\ No newline at end of file
package me.zhengjie.ruibo.excel.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import me.zhengjie.rbscreen.domain.vo.BadRequestException;
/**
* 性别由数据库的0/1 转换成
*/
public class SexConverter implements Converter<Integer> {
@Override
public Class<?> supportJavaTypeKey() {
return Integer.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public Integer convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
String stringValue = cellData.getStringValue();
switch (stringValue) {
case "男":
return 1;
case "女":
return 0;
default:
throw new BadRequestException("存在未知性别");
}
}
@Override
public WriteCellData<?> convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
switch (value) {
case 1:
return new WriteCellData<>("男");
case 0:
return new WriteCellData<>("女");
default:
throw new BadRequestException("存在未知性别");
}
}
}
package me.zhengjie.ruibo.netty;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import lombok.extern.slf4j.Slf4j;
import java.net.InetSocketAddress;
@Slf4j
public class NettyServer {
public void start(String ip,Integer port) {
InetSocketAddress socketAddress = new InetSocketAddress(ip,port );
//new 一个主线程组
EventLoopGroup bossGroup = new NioEventLoopGroup(1);
//new 一个工作线程组
EventLoopGroup workGroup = new NioEventLoopGroup(200);
ServerBootstrap bootstrap = new ServerBootstrap()
.group(bossGroup, workGroup)
.channel(NioServerSocketChannel.class)
.childHandler(new ServerChannelInitializer())
.localAddress(socketAddress)
//设置队列大小
.option(ChannelOption.SO_BACKLOG, 1024)
// 两小时内没有数据的通信时,TCP会自动发送一个活动探测数据报文
.childOption(ChannelOption.SO_KEEPALIVE, true);
//绑定端口,开始接收进来的连接
try {
ChannelFuture future = bootstrap.bind(socketAddress).sync();
log.info("服务器启动开始监听端口: {}", socketAddress.getPort());
future.channel().closeFuture().sync();
} catch (InterruptedException e) {
log.error("服务器开启失败", e);
} finally {
//关闭主线程组
bossGroup.shutdownGracefully();
//关闭工作线程组
workGroup.shutdownGracefully();
}
}
}
package me.zhengjie.ruibo.netty;
import com.github.yulichang.toolkit.SpringContentUtils;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.ruibo.controller.ScreenAlarmController;
import me.zhengjie.ruibo.utils.StringUtils;
import me.zhengjie.utils.RedisUtils;
import java.io.IOException;
import java.util.HashMap;
/**
* netty服务端处理器
**/
@Slf4j
public class NettyServerHandler extends ChannelInboundHandlerAdapter {
private RedisUtils redisUtils;
public NettyServerHandler() {
this.redisUtils = SpringContentUtils.getBean(RedisUtils.class);
}
// 创建线程安全的map对象存储 存储客户端连接信息
public static HashMap<ChannelHandlerContext, String> nettyChannelMap = new HashMap<>();
/**
* 客户端连接会触发
*/
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
//打印链接信息 ip 等
log.info("Channel 通道连接:{}", ctx.channel().remoteAddress().toString());
//ctx.writeAndFlush(StringUtils.hexString2Bytes("完成连接!"));
}
/**
* 客户端发消息会触发
*/
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//String msgString = msg.toString();
ByteBuf byteBuf = (ByteBuf) msg;
String msgString = StringUtils.convertByteBufToString(byteBuf);
log.info("服务器收到消息: {}", msgString);
// TODO 业务处理
String string = ByteBufUtil.hexDump(byteBuf).toUpperCase();
if (ScreenAlarmController.OPEN_COMMAND.equals(string)) {
String string1 = nettyChannelMap.get(ctx);
String redisKey = ScreenAlarmController.STATUS_CODE + ":" + string1;
redisUtils.set(redisKey, "1");
} else if (ScreenAlarmController.STOP_COMMAND.equals(string)) {
String string1 = nettyChannelMap.get(ctx);
String redisKey = ScreenAlarmController.STATUS_CODE + ":" + string1;
redisUtils.set(redisKey, "0");
} else {
// 判断链接是否保存 如果没有就存储链接
if (!nettyChannelMap.containsKey(ctx)) {
nettyChannelMap.put(ctx, msgString);
}
}
}
/**
* 发生异常触发
*/
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
ctx.close();
}
/**
* 客户端与服务端 断连时 执行
*
* @param ctx
* @throws Exception
*/
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception, IOException {
nettyChannelMap.remove(ctx);
log.info("客户端断开连接:{}", ctx.channel().remoteAddress().toString());
ctx.close(); //断开连接时,必须关闭,否则造成资源浪费,并发量很大情况下可能造成宕机
}
}
package me.zhengjie.ruibo.netty;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import sun.nio.cs.ext.GBK;
import java.nio.charset.Charset;
/**
* netty服务初始化器
**/
public class ServerChannelInitializer extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
//添加编解码
// socketChannel.pipeline().addLast("decoder", new StringDecoder(Charset.forName("GBK")));
// 添加编码器
socketChannel.pipeline().addLast("encoder", new StringEncoder(Charset.forName("GBK")));
socketChannel.pipeline().addLast(new NettyServerHandler());
}
}
package me.zhengjie.ruibo.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.rbscreen.domain.vo.DataQueryCriteria;
import me.zhengjie.ruibo.domain.DiBangMysql;
import java.util.HashMap;
import java.util.List;
public interface DiBangMysqlService extends IService<DiBangMysql> {
DiBangMysql getRealDiBang();
void insertBatch(List<DiBangMysql> diBangMysqlList);
int cycleStatistics(String dateRange);
Page getDiBangPage(DataQueryCriteria dataQueryCriteria, Page<DiBangMysql> page);
}
package me.zhengjie.ruibo.service;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.ruibo.domain.DiBang;
public interface DiBangService extends IService<DiBang> {
DiBang getRealDiBang();
}
package me.zhengjie.ruibo.service;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.ruibo.domain.PerInfo;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
public interface PerInfoService extends IService<PerInfo> {
Map pageAll(Long page, Long size, PerInfo perInfo);
void importPerInfo(MultipartFile multipartFile) throws IOException;
void exportTemplate(HttpServletResponse response);
}
\ No newline at end of file
package me.zhengjie.ruibo.service;
import org.springframework.stereotype.Service;
public interface ScreenAlarmService {
}
package me.zhengjie.ruibo.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.rbscreen.domain.vo.DataQueryCriteria;
import me.zhengjie.ruibo.domain.DiBangMysql;
import me.zhengjie.ruibo.service.DiBangMysqlService;
import me.zhengjie.ruibo.service.mapper.DiBangMysqlMapper;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
@RequiredArgsConstructor
@Service
public class DiBangMysqlServiceImpl extends ServiceImpl<DiBangMysqlMapper, DiBangMysql> implements DiBangMysqlService {
private final DiBangMysqlMapper diBangMysqlMapper;
// 初始化定义 起始时间拼接字符串
private static final String START_DATE_STRING = " 00:00:00";
// 初始化定义结束时间拼接字符串
private static final String END_DATE_STRING = " 23:59:59";
@Override
public DiBangMysql getRealDiBang() {
DiBangMysql realDiBangMysql = diBangMysqlMapper.getRealDiBang();
return realDiBangMysql;
}
@Override
public void insertBatch(List<DiBangMysql> diBangMysqlList) {
diBangMysqlMapper.insertBatch(diBangMysqlList);
}
@Override
public int cycleStatistics(String dateRange) {
// 创建startDate ,endDate
String startDate = "";
String endDate = "";
// 获取当天时间
LocalDate now = LocalDate.now();
// 查询数据
switch (dateRange){
case "day":
// 计算当天的0时到24时
String string = now.toString();
startDate = string + START_DATE_STRING;
endDate = string + END_DATE_STRING;
break;
case "week":
// 计算本周时间
startDate = now.with(DayOfWeek.MONDAY).toString() +START_DATE_STRING;
endDate = now.with(DayOfWeek.SUNDAY).toString() +END_DATE_STRING;
break;
case "month":
// 计算本月的起止时间
startDate = now.withDayOfMonth(1).toString() +START_DATE_STRING;
endDate = now.withDayOfMonth(now.lengthOfMonth()).toString() +END_DATE_STRING;
break;
case "year":
//计算本年的起止时间
startDate = now.withDayOfYear(1).toString() +START_DATE_STRING;
endDate = now.withDayOfYear(now.lengthOfYear()).toString() +END_DATE_STRING;
break;
default:
// 默认
throw new BadRequestException("未指定查询周期");
}
return diBangMysqlMapper.cycleStatistics(startDate,endDate);
}
@Override
public Page getDiBangPage(DataQueryCriteria dataQueryCriteria, Page<DiBangMysql> page) {
QueryWrapper<DiBangMysql> diBangMysqlQueryWrapper = new QueryWrapper<>();
// 分页查询
List<String> range = dataQueryCriteria.getRange();
if (!CollectionUtils.isEmpty(range)) {
if (range.size() >= 2) {
diBangMysqlQueryWrapper.between("weight_time", range.get(0)+START_DATE_STRING, range.get(1)+END_DATE_STRING);
}
}
diBangMysqlQueryWrapper.orderByDesc("weight_time");
page = diBangMysqlMapper.selectPage(page, diBangMysqlQueryWrapper);
return page;
}
public static void main(String[] args) {
LocalDate now = LocalDate.now();
String string = now.with(DayOfWeek.MONDAY).toString() + " 00:00:00";
String end = now.with(DayOfWeek.SUNDAY).toString() + " 00:00:00";
System.out.println("string = " + string+"******"+end);
String string1 = "[\"2024-01-01\",\"2025-01-09\"]";
List<List> lists = JSONObject.parseArray(string1, List.class);
System.out.println("lists = " + lists);
}
}
package me.zhengjie.ruibo.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.ruibo.domain.DiBang;
import me.zhengjie.ruibo.service.DiBangService;
import me.zhengjie.ruibo.service.mapper.DiBangMapper;
import org.springframework.stereotype.Service;
@RequiredArgsConstructor
@Service
@DS("slave")
public class DiBangServiceImpl extends ServiceImpl<DiBangMapper, DiBang> implements DiBangService {
private final DiBangMapper diBangMapper;
@Override
public DiBang getRealDiBang() {
DiBang realDiBang = diBangMapper.getRealDiBang();
return realDiBang;
}
}
package me.zhengjie.ruibo.service.impl;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.ruibo.domain.PerInfo;
import me.zhengjie.ruibo.excel.PerInfoExcelDto;
import me.zhengjie.ruibo.excel.PerInfoExcelDtoListener;
import me.zhengjie.ruibo.service.PerInfoService;
import me.zhengjie.ruibo.service.mapper.PerInfoMapper;
import me.zhengjie.ruibo.utils.StringUtils;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.Map;
@Service
public class PerInfoServiceImpl extends ServiceImpl<PerInfoMapper, PerInfo> implements PerInfoService {
@Autowired
private PerInfoMapper perInfoMapper;
@Override
public Map pageAll(Long page, Long size, PerInfo perInfo) {
Page<PerInfo> perInfoPage = new Page<PerInfo>(page, size);
QueryWrapper<PerInfo> perInfoQueryWrapper = new QueryWrapper<>();
// 构建查询条件
//
Field[] fields = perInfo.getClass().getFields();
for (Field field : fields) {
try {
// 设置可访问私有字段
field.setAccessible(true);
// 获取字段的值
Object value = field.get(perInfo);
// 判断字段值是否不为空
if (value != null) {
String name = field.getName();
//
String camelToSnake = StringUtils.camelToSnake(name);
perInfoQueryWrapper.eq(camelToSnake, value);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
perInfoQueryWrapper.orderByDesc("id");
Page<PerInfo> resultPage = perInfoMapper.selectPage(perInfoPage, perInfoQueryWrapper);
Map resultMap = PageUtil.toPage(resultPage);
return resultMap;
}
@Override
public void importPerInfo(MultipartFile multipartFile) throws IOException {
InputStream inputStream = multipartFile.getInputStream();
EasyExcel.read(inputStream, PerInfoExcelDto.class, new PerInfoExcelDtoListener(perInfoMapper)).sheet().doRead();
}
@Override
public void exportTemplate(HttpServletResponse response) {
FileUtil.download(System.getProperty("user.dir") + "/import/人员基础信息导入模版.xlsx", response);
}
}
\ No newline at end of file
package me.zhengjie.ruibo.service.impl;
import me.zhengjie.ruibo.service.ScreenAlarmService;
import org.springframework.stereotype.Service;
@Service
public class ScreenAlarmServiceIml implements ScreenAlarmService {
}
package me.zhengjie.ruibo.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.ruibo.domain.DiBang;
import java.util.HashMap;
import java.util.List;
public interface DiBangMapper extends BaseMapper<DiBang> {
DiBang getRealDiBang();
List<HashMap> cycleStatistics(String dateRange);
}
package me.zhengjie.ruibo.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.ruibo.domain.DiBangMysql;
import java.util.List;
public interface DiBangMysqlMapper extends BaseMapper<DiBangMysql> {
DiBangMysql getRealDiBang();
int cycleStatistics(String startDate, String endDate);
void insertBatch(List<DiBangMysql> diBangMysqlList);
}
package me.zhengjie.ruibo.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.rbscreen.domain.vo.PerorcarVo;
import me.zhengjie.ruibo.domain.PerInfo;
import me.zhengjie.ruibo.excel.PerInfoExcelDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
@Mapper
public interface PerInfoMapper extends BaseMapper<PerInfo> {
void insertBatchExcel(List<PerInfoExcelDto> perInfoExcelList);
// 查询所有的 phone
List<String> selectPhoneAll();
List<String> selectPerTelAll();
PerorcarVo queryOnlineState(@Param("time")String time);
List<HashMap<String,Object>> queryOnlineStatAWeek(@Param("time")String time);
}
\ No newline at end of file
package me.zhengjie.ruibo.task;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.ruibo.domain.DiBang;
import me.zhengjie.ruibo.domain.DiBangMysql;
import me.zhengjie.ruibo.service.DiBangMysqlService;
import me.zhengjie.ruibo.service.DiBangService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Component
public class DataTask {
@Autowired
private DiBangService diBangService;
@Autowired
private DiBangMysqlService diBangMysqlService;
public void sqlServerTransferMysql() {
// 地磅数据从sqlServer 数据转存到 mysql
// 从读取最新的mysql 数据
DiBangMysql realDiBangMysql = diBangMysqlService.getRealDiBang();
QueryWrapper<DiBang> diBangQueryWrapper = new QueryWrapper<>();
if (realDiBangMysql != null) {
// 不为空 读取sqlServer内数据时间大于 mysql最新数据的
diBangQueryWrapper.ge("Weight_time", realDiBangMysql.getWeightTime()).orderByAsc("Weight_time");
}
List<DiBang> list =
diBangService.list(diBangQueryWrapper);
if (!ObjectUtils.isEmpty(list)) {
// 为空说明没有数据,不为空才说明有新数据需要新增
ArrayList<DiBangMysql> diBangMysqls = new ArrayList<DiBangMysql>();
list.forEach(item -> {
DiBangMysql diBangMysql = new DiBangMysql();
BeanUtils.copyProperties(item, diBangMysql);
diBangMysqls.add(diBangMysql);
// 超过一千条存储一次
if (diBangMysqls.size() >= 1000) {
diBangMysqlService.insertBatch(diBangMysqls);
diBangMysqls.clear();
}
});
// 剩余不满足一千的最后存储一次
if (diBangMysqls.size() > 0) {
diBangMysqlService.insertBatch(diBangMysqls);
}
}else{
log.debug("地磅暂未产生新的数据!!");
}
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.ruibo.service.mapper.DiBangMapper">
<select id="getRealDiBang" resultType="me.zhengjie.ruibo.domain.DiBang">
select TOP (1) * from tbl_back_record order by Weight_time desc
</select>
<select id="cycleStatistics" resultType="hashmap">
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.ruibo.service.mapper.DiBangMysqlMapper">
<select id="getRealDiBang" resultType="me.zhengjie.ruibo.domain.DiBangMysql">
select * from tbl_back_record order by Weight_time desc limit 1
</select>
<select id="cycleStatistics" resultType="integer">
select ifnull(sum(weight) ,0)as weight from tbl_back_record
where weight_time between #{startDate} and #{endDate}
</select>
<insert id="insertBatch">
insert into tbl_back_record (weight,weight_time) values
<foreach collection="list" item="item" separator=",">
(#{item.weight},#{item.weightTime})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.rbscreen.mapper.PerHistoryMapper">
<select id="getAllReal" resultType="me.zhengjie.rbscreen.dto.PerInfoRealDto">
select pi.per_name as perName,
pi.phone,
pi.per_imei as perImei,
case when pi.per_sex = '1' then '男' when pi.per_sex = '2' then '女' else '未知' end as perSex,
pi.per_tel as perTel,
pi.per_number as perNumber,
pi.per_dept as perDept,
pi.per_office as perOffice,
ph.lat,
ph.lng,
ph.hight
from per_info pi
join (select a.*
from per_history_${time} a
join (select max(create_time) as maxTime, phone
from per_history_${time} where create_time >= DATE_SUB(NOW(), INTERVAL 5 MINUTE )
group by phone) phmx on phmx.maxTime = a.create_time and phmx.phone=a.phone) ph
on pi.phone = ph.phone
group by pi.phone
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.ruibo.service.mapper.PerInfoMapper">
<insert id="insertBatchExcel">
insert into per_info (per_name, phone, per_imei, per_sex, per_tel, per_number, per_dept, per_office,safe_educate,temporary)
values
<foreach collection="perInfoExcelList" separator="," index="index" item="perInfoExcel">
(#{perInfoExcel.perName},
#{perInfoExcel.phone}, #{perInfoExcel.perImei},
#{perInfoExcel.perSex}, #{perInfoExcel.perTel},
#{perInfoExcel.perNumber}, #{perInfoExcel.perDept},
#{perInfoExcel.perOffice}, #{perInfoExcel.safeEducate}, #{perInfoExcel.temporary})
</foreach>
</insert>
<select id="selectPhoneAll" resultType="string">
select phone
from per_info
</select>
<select id="selectPerTelAll" resultType="string">
select per_tel
from per_info
</select>
<select id="queryOnlineState" resultType="me.zhengjie.rbscreen.domain.vo.PerorcarVo">
select '人员定位' as name,
count(1) as count,
(select count(DISTINCT a.phone)
from per_info a
join per_history_${time} b on a.phone = b.phone and a.temporary = 1
where b.create_time >= DATE_SUB(NOW(), INTERVAL 5 MINUTE)) as online
from per_info
</select>
<select id="queryOnlineStatAWeek" resultType="java.util.HashMap">
SELECT
sub.phone,
dt AS time,
COUNT( DISTINCT c.phone ) AS count
FROM
(-- 子查询:计算每个手机号在每天的首次和末次访问时间,筛选出活动时间>=2小时的记录
SELECT
phone,
DATE ( create_time ) AS dt,
MIN( create_time ) AS first_time,
MAX( create_time ) AS last_time
FROM
per_history_${time}
WHERE
create_time > DATE_SUB( NOW(), INTERVAL 7 DAY )
GROUP BY
phone,
DATE ( create_time )
HAVING
TIMESTAMPDIFF(
HOUR,
MIN( create_time ),
MAX( create_time )) >= 2
) AS sub
JOIN per_info c ON c.phone = sub.phone
AND c.TEMPORARY = 1
GROUP BY
dt
</select>
</mapper>
\ No newline at end of file
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
<artifactId>eladmin-tools</artifactId> <artifactId>eladmin-tools</artifactId>
<version>2.6</version> <version>2.6</version>
</dependency> </dependency>
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-ruibo</artifactId>
<version>2.6</version>
</dependency>
<!-- Spring boot websocket --> <!-- Spring boot websocket -->
<dependency> <dependency>
...@@ -91,11 +96,7 @@ ...@@ -91,11 +96,7 @@
<artifactId>mybatis-plus-generator</artifactId> <artifactId>mybatis-plus-generator</artifactId>
<version>3.5.1</version> <version>3.5.1</version>
</dependency> </dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.3</version>
</dependency>
<!--swragger ui--> <!--swragger ui-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
...@@ -113,21 +114,16 @@ ...@@ -113,21 +114,16 @@
<version>2.0</version> <version>2.0</version>
</dependency> </dependency>
<!--netty--> <!--netty-->
<!-- <dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>netty-all</artifactId>
<version>4.1.17.Final</version> <version>4.1.75.Final</version>
</dependency>--> </dependency>
<dependency> <dependency>
<groupId>org.json</groupId> <groupId>org.json</groupId>
<artifactId>json</artifactId> <artifactId>json</artifactId>
<version>20090211</version> <version>20090211</version>
</dependency> </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
</dependencies> </dependencies>
<!-- 打包 --> <!-- 打包 -->
......
...@@ -17,7 +17,9 @@ package me.zhengjie; ...@@ -17,7 +17,9 @@ package me.zhengjie;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import me.zhengjie.annotation.rest.AnonymousGetMapping; import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.ruibo.netty.NettyServer;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
import me.zhengjie.utils.StringUtils;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
...@@ -45,10 +47,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -45,10 +47,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication @SpringBootApplication
@EnableTransactionManagement @EnableTransactionManagement
@EnableJpaAuditing(auditorAwareRef = "auditorAware") @EnableJpaAuditing(auditorAwareRef = "auditorAware")
@MapperScan("me.zhengjie.gemho.mapper") @MapperScan({"me.zhengjie.gemho.mapper","me.zhengjie.ruibo.service.mapper","me.zhengjie.rbscreen.mapper","me.zhengjie.video.mapper"})
public class AppRun implements CommandLineRunner { public class AppRun implements CommandLineRunner {
@Value("${netty.tcp.server.port}") @Value("${netty.tcp.server.port}")
private String port; private String port;
@Value("${netty.tcp.server.ip}")
private String ip;
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AppRun.class, args); SpringApplication.run(AppRun.class, args);
...@@ -78,7 +82,9 @@ public class AppRun implements CommandLineRunner { ...@@ -78,7 +82,9 @@ public class AppRun implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
// new NettyServer().start(port); if (StringUtils.isNotNull(port)&& StringUtils.isNotEmpty(ip)){
//System.out.println("======服务已经启动========"); new NettyServer().start(ip,Integer.valueOf(port));
System.out.println("======服务已经启动========");
}
} }
} }
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.artificial.ArtificialData; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.service.artificial.ArtificialDataService; import me.zhengjie.gemho.service.artificial.ArtificialDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.artificial.ArtificialPointService; ...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.artificial.ArtificialPointService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.DbDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.DbDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.DmDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.DmDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -4,14 +4,13 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,14 +4,13 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.gemho.entity.data.MpData; import me.zhengjie.gemho.entity.data.MpData;
import me.zhengjie.gemho.service.data.MpDataService; import me.zhengjie.gemho.service.data.MpDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -120,6 +119,7 @@ public class MpDataController { ...@@ -120,6 +119,7 @@ public class MpDataController {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
/** /**
* 删除表面位移人工巡检数据 * 删除表面位移人工巡检数据
* *
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.PslDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.PslDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.util.PageResult; ...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -4,11 +4,11 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,11 +4,11 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.service.data.SlDataService; import me.zhengjie.gemho.service.data.SlDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -49,10 +49,7 @@ public class SlDataController { ...@@ -49,10 +49,7 @@ public class SlDataController {
*/ */
@ApiOperation(value = "获取指定日期的渗流量数据", response = DataVo.class) @ApiOperation(value = "获取指定日期的渗流量数据", response = DataVo.class)
@GetMapping @GetMapping
public ResponseEntity<Object> getall(@ApiParam("日期范围") String range, public ResponseEntity<Object> getall(@ApiParam("日期范围") String range, @ApiParam("监测值") String values, @ApiParam("设备id") String deviceid, @ApiParam("检测项") String subitem) {
@ApiParam("监测值") String values,
@ApiParam("设备id") String deviceid,
@ApiParam("检测项") String subitem) {
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
String date = range; String date = range;
try { try {
...@@ -97,5 +94,6 @@ public class SlDataController { ...@@ -97,5 +94,6 @@ public class SlDataController {
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
slDataService.download(response, dataQueryCriteria, request); slDataService.download(response, dataQueryCriteria, request);
} }
} }
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.StDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.StDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
package me.zhengjie.gemho.controller.data; package me.zhengjie.gemho.controller.data;
import cn.hutool.http.HttpRequest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -9,7 +8,7 @@ import me.zhengjie.gemho.service.data.SzDataService; ...@@ -9,7 +8,7 @@ import me.zhengjie.gemho.service.data.SzDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.WpbDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.WpbDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.WtDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.data.WtDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.data.Zhidian; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.data.Zhidian;
import me.zhengjie.gemho.service.data.ZhidianService; import me.zhengjie.gemho.service.data.ZhidianService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsChildren; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsChildren;
import me.zhengjie.gemho.service.ins.InsChildrenService; import me.zhengjie.gemho.service.ins.InsChildrenService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.ins.InsDataService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.ins.InsDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsProject; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsProject;
import me.zhengjie.gemho.service.ins.InsProjectService; import me.zhengjie.gemho.service.ins.InsProjectService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.service.sys.SysSummaryService; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService; import me.zhengjie.gemho.service.tab.MonitorvideoService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.tab.DrybeachequipinforService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.service.tab.TabAbnormalService; import me.zhengjie.gemho.service.tab.TabAbnormalService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -36,7 +36,7 @@ public class DataBack { ...@@ -36,7 +36,7 @@ public class DataBack {
String filepath; String filepath;
@Autowired @Autowired
private DataSource dataSource; private DataSource dataSource;
@Value(value = "${spring.datasource.druid.password}") @Value(value = "${spring.datasource.dynamic.datasource.master.password}")
String password; String password;
@Value(value = "${environment.path}") @Value(value = "${environment.path}")
private String envPath; private String envPath;
......
...@@ -17,7 +17,7 @@ import me.zhengjie.gemho.util.PageResult; ...@@ -17,7 +17,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.tab.dry.DryVo; import me.zhengjie.gemho.x_datavo.tab.dry.DryVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
......
...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.tab.JrxDissectService; ...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.tab.JrxDissectService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria; import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO; import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo; import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.tab.JrxSteps; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.tab.JrxSteps;
import me.zhengjie.gemho.service.tab.IJrxStepsService; import me.zhengjie.gemho.service.tab.IJrxStepsService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo; import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.tab.JrxWaterService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.tab.JrxWaterService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.service.tab.TailpondinforService; ...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.ThrowableUtil; import me.zhengjie.utils.ThrowableUtil;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.artificial; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.artificial;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.artificial.ArtificialData; import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.artificial; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.artificial;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.artificial.ArtificialPoint; import me.zhengjie.gemho.entity.artificial.ArtificialPoint;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -14,7 +14,7 @@ import me.zhengjie.gemho.util.ServiceUtil; ...@@ -14,7 +14,7 @@ import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.artificial.ADataVo; import me.zhengjie.gemho.x_datavo.artificial.ADataVo;
import me.zhengjie.gemho.x_datavo.artificial.ArtificialDataVo; import me.zhengjie.gemho.x_datavo.artificial.ArtificialDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
......
...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.artificial.ArtificialPointService; ...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.service.artificial.ArtificialPointService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.artificial.PointListVo; import me.zhengjie.gemho.x_datavo.artificial.PointListVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.DbData; import me.zhengjie.gemho.entity.data.DbData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.DmData; import me.zhengjie.gemho.entity.data.DmData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.MpData; import me.zhengjie.gemho.entity.data.MpData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.PslData; import me.zhengjie.gemho.entity.data.PslData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.RgData; import me.zhengjie.gemho.entity.data.RgData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.SlData; import me.zhengjie.gemho.entity.data.SlData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.StData; import me.zhengjie.gemho.entity.data.StData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -3,7 +3,7 @@ package me.zhengjie.gemho.service.data; ...@@ -3,7 +3,7 @@ package me.zhengjie.gemho.service.data;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.SzData; import me.zhengjie.gemho.entity.data.SzData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.WpbData; import me.zhengjie.gemho.entity.data.WpbData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.WtData; import me.zhengjie.gemho.entity.data.WtData;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -3,12 +3,10 @@ package me.zhengjie.gemho.service.data; ...@@ -3,12 +3,10 @@ package me.zhengjie.gemho.service.data;
import me.zhengjie.gemho.entity.data.Zhidian; import me.zhengjie.gemho.entity.data.Zhidian;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.HashMap; import java.util.HashMap;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import com.baomidou.mybatisplus.core.metadata.IPage;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
......
...@@ -17,7 +17,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -17,7 +17,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.util.TailNoForInfoUtil; ...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.DataVo; import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo; ...@@ -15,7 +15,7 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo; import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
package me.zhengjie.gemho.service.data.impl; package me.zhengjie.gemho.service.data.impl;
import cn.hutool.http.HttpUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.gemho.entity.data.WtData;
import me.zhengjie.gemho.entity.data.Zhidian; import me.zhengjie.gemho.entity.data.Zhidian;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.data.ZhidianMapper; import me.zhengjie.gemho.mapper.data.ZhidianMapper;
...@@ -12,7 +10,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; ...@@ -12,7 +10,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.service.data.ZhidianService; import me.zhengjie.gemho.service.data.ZhidianService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.ins.InsChildren; import me.zhengjie.gemho.entity.ins.InsChildren;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.ins.InsData; import me.zhengjie.gemho.entity.ins.InsData;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.ins;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.ins.InsProject; import me.zhengjie.gemho.entity.ins.InsProject;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsChildren; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsChildren;
import me.zhengjie.gemho.mapper.ins.InsChildrenMapper; import me.zhengjie.gemho.mapper.ins.InsChildrenMapper;
import me.zhengjie.gemho.service.ins.InsChildrenService; import me.zhengjie.gemho.service.ins.InsChildrenService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.ins.InsData; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.ins.InsData;
import me.zhengjie.gemho.mapper.ins.InsDataMapper; import me.zhengjie.gemho.mapper.ins.InsDataMapper;
import me.zhengjie.gemho.service.ins.InsDataService; import me.zhengjie.gemho.service.ins.InsDataService;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.ins.InsDataVo; import me.zhengjie.gemho.x_datavo.ins.InsDataVo;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsProject; ...@@ -7,7 +7,7 @@ import me.zhengjie.gemho.entity.ins.InsProject;
import me.zhengjie.gemho.mapper.ins.InsProjectMapper; import me.zhengjie.gemho.mapper.ins.InsProjectMapper;
import me.zhengjie.gemho.service.ins.InsProjectService; import me.zhengjie.gemho.service.ins.InsProjectService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.sys; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.sys;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.sys.SysSummary; import me.zhengjie.gemho.entity.sys.SysSummary;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; ...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.UserTailponMapper; import me.zhengjie.gemho.mapper.tab.UserTailponMapper;
import me.zhengjie.gemho.service.sys.SysSummaryService; import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.sys.SysSummaryVo; import me.zhengjie.gemho.x_datavo.sys.SysSummaryVo;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.JrxSteps; import me.zhengjie.gemho.entity.tab.JrxSteps;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo; import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.JrxDissect; import me.zhengjie.gemho.entity.tab.JrxDissect;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria; import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO; import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo; import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.JrxWater; import me.zhengjie.gemho.entity.tab.JrxWater;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.Abnormal; import me.zhengjie.gemho.entity.tab.Abnormal;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab; ...@@ -2,7 +2,7 @@ package me.zhengjie.gemho.service.tab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.tab.Tailpondinfor; import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -11,7 +11,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; ...@@ -11,7 +11,7 @@ import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.gemho.x_datavo.tab.dry.LevelVo; import me.zhengjie.gemho.x_datavo.tab.dry.LevelVo;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
......
...@@ -13,7 +13,7 @@ import me.zhengjie.gemho.service.tab.JrxDissectService; ...@@ -13,7 +13,7 @@ import me.zhengjie.gemho.service.tab.JrxDissectService;
import me.zhengjie.gemho.util.DataUtil; import me.zhengjie.gemho.util.DataUtil;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria; import me.zhengjie.gemho.x_datavo.data.JrxQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.JrxDissectDto; import me.zhengjie.gemho.x_datavo.tab.JrxDissectDto;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO; import me.zhengjie.gemho.x_datavo.tab.visual.JrxDissectVisualVO;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.mapper.tab.JrxStepsMapper; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.mapper.tab.JrxStepsMapper;
import me.zhengjie.gemho.service.tab.IJrxStepsService; import me.zhengjie.gemho.service.tab.IJrxStepsService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo; import me.zhengjie.gemho.x_datavo.tab.visual.JrxStepsListVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.mapper.tab.JrxWaterMapper; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.mapper.tab.JrxWaterMapper;
import me.zhengjie.gemho.service.tab.JrxWaterService; import me.zhengjie.gemho.service.tab.JrxWaterService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.service.dic.IAlarmStateService; ...@@ -16,7 +16,7 @@ import me.zhengjie.gemho.service.dic.IAlarmStateService;
import me.zhengjie.gemho.service.tab.TabAbnormalService; import me.zhengjie.gemho.service.tab.TabAbnormalService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.mapper.tab.UserTailponMapper; ...@@ -9,7 +9,7 @@ import me.zhengjie.gemho.mapper.tab.UserTailponMapper;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.ServiceUtil; import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
......
...@@ -11,7 +11,7 @@ import me.zhengjie.gemho.mapper.artificial.ArtificialPointMapper; ...@@ -11,7 +11,7 @@ import me.zhengjie.gemho.mapper.artificial.ArtificialPointMapper;
import me.zhengjie.gemho.mapper.dic.JczxMapper; import me.zhengjie.gemho.mapper.dic.JczxMapper;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.x_datavo.Result; import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
......
...@@ -124,6 +124,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -124,6 +124,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/file/**").permitAll() .antMatchers("/file/**").permitAll()
// 阿里巴巴 druid // 阿里巴巴 druid
.antMatchers("/druid/**").permitAll() .antMatchers("/druid/**").permitAll()
.antMatchers("/magic/web/**").permitAll()
// 放行OPTIONS请求 // 放行OPTIONS请求
.antMatchers(HttpMethod.OPTIONS, "/**").permitAll() .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
// 自定义匿名访问所有url放行:允许匿名和带Token访问,细腻化到每个 Request 类型 // 自定义匿名访问所有url放行:允许匿名和带Token访问,细腻化到每个 Request 类型
......
#配置数据源 #配置数据源
spring: spring:
datasource: datasource:
initialization-mode: never
dynamic:
primary: master
datasource:
master:
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.2.37}:${DB_PORT:3310}/${DB_NAME:ruibo}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=true&requireSSL=true
username: root
#password: ${DB_PWD:jinghe2021//}
password: jinghe2023
slave:
#配置 sqlServer
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://${DB_HOST:192.168.2.38}:1450;databaseName=demo01;encrypt=false
username: root
password: jinghe20221
druid: druid:
connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000 connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3310}/${DB_NAME:zhonghe}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=true&requireSSL=true
username: ${DB_USER:root}
#password: ${DB_PWD:jinghe2021//}
password: ${DB_PWD:jinghe2023}
# 初始连接数 # 初始连接数
initial-size: 5 initial-size: 5
# 最小连接数 # 最小连接数
...@@ -113,8 +126,8 @@ file: ...@@ -113,8 +126,8 @@ file:
path: /home/eladmin/file/ path: /home/eladmin/file/
avatar: /home/eladmin/avatar/ avatar: /home/eladmin/avatar/
windows: windows:
path: C:\eladmin\file\ path: F:\RuShanRuiBo\file\
avatar: C:\eladmin\avatar\ avatar: F:\RuShanRuiBo\avatar\
# 文件大小 /M # 文件大小 /M
maxSize: 100 maxSize: 100
avatarMaxSize: 5 avatarMaxSize: 5
#配置数据源 #配置数据源
spring: spring:
datasource: datasource:
druid: dynamic:
connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000 primary: master
db-type: com.alibaba.druid.pool.DruidDataSource datasource:
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy initialization-mode: never
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:mdm_1_db}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false master:
#driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
#url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:10101}/${DB_NAME:ruibo}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
#username: ${DB_USER:root}
#password: ${DB_PWD:jinghe2022}
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:10101}/${DB_NAME:ruibo}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:jinghe2021//} password: ${DB_PWD:jinghe2022}
slave:
#配置 sqlServer
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://${DB_HOST:192.168.10.50}:1433;databaseName=WEIGHT90;encrypt=false
username: sa
password: 00123
druid:
# 初始连接数 # 初始连接数
initial-size: 5 initial-size: 5
# 最小连接数 # 最小连接数
...@@ -94,7 +108,7 @@ jwt: ...@@ -94,7 +108,7 @@ jwt:
# IP 本地解析 # IP 本地解析
ip: ip:
local-parsing: false local-parsing: true
#是否允许生成代码,生产环境设置为false #是否允许生成代码,生产环境设置为false
generator: generator:
...@@ -120,8 +134,8 @@ file: ...@@ -120,8 +134,8 @@ file:
path: /home/eladmin/file/ path: /home/eladmin/file/
avatar: /home/eladmin/avatar/ avatar: /home/eladmin/avatar/
windows: windows:
path: C:\eladmin\file\ path: D:\RuiBo\file\
avatar: C:\eladmin\avatar\ avatar: D:\RuiBo\avatar\
# 文件大小 /M # 文件大小 /M
maxSize: 100 maxSize: 100
avatarMaxSize: 5 avatarMaxSize: 5
...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
<#if restControllerStyle> <#if restControllerStyle>
<#else> <#else>
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
......
...@@ -3,7 +3,7 @@ package ${package.Service}; ...@@ -3,7 +3,7 @@ package ${package.Service};
import ${package.Entity}.${entity}; import ${package.Entity}.${entity};
import ${superServiceClassPackage}; import ${superServiceClassPackage};
import java.util.HashMap; import java.util.HashMap;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.base.DataQueryCriteria;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List; import java.util.List;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<module>eladmin-system</module> <module>eladmin-system</module>
<module>eladmin-tools</module> <module>eladmin-tools</module>
<module>eladmin-generator</module> <module>eladmin-generator</module>
<module>eladmin-ruibo</module>
</modules> </modules>
<name>EL-ADMIN 后台管理</name> <name>EL-ADMIN 后台管理</name>
...@@ -89,13 +90,33 @@ ...@@ -89,13 +90,33 @@
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!--监控sql日志--> <!--监控sql日志-->
<dependency> <dependency>
<groupId>org.bgee.log4jdbc-log4j2</groupId> <groupId>org.bgee.log4jdbc-log4j2</groupId>
<artifactId>log4jdbc-log4j2-jdbc4.1</artifactId> <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
<version>${log4jdbc.version}</version> <version>${log4jdbc.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.yulichang/mybatis-plus-join-boot-starter -->
<dependency>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-boot-starter</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.6.1</version>
</dependency>
<!-- Swagger UI 相关 --> <!-- Swagger UI 相关 -->
<dependency> <dependency>
...@@ -135,6 +156,12 @@ ...@@ -135,6 +156,12 @@
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!--for SqlServer-->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>10.2.0.jre8</version>
</dependency>
<!-- druid数据源驱动 --> <!-- druid数据源驱动 -->
<dependency> <dependency>
...@@ -162,12 +189,12 @@ ...@@ -162,12 +189,12 @@
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.17</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>3.17</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>xerces</groupId> <groupId>xerces</groupId>
...@@ -219,6 +246,16 @@ ...@@ -219,6 +246,16 @@
<version>4.13.2</version> <version>4.13.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.ssssssss</groupId>
<artifactId>magic-api-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -233,7 +270,6 @@ ...@@ -233,7 +270,6 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<repositories> <repositories>
<repository> <repository>
<id>public</id> <id>public</id>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment