Compare commits
37 Commits
influxdb_d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d26e02f364 | ||
|
|
832a1d3972 | ||
|
|
4ec6865d5e | ||
|
|
16952f2a9f | ||
|
|
b52496609a | ||
|
|
1f9037cf85 | ||
|
|
130a85e2c9 | ||
|
|
9b6485db8d | ||
|
|
90d74beb03 | ||
|
|
c4271768e1 | ||
|
|
f51c0df5f7 | ||
|
|
285c46024b | ||
|
|
eb64434b2c | ||
|
|
3a040fe510 | ||
|
|
c87d090a71 | ||
|
|
d08bb52783 | ||
|
|
089ead49be | ||
|
|
dfaa807ff2 | ||
|
|
be3c8e9e4c | ||
| ac525609f6 | |||
|
|
805be30f64 | ||
|
|
bd46317d2b | ||
|
|
f44d78c94c | ||
|
|
dfeb83d111 | ||
|
|
f4f5766eeb | ||
|
|
c7da74d85b | ||
|
|
4f79eb01bb | ||
|
|
5bec1c3043 | ||
|
|
8d45177d10 | ||
|
|
d7c5bae22f | ||
|
|
36d2208c60 | ||
|
|
0988b0f45e | ||
|
|
ad9fdb60e4 | ||
|
|
ee953896c9 | ||
|
|
25d0c60809 | ||
|
|
f10bbd184e | ||
|
|
42323ded0d |
@ -2,7 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
@ -14,13 +13,16 @@
|
||||
<module name="gateway-server" />
|
||||
<module name="admin-server" />
|
||||
<module name="common-web" />
|
||||
<module name="common-mongodb" />
|
||||
<module name="wechat-server" />
|
||||
<module name="cloud-manage-server" />
|
||||
<module name="common-redis" />
|
||||
<module name="common-core" />
|
||||
<module name="common-influxdb" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="common-websocket" target="17" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
@ -28,11 +30,12 @@
|
||||
<module name="authorization-server" options="-parameters" />
|
||||
<module name="cloud-manage-server" options="-parameters" />
|
||||
<module name="common-core" options="-parameters" />
|
||||
<module name="common-influxdb" options="-parameters" />
|
||||
<module name="common-mongodb" options="-parameters" />
|
||||
<module name="common-mybatis" options="-parameters" />
|
||||
<module name="common-permission" options="-parameters" />
|
||||
<module name="common-redis" options="-parameters" />
|
||||
<module name="common-web" options="-parameters" />
|
||||
<module name="common-websocket" options="-parameters" />
|
||||
<module name="gateway-server" options="-parameters" />
|
||||
<module name="resource-server" options="-parameters" />
|
||||
<module name="wechat-server" options="-parameters" />
|
||||
|
||||
@ -4,11 +4,12 @@
|
||||
<file url="file://$PROJECT_DIR$/admin-server/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/authorization-server/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-core/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-influxdb/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-mongodb/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-mybatis/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-permission/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-redis/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-web/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/common-websocket/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/base-commons/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cloud-manage-server/src/main/java" charset="UTF-8" />
|
||||
|
||||
@ -7,6 +7,11 @@
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/base-commons/common-websocket/pom.xml" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="17 (2)" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
@ -1,7 +1,10 @@
|
||||
package com.evotech.hd.authorization.config.oauth2;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
@ -11,12 +14,7 @@ import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
|
||||
import org.springframework.security.oauth2.core.OAuth2Error;
|
||||
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
public class MyAuthenticationFailureHandler implements AuthenticationFailureHandler {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.authorization.config.oauth2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Map;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
@ -17,11 +17,9 @@ import org.springframework.security.oauth2.server.authorization.authentication.O
|
||||
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Map;
|
||||
|
||||
public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
|
||||
|
||||
@ -56,7 +54,7 @@ public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHand
|
||||
ServletServerHttpResponse httpResponse = new ServletServerHttpResponse(response);
|
||||
|
||||
|
||||
this.accessTokenHttpResponseConverter.write(new Result<String>().success(tokenResponseParameters), null, httpResponse);
|
||||
this.accessTokenHttpResponseConverter.write(new Result<Map<String, Object>>().success(tokenResponseParameters), null, httpResponse);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
package com.evotech.hd.authorization.config.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 登陆了,没有权限时,触发异常 返回信息
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.evotech.hd.authorization.config.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
@ -8,12 +12,7 @@ import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.oauth2.server.resource.InvalidBearerTokenException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 未认证(没有登录)时,返回异常 信息
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
package com.evotech.hd.authorization.config.security.userdetail;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.authentication.DisabledException;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class UserDetailService implements UserDetailsService {
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
package com.evotech.hd.authorization.controller;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Tag(name = "验证码")
|
||||
@RestController
|
||||
@RequestMapping("/captcha")
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
package com.evotech.hd.authorization.controller;
|
||||
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.authorization.entity.LoginRequest;
|
||||
import com.evotech.hd.authorization.entity.UserVo;
|
||||
import com.evotech.hd.authorization.service.LoginService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
@ -20,6 +11,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Tag(name = "登陆")
|
||||
@RestController
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.evotech.hd.authorization.service;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
|
||||
public interface CaptchaService {
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
public interface CloudService {
|
||||
|
||||
|
||||
@GetMapping(value = "/batterystation/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
@GetMapping(value = "/battery/station/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
public Result<List<BatteryStation>> loadBatteryStation(@RequestParam("proxyCode") String proxyCode);
|
||||
|
||||
@GetMapping(value = "/company/login/one", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
package com.evotech.hd.authorization.service;
|
||||
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
|
||||
import com.evotech.hd.authorization.entity.LoginRequest;
|
||||
import com.evotech.hd.authorization.entity.UserVo;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
|
||||
public interface LoginService {
|
||||
|
||||
|
||||
@ -21,19 +21,19 @@ public interface ResourceService {
|
||||
|
||||
@GetMapping(value = "/user/userbyname",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
||||
public Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
||||
|
||||
@PostMapping(value = "/user/userpermbyid",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
||||
public Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
||||
|
||||
@PostMapping(value = "/loginlog/add",
|
||||
consumes = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
||||
public Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
||||
|
||||
@GetMapping(value = "/logininfo/get",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
||||
public Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
||||
|
||||
@GetMapping(value = "/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
public Result<List<AuthUserStation>> loadBatteryStation(@RequestParam("uid") String uid);
|
||||
|
||||
@ -1,18 +1,16 @@
|
||||
package com.evotech.hd.authorization.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.redis.utils.RedisUtil;
|
||||
|
||||
import cn.hutool.captcha.CaptchaUtil;
|
||||
import cn.hutool.captcha.LineCaptcha;
|
||||
import cn.hutool.captcha.generator.RandomGenerator;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.redis.utils.RedisUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CaptchaServiceImpl implements CaptchaService {
|
||||
@ -32,7 +30,7 @@ public class CaptchaServiceImpl implements CaptchaService {
|
||||
String imageBase64Data = captcha.getImageBase64Data();
|
||||
String captchaId = IdUtil.fastSimpleUUID();
|
||||
redisUtil.set(HDConstant.CAPTCHA_REDIS_PREFIX + captchaId, code, captchaExpire);
|
||||
return new Result<String>().success("OK", captchaId + ":" + imageBase64Data);
|
||||
return new Result<String>().success(captchaId + ":" + imageBase64Data);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,10 +15,10 @@ import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.authorization.utils.LoginRequesHeadertUtil;
|
||||
import com.evotech.hd.authorization.utils.Oauth2AccessTokenUtil;
|
||||
import com.evotech.hd.authorization.utils.TokenUtil;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.Dto.ResultUtil;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.LoginCacheInfo;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStation;
|
||||
import com.evotech.hd.common.core.entity.cloud.Company;
|
||||
import com.evotech.hd.common.core.entity.cloud.VehicleInfo;
|
||||
@ -43,7 +43,6 @@ import org.springframework.util.StringUtils;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@ -71,7 +70,7 @@ public class LoginServiceImpl implements LoginService {
|
||||
// 1. 校验验证码
|
||||
Result<Boolean> res = captchaService.checkCaptcha(lr.getCode());
|
||||
if (res.getStatus() != 1) {
|
||||
return new Result<UserVo>().error(res.getCode(), res.getMsg());
|
||||
return new Result<UserVo>().error(CodeMsg.getCodeMsgByCode(res.getCode()), res.getMsg());
|
||||
}
|
||||
// 2. 从请求头获取client信息
|
||||
Map<String, String> oAuth2Client = LoginRequesHeadertUtil.getOAuth2Client(request);
|
||||
@ -231,13 +230,13 @@ public class LoginServiceImpl implements LoginService {
|
||||
}
|
||||
|
||||
private void asyncIndexTask(){
|
||||
CompletableFuture<Void> asyncTask = CompletableFuture.runAsync(()->{
|
||||
try {
|
||||
cloudService.loadIndexData();
|
||||
} catch (Exception e) {
|
||||
log.error("异步处理首页数据异常:{}", e.getMessage());
|
||||
}
|
||||
});
|
||||
// CompletableFuture<Void> asyncTask = CompletableFuture.runAsync(()->{
|
||||
// try {
|
||||
// cloudService.loadIndexData();
|
||||
// } catch (Exception e) {
|
||||
// log.error("异步处理首页数据异常:{}", e.getMessage());
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,10 @@
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
@ -71,6 +74,12 @@
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.58</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package com.evotech.hd.common.core.Dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Options
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:Options
|
||||
* @date: 2026年02月14日 9:54
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "下拉菜单参数")
|
||||
public class Options {
|
||||
|
||||
@Schema(description = "下拉菜单的label")
|
||||
String label;
|
||||
@Schema(description = "下拉菜单的value")
|
||||
String value;
|
||||
|
||||
public Options() {
|
||||
}
|
||||
|
||||
public Options(String label, String value) {
|
||||
this.label = label;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请求返回对象
|
||||
@ -26,9 +27,28 @@ public class Result<T> implements Serializable {
|
||||
@Schema(description = "返回数据")
|
||||
private T data;
|
||||
|
||||
public static <T> Result<T> getInstance(){
|
||||
return new Result<T>();
|
||||
}
|
||||
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public <T> Result<T> build(Class<T> cls) {
|
||||
return (Result<T>) this;
|
||||
}
|
||||
|
||||
public <T> Result<List<T>> buildList(Class<T> cls) {
|
||||
return (Result<List<T>>) this;
|
||||
}
|
||||
|
||||
public Result<T> success() {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(T o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
@ -37,6 +57,21 @@ public class Result<T> implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String errMsg) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = errMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String errMsg, T data) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = errMsg;
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg codeMsg) {
|
||||
this.status = 1;
|
||||
this.code = codeMsg.getCode();
|
||||
@ -50,4 +85,20 @@ public class Result<T> implements Serializable {
|
||||
this.msg = errorMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> exception(T data) {
|
||||
this.status = -1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = CodeMsg.ERROR.getMsg();
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> businessException(String code, String msg, T o) {
|
||||
this.status = -1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,4 +22,8 @@ public class ResultUtil {
|
||||
log.error("当前请求出现异常{}", result.getMsg());
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> Boolean verifyCode(Result<T> result){
|
||||
return CodeMsg.SUCCESS.getCode().equals(result.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto;
|
||||
package com.evotech.hd.common.core.Dto.device;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -0,0 +1,35 @@
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:HomeOrderInfo
|
||||
* @date: 2025年05月08日 17:34
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "首页换电订单信息")
|
||||
public class HomeOrderInfo {
|
||||
|
||||
@Schema(description = "换电时间")
|
||||
@JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date swapTime;
|
||||
|
||||
@Schema(description = "换电车辆")
|
||||
private String swapCar;
|
||||
|
||||
@Schema(description = "换电人")
|
||||
private String swapUserName;
|
||||
|
||||
@Schema(description = "换电金额")
|
||||
private Double swapAmount;
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -16,6 +16,15 @@ public class HomeOrderSwapBatteryAmountDto {
|
||||
|
||||
Double amount;
|
||||
|
||||
Long dataCount;
|
||||
|
||||
Integer status;
|
||||
|
||||
public HomeOrderSwapBatteryAmountDto() {
|
||||
}
|
||||
|
||||
public HomeOrderSwapBatteryAmountDto(Double amount, Long dataCount) {
|
||||
this.amount = amount;
|
||||
this.dataCount = dataCount;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -24,9 +24,9 @@ public class HomeOrderSwapBatteryHalfYearAmountDto {
|
||||
@Schema(description = "交易金额")
|
||||
private Double totalMoney;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "支付类型")
|
||||
private Integer payType;
|
||||
// @Schema(description = "类型")
|
||||
// private Integer status;
|
||||
//
|
||||
// @Schema(description = "支付类型")
|
||||
// private Integer payType;
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -22,7 +22,8 @@ public class HomeOrderSwapBatteryProportionDto {
|
||||
String stationCode;
|
||||
@Schema(description = "换电站订单数量")
|
||||
Long quantity;
|
||||
@Schema(description = "订单类型")
|
||||
Integer orderType;
|
||||
|
||||
// @Schema(description = "订单类型")
|
||||
// Integer orderType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.evotech.hd.common.core.excel.Excel;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderListVo
|
||||
* @date: 2025年05月16日 13:54
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "电子账单")
|
||||
public class OrderBillListVo {
|
||||
/***
|
||||
* 结算总金额
|
||||
*/
|
||||
@Schema(description = "订单总额")
|
||||
Double orderTotalAmount;
|
||||
/***
|
||||
* 站点名称
|
||||
*/
|
||||
@Schema(description = "站点名称")
|
||||
@Excel(name="站点名称")
|
||||
String stationName;
|
||||
/***
|
||||
* 车牌号
|
||||
*/
|
||||
@Schema(description = "车牌号")
|
||||
@Excel(name="车牌号")
|
||||
String plateNum;
|
||||
/***
|
||||
* 换电人
|
||||
*/
|
||||
@Schema(description = "换电人")
|
||||
@Excel(name="换电人")
|
||||
String preName;
|
||||
|
||||
/***
|
||||
* 换电次数
|
||||
*/
|
||||
@Schema(description = "换电次数")
|
||||
Integer orderNum;
|
||||
/***
|
||||
* 换电时间
|
||||
*/
|
||||
@Schema(description = "换电时间")
|
||||
@Excel(name="换电时间", dateFormat ="yyyy-MM-dd HH:mm:ss")
|
||||
Date orderTime;
|
||||
/***
|
||||
* 订单金额
|
||||
*/
|
||||
@Schema(description = "订单金额")
|
||||
Integer orderAmount;
|
||||
|
||||
@Excel(name="订单金额", isStatistics = true)
|
||||
@JsonIgnore
|
||||
Double orderAmountExcel;
|
||||
/***
|
||||
* 订单状态
|
||||
*/
|
||||
@Schema(description = "订单状态")
|
||||
Integer status;
|
||||
@Schema(description = "换电订单详情")
|
||||
List<OrderBillListVo> childList = Collections.emptyList();;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderDetailVo
|
||||
* @date: 2025年07月23日 15:12
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class OrderDetailVo {
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(title = "订单类型", description = "1=换电;2=充电")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(title = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(title = "订单状态", description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "订单时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(title = "换电站")
|
||||
private String stationName;
|
||||
|
||||
@Schema(title = "预约人")
|
||||
private String perName;
|
||||
|
||||
@Schema(title = "交易编码", description = "第三方收款返回的唯一标识")
|
||||
private String notifyOrderNo;
|
||||
|
||||
@Schema(title = "订单总金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(title = "计费类型", description="1-ODO, 2-SOC, 3-电量")
|
||||
private Integer feeType;
|
||||
|
||||
@Schema(title = "订单金额")
|
||||
private Integer orderFee;
|
||||
|
||||
@Schema(title = "服务金额")
|
||||
private Integer serviceFee;
|
||||
|
||||
@Schema(title = "服务开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date serviceTimeBegin;
|
||||
|
||||
@Schema(title = "服务结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date serviceTimeEnd;
|
||||
|
||||
@Schema(title = "订单开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTimeBegin;
|
||||
|
||||
@Schema(title = "订单结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTimeEnd;
|
||||
|
||||
@Schema(title = "耗电量", description = "耗电量; 如果是soc结算 则是soc的差值, ODO则是里程")
|
||||
private Double electricityQuantity;
|
||||
|
||||
@Schema(title = "开始充电的电量", description = "feeType=3时, 不为空")
|
||||
private Double electStart;
|
||||
|
||||
@Schema(title = "结束充电的电量", description = "feeType=3时, 不为空")
|
||||
private Double electEnd;
|
||||
|
||||
@Schema(title = "租借电池包仓位", description = "feeType=2时, 不为空")
|
||||
private String rentBatNo;
|
||||
|
||||
@Schema(title = "租借电池包编码", description = "feeType=2时, 不为空")
|
||||
private String rentBatCode;
|
||||
|
||||
@Schema(title = "租借电池包SOC", description = "feeType=2时, 不为空")
|
||||
private Double rentBatSoc;
|
||||
|
||||
@Schema(title = "归还电池包仓位", description = "feeType=2时, 不为空")
|
||||
private String returnBatNo;
|
||||
@Schema(title = "归还电池包编码", description = "feeType=2时, 不为空")
|
||||
private String returnBatCode;
|
||||
|
||||
@Schema(title = "归还电池包SOC", description = "feeType=2时, 不为空")
|
||||
private Double returnBatSoc;
|
||||
|
||||
@Schema(title = "换电模式", description="1-全自动; 2-半自动; 3-人工干预")
|
||||
private Integer changeMode;
|
||||
|
||||
@Schema(title = "换电车道", description="1-换电车道A; 2-换电车道B")
|
||||
private Integer changeLane;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.evotech.hd.common.core.excel.Excel;
|
||||
import com.evotech.hd.common.core.excel.handler.impl.OrderSourceExcelHandlerAdapter;
|
||||
import com.evotech.hd.common.core.excel.handler.impl.OrderStatusExcelHandlerAdapter;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* OrderExportVo
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:OrderExportVo
|
||||
* @date: 2026年02月10日 10:13
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class OrderExportVo {
|
||||
|
||||
@Excel(name="序号", needMerge=true)
|
||||
Integer serialNumber;
|
||||
@Excel(name="订单编号", needMerge=true)
|
||||
String orderNo;
|
||||
@Excel(name="站点名称", needMerge=true)
|
||||
String stationName;
|
||||
@Excel(name="订单来源", needMerge=true, handler = OrderSourceExcelHandlerAdapter.class)
|
||||
String orderSource;
|
||||
@Excel(name="换电结果", needMerge=true, handler = OrderStatusExcelHandlerAdapter.class)
|
||||
String orderType;
|
||||
@Excel(name="车牌号", needMerge=true)
|
||||
String plateNum;
|
||||
@Excel(name="拆卸电池编号", needMerge=true)
|
||||
String returnBatCode;
|
||||
@Excel(name="拆卸电池SOC", needMerge=true)
|
||||
String returnBatSoc;
|
||||
@Excel(name="安装电池编号", needMerge=true)
|
||||
String rentBatCode;
|
||||
@Excel(name="安装电池SOC", needMerge=true)
|
||||
String rentBatSoc;
|
||||
@Excel(name="车辆进站时间", dateFormat = "yyyy-MM-dd HH:mm:ss", needMerge=true)
|
||||
Date serviceTimeBegin;
|
||||
@Excel(name="服务结束时间", dateFormat = "yyyy-MM-dd HH:mm:ss", needMerge=true)
|
||||
Date serviceTimeEnd;
|
||||
@Excel(name="服务耗时", needMerge=true)
|
||||
String serviceDuration;
|
||||
@Excel(name="换电开始时间", dateFormat = "yyyy-MM-dd HH:mm:ss", needMerge=true)
|
||||
Date startTime;
|
||||
@Excel(name="换电结束时间", dateFormat = "yyyy-MM-dd HH:mm:ss", needMerge=true)
|
||||
Date closeTime;
|
||||
@Excel(name="换电耗时", needMerge=true)
|
||||
String batteryDuration;
|
||||
@Excel(name="流程是否完整", needMerge=true)
|
||||
String processComplete;
|
||||
@Excel(name="换电步骤")
|
||||
List<OrderStepExportVo> stepList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderListVo
|
||||
* @date: 2025年05月16日 13:54
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "订单列表")
|
||||
public class OrderListVo {
|
||||
|
||||
@Schema(description = "唯一标识")
|
||||
private Integer pkId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(name = "订单类型", description = "1=换电;2=充电")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(name = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(name = "换电站")
|
||||
private String stationName;
|
||||
|
||||
@Schema(name = "订单金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(name = "预约人")
|
||||
private String perName;
|
||||
|
||||
@Schema(name = "订单时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(name = "订单状态", description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(name = "交易编码", description = "第三方收款返回的唯一标识")
|
||||
private String notifyOrderNo;
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.evotech.hd.common.core.excel.Excel;
|
||||
import com.evotech.hd.common.core.excel.handler.impl.OrderStepExcelHandlerAdapter;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* OrderDetailExportVo
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:OrderDetailExportVo
|
||||
* @date: 2026年02月10日 14:18
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class OrderStepExportVo {
|
||||
Integer step;
|
||||
@Excel(name="步骤", handler = OrderStepExcelHandlerAdapter.class)
|
||||
String stepName;
|
||||
@Excel(name="时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
Date stepTime;
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.evotech.hd.common.core.Dto.request.order;
|
||||
|
||||
import com.evotech.hd.common.core.entity.BasePageRequest;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderRequest
|
||||
* @date: 2025年05月16日 15:28
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "查询订单请求参数", hidden = true)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class OrderRequest extends BasePageRequest {
|
||||
|
||||
@Schema(description = "订单编码")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(description = "订单时间开始", example = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTimeBegin;
|
||||
|
||||
@Schema(description = "订单时间结束")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTimeEnd;
|
||||
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.evotech.hd.common.core.Dto.request.template;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:AlarmTemplateDto
|
||||
* @date: 2025年05月05日 16:29
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AlarmTemplateDto {
|
||||
|
||||
List<String> wuid;
|
||||
|
||||
String stationName;
|
||||
|
||||
String alarmMsg;
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.evotech.hd.common.core.Dto.request.template;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:AlarmTemplateDto
|
||||
* @date: 2025年05月05日 16:29
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class StopServerTemplateDto {
|
||||
|
||||
/***
|
||||
* key 为 用户的wuid, value为用户的车牌号信息
|
||||
*/
|
||||
Map<String,String> plateNum;
|
||||
|
||||
/***
|
||||
* 站管理员的wuid
|
||||
*/
|
||||
List<String> adminWuId;
|
||||
|
||||
String stationName;
|
||||
|
||||
String reason;
|
||||
}
|
||||
@ -2,6 +2,18 @@ package com.evotech.hd.common.core.constant;
|
||||
|
||||
public interface HDConstant {
|
||||
|
||||
/***
|
||||
* 全局删除标识-已删除
|
||||
*/
|
||||
final static Integer DELETE_YES = 1;
|
||||
/***
|
||||
* 全局删除标识-未删除
|
||||
*/
|
||||
final static Integer DELETE_NO = 0;
|
||||
|
||||
final static String PUBLIC_KEY="public_key";
|
||||
final static String PRIVATE_KEY="private_key";
|
||||
|
||||
/***
|
||||
* 大华设备相关CONSTANT
|
||||
*/
|
||||
@ -12,6 +24,133 @@ public interface HDConstant {
|
||||
|
||||
}
|
||||
|
||||
final class DcConstant{
|
||||
/** 出租中 */
|
||||
public static final Integer STATUS_CZ = 1;
|
||||
/** 充电中 */
|
||||
public static final Integer STATUS_CD = 2;
|
||||
/** 空闲 */
|
||||
public static final Integer STATUS_KX = 3;
|
||||
/** 故障 */
|
||||
public static final Integer STATUS_GZ = 4;
|
||||
/** 其他 */
|
||||
public static final Integer STATUS_QT = 5;
|
||||
|
||||
/** 来源_电站 */
|
||||
public static final Integer SOURCE_FROM_STATION = 1;
|
||||
/** 来源_车 */
|
||||
public static final Integer SOURCE_FROM_CAR = 2;
|
||||
|
||||
/** 电站 */
|
||||
public static final Integer POINT_TYPE_STATION = 1;
|
||||
/** 车 */
|
||||
public static final Integer POINT_TYPE_CAR = 2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* 订单相关参数
|
||||
*/
|
||||
final class OrderConstant{
|
||||
|
||||
/***
|
||||
* 计费方式-ODO(里程数)
|
||||
*/
|
||||
public static final int FEE_TYPE_ODO = 1;
|
||||
/***
|
||||
* 计费方式-SOC(电池百分比)
|
||||
*/
|
||||
public static final int FEE_TYPE_SOC = 2;
|
||||
/***
|
||||
* 计费方式-电量
|
||||
*/
|
||||
public static final int FEE_TYPE_DL = 3;
|
||||
/***
|
||||
* 换电模式 全自动
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_AUTOMATIC = 1;
|
||||
/***
|
||||
* 换电模式 半自动
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_AUTOMATIC_SEMI = 2;
|
||||
/***
|
||||
* 换电模式 人工干预
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_ARTIFICIAL = 3;
|
||||
/***
|
||||
* 换电车道 A
|
||||
*/
|
||||
public static final Integer CHANGE_LANE_A = 1;
|
||||
/***
|
||||
* 换电车道 B
|
||||
*/
|
||||
public static final Integer CHANGE_LANE_B = 2;
|
||||
|
||||
/***
|
||||
* 订单类型-充电
|
||||
*/
|
||||
public static final Integer ORDER_TYPE_CHARGING = 2;
|
||||
/***
|
||||
* 订单类型-换电
|
||||
*/
|
||||
public static final Integer ORDER_TYPE_SWAP = 1;
|
||||
|
||||
/***
|
||||
* 支付方式-支付宝支付
|
||||
*/
|
||||
public static final String PAY_TYPE_ALI_PAY = "aliPay";
|
||||
/***
|
||||
* 支付方式-微信支付
|
||||
*/
|
||||
public static final String PAY_TYPE_WECHAT_PAY = "wechatPay";
|
||||
/***
|
||||
* 支付方式-余额支付
|
||||
*/
|
||||
public static final String PAY_TYPE_BALANCE_PAY = "balancePay";
|
||||
|
||||
|
||||
|
||||
//
|
||||
// /***
|
||||
// * 订单状态-已创建
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CREATE = 1;
|
||||
// /***
|
||||
// * 订单状态-换电中
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_BATTERY_SWAPPING = 2;
|
||||
// /***
|
||||
// * 订单状态-换电完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_BATTERY_SWAPPING_END = 3;
|
||||
// /***
|
||||
// * 订单状态-充电中
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CHARGING = 4;
|
||||
// /***
|
||||
// * 订单状态-充电完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CHARGING_END = 5;
|
||||
// /***
|
||||
// * 订单状态-待结算
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_TO_BE_SETTLED = 6;
|
||||
// /***
|
||||
// * 订单状态-已完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_END = 7;
|
||||
// /***
|
||||
// * 订单状态-已取消
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CLOSE = 9;
|
||||
// /***
|
||||
// * 订单状态-退款
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_REFUND = -1;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* 大华设备相关CONSTANT
|
||||
*/
|
||||
@ -33,7 +172,6 @@ public interface HDConstant {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 权限相关CONSTANT
|
||||
*/
|
||||
@ -113,14 +251,14 @@ public interface HDConstant {
|
||||
*/
|
||||
String JWT_PAYLOAD_KEY = "payload";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* jwt中添加的属性
|
||||
*/
|
||||
String USER_ID_KEY = "uid";
|
||||
String ROLE_CODE_KEY = "rcodes";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 登陆验证码缓存key
|
||||
* hd:login:captcha: + captchaId
|
||||
@ -132,37 +270,37 @@ public interface HDConstant {
|
||||
* key: hd:login:jti:token
|
||||
*/
|
||||
String LOGIN_CACHE_KEY_PREFIX = "hd:login:";
|
||||
|
||||
|
||||
/**
|
||||
* 缓存系统token有效时间,s
|
||||
*/
|
||||
String HD_CACHE_TOKEN_EXP_KEY = "hd:cache:tokenExp";
|
||||
|
||||
|
||||
/**
|
||||
* 资源权限类型
|
||||
*/
|
||||
String RESOURCE_TYPE_PERM = "PER";
|
||||
String RESOURCE_TYPE_MENU = "MENU";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 交换数据非对称加密RSA秘钥前缀
|
||||
*/
|
||||
String HD_STATION_SECRET_KEY_RSA_PREFIX = "hd:station:secretKey:rsa:";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 交换数据对称加密AES秘钥前缀
|
||||
* 交换数据对称加密AES秘钥前缀
|
||||
*/
|
||||
String HD_STATION_SECRET_KEY_AES_PREFIX = "hd:station:secretKey:aes:";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 微信服务请求头中权限验证字段
|
||||
*/
|
||||
String WECHAT_SERVER_AUTHORIZATION_KEY = "WXUID";
|
||||
String WECHAT_SERVER_TOKEN_KEY = "WXTOKEN";
|
||||
|
||||
|
||||
/**
|
||||
* 微信登录缓存数据前缀
|
||||
*/
|
||||
@ -176,4 +314,8 @@ public interface HDConstant {
|
||||
* 预约单失效前缀
|
||||
*/
|
||||
String preOrder="pre_order:";
|
||||
/***
|
||||
* 站控推送策略
|
||||
*/
|
||||
String STRATEGY_NAME = "站控推送";
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.common.AlarmTemplate;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2025-02-10
|
||||
*/
|
||||
public interface AlarmTemplateDao extends BaseMapper<AlarmTemplate> {
|
||||
|
||||
}
|
||||
@ -16,4 +16,6 @@ import java.util.List;
|
||||
public interface BatteryStationCdStrategyDao extends BaseMapper<BatteryStationCdStrategy> {
|
||||
|
||||
List<BatteryStationCdStrategy> listCdStrategy(@Param("stationCode") String stationCode, @Param("status") Integer status);
|
||||
|
||||
BatteryStationCdStrategy getBatteryStationCdStrategyByName(@Param("stationCode") String stationCode, @Param("name") String name);
|
||||
}
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.Dto.order.OrderExportVo;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PageListSwapOrderRequest;
|
||||
import com.evotech.hd.common.core.entity.order.Order;
|
||||
import com.evotech.hd.common.core.Dto.home.*;
|
||||
import com.evotech.hd.common.core.Dto.request.HomeRequestDto;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
import com.evotech.hd.common.core.permission.DataScopes;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:OrderMapper
|
||||
* @date: 2025年05月16日 14:00
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@DataScopes({
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
||||
@DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "plate_num", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_CAR_CODE),
|
||||
})
|
||||
//@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
public interface OrderDao extends BaseMapper<Order> {
|
||||
|
||||
List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
|
||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
//因为站端不需要显示金额, 所有重新写一个
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
Long homeFindOrderCountData(@Param("date") Date date);
|
||||
|
||||
Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
|
||||
List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
||||
|
||||
List<Order> findBillList(@Param("companyCode") String companyCode, @Param("orderTimeEnd")String orderTimeEnd);
|
||||
|
||||
|
||||
List<OrderExportVo> findExportList(PageListSwapOrderRequest plsor);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.order.OrderDetail;
|
||||
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:OrderDetailDap
|
||||
* @date: 2025年05月17日 11:09
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface OrderDetailDao extends BaseMapper<OrderDetail> {
|
||||
}
|
||||
@ -1,20 +1,10 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.Dto.request.HomeRequestDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryHalfYearDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryProportionDto;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
import com.evotech.hd.common.core.permission.DataScopeOpenMethod;
|
||||
import com.evotech.hd.common.core.permission.DataScopes;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -24,20 +14,24 @@ import java.util.List;
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
||||
@DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "plate_num", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_CAR_CODE),
|
||||
})
|
||||
@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
//@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
public interface OrderSwapBatteryDao extends BaseMapper<OrderSwapBattery> {
|
||||
|
||||
//
|
||||
// List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
Long homeFindOrderCountData(@Param("date") Date date);
|
||||
|
||||
Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
//因为站端不需要显示金额, 所有重新写一个
|
||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// Long homeFindOrderCountData(@Param("date") Date date);
|
||||
//
|
||||
// Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
//
|
||||
// List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.system.SysParam;
|
||||
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:SysParamDao
|
||||
* @date: 2025年07月02日 14:32
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface SysParamDao extends BaseMapper<SysParam> {
|
||||
}
|
||||
@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -12,4 +15,6 @@ import com.evotech.hd.common.core.permission.DataScope;
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "creater", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_AUTH_USER_UID)
|
||||
public interface AuthUserDao extends BaseMapper<AuthUser> {
|
||||
|
||||
List<String> findWuIdByStationCodeAndProxyCode(@Param("stationCode") String stationCode, @Param("proxyCode") String proxyCode);
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.evotech.hd.common.core.dao.resource.auth;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUserStation;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
|
||||
/**
|
||||
* @desc: 用户和充电站的关联
|
||||
@ -11,5 +13,7 @@ import com.evotech.hd.common.core.entity.resource.auth.AuthUserStation;
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
public interface AuthUserStationDao extends BaseMapper<AuthUserStation> {
|
||||
}
|
||||
|
||||
@ -2,16 +2,12 @@ package com.evotech.hd.common.core.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@ -21,26 +17,16 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "BaseEntity", description = "基础实体类")
|
||||
public class BaseEntity implements Serializable {
|
||||
public class BaseEntity extends IdEntity {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "pk_id", type = IdType.AUTO)
|
||||
@Hidden
|
||||
private Integer pkId;
|
||||
|
||||
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String creater;
|
||||
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date ctime;
|
||||
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private String updater;
|
||||
@ -51,4 +37,10 @@ public class BaseEntity implements Serializable {
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date uptime;
|
||||
|
||||
public BaseEntity() {
|
||||
}
|
||||
|
||||
public BaseEntity(Integer pkId) {
|
||||
super(pkId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.evotech.hd.common.core.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:IdEntity
|
||||
* @date: 2025年05月16日 11:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class IdEntity implements Serializable {
|
||||
|
||||
|
||||
@TableId(value = "pk_id", type = IdType.AUTO)
|
||||
@Hidden
|
||||
private Integer pkId;
|
||||
|
||||
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date ctime;
|
||||
|
||||
public IdEntity() {
|
||||
}
|
||||
|
||||
public IdEntity(Integer pkId) {
|
||||
this.pkId = pkId;
|
||||
}
|
||||
}
|
||||
@ -1,164 +1,171 @@
|
||||
package com.evotech.hd.common.core.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @date 2024年9月2日17:25:54
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "请求返回对象")
|
||||
public class Result<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7806513009135956518L;
|
||||
|
||||
@Schema(description = "请求处理状态", example = "1")
|
||||
private Integer status;
|
||||
@Schema(description = "状态码", example = "1000")
|
||||
private String code;
|
||||
@Schema(description = "返回消息")
|
||||
private String msg;
|
||||
@Schema(description = "返回数据")
|
||||
private Object data;
|
||||
|
||||
private T obj;
|
||||
|
||||
|
||||
public Result(Integer status, String code, String msg, Object data) {
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Result(Integer status, String msg, Object data) {
|
||||
this.status = status;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Result(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public Result(Integer status, String code, String msg) {
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Result(Integer status, String msg) {
|
||||
this.status = status;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Result<T> success(Object o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String msg, Object o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String msg) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = msg;
|
||||
this.data = CodeMsg.SUCCESS.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String code, String msg, Object o) {
|
||||
this.status = 1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(CodeMsg cm, Object o) {
|
||||
this.status = 0;
|
||||
this.code = cm.getCode();
|
||||
this.msg = cm.getMsg();
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String msg) {
|
||||
this.status = 0;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = msg;
|
||||
this.data = "ERROR";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String code, String msg) {
|
||||
this.status = 0;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = "ERROR";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg cm) {
|
||||
this.status = 0;
|
||||
this.code = cm.getCode();
|
||||
this.msg = cm.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg cm, Object o) {
|
||||
return error(cm.getCode(), cm.getMsg(), o);
|
||||
}
|
||||
|
||||
public Result<T> error(String code, String msg, Object o) {
|
||||
this.status = 0;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String msg, Object o) {
|
||||
this.status = 0;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Result<T> exception(Object data) {
|
||||
this.status = -1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = CodeMsg.ERROR.getMsg();
|
||||
this.data = data==null?"未知异常":data;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Result<T> bussinessException(String code, String msg, Object o) {
|
||||
this.status = -1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
//package com.evotech.hd.common.core.entity;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
//
|
||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
||||
//import lombok.Data;
|
||||
//
|
||||
///**
|
||||
// * @author zrb
|
||||
// * @date 2024年9月2日17:25:54
|
||||
// */
|
||||
//@Data
|
||||
//@Schema(name = "请求返回对象")
|
||||
//public class Result<T> implements Serializable {
|
||||
//
|
||||
// private static final long serialVersionUID = -7806513009135956518L;
|
||||
//
|
||||
// @Schema(description = "请求处理状态", example = "1")
|
||||
// private Integer status;
|
||||
// @Schema(description = "状态码", example = "1000")
|
||||
// private String code;
|
||||
// @Schema(description = "返回消息")
|
||||
// private String msg;
|
||||
// @Schema(description = "返回数据")
|
||||
// private Object data;
|
||||
//
|
||||
// private T obj;
|
||||
//
|
||||
//
|
||||
// public Result(Integer status, String code, String msg, Object data) {
|
||||
// this.status = status;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = data;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String msg, Object data) {
|
||||
// this.status = status;
|
||||
// this.msg = msg;
|
||||
// this.data = data;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status) {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// public Result() {
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String code, String msg) {
|
||||
// this.status = status;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String msg) {
|
||||
// this.status = status;
|
||||
// this.msg = msg;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success() {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String msg, Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String msg) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = CodeMsg.SUCCESS.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String code, String msg, Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(CodeMsg cm, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = cm.getCode();
|
||||
// this.msg = cm.getMsg();
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String msg) {
|
||||
// this.status = 0;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = "ERROR";
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String code, String msg) {
|
||||
// this.status = 0;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = "ERROR";
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(CodeMsg cm) {
|
||||
// this.status = 0;
|
||||
// this.code = cm.getCode();
|
||||
// this.msg = cm.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(CodeMsg cm, Object o) {
|
||||
// return error(cm.getCode(), cm.getMsg(), o);
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String code, String msg, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String msg, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Result<T> exception(Object data) {
|
||||
// this.status = -1;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = CodeMsg.ERROR.getMsg();
|
||||
// this.data = data==null?"未知异常":data;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Result<T> bussinessException(String code, String msg, Object o) {
|
||||
// this.status = -1;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@ -27,6 +27,11 @@ public class BatteryStation extends BaseEntity implements Serializable {
|
||||
@Schema(description = "归属运营商ID", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "无关联运营商信息")
|
||||
private String proxyId;
|
||||
@Schema(description = "运营商名称", requiredMode = RequiredMode.REQUIRED)
|
||||
@TableField(exist = false)
|
||||
private String poname;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "站点名称", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "站点名称不能为空")
|
||||
@ -57,6 +62,10 @@ public class BatteryStation extends BaseEntity implements Serializable {
|
||||
@Schema(description = "地址-区县")
|
||||
private String addressArea;
|
||||
|
||||
@Schema(description = "区划编码", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "区划编码不能为空")
|
||||
private String divisionNo;
|
||||
|
||||
@Schema(description = "注册日期")
|
||||
private String registerDate;
|
||||
|
||||
@ -131,4 +140,7 @@ public class BatteryStation extends BaseEntity implements Serializable {
|
||||
|
||||
@Schema(description = "场地Code--DH")
|
||||
private String orgCode;
|
||||
|
||||
@Schema(description = "告警状态", hidden = true)
|
||||
private Boolean alarm;
|
||||
}
|
||||
|
||||
@ -1,22 +1,16 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2025-02-10
|
||||
@ -50,4 +44,18 @@ public class BatteryStationCdStrategyDetail extends BaseEntity implements Serial
|
||||
|
||||
@Schema(description = "充电功率")
|
||||
private Double chargingPower;
|
||||
|
||||
/***
|
||||
* 数据状态, 1正常, 2修改, 3删除
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer dataType = 1;
|
||||
|
||||
public BatteryStationCdStrategyDetail() {
|
||||
}
|
||||
|
||||
public BatteryStationCdStrategyDetail(Integer pkId, Integer dataType) {
|
||||
super(pkId);
|
||||
this.dataType = dataType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,7 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@ -18,6 +9,8 @@ import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-10-17
|
||||
@ -54,11 +47,16 @@ public class BatteryStationDc extends BaseEntity implements Serializable {
|
||||
@Schema(description = "站码或车牌照", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank
|
||||
private String sourceCode;
|
||||
|
||||
/***
|
||||
* 具体参考 HDConstant.DcConstant.STATUS_*
|
||||
*/
|
||||
@Schema(description = "状态:1-出租中,2-充电中,3-空闲,4-故障,5-其它", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
||||
/***
|
||||
* 具体参考 HDConstant.DcConstant.POINT_TYPE_*
|
||||
*/
|
||||
@Schema(description = "轨迹点类型:1-电站,2-车辆")
|
||||
private Integer pointType;
|
||||
|
||||
@ -72,7 +70,7 @@ public class BatteryStationDc extends BaseEntity implements Serializable {
|
||||
private Integer soc;
|
||||
|
||||
@Schema(description = "电池仓位号")
|
||||
private Integer dccNo;
|
||||
private String dccNo;
|
||||
|
||||
@Schema(description = "删除标志:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@ -1,27 +1,19 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-10-17
|
||||
@ -44,6 +36,9 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "基本服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "开始日期", requiredMode = RequiredMode.REQUIRED, example = DatePattern.PURE_DATE_PATTERN)
|
||||
@NotBlank(message = "开始时间不能为空")
|
||||
private String dayBegin;
|
||||
@ -61,6 +56,9 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
||||
@Schema(description = "每度电收费")
|
||||
private BigDecimal eachKwhFee;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "正常换电服务费")
|
||||
private BigDecimal commonRemainFee;
|
||||
|
||||
|
||||
@ -1,26 +1,19 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -42,6 +35,9 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
||||
@NotNull
|
||||
private Integer standardId;
|
||||
|
||||
@Schema(description = "服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "每公里收费")
|
||||
private BigDecimal eachKmFee;
|
||||
|
||||
@ -61,6 +57,5 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_TIME_PATTERN)
|
||||
private LocalTime timeEnd;
|
||||
|
||||
@Schema(description = "谷段服务费")
|
||||
private BigDecimal timeServiceFee;
|
||||
|
||||
}
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("hd_cloud_manage.yt_t_order_recharge")
|
||||
@Schema(name = "充值订单")
|
||||
public class OrderRecharge extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "订单时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(description = "订单编码", hidden = true)
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "换电站名称")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "钱包账户账号")
|
||||
private String accountCode;
|
||||
|
||||
@Schema(description = "充值账号ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
}
|
||||
@ -25,16 +25,16 @@ import java.util.Date;
|
||||
public class OrderSwapBattery extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@Schema(description = "预约订单ID")
|
||||
private Integer orderPreId;
|
||||
|
||||
|
||||
@Schema(description = "预约用户")
|
||||
private String orderPreUid;
|
||||
|
||||
|
||||
@Schema(description = "预约用户名称")
|
||||
private String orderPreUname;
|
||||
|
||||
|
||||
@Schema(description = "预约用户手机")
|
||||
private String orderPrePhone;
|
||||
|
||||
@ -104,7 +104,7 @@ public class OrderSwapBattery extends BaseEntity implements Serializable {
|
||||
|
||||
@Schema(description = "按ODO换电费")
|
||||
private BigDecimal odoAmount;
|
||||
|
||||
|
||||
@Schema(description = "充电开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@ -153,10 +153,10 @@ public class OrderSwapBattery extends BaseEntity implements Serializable {
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
@Schema(description = "交易编码", hidden = true)
|
||||
private String tradeNo;
|
||||
|
||||
|
||||
@Schema(description = "备注信息")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@ -1,21 +1,17 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -35,7 +31,7 @@ public class OrderSwapBatteryPre extends BaseEntity implements Serializable {
|
||||
@Schema(description = "来源是站端时,记录发送Id,其他来源不需要", hidden = true)
|
||||
private String sourceId;
|
||||
|
||||
@Schema(description = "预约人编码", requiredMode = RequiredMode.REQUIRED)
|
||||
@Schema(description = "预约人的微信Id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String ucode;
|
||||
|
||||
@Schema(description = "预约人姓名", requiredMode = RequiredMode.REQUIRED)
|
||||
|
||||
@ -1,19 +1,15 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-12-11
|
||||
@ -35,6 +31,7 @@ public class OrderSwapBatteryStep extends BaseEntity implements Serializable {
|
||||
private String stepName;
|
||||
|
||||
@Schema(description = "步骤时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date stepTime;
|
||||
}
|
||||
|
||||
@ -1,19 +1,15 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
@ -28,38 +24,34 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "交易人")
|
||||
@Schema(description = "交易人微信Id")
|
||||
private String plateCompanyCode;
|
||||
|
||||
@Schema(description = "交易人name")
|
||||
private String trader;
|
||||
|
||||
@Schema(description = "交易人编码")
|
||||
@Schema(description = "交易人微信Id")
|
||||
private String traderCode;
|
||||
|
||||
@Schema(description = "交易类型:1-充值,2-订单消费,3-提现")
|
||||
private Integer tradeType;
|
||||
|
||||
@Schema(description = "变动金额的钱包账户,钱包金额不变时不需要")
|
||||
private String wallet;
|
||||
|
||||
@Schema(description = "appid")
|
||||
private String appid;
|
||||
|
||||
@Schema(description = "银行类型")
|
||||
private String bankType;
|
||||
|
||||
@Schema(description = "收款商户号")
|
||||
private String mchid;
|
||||
|
||||
@Schema(description = "微信支付API类型")
|
||||
private String wechatPayApiType;
|
||||
|
||||
@Schema(description = "订单总描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String outTradeNo;
|
||||
|
||||
@Schema(description = "支付方式:1-账户余额,2-微信,3-支付宝,4-网银,5 -充电补偿")
|
||||
@Schema(description = "交易类型:1-充值,2-订单消费,3-退款, 9-提现")
|
||||
private Integer tradeType;
|
||||
|
||||
@Schema(description = "支付方式:1-账户余额,2-微信,3-支付宝,4-网银,5 -充电补偿, 6-公对公转账")
|
||||
private Integer payType;
|
||||
@Schema(description = "微信支付API类型")
|
||||
private String wechatPayApiType;
|
||||
/***
|
||||
* 交易信息
|
||||
*/
|
||||
private String tradeMessage;
|
||||
/***
|
||||
* 交易账号
|
||||
*/
|
||||
// @Schema(description = "变动金额的钱包账户,钱包金额不变时不需要")
|
||||
private String payAccount;
|
||||
|
||||
@Schema(description = "订单数量")
|
||||
private Integer orderCount;
|
||||
@ -79,15 +71,12 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "微信支付订单号")
|
||||
private String transactionId;
|
||||
|
||||
@Schema(description = "支付结果,暂用微信结果的枚举类型")
|
||||
@Schema(description = "支付结果,暂用微信结果的枚举类型, 新增 paymentInProgress 结算中类型")
|
||||
private String payResult;
|
||||
|
||||
@Schema(description = "在微信等支付网关创建支付订单时失败,返回的失败原因")
|
||||
private String payMsg;
|
||||
|
||||
@Schema(description = "付款人编码,对于个人账户,交易发起人和付款人一般是同一人。公司账户交易发起人是公司,付款人可能是 微信账户")
|
||||
private String payer;
|
||||
|
||||
private String payWechatId;
|
||||
|
||||
@Schema(description = "支付完成时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@ -96,12 +85,33 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "删除标识,1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(description = "退款结果: 0-未退款, 1-退款中,2-已退款, 3-退款失败")
|
||||
private Integer refundResult;
|
||||
@Schema(description = "appid")
|
||||
private String appid;
|
||||
//
|
||||
@Schema(description = "银行类型")
|
||||
private String bankType;
|
||||
|
||||
@Schema(description = "在微信等退款网关创建退款订单时失败,返回的失败原因")
|
||||
private String refundMsg;
|
||||
@Schema(description = "收款商户号")
|
||||
private String mchid;
|
||||
|
||||
@Schema(description = "退款返回数据")
|
||||
private String refundReturn;
|
||||
@Schema(description = "订单总描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "状态: edit-编辑中, submit-提交. finish-完成, reject-打回")
|
||||
private String status;
|
||||
|
||||
|
||||
// @Schema(description = "在微信等支付网关创建支付订单时失败,返回的失败原因")
|
||||
// private String payMsg;
|
||||
|
||||
|
||||
|
||||
// @Schema(description = "退款结果: 0-未退款, 1-退款中,2-已退款, 3-退款失败")
|
||||
// private Integer refundResult;
|
||||
//
|
||||
// @Schema(description = "在微信等退款网关创建退款订单时失败,返回的失败原因")
|
||||
// private String refundMsg;
|
||||
//
|
||||
// @Schema(description = "退款返回数据")
|
||||
// private String refundReturn;
|
||||
}
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
package com.evotech.hd.common.core.entity.cloud.request;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.evotech.hd.common.core.entity.BasePageRequest;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@ -54,6 +52,9 @@ public class PageListSwapOrderRequest extends BasePageRequest {
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String ccode;
|
||||
|
||||
@Schema(description = "运营商code")
|
||||
private String proCode;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -28,4 +28,7 @@ public class PageListWalletRequest extends BasePageRequest {
|
||||
@Schema(description = "引入站点")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "客户电话")
|
||||
private String phone;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.evotech.hd.common.core.entity.cloud.request;
|
||||
|
||||
import com.evotech.hd.common.core.entity.BasePageRequest;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(name = "查询资金账户请求参数", hidden = true)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class PrePayRequest extends BasePageRequest {
|
||||
|
||||
@Schema(description = "用户编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank
|
||||
private String wuid;
|
||||
@Schema(description = "支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(100000000)
|
||||
private Integer total;
|
||||
@Schema(description = "商户订单号")
|
||||
private String outTradeNo;
|
||||
@Schema(description = "微信支付订单号")
|
||||
private String transactionId;
|
||||
@Schema(description = "退款原因")
|
||||
private String reason;
|
||||
@Schema(description = "金额")
|
||||
private Integer money;
|
||||
@Schema(description = "支付方式")
|
||||
private Integer payType;
|
||||
@Schema(description = "交易类型")
|
||||
private Integer tradeType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,158 @@
|
||||
package com.evotech.hd.common.core.entity.cloud.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderVo
|
||||
* @date: 2025年06月20日 16:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class OrderVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "预约订单ID")
|
||||
private Integer orderPreId;
|
||||
|
||||
@Schema(description = "预约用户")
|
||||
private String orderPreUid;
|
||||
|
||||
@Schema(description = "预约用户名称")
|
||||
private String orderPreUname;
|
||||
|
||||
@Schema(description = "预约用户手机")
|
||||
private String orderPrePhone;
|
||||
|
||||
@NotNull(message = "订单类型不能为空")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(description = "订单编码", hidden = true)
|
||||
private String orderNo;
|
||||
|
||||
@NotBlank(message = "车牌号不能为空")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(description = "订单时间", example = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@NotBlank(message = "换电站编码不能为空")
|
||||
private String stationCode;
|
||||
|
||||
@NotBlank(message = "换电站名称不能为空")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "金额账号")
|
||||
private String accountCode;
|
||||
|
||||
@Schema(description = "订单金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "计算费用方式:1-ODO,2-SOC,3-按电量")
|
||||
private Integer feeType;
|
||||
|
||||
@Schema(description = "基础费用")
|
||||
private BigDecimal basicFee;
|
||||
|
||||
@Schema(description = "服务开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeBegin;
|
||||
|
||||
@Schema(description = "服务结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeEnd;
|
||||
|
||||
@Schema(description = "服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "费用标准")
|
||||
private String feeStandardJson;
|
||||
@Schema(description = "费用标准详情")
|
||||
@TableField(exist = false)
|
||||
private BatteryStationHdFeeStandard feeStandardDetail;
|
||||
|
||||
@Schema(description = "上次租赁电池时车辆里程")
|
||||
private BigDecimal lastRentBatCarOdo;
|
||||
|
||||
@Schema(description = "归还电池时车辆里程")
|
||||
private BigDecimal nowReturnBatCarOdo;
|
||||
|
||||
@Schema(description = "按ODO换电费")
|
||||
private BigDecimal odoAmount;
|
||||
|
||||
@Schema(description = "充电开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeBegin;
|
||||
|
||||
@Schema(description = "充电结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeEnd;
|
||||
|
||||
@Schema(description = "总充电量")
|
||||
private BigDecimal electAmount;
|
||||
|
||||
@Schema(description = "租借电池包仓位")
|
||||
private Integer rentBatNo;
|
||||
|
||||
@Schema(description = "租用电池包编码")
|
||||
private String rentBatCode;
|
||||
|
||||
@Schema(description = "租用电池包SOC")
|
||||
private Integer rentBatSoc;
|
||||
|
||||
@Schema(description = "归还电池包编码")
|
||||
private String returnBatCode;
|
||||
|
||||
@Schema(description = "归还电池包仓位")
|
||||
private Integer returnBatNo;
|
||||
|
||||
@Schema(description = "归还电池包SOC")
|
||||
private Integer returnBatSoc;
|
||||
|
||||
@Schema(description = "归还电池租出时soc")
|
||||
private Integer returnBatRentSoc;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站编码")
|
||||
private String returnBatRentStationCode;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站")
|
||||
private String returnBatRentStationName;
|
||||
|
||||
@Schema(description = "换电模式:1-全自动,2-半自动,3-人工干预 ")
|
||||
private Integer changeMode;
|
||||
|
||||
@Schema(description = "换电车道 1-A 车道;2-B 车道")
|
||||
private Integer changeLane;
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(description = "交易编码", hidden = true)
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "备注信息")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.evotech.hd.common.core.entity.common;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* AlarmTemplate
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:AlarmTemplate
|
||||
* @date: 2025年10月28日 15:01
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName(value = "sys_alarm_template", schema = "hd_cloud_manage")
|
||||
@Schema(name = "AlarmTemplate", description = "异常通知")
|
||||
public class AlarmTemplate extends BaseEntity implements Serializable {
|
||||
|
||||
@Schema(description = "路径", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String path;
|
||||
@Schema(description = "通知人员", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String recipientIds;
|
||||
|
||||
//通知人员姓名
|
||||
@TableField(exist = false)
|
||||
String recipientNames;
|
||||
|
||||
@TableField(exist = false)
|
||||
String area;
|
||||
@TableField(exist = false)
|
||||
String message;
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BaseOrder
|
||||
* @date: 2025年05月16日 11:11
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class BaseOrder extends IdEntity {
|
||||
|
||||
/***
|
||||
* 订单编码
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/***
|
||||
* 订单金额
|
||||
*/
|
||||
private Integer orderAmount;
|
||||
|
||||
/***
|
||||
* 订单状态, 具体参考 OrderStatusEnums //HDConstant.OrderConstant.ORDER_STATUS_*
|
||||
*/
|
||||
private Integer status;
|
||||
/***
|
||||
* 支付方式 具体参考 HDConstant.OrderConstant.PAY_TYPE_*
|
||||
*/
|
||||
private String payType;
|
||||
/***
|
||||
* 支付时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date payTime;
|
||||
/***
|
||||
* 支付人的微信ID
|
||||
*/
|
||||
private String payWechatId;
|
||||
|
||||
/***
|
||||
* 第三方返回的唯一订单标识
|
||||
*/
|
||||
private String notifyOrderNo;
|
||||
/***
|
||||
* 支付的回调信息
|
||||
*/
|
||||
private String notifyInfo;
|
||||
/***
|
||||
* 交易编码
|
||||
*/
|
||||
private String tradeNo;
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:SwapOrder
|
||||
* @date: 2025年05月16日 11:29
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName(value = "yt_t_order", schema = "hd_cloud_manage")
|
||||
public class Order extends BaseOrder{
|
||||
|
||||
private Integer orderPreId;
|
||||
|
||||
/***
|
||||
* 预约用户的微信ID
|
||||
*/
|
||||
private String preWechatId;
|
||||
|
||||
/***
|
||||
* 预约用户名称
|
||||
*/
|
||||
private String orderPreUname;
|
||||
/***
|
||||
* 订单类型, 具体参考 HDConstant.OrderConstant.ORDER_TYPE_*
|
||||
*/
|
||||
private Integer orderType;
|
||||
/***
|
||||
* 车牌号
|
||||
*/
|
||||
private String plateNum;
|
||||
|
||||
/***
|
||||
* 下单时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date orderTime;
|
||||
/***
|
||||
* '换电站编码'
|
||||
*/
|
||||
private String stationCode;
|
||||
|
||||
/***
|
||||
* ''换电站名称''
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/***
|
||||
* 订单状态, 具体参考 HDConstant.DELETE_*
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/***
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/***
|
||||
* 变更时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
@TableField(exist = false)
|
||||
private OrderDetail orderDetail;
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderDetail
|
||||
* @date: 2025年05月17日 9:10
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_detail", schema = "hd_cloud_manage")
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class OrderDetail extends IdEntity {
|
||||
|
||||
private Integer orderId;
|
||||
|
||||
/***
|
||||
* 计费类型, 具体参考 HDConstant.OrderConstant.FEE_TYPE_*
|
||||
*/
|
||||
private Integer feeType;
|
||||
/***
|
||||
* 订单金额 (此金额是当前订单的金额, 不包含基础服务费, 所以不是订单总额)
|
||||
*/
|
||||
private Integer orderFee;
|
||||
/***
|
||||
* 服务费
|
||||
*/
|
||||
private Integer serviceFee;
|
||||
/***
|
||||
* 单价(分)
|
||||
*/
|
||||
private Integer unitPrice;
|
||||
/***
|
||||
* 服务开始时间
|
||||
*/
|
||||
private Date serviceTimeBegin;
|
||||
/***
|
||||
* 服务结束时间
|
||||
*/
|
||||
private Date serviceTimeEnd;
|
||||
/***
|
||||
* 订单开始时间
|
||||
*/
|
||||
private Date orderTimeBegin;
|
||||
/***
|
||||
* 订单结束时间
|
||||
*/
|
||||
private Date orderTimeEnd;
|
||||
/***
|
||||
* 费用标准详情
|
||||
*/
|
||||
private String feeStandard;
|
||||
/***
|
||||
* 耗电量; 如果是soc结算 则是soc的差值, ODO则是里程
|
||||
*/
|
||||
private Double electricityQuantity;
|
||||
|
||||
/***
|
||||
* 开始充电的电量
|
||||
*/
|
||||
private Double electStart;
|
||||
/***
|
||||
* 结束充电的电量
|
||||
*/
|
||||
private Double electEnd;
|
||||
/***
|
||||
* 租借电池包仓位
|
||||
*/
|
||||
private String rentBatNo;
|
||||
/***
|
||||
* 租借电池包编码
|
||||
*/
|
||||
private String rentBatCode;
|
||||
/***
|
||||
* 租借电池包SOC
|
||||
*/
|
||||
private Double rentBatSoc;
|
||||
/***
|
||||
* 归还电池包仓位
|
||||
*/
|
||||
private String returnBatNo;
|
||||
/***
|
||||
* 归还电池包编码
|
||||
*/
|
||||
private String returnBatCode;
|
||||
/***
|
||||
* 归还电池包SOC
|
||||
*/
|
||||
private Double returnBatSoc;
|
||||
/***
|
||||
* 换电模式 HDConstant.OrderConstant.CHANGE_MODE_*
|
||||
*/
|
||||
private Integer changeMode;
|
||||
/***
|
||||
* 换电车道 HDConstant.OrderConstant.CHANGE_LANE_*
|
||||
*/
|
||||
private Integer changeLane;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_recharge", schema = "hd_cloud_manage")
|
||||
@Schema(name = "充值订单")
|
||||
public class OrderRecharge extends BaseOrder implements Serializable {
|
||||
|
||||
/***
|
||||
* 1 待支付 2 已支付
|
||||
*/
|
||||
private Integer orderType;
|
||||
|
||||
private String wuId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 退款订单类
|
||||
*
|
||||
* @ClassName:OrderRefund
|
||||
* @date: 2025年06月28日 16:21
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_refund", schema = "hd_cloud_manage")
|
||||
@Schema(name = "退款订单")
|
||||
public class OrderRefund extends IdEntity {
|
||||
|
||||
/***
|
||||
* 微信支付单号
|
||||
*/
|
||||
String transactionId;
|
||||
/***
|
||||
* 退款订单号
|
||||
*/
|
||||
String refundOrderNo;
|
||||
/***
|
||||
* 充值订单号
|
||||
*/
|
||||
String outTradeNo;
|
||||
/***
|
||||
* 退款原因
|
||||
*/
|
||||
String reason;
|
||||
/***
|
||||
* 订单金额
|
||||
*/
|
||||
Integer orderAmount;
|
||||
/***
|
||||
* 退款金额
|
||||
*/
|
||||
Integer refundAmount;
|
||||
/***
|
||||
* 退款状态. 默认待退款
|
||||
* PENDING_REFUND-待退款
|
||||
* SUCCESS—退款成功
|
||||
* CLOSED—退款关闭。
|
||||
* PROCESSING—退款处理中
|
||||
* ABNORMAL—退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台-交易中心,手动处理此笔退款,可参考: 退款异常的处理,或者通过发起异常退款接口进行处理。
|
||||
*/
|
||||
String refundStatus = "PENDING_REFUND";
|
||||
/***
|
||||
* 微信退款单号
|
||||
*/
|
||||
String refundId;
|
||||
/***
|
||||
* 微信退款用户Id
|
||||
*/
|
||||
String refundWechatId;
|
||||
/***
|
||||
* 微信请求结果
|
||||
*/
|
||||
String refundRequestInfo;
|
||||
/***
|
||||
* 微信退款回调结果
|
||||
*/
|
||||
String notifyInfo;
|
||||
|
||||
}
|
||||
@ -93,28 +93,15 @@ public class AuthUser extends BaseEntity implements Serializable {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date lastLoginTime;
|
||||
|
||||
/*@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String creater;
|
||||
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date ctime;
|
||||
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date uptime;*/
|
||||
|
||||
@Schema(description = "角色编码", hidden = true)
|
||||
@TableField(exist = false)
|
||||
private String rcodes;
|
||||
|
||||
@Schema(description = "站编码", hidden = true)
|
||||
@TableField(exist = false)
|
||||
private String stationCodes;
|
||||
|
||||
@Schema(description = "微信用户id")
|
||||
private String wuid;
|
||||
|
||||
}
|
||||
|
||||
@ -1,17 +1,13 @@
|
||||
package com.evotech.hd.common.core.entity.resource.auth;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户和站的关系, 一般是运营端使用
|
||||
@ -25,7 +21,7 @@ import java.util.Date;
|
||||
@Setter
|
||||
@TableName("yt_auth_user_station")
|
||||
@Schema(name = "账号角色关系")
|
||||
public class AuthUserStation implements Serializable {
|
||||
public class AuthUserStation extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.evotech.hd.common.core.entity.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:SysParam
|
||||
* @date: 2025年07月02日 14:26
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName(value = "yt_t_sys_param", schema = "hd_cloud_manage")
|
||||
public class SysParam extends IdEntity {
|
||||
|
||||
/** 参数名 */
|
||||
private String paramName;
|
||||
|
||||
/** 参数码 */
|
||||
private String paramCode;
|
||||
|
||||
/** 参数值 */
|
||||
private String paramValue;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
/**
|
||||
* 枚举
|
||||
*
|
||||
* @ClassName:BaseEnum
|
||||
* @date: 2025年05月19日 15:36
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface BaseEnum<K, V> {
|
||||
|
||||
K getKey();
|
||||
V getValue();
|
||||
}
|
||||
@ -1,5 +1,9 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 100 Continue 继续。客户端应继续其请求
|
||||
101 Switching Protocols 切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议,例如,切换到HTTP的新版本协议
|
||||
@ -99,5 +103,11 @@ public enum CodeMsg {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static CodeMsg getCodeMsgByCode(String code){
|
||||
Map<String, CodeMsg> map = Arrays.stream(CodeMsg.values()).collect(Collectors.toMap(CodeMsg::getCode, v->v));
|
||||
return map.get(code);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
public enum OrderStatusEnums {
|
||||
public enum OrderStatusEnums implements BaseEnum<Integer, String> {
|
||||
|
||||
CREATE(1, "已创建"),
|
||||
|
||||
SWAP(2, "换电开始"),
|
||||
SWAP(2, "换电中"),
|
||||
|
||||
SWAPOVER(3, "换电完成"),
|
||||
|
||||
@ -16,12 +16,23 @@ public enum OrderStatusEnums {
|
||||
|
||||
FINISH(7, "已完成"),
|
||||
|
||||
CANCLE(9, "已取消");
|
||||
SETTLEMENT_IN_PROGRESS(8, "结算中"),
|
||||
|
||||
CANCLE(9, "已取消"),
|
||||
|
||||
REFUND(-1, "订单退款"),
|
||||
|
||||
REFUND_PART(-2, "订单不分退款"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
Integer code;
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
@ -36,4 +47,14 @@ public enum OrderStatusEnums {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getKey() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,9 @@ public enum PayTypeEnums {
|
||||
ALIPAY(3, "支付宝"),
|
||||
|
||||
BANK(4, "网银"),
|
||||
CHARGING_COMPENSATION(5, "充电补偿"),
|
||||
|
||||
BUSINESS_TO_BUSINESS(6, "公对公"),
|
||||
|
||||
OTHER(9, "其他");
|
||||
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
/**
|
||||
* 枚举
|
||||
*
|
||||
* @ClassName:SwapBatteryStepEnum
|
||||
* @date: 2025年06月23日 16:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public enum SwapBatteryStepEnum implements BaseEnum<Integer, String>{
|
||||
|
||||
// @Schema(description = "步骤:1-车辆进站,2-车辆到达指定位置,3-对中机构,4-取新电,5-拆旧电,6-装新电,7-放旧电,8-完成")
|
||||
VEHICLES_ENTER_STATION(1, "车辆进站"),
|
||||
|
||||
VEHICLE_POSITION(2, "车辆到达指定位置"),
|
||||
|
||||
INSTITUTIONS_FOR_CHINA(3, "启动对中机构"),
|
||||
|
||||
GET_NEW_ELECTRICITY(4, "取新电池"),
|
||||
|
||||
DISMANTLE_OLD_ELECTRICITY(5, "拆旧电池"),
|
||||
|
||||
INSTALL_NEW_ELECTRICITY(6, "装新电池"),
|
||||
|
||||
DISCHARGE_OLD_ELECTRICITY(7, "放旧电池"),
|
||||
|
||||
COMPLETED(8, "换电完成"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
Integer code;
|
||||
|
||||
String name;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
SwapBatteryStepEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getKey() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {return this.name;}
|
||||
}
|
||||
@ -0,0 +1,203 @@
|
||||
package com.evotech.hd.common.core.excel;
|
||||
|
||||
import com.evotech.hd.common.core.excel.handler.ExcelFieldHandlerAdapter;
|
||||
import com.evotech.hd.common.core.excel.handler.ExcelHandlerAdapter;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface Excel
|
||||
{
|
||||
/**
|
||||
* 导出时在excel中排序
|
||||
*/
|
||||
public int sort() default Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 导出到Excel中的名字.
|
||||
*/
|
||||
public String name() default "";
|
||||
|
||||
/**
|
||||
* 日期格式, 如: yyyy-MM-dd
|
||||
*/
|
||||
public String dateFormat() default "";
|
||||
|
||||
/**
|
||||
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
|
||||
*/
|
||||
public String dictType() default "";
|
||||
|
||||
/**
|
||||
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||
*/
|
||||
public String readConverterExp() default "";
|
||||
|
||||
/**
|
||||
* 分隔符,读取字符串组内容
|
||||
*/
|
||||
public String separator() default ",";
|
||||
|
||||
/**
|
||||
* BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
|
||||
*/
|
||||
public int scale() default -1;
|
||||
|
||||
/**
|
||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||
*/
|
||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||
|
||||
/**
|
||||
* 导出时在excel中每个列的高度
|
||||
*/
|
||||
public double height() default 14;
|
||||
|
||||
/**
|
||||
* 导出时在excel中每个列的宽度
|
||||
*/
|
||||
public double width() default 16;
|
||||
|
||||
/**
|
||||
* 文字后缀,如% 90 变成90%
|
||||
*/
|
||||
public String suffix() default "";
|
||||
|
||||
/**
|
||||
* 当值为空时,字段的默认值
|
||||
*/
|
||||
public String defaultValue() default "";
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
*/
|
||||
public String prompt() default "";
|
||||
|
||||
/**
|
||||
* 设置只能选择不能输入的列内容.
|
||||
*/
|
||||
public String[] combo() default {};
|
||||
|
||||
/**
|
||||
* 是否从字典读数据到combo,默认不读取,如读取需要设置dictType注解.
|
||||
*/
|
||||
public boolean comboReadDict() default false;
|
||||
|
||||
/**
|
||||
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
|
||||
*/
|
||||
public boolean needMerge() default false;
|
||||
|
||||
/**
|
||||
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
||||
*/
|
||||
public boolean isExport() default true;
|
||||
|
||||
/**
|
||||
* 另一个类中的属性名称,支持多级获取,以小数点隔开
|
||||
*/
|
||||
public String targetAttr() default "";
|
||||
|
||||
/**
|
||||
* 是否自动统计数据,在最后追加一行统计数据总和
|
||||
*/
|
||||
public boolean isStatistics() default false;
|
||||
|
||||
/**
|
||||
* 导出类型(0数字 1字符串 2图片)
|
||||
*/
|
||||
public ColumnType cellType() default ColumnType.STRING;
|
||||
|
||||
/**
|
||||
* 导出列头背景颜色
|
||||
*/
|
||||
public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
|
||||
|
||||
/**
|
||||
* 导出列头字体颜色
|
||||
*/
|
||||
public IndexedColors headerColor() default IndexedColors.WHITE;
|
||||
|
||||
/**
|
||||
* 导出单元格背景颜色
|
||||
*/
|
||||
public IndexedColors backgroundColor() default IndexedColors.WHITE;
|
||||
|
||||
/**
|
||||
* 导出单元格字体颜色
|
||||
*/
|
||||
public IndexedColors color() default IndexedColors.BLACK;
|
||||
|
||||
/**
|
||||
* 导出字段对齐方式
|
||||
*/
|
||||
public HorizontalAlignment align() default HorizontalAlignment.CENTER;
|
||||
|
||||
/**
|
||||
* 自定义数据处理器
|
||||
*/
|
||||
public Class<?> handler() default ExcelHandlerAdapter.class;
|
||||
|
||||
/**
|
||||
* 自定义数据处理器
|
||||
*/
|
||||
public boolean customExcelField() default false;
|
||||
/**
|
||||
* 自定义数据处理器
|
||||
*/
|
||||
public Class<?> excelFieldHandler() default ExcelFieldHandlerAdapter.class;
|
||||
|
||||
/**
|
||||
* 自定义数据处理器参数
|
||||
*/
|
||||
public String[] args() default {};
|
||||
|
||||
/**
|
||||
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
||||
*/
|
||||
Type type() default Type.ALL;
|
||||
|
||||
public enum Type
|
||||
{
|
||||
ALL(0), EXPORT(1), IMPORT(2);
|
||||
private final int value;
|
||||
|
||||
Type(int value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ColumnType
|
||||
{
|
||||
NUMERIC(0), STRING(1), IMAGE(2), TEXT(3);
|
||||
private final int value;
|
||||
|
||||
ColumnType(int value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.evotech.hd.common.core.excel;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Excels
|
||||
{
|
||||
public Excel[] value();
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.evotech.hd.common.core.excel.handler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特殊出具处理接口
|
||||
*
|
||||
* @ClassName:ExcelFieldHandlerAdapter
|
||||
* @date: 2025年07月12日 10:40
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface ExcelFieldHandlerAdapter {
|
||||
|
||||
List<String> buildExcel();
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.evotech.hd.common.core.excel.handler;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
/**
|
||||
* Excel数据格式处理适配器
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
public interface ExcelHandlerAdapter
|
||||
{
|
||||
/**
|
||||
* 格式化
|
||||
*
|
||||
* @param value 单元格数据值
|
||||
* @param args excel注解args参数组
|
||||
* @param cell 单元格对象
|
||||
* @param wb 工作簿对象
|
||||
*
|
||||
* @return 处理后的值
|
||||
*/
|
||||
Object format(Object value, String[] args, Cell cell, Workbook wb);
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.evotech.hd.common.core.excel.handler.impl;
|
||||
|
||||
import com.evotech.hd.common.core.excel.handler.ExcelHandlerAdapter;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
/**
|
||||
* OrderStatusExcelHandlerAdapter
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:OrderStatusExcelHandlerAdapter
|
||||
* @date: 2026年02月11日 14:23
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class OrderSourceExcelHandlerAdapter implements ExcelHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public Object format(Object value, String[] args, Cell cell, Workbook wb) {
|
||||
if(ObjectUtils.isNotEmpty(value)){
|
||||
switch (String.valueOf(value)){
|
||||
case "1":
|
||||
return "小程序";
|
||||
case "2":
|
||||
return "云端";
|
||||
case "3":
|
||||
return "站端";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.evotech.hd.common.core.excel.handler.impl;
|
||||
|
||||
import com.evotech.hd.common.core.enums.OrderStatusEnums;
|
||||
import com.evotech.hd.common.core.excel.handler.ExcelHandlerAdapter;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
/**
|
||||
* OrderStatusExcelHandlerAdapter
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:OrderStatusExcelHandlerAdapter
|
||||
* @date: 2026年02月11日 14:23
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class OrderStatusExcelHandlerAdapter implements ExcelHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public Object format(Object value, String[] args, Cell cell, Workbook wb) {
|
||||
if(ObjectUtils.isNotEmpty(value)){
|
||||
Integer val = Integer.valueOf(String.valueOf(value));
|
||||
for (OrderStatusEnums orderStatus : OrderStatusEnums.values()){
|
||||
if(orderStatus.getCode().equals(val)){
|
||||
return orderStatus.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.evotech.hd.common.core.excel.handler.impl;
|
||||
|
||||
import com.evotech.hd.common.core.enums.SwapBatteryStepEnum;
|
||||
import com.evotech.hd.common.core.excel.handler.ExcelHandlerAdapter;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
/**
|
||||
* OrderStatusExcelHandlerAdapter
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:OrderStatusExcelHandlerAdapter
|
||||
* @date: 2026年02月11日 14:23
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class OrderStepExcelHandlerAdapter implements ExcelHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public Object format(Object value, String[] args, Cell cell, Workbook wb) {
|
||||
|
||||
if(ObjectUtils.isNotEmpty(value)){
|
||||
Integer val = Integer.valueOf(String.valueOf(value));
|
||||
for (SwapBatteryStepEnum stepEnum : SwapBatteryStepEnum.values()){
|
||||
if(stepEnum.getCode().equals(val)){
|
||||
return stepEnum.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -45,7 +45,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 检查集合为空
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:14:43
|
||||
* @methodName Collections.isEmpty
|
||||
* @param list
|
||||
@ -59,7 +58,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 检查集合不为空
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:15:07
|
||||
* @methodName Collections.isNotEmpty
|
||||
* @param collection
|
||||
@ -73,7 +71,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 将list进行分页
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月15日上午9:37:07
|
||||
* @param <T> 泛型, 根据传入的对对象类型,返回类型
|
||||
* @param list 需要分组的集合
|
||||
@ -109,7 +106,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 创建对象
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月15日上午9:37:07
|
||||
* @param <T>
|
||||
* @return
|
||||
@ -121,7 +117,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 数组转对象
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:09:14
|
||||
* @methodName Collections.asList
|
||||
* @param objs
|
||||
@ -157,7 +152,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 去除集合的重复项
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:09:07
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param list1 去重的集合1
|
||||
@ -172,7 +166,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 去除集合的重复项
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:13:09
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param listArray 去重的集合数组
|
||||
@ -203,7 +196,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 获取重复数据
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:46:03
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param list1 查重的集合1
|
||||
@ -217,7 +209,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 获取重复数据
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:44:30
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param listArray 需要查重的集合数组
|
||||
@ -281,7 +272,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 组装map数据对象
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午1:37:05
|
||||
* @methodName MapLists.createMap
|
||||
* @param args
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package com.evotech.hd.common.core.utils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
|
||||
public class CommonUtil {
|
||||
|
||||
@ -47,6 +50,19 @@ public class CommonUtil {
|
||||
return prefix + "1100";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static BigDecimal yuanToFen(BigDecimal yuan){
|
||||
if(ObjectUtils.isEmpty(yuan)){
|
||||
return new BigDecimal(0);
|
||||
}
|
||||
return yuan.multiply(new BigDecimal(100));
|
||||
}
|
||||
|
||||
public static BigDecimal fenToYuan(BigDecimal yuan){
|
||||
if(ObjectUtils.isEmpty(yuan)){
|
||||
return new BigDecimal(0);
|
||||
}
|
||||
return yuan.divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.evotech.hd.common.core.utils;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:DataUtils
|
||||
* @date: 2025年06月03日 10:25
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class DataUtils {
|
||||
|
||||
public static final BigDecimal DEFAULT_VALUE = new BigDecimal(0);
|
||||
|
||||
|
||||
public static <T> T findDefaultValue(T v, T dv){
|
||||
if(ObjectUtils.isNotEmpty(v)){
|
||||
return v;
|
||||
}
|
||||
return dv;
|
||||
}
|
||||
|
||||
public static <K, V> V getValOrDefault(Map<K, V> map, K key, V dv) {
|
||||
if(!map.containsKey(key) || ObjectUtils.isEmpty(map.get(key))){
|
||||
return dv;
|
||||
}
|
||||
return map.get(key); // 键不存在时,Java默认返回null
|
||||
}
|
||||
}
|
||||
@ -1,90 +0,0 @@
|
||||
package com.evotech.hd.influxdb.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:InfluxdbPropertys
|
||||
* @date: 2025年04月26日 13:30
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "influxdb", ignoreUnknownFields = true)
|
||||
public class InfluxdbProperty {
|
||||
|
||||
static String url;
|
||||
|
||||
static String name;
|
||||
|
||||
static String password;
|
||||
|
||||
static String token;
|
||||
|
||||
static String org;
|
||||
|
||||
static String bucket;
|
||||
|
||||
static Boolean gzip;
|
||||
|
||||
public static String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
InfluxdbProperty.url = url;
|
||||
}
|
||||
|
||||
public static String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
InfluxdbProperty.name = name;
|
||||
}
|
||||
|
||||
public static String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
InfluxdbProperty.password = password;
|
||||
}
|
||||
|
||||
public static String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
InfluxdbProperty.token = token;
|
||||
}
|
||||
|
||||
public static String getBucket() {
|
||||
return bucket;
|
||||
}
|
||||
|
||||
public void setBucket(String bucket) {
|
||||
InfluxdbProperty.bucket = bucket;
|
||||
}
|
||||
|
||||
public static Boolean getGzip() {
|
||||
return gzip;
|
||||
}
|
||||
|
||||
public void setGzip(Boolean gzip) {
|
||||
InfluxdbProperty.gzip = gzip;
|
||||
}
|
||||
|
||||
public static String getOrg() {
|
||||
return org;
|
||||
}
|
||||
|
||||
public void setOrg(String org) {
|
||||
InfluxdbProperty.org = org;
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package com.evotech.hd.influxdb.config;
|
||||
|
||||
import com.influxdb.client.InfluxDBClient;
|
||||
import com.influxdb.client.InfluxDBClientFactory;
|
||||
import com.influxdb.client.InfluxQLQueryApi;
|
||||
import com.influxdb.client.WriteApi;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* influxdb的bean
|
||||
*
|
||||
* @ClassName:MyInfluxDBConfiguration
|
||||
* @date: 2025年04月26日 14:26
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Configuration
|
||||
@EnableConfigurationProperties
|
||||
public class MyInfluxDBConfiguration {
|
||||
|
||||
@Bean
|
||||
public InfluxDBClient influxDBClient(){
|
||||
InfluxDBClient client = InfluxDBClientFactory.create(InfluxdbProperty.getUrl(), InfluxdbProperty.getToken().toCharArray());
|
||||
if(InfluxdbProperty.getGzip()){
|
||||
client.enableGzip();
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public WriteApi writeApiBlocking(final InfluxDBClient influxDBClient){
|
||||
return influxDBClient.getWriteApi();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public InfluxQLQueryApi influxQLQueryApi(final InfluxDBClient influxDBClient){
|
||||
return influxDBClient.getInfluxQLQueryApi();
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
//package com.evotech.hd.influxdb.service;
|
||||
//
|
||||
//import com.evotech.hd.influxdb.config.InfluxdbProperty;
|
||||
//import com.influxdb.client.InfluxDBClient;
|
||||
//import com.influxdb.client.InfluxDBClientFactory;
|
||||
//import com.influxdb.client.WriteApiBlocking;
|
||||
//import org.springframework.beans.factory.DisposableBean;
|
||||
//import org.springframework.stereotype.Service;
|
||||
///**
|
||||
// * influxdb 数据库链接类
|
||||
// *
|
||||
// * @ClassName:InfluxDbService
|
||||
// * @date: 2025年04月26日 13:21
|
||||
// * @author: andy.shi
|
||||
// * @contact: 17330188597
|
||||
// * @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
// */
|
||||
//@Service
|
||||
//public class InfluxDbService implements DisposableBean {
|
||||
// /***
|
||||
// * 单例 饿汉式(线程安全)
|
||||
// * 简单,天生线程安全,实例在类加载时就完成了初始化。
|
||||
// */
|
||||
// private static InfluxDBClient client = InfluxDBClientFactory.create(InfluxdbProperty.getUrl(), InfluxdbProperty.getName(),InfluxdbProperty.getPassword().toCharArray());
|
||||
//
|
||||
//
|
||||
// public static void write(){
|
||||
// WriteApiBlocking writeApi = client.getWriteApiBlocking();
|
||||
// writeApi.writePoint("","",com.influxdb.client.write.Point.measurement(""));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void destroy() throws Exception {
|
||||
// if(client != null){
|
||||
// client.close();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -1,48 +0,0 @@
|
||||
package com.evotech.hd.influxdb.util;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BeanUtil
|
||||
* @date: 2025年04月26日 14:41
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Component
|
||||
public class BeanUtil implements ApplicationContextAware {
|
||||
|
||||
private static ApplicationContext applicationContext = null;
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
setGlobalApplicationContext(applicationContext);
|
||||
}
|
||||
|
||||
private synchronized static void setGlobalApplicationContext(ApplicationContext applicationContext) {
|
||||
if(BeanUtil.applicationContext == null){
|
||||
BeanUtil.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
||||
private static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
public static Object getBean(String name) {
|
||||
return getApplicationContext().getBean(name);
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> clazz) {
|
||||
T b = null;
|
||||
try {
|
||||
b=getApplicationContext().getBean(clazz);
|
||||
} catch (BeansException e) {
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
package com.evotech.hd.influxdb.util;
|
||||
|
||||
import com.evotech.hd.influxdb.config.InfluxdbProperty;
|
||||
import com.influxdb.client.InfluxDBClient;
|
||||
import com.influxdb.client.InfluxDBClientFactory;
|
||||
import com.influxdb.client.WriteApi;
|
||||
import com.influxdb.client.domain.WritePrecision;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据数据库的工具类
|
||||
* @ClassName:InfluxDBUtils
|
||||
* @date: 2025年04月26日 14:36
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class InfluxDBUtils {
|
||||
|
||||
|
||||
public static int insert(String tableName, Map<String, String> tags, Map<String, Object> values){
|
||||
WriteApi writeApi = BeanUtil.getBean(WriteApi.class);
|
||||
InfluxDBClient client = InfluxDBClientFactory.create(InfluxdbProperty.getUrl(), InfluxdbProperty.getToken().toCharArray());
|
||||
com.influxdb.client.write.Point point = com.influxdb.client.write.Point.measurement(tableName)
|
||||
.time(System.currentTimeMillis(), WritePrecision.NS);
|
||||
|
||||
if(!CollectionUtils.isEmpty(tags)){
|
||||
Iterator<String> iterator = tags.keySet().iterator();
|
||||
while (iterator.hasNext()){
|
||||
String key = iterator.next();
|
||||
point = point.addTag(key, tags.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
if(!CollectionUtils.isEmpty(values)){
|
||||
// point = point.addFields(values);
|
||||
Iterator<String> iterator = values.keySet().iterator();
|
||||
while (iterator.hasNext()){
|
||||
String key = iterator.next();
|
||||
Object value = values.get(key);
|
||||
if (value instanceof Boolean) {
|
||||
point = point.addField(key, (Boolean)value);
|
||||
} else if (value instanceof Long) {
|
||||
point = point.addField(key, (Long)value);
|
||||
} else if (value instanceof Double) {
|
||||
point = point.addField(key, (Double)value);
|
||||
} else if (value instanceof String) {
|
||||
point = point.addField(key, (String)value);
|
||||
}
|
||||
}
|
||||
}
|
||||
client.getWriteApiBlocking().writePoint(InfluxdbProperty.getBucket(),InfluxdbProperty.getOrg(),point);
|
||||
writeApi.flush();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -8,23 +8,13 @@
|
||||
<artifactId>base-commons</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>common-influxdb</artifactId>
|
||||
|
||||
<artifactId>common-mongodb</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.influxdb</groupId>
|
||||
<artifactId>influxdb-client-java</artifactId>
|
||||
<version>6.6.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.influxdb</groupId>-->
|
||||
<!-- <artifactId>influxdb-java</artifactId>-->
|
||||
<!-- <version>2.21</version> <!– 请检查最新版本 –>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
@ -32,10 +22,9 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot</artifactId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>2.2.19</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,105 @@
|
||||
package com.evotech.hd.common.config;
|
||||
|
||||
import com.mongodb.ConnectionString;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* mongoDB类
|
||||
*
|
||||
* @ClassName:AbstractMongoDbConfig
|
||||
* @date: 2025年04月29日 14:41
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
public abstract class AbstractMongoDbConfig{
|
||||
|
||||
// MongoDB Properties
|
||||
@Value("${yt.base_properties.uri:}")
|
||||
private String uri;
|
||||
@Value("${yt.base_properties.user_name:''}")
|
||||
private String userName;
|
||||
@Value("${yt.base_properties.password:''}")
|
||||
private String password;
|
||||
@Value("${yt.base_properties.host:''}")
|
||||
private String host;
|
||||
@Value("${yt.base_properties.authentication-database:''}")
|
||||
private String authenticationDataBase;
|
||||
private String dataBase;
|
||||
@Value("${yt.base_properties.port:''}")
|
||||
private Integer port;
|
||||
|
||||
|
||||
public MongoDatabaseFactory mongoDbFactory(){
|
||||
//String connectionString = "mongodb://" + userName + ":" + password+ "@"+ host+":"+port+"/" + dataBase+"?authSource="+authenticationDataBase;
|
||||
return new SimpleMongoClientDatabaseFactory(getConnectionString());
|
||||
}
|
||||
|
||||
private ConnectionString getConnectionString(){
|
||||
if (StringUtils.hasText(uri)) {
|
||||
return new ConnectionString(uri);
|
||||
}
|
||||
StringBuilder builder = new StringBuilder("mongodb://");
|
||||
if (StringUtils.hasText(userName)) {
|
||||
builder.append(encode(userName));
|
||||
builder.append(":");
|
||||
if (StringUtils.hasText(password)) {
|
||||
builder.append(encode(password));
|
||||
}
|
||||
builder.append("@");
|
||||
}
|
||||
builder.append((StringUtils.hasText(host)) ? host : "localhost");
|
||||
if (port != null) {
|
||||
builder.append(":");
|
||||
builder.append(port);
|
||||
}
|
||||
//集群多地址配置, 具体参考 propertiesMongoConnectionDetails
|
||||
// if (this.properties.getAdditionalHosts() != null) {
|
||||
// builder.append(",");
|
||||
// builder.append(String.join(",", this.properties.getAdditionalHosts()));
|
||||
// }
|
||||
builder.append("/");
|
||||
builder.append(dataBase);
|
||||
List<String> options = getOptions();
|
||||
if (!options.isEmpty()) {
|
||||
builder.append("?");
|
||||
builder.append(String.join("&", options));
|
||||
}
|
||||
return new ConnectionString(builder.toString());
|
||||
}
|
||||
|
||||
private String encode(String input) {
|
||||
return URLEncoder.encode(input, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private List<String> getOptions() {
|
||||
List<String> options = new ArrayList<>();
|
||||
//集群,名称. 具体参考 propertiesMongoConnectionDetails
|
||||
// if (this.properties.getReplicaSetName() != null) {
|
||||
// options.add("replicaSet=" + this.properties.getReplicaSetName());
|
||||
// }
|
||||
if (StringUtils.hasText(userName) && StringUtils.hasText(authenticationDataBase)) {
|
||||
options.add("authSource=" + authenticationDataBase);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
abstract public MongoTemplate getMongoTemplate() throws Exception;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.evotech.hd.common.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BatteryInfoProperties
|
||||
* @date: 2025年04月29日 16:32
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "yt.battery-box", ignoreInvalidFields = true)
|
||||
public class BatteryBoxProperties extends AbstractMongoDbConfig {
|
||||
|
||||
@Bean("mongoTemplateBatteryBox")
|
||||
@Override
|
||||
public MongoTemplate getMongoTemplate() throws Exception {
|
||||
return new MongoTemplate(mongoDbFactory());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.evotech.hd.common.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BatteryInfoProperties
|
||||
* @date: 2025年04月29日 16:32
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "yt.battery-info", ignoreInvalidFields = true)
|
||||
public class BatteryInfoProperties extends AbstractMongoDbConfig {
|
||||
|
||||
@Primary
|
||||
@Bean("mongoTemplateBatteryInfo")
|
||||
@Override
|
||||
public MongoTemplate getMongoTemplate() throws Exception {
|
||||
return new MongoTemplate(mongoDbFactory());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.evotech.hd.common.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
|
||||
/**
|
||||
* 站相关推送信息记录类
|
||||
*
|
||||
* @ClassName:BatteryInfoProperties
|
||||
* @date: 2025年04月29日 16:32
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "yt.station-info", ignoreInvalidFields = true)
|
||||
public class StationInfoProperties extends AbstractMongoDbConfig {
|
||||
@Bean("mongoTemplateStationInfo")
|
||||
@Override
|
||||
public MongoTemplate getMongoTemplate() throws Exception {
|
||||
return new MongoTemplate(mongoDbFactory());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.evotech.hd.common.constant;
|
||||
|
||||
/**
|
||||
* MongoDB的静态类
|
||||
* @ClassName:MongoConstant
|
||||
* @date: 2025年04月29日 9:21
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class MongoConstant {
|
||||
|
||||
public class ErrorCode{
|
||||
//站端告警标识
|
||||
public static final Integer STATION_ALARM_CODE= 2;
|
||||
|
||||
}
|
||||
//电池实时信息数据库
|
||||
public static final String BATTERY_DATA_BASE="battery_info";
|
||||
//电池箱实时信息数据库
|
||||
public static final String BATTERY_BOX_DATA_BASE="battery_box";
|
||||
//电池箱实时信息数据库
|
||||
public static final String STATION_INFO_BASE="station_info";
|
||||
|
||||
public static final String SEPARATION = "_";
|
||||
/***
|
||||
* 或者查询, 示例
|
||||
* put(OR+"条件名称"+SEPARATION+"条件名称"...,"条件值"+SEPARATION+"条件值"....)
|
||||
*/
|
||||
public static final String OR = "or"+SEPARATION;
|
||||
/***
|
||||
* 条件查询, 示例
|
||||
* put(查询类型+"条件名称","条件值")
|
||||
*/
|
||||
public static final String EQ = "and";
|
||||
public static final String IN = "in";
|
||||
public static final String NOT_IN = "not-in";
|
||||
public static final String GT = "gt";
|
||||
public static final String GE = "ge";
|
||||
public static final String GT_GE = "ge-ge";
|
||||
public static final String LT = "lt";
|
||||
public static final String LE = "le";
|
||||
public static final String REGEX = "regex";
|
||||
/***
|
||||
* 排序, 示例
|
||||
* put(SORT+SORT_ASC,"条件名称")
|
||||
*/
|
||||
public static final String SORT = "Sort";
|
||||
public static final String SORT_ASC ="asc";
|
||||
public static final String SORT_DESC = "desc";
|
||||
|
||||
/***
|
||||
* 排序, 示例
|
||||
* put(PAGE,"当前页"+SEPARATION+"每页显示的条数")
|
||||
*/
|
||||
public static final String PAGE = "page";
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.evotech.hd.common.documnet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BaseDocumentEntity
|
||||
* @date: 2025年05月05日 13:38
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Document
|
||||
public class BaseDocumentEntity {
|
||||
|
||||
/***
|
||||
* 时间戳做id
|
||||
*/
|
||||
@Id
|
||||
String id;
|
||||
|
||||
String stationCode;
|
||||
|
||||
String value;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.evotech.hd.common.documnet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
/**
|
||||
* 电池实时信息
|
||||
* @ClassName:BatData
|
||||
* @date: 2025年04月30日 9:13
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Document
|
||||
public class BatData extends BaseDocumentEntity{
|
||||
|
||||
String batCode;
|
||||
|
||||
String cabinetNo;
|
||||
|
||||
/***
|
||||
* value 内容参考
|
||||
* 仓位序号 cabinetNo int 仓位序号
|
||||
* 单体电压总个数 batCellVoltCnt int32
|
||||
* 单体电压 batCellVoltList list<float> 单位-V (每个型号的电池单体单体个数不定)
|
||||
* 单体电压采样时间 voltSampleTime string 格式:yyyy-MM-dd HH:mm:ss (需要架载机支持)
|
||||
* 探针温度总个数 probeTempCnt int32
|
||||
* 探针温度 probeTempList list<int32> 单位-°C (个数不定)
|
||||
* 探针温度采样时 间 tempSampleTime string 格式:yyyy-MM-dd HH:mm:ss (需要架载机支持)
|
||||
* 电池包 SOH soh float %
|
||||
* 电池包总电流,充电为负值,放电为正值 batTotalCurr float 单位-A
|
||||
* 电池包允许最大 回充电电流值 (脉冲) batAvailMaxChgCu rr float 单位-A
|
||||
* 电池包允许最大 放电电流值(脉 冲) batAvailMaxDisch gCurr float 单位-A
|
||||
* 电池包正极绝缘 值 batPosiInsu float 单位-kohm
|
||||
* 电池包负极绝缘 值 batNegaInsu float 单位-kohm
|
||||
* 电池端高压(主 继电器内侧) batHighVoltInner float 单位-V
|
||||
* 母线端高压(主 继电器外侧) batHighVoltOuter float 单位-V
|
||||
* TMS 工作状态 tmsState int 0 关机;
|
||||
* 1 制冷;
|
||||
* 2 制热;
|
||||
* 3 自循环;
|
||||
* TMS 高压继电器 状态 tmsRelayState int 0 断开;1 闭合;2~3 无效;
|
||||
* 出水温度(机组 到电池) outletWaterTemp int 单位-°C
|
||||
* 回水温度(电池 到机组) inletWaterTemp int 单位-°C
|
||||
* TMS 需求功率 tmsDemandPower float 单位-kW
|
||||
* TMS 故障码 tmsFaultCode int 0 无故障;
|
||||
* 出现 1 种以上循环发送
|
||||
* TMS 故障码等级 tmsFaultLevel int 1 1 级故障; 2 2 级故障; 3 3 级故障; 0 无效;
|
||||
* 电池ID batCode string 唯一识别码
|
||||
*/
|
||||
|
||||
public BatData() {
|
||||
}
|
||||
|
||||
public BatData(String batCode, String cabinetNo, String value) {
|
||||
this.batCode = batCode;
|
||||
this.cabinetNo = cabinetNo;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,166 @@
|
||||
package com.evotech.hd.common.documnet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
/**
|
||||
* 充电过程实时信息
|
||||
* @ClassName:ChargingData
|
||||
* @date: 2025年04月29日 15:13
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Document
|
||||
public class ChargingData extends BaseDocumentEntity{
|
||||
|
||||
String batCode;
|
||||
|
||||
String chgSn;
|
||||
|
||||
/***
|
||||
* value 内容参考
|
||||
* 充电机编号 chgID string 充电机编号,采用 16 位数字编码
|
||||
* 枪编号 gunNo int 从 1 开始,比如:1-A 枪,2-B 枪 ... (充电切换旋钮为“连接器”状 态时,只发 A 枪)
|
||||
* 充电开始时间 startTime string 格式-yyyy-MM-dd hh:mm:ss
|
||||
* 充电机输出电压 chgOutputVolt float 单位-V,小数点后一位
|
||||
* 充电机输出电流 chgOutputCurr float 单位-A,小数点后一位
|
||||
* 充电电量 chgQty float 单位-kWh,小数点后一位
|
||||
* 电池ID batCode string 电池唯一识别码
|
||||
* SOC soc float 当前电池电量0-100%
|
||||
* 电池箱所在仓位 cabinetNo int 仓位序号
|
||||
* 最高单体电压 batMaxVolt float 单位-V
|
||||
* 最高单体电压组 号 batMaxVoltNo int
|
||||
* 最低单体电压 batMinVolt float 单位-V
|
||||
* 最低单体电压组 号 batMinVoltNo int
|
||||
* 最高单体温度 batMaxTemp int 单位-°C
|
||||
* 最高单体温度组 号 batMaxTempNo int
|
||||
* 最低单体温度 batMinTemp int 单位-°C
|
||||
* 最低单体温度组 号 batMinTempNo int
|
||||
* 电池电压需求 voltDemand float 单位-V,小数点后一位
|
||||
* 电池电流需求 currDemand float 单位-A,小数点后一位
|
||||
* 充电模式 chgMode int 1、恒压充电 2、恒流充电 3、恒功率充电
|
||||
* 剩余充电时长 remainderChgTi me int 单位-min 从 BMS 获取
|
||||
* 直流电表电量 dcMeterElect float 单位-kWh,小数点后一位
|
||||
* 充电流水号 chgSn string
|
||||
*/
|
||||
// //充电机编号
|
||||
// String chgID;
|
||||
// /***
|
||||
// * 枪编号
|
||||
// */
|
||||
// Integer gunNo;
|
||||
// /***
|
||||
// * 充电开始时间
|
||||
// * 格式-yyyy-MM-dd hh:mm:ss
|
||||
// */
|
||||
// String startTime;
|
||||
// /***
|
||||
// * 充电机输出电压
|
||||
// * 单位-V,小数点后一位
|
||||
// */
|
||||
// Float chgOutputVolt;
|
||||
// /***
|
||||
// * 充电机输出电流
|
||||
// * 单位-A,小数点后一位
|
||||
// */
|
||||
// Float chgOutputCurr;
|
||||
// /***
|
||||
// * 充电电量
|
||||
// * 单位-kWh,小数点后一位
|
||||
// */
|
||||
// String chgQty;
|
||||
// /***
|
||||
// * 电池ID
|
||||
// * 电池唯一识别码
|
||||
// */
|
||||
// String batCode;
|
||||
// /***
|
||||
// * SOC
|
||||
// * 当前电池电量0-100%
|
||||
// */
|
||||
// Float soc;
|
||||
//
|
||||
// /***
|
||||
// * 电池箱所在仓位
|
||||
// * 仓位序号
|
||||
// */
|
||||
// Integer cabinetNo;
|
||||
// /***
|
||||
// * 最高单体电压
|
||||
// * 单位-V
|
||||
// */
|
||||
// Float batMaxVolt;
|
||||
// /***
|
||||
// * 最高单体电压组 号
|
||||
// * 单位-V
|
||||
// */
|
||||
// Integer batMaxVoltNo;
|
||||
// /***
|
||||
// * 最低单体电压
|
||||
// * 单位-V
|
||||
// */
|
||||
// Float batMinVolt;
|
||||
// /***
|
||||
// * 最低单体电压组
|
||||
// */
|
||||
// Integer batMinVoltNo;
|
||||
// /***
|
||||
// * 最高单体温度
|
||||
// * 单位-°C
|
||||
// */
|
||||
// Integer batMaxTemp;
|
||||
// /***
|
||||
// * 最低单体温度
|
||||
// * 单位-°C
|
||||
// */
|
||||
// Integer batMinTemp;
|
||||
// /***
|
||||
// * 最低单体温度组
|
||||
// * 单位-°C
|
||||
// */
|
||||
// Integer batMinTempNo;
|
||||
// /***
|
||||
// * 电池电压需求
|
||||
// * 单位-V,小数点后一位
|
||||
// */
|
||||
// Float voltDemand;
|
||||
// /***
|
||||
// * 电池电流需求
|
||||
// * 单位-V,小数点后一位
|
||||
// */
|
||||
// Float currDemand;
|
||||
//
|
||||
// /***
|
||||
// * 充电模式
|
||||
// * 1、恒压充电 2、恒流充电 3、恒功率充电
|
||||
// */
|
||||
// Integer chgMode;
|
||||
// /***
|
||||
// * 剩余充电时长
|
||||
// * 单位-min
|
||||
// */
|
||||
// Integer remainderChgTime;
|
||||
// /***
|
||||
// * 直流电表电量
|
||||
// * 单位-kWh,小数点后一位
|
||||
// */
|
||||
// Float dcMeterElect;
|
||||
// /***
|
||||
// * 充电流水号
|
||||
// * 电池唯一识别码
|
||||
// */
|
||||
// String chgSn;
|
||||
|
||||
|
||||
public ChargingData() {
|
||||
}
|
||||
|
||||
public ChargingData(String batCode, String chgSn, String value) {
|
||||
this.batCode = batCode;
|
||||
this.chgSn = chgSn;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.evotech.hd.common.documnet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
/**
|
||||
* 站级状态信息类
|
||||
*
|
||||
* @ClassName:StationState
|
||||
* @date: 2025年05月05日 13:28
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Document
|
||||
public class StationState extends BaseDocumentEntity{
|
||||
|
||||
|
||||
/***
|
||||
* value 信息参考
|
||||
* 1 运行状态 state int 1-运营;2-调试;3-检修; 是 是
|
||||
* 2 烟感告警信号 smoke string 0-未知;1-正常;2-告警,多个烟感时, 以逗号分隔,如:2,1,2,0,1,0,1,2,一 般和架载机个数相同 是 是
|
||||
* 3 消防告警信号 fire int 0-未知;1-正常;2-告警 是 是
|
||||
* 4 温度 temp int 换电站室内温度,°C,未接入时传null 是 否
|
||||
* 5 湿度 humid int 换电站室内湿度,%,未接入时传 null 是 否
|
||||
* 6 电表读数 totalElect float 单位:kWh,未接入时传 null 是 否
|
||||
*/
|
||||
|
||||
public StationState() {
|
||||
}
|
||||
|
||||
public StationState(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.evotech.hd.common.dtos;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电池实时信息
|
||||
* @ClassName:BatData
|
||||
* @date: 2025年04月30日 9:13
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class BatDataDto {
|
||||
//电池编号
|
||||
String batCode;
|
||||
//开始时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
Date beginTime;
|
||||
//结束时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
Date endTime;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user