Compare commits
No commits in common. "master" and "mongodb_dev" have entirely different histories.
master
...
mongodb_de
@ -9,20 +9,15 @@
|
|||||||
<module name="common-mybatis" />
|
<module name="common-mybatis" />
|
||||||
<module name="authorization-server" />
|
<module name="authorization-server" />
|
||||||
<module name="resource-server" />
|
<module name="resource-server" />
|
||||||
<module name="common-permission" />
|
|
||||||
<module name="gateway-server" />
|
<module name="gateway-server" />
|
||||||
<module name="admin-server" />
|
<module name="admin-server" />
|
||||||
<module name="common-web" />
|
<module name="common-web" />
|
||||||
<module name="common-mongodb" />
|
|
||||||
<module name="wechat-server" />
|
<module name="wechat-server" />
|
||||||
<module name="cloud-manage-server" />
|
<module name="cloud-manage-server" />
|
||||||
<module name="common-redis" />
|
<module name="common-redis" />
|
||||||
<module name="common-core" />
|
<module name="common-core" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
<bytecodeTargetLevel>
|
|
||||||
<module name="common-websocket" target="17" />
|
|
||||||
</bytecodeTargetLevel>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="JavacSettings">
|
<component name="JavacSettings">
|
||||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
@ -30,12 +25,9 @@
|
|||||||
<module name="authorization-server" options="-parameters" />
|
<module name="authorization-server" options="-parameters" />
|
||||||
<module name="cloud-manage-server" options="-parameters" />
|
<module name="cloud-manage-server" options="-parameters" />
|
||||||
<module name="common-core" options="-parameters" />
|
<module name="common-core" options="-parameters" />
|
||||||
<module name="common-mongodb" options="-parameters" />
|
|
||||||
<module name="common-mybatis" options="-parameters" />
|
<module name="common-mybatis" options="-parameters" />
|
||||||
<module name="common-permission" options="-parameters" />
|
|
||||||
<module name="common-redis" options="-parameters" />
|
<module name="common-redis" options="-parameters" />
|
||||||
<module name="common-web" options="-parameters" />
|
<module name="common-web" options="-parameters" />
|
||||||
<module name="common-websocket" options="-parameters" />
|
|
||||||
<module name="gateway-server" options="-parameters" />
|
<module name="gateway-server" options="-parameters" />
|
||||||
<module name="resource-server" options="-parameters" />
|
<module name="resource-server" options="-parameters" />
|
||||||
<module name="wechat-server" options="-parameters" />
|
<module name="wechat-server" options="-parameters" />
|
||||||
|
|||||||
@ -4,12 +4,9 @@
|
|||||||
<file url="file://$PROJECT_DIR$/admin-server/src/main/java" charset="UTF-8" />
|
<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$/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-core/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-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-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-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/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/base-commons/src/main/resources" 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" />
|
<file url="file://$PROJECT_DIR$/cloud-manage-server/src/main/java" charset="UTF-8" />
|
||||||
|
|||||||
@ -7,11 +7,6 @@
|
|||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="ignoredFiles">
|
|
||||||
<set>
|
|
||||||
<option value="$PROJECT_DIR$/base-commons/common-websocket/pom.xml" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="17 (2)" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="17 (2)" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
||||||
@ -1,10 +1,7 @@
|
|||||||
package com.evotech.hd.authorization.config.oauth2;
|
package com.evotech.hd.authorization.config.oauth2;
|
||||||
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import java.io.IOException;
|
||||||
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.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.http.server.ServletServerHttpResponse;
|
import org.springframework.http.server.ServletServerHttpResponse;
|
||||||
@ -14,7 +11,12 @@ import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
|
|||||||
import org.springframework.security.oauth2.core.OAuth2Error;
|
import org.springframework.security.oauth2.core.OAuth2Error;
|
||||||
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||||
|
|
||||||
import java.io.IOException;
|
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;
|
||||||
|
|
||||||
public class MyAuthenticationFailureHandler implements AuthenticationFailureHandler {
|
public class MyAuthenticationFailureHandler implements AuthenticationFailureHandler {
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package com.evotech.hd.authorization.config.oauth2;
|
package com.evotech.hd.authorization.config.oauth2;
|
||||||
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import java.io.IOException;
|
||||||
import jakarta.servlet.ServletException;
|
import java.time.temporal.ChronoUnit;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import java.util.Map;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
@ -17,9 +17,11 @@ import org.springframework.security.oauth2.server.authorization.authentication.O
|
|||||||
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.Map;
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
|
public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
|
||||||
|
|
||||||
@ -54,7 +56,7 @@ public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHand
|
|||||||
ServletServerHttpResponse httpResponse = new ServletServerHttpResponse(response);
|
ServletServerHttpResponse httpResponse = new ServletServerHttpResponse(response);
|
||||||
|
|
||||||
|
|
||||||
this.accessTokenHttpResponseConverter.write(new Result<Map<String, Object>>().success(tokenResponseParameters), null, httpResponse);
|
this.accessTokenHttpResponseConverter.write(new Result<String>().success(tokenResponseParameters), null, httpResponse);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,17 @@
|
|||||||
package com.evotech.hd.authorization.config.security;
|
package com.evotech.hd.authorization.config.security;
|
||||||
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import java.io.IOException;
|
||||||
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.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.http.server.ServletServerHttpResponse;
|
import org.springframework.http.server.ServletServerHttpResponse;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登陆了,没有权限时,触发异常 返回信息
|
* 登陆了,没有权限时,触发异常 返回信息
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
package com.evotech.hd.authorization.config.security;
|
package com.evotech.hd.authorization.config.security;
|
||||||
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import java.io.IOException;
|
||||||
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.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.http.server.ServletServerHttpResponse;
|
import org.springframework.http.server.ServletServerHttpResponse;
|
||||||
@ -12,7 +8,12 @@ import org.springframework.security.core.AuthenticationException;
|
|||||||
import org.springframework.security.oauth2.server.resource.InvalidBearerTokenException;
|
import org.springframework.security.oauth2.server.resource.InvalidBearerTokenException;
|
||||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||||
|
|
||||||
import java.io.IOException;
|
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未认证(没有登录)时,返回异常 信息
|
* 未认证(没有登录)时,返回异常 信息
|
||||||
|
|||||||
@ -1,16 +1,17 @@
|
|||||||
package com.evotech.hd.authorization.config.security.userdetail;
|
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.authentication.DisabledException;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
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
|
@Slf4j
|
||||||
public class UserDetailService implements UserDetailsService {
|
public class UserDetailService implements UserDetailsService {
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
package com.evotech.hd.authorization.controller;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
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 = "验证码")
|
@Tag(name = "验证码")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/captcha")
|
@RequestMapping("/captcha")
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
package com.evotech.hd.authorization.controller;
|
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.LoginRequest;
|
||||||
import com.evotech.hd.authorization.entity.UserVo;
|
import com.evotech.hd.authorization.entity.UserVo;
|
||||||
import com.evotech.hd.authorization.service.LoginService;
|
import com.evotech.hd.authorization.service.LoginService;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Parameters;
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
@ -11,9 +20,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.apache.http.auth.AuthenticationException;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
@Tag(name = "登陆")
|
@Tag(name = "登陆")
|
||||||
@RestController
|
@RestController
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.evotech.hd.authorization.service;
|
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 {
|
public interface CaptchaService {
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
public interface CloudService {
|
public interface CloudService {
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(value = "/battery/station/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
@GetMapping(value = "/batterystation/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||||
public Result<List<BatteryStation>> loadBatteryStation(@RequestParam("proxyCode") String proxyCode);
|
public Result<List<BatteryStation>> loadBatteryStation(@RequestParam("proxyCode") String proxyCode);
|
||||||
|
|
||||||
@GetMapping(value = "/company/login/one", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
@GetMapping(value = "/company/login/one", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
package com.evotech.hd.authorization.service;
|
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.LoginRequest;
|
||||||
import com.evotech.hd.authorization.entity.UserVo;
|
import com.evotech.hd.authorization.entity.UserVo;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.apache.http.auth.AuthenticationException;
|
|
||||||
|
|
||||||
public interface LoginService {
|
public interface LoginService {
|
||||||
|
|
||||||
|
|||||||
@ -21,19 +21,19 @@ public interface ResourceService {
|
|||||||
|
|
||||||
@GetMapping(value = "/user/userbyname",
|
@GetMapping(value = "/user/userbyname",
|
||||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||||
public Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
public com.evotech.hd.common.core.entity.Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
||||||
|
|
||||||
@PostMapping(value = "/user/userpermbyid",
|
@PostMapping(value = "/user/userpermbyid",
|
||||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||||
public Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
public com.evotech.hd.common.core.entity.Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
||||||
|
|
||||||
@PostMapping(value = "/loginlog/add",
|
@PostMapping(value = "/loginlog/add",
|
||||||
consumes = {MediaType.APPLICATION_JSON_VALUE})
|
consumes = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
public Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
public com.evotech.hd.common.core.entity.Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
||||||
|
|
||||||
@GetMapping(value = "/logininfo/get",
|
@GetMapping(value = "/logininfo/get",
|
||||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||||
public Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
public com.evotech.hd.common.core.entity.Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
||||||
|
|
||||||
@GetMapping(value = "/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
@GetMapping(value = "/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||||
public Result<List<AuthUserStation>> loadBatteryStation(@RequestParam("uid") String uid);
|
public Result<List<AuthUserStation>> loadBatteryStation(@RequestParam("uid") String uid);
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
package com.evotech.hd.authorization.service.impl;
|
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.CaptchaUtil;
|
||||||
import cn.hutool.captcha.LineCaptcha;
|
import cn.hutool.captcha.LineCaptcha;
|
||||||
import cn.hutool.captcha.generator.RandomGenerator;
|
import cn.hutool.captcha.generator.RandomGenerator;
|
||||||
import cn.hutool.core.util.IdUtil;
|
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 jakarta.annotation.Resource;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CaptchaServiceImpl implements CaptchaService {
|
public class CaptchaServiceImpl implements CaptchaService {
|
||||||
@ -30,7 +32,7 @@ public class CaptchaServiceImpl implements CaptchaService {
|
|||||||
String imageBase64Data = captcha.getImageBase64Data();
|
String imageBase64Data = captcha.getImageBase64Data();
|
||||||
String captchaId = IdUtil.fastSimpleUUID();
|
String captchaId = IdUtil.fastSimpleUUID();
|
||||||
redisUtil.set(HDConstant.CAPTCHA_REDIS_PREFIX + captchaId, code, captchaExpire);
|
redisUtil.set(HDConstant.CAPTCHA_REDIS_PREFIX + captchaId, code, captchaExpire);
|
||||||
return new Result<String>().success(captchaId + ":" + imageBase64Data);
|
return new Result<String>().success("OK", captchaId + ":" + imageBase64Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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.LoginRequesHeadertUtil;
|
||||||
import com.evotech.hd.authorization.utils.Oauth2AccessTokenUtil;
|
import com.evotech.hd.authorization.utils.Oauth2AccessTokenUtil;
|
||||||
import com.evotech.hd.authorization.utils.TokenUtil;
|
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.Dto.ResultUtil;
|
||||||
import com.evotech.hd.common.core.constant.HDConstant;
|
import com.evotech.hd.common.core.constant.HDConstant;
|
||||||
import com.evotech.hd.common.core.entity.LoginCacheInfo;
|
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.BatteryStation;
|
||||||
import com.evotech.hd.common.core.entity.cloud.Company;
|
import com.evotech.hd.common.core.entity.cloud.Company;
|
||||||
import com.evotech.hd.common.core.entity.cloud.VehicleInfo;
|
import com.evotech.hd.common.core.entity.cloud.VehicleInfo;
|
||||||
@ -43,6 +43,7 @@ import org.springframework.util.StringUtils;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -70,7 +71,7 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
// 1. 校验验证码
|
// 1. 校验验证码
|
||||||
Result<Boolean> res = captchaService.checkCaptcha(lr.getCode());
|
Result<Boolean> res = captchaService.checkCaptcha(lr.getCode());
|
||||||
if (res.getStatus() != 1) {
|
if (res.getStatus() != 1) {
|
||||||
return new Result<UserVo>().error(CodeMsg.getCodeMsgByCode(res.getCode()), res.getMsg());
|
return new Result<UserVo>().error(res.getCode(), res.getMsg());
|
||||||
}
|
}
|
||||||
// 2. 从请求头获取client信息
|
// 2. 从请求头获取client信息
|
||||||
Map<String, String> oAuth2Client = LoginRequesHeadertUtil.getOAuth2Client(request);
|
Map<String, String> oAuth2Client = LoginRequesHeadertUtil.getOAuth2Client(request);
|
||||||
@ -230,13 +231,13 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void asyncIndexTask(){
|
private void asyncIndexTask(){
|
||||||
// CompletableFuture<Void> asyncTask = CompletableFuture.runAsync(()->{
|
CompletableFuture<Void> asyncTask = CompletableFuture.runAsync(()->{
|
||||||
// try {
|
try {
|
||||||
// cloudService.loadIndexData();
|
cloudService.loadIndexData();
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// log.error("异步处理首页数据异常:{}", e.getMessage());
|
log.error("异步处理首页数据异常:{}", e.getMessage());
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,10 +28,7 @@
|
|||||||
<groupId>org.hibernate.validator</groupId>
|
<groupId>org.hibernate.validator</groupId>
|
||||||
<artifactId>hibernate-validator</artifactId>
|
<artifactId>hibernate-validator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
@ -74,12 +71,6 @@
|
|||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>1.2.58</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.evotech.hd.common.core.Dto.device;
|
package com.evotech.hd.common.core.Dto;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -5,7 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求返回对象
|
* 请求返回对象
|
||||||
@ -27,28 +26,9 @@ public class Result<T> implements Serializable {
|
|||||||
@Schema(description = "返回数据")
|
@Schema(description = "返回数据")
|
||||||
private T data;
|
private T data;
|
||||||
|
|
||||||
public static <T> Result<T> getInstance(){
|
|
||||||
return new Result<T>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Result() {
|
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) {
|
public Result<T> success(T o) {
|
||||||
this.status = 1;
|
this.status = 1;
|
||||||
this.code = CodeMsg.SUCCESS.getCode();
|
this.code = CodeMsg.SUCCESS.getCode();
|
||||||
@ -57,21 +37,6 @@ public class Result<T> implements Serializable {
|
|||||||
return this;
|
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) {
|
public Result<T> error(CodeMsg codeMsg) {
|
||||||
this.status = 1;
|
this.status = 1;
|
||||||
this.code = codeMsg.getCode();
|
this.code = codeMsg.getCode();
|
||||||
@ -85,20 +50,4 @@ public class Result<T> implements Serializable {
|
|||||||
this.msg = errorMsg;
|
this.msg = errorMsg;
|
||||||
return this;
|
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,8 +22,4 @@ public class ResultUtil {
|
|||||||
log.error("当前请求出现异常{}", result.getMsg());
|
log.error("当前请求出现异常{}", result.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> Boolean verifyCode(Result<T> result){
|
|
||||||
return CodeMsg.SUCCESS.getCode().equals(result.getCode());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,35 +0,0 @@
|
|||||||
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,77 +0,0 @@
|
|||||||
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();;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,111 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.evotech.hd.common.core.Dto.home;
|
package com.evotech.hd.common.core.Dto.result.home;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -16,15 +16,6 @@ public class HomeOrderSwapBatteryAmountDto {
|
|||||||
|
|
||||||
Double amount;
|
Double amount;
|
||||||
|
|
||||||
Long dataCount;
|
|
||||||
|
|
||||||
Integer status;
|
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.home;
|
package com.evotech.hd.common.core.Dto.result.home;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -24,9 +24,9 @@ public class HomeOrderSwapBatteryHalfYearAmountDto {
|
|||||||
@Schema(description = "交易金额")
|
@Schema(description = "交易金额")
|
||||||
private Double totalMoney;
|
private Double totalMoney;
|
||||||
|
|
||||||
// @Schema(description = "类型")
|
@Schema(description = "类型")
|
||||||
// private Integer status;
|
private Integer status;
|
||||||
//
|
|
||||||
// @Schema(description = "支付类型")
|
@Schema(description = "支付类型")
|
||||||
// private Integer payType;
|
private Integer payType;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.evotech.hd.common.core.Dto.home;
|
package com.evotech.hd.common.core.Dto.result.home;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.evotech.hd.common.core.Dto.home;
|
package com.evotech.hd.common.core.Dto.result.home;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -22,8 +22,7 @@ public class HomeOrderSwapBatteryProportionDto {
|
|||||||
String stationCode;
|
String stationCode;
|
||||||
@Schema(description = "换电站订单数量")
|
@Schema(description = "换电站订单数量")
|
||||||
Long quantity;
|
Long quantity;
|
||||||
|
@Schema(description = "订单类型")
|
||||||
// @Schema(description = "订单类型")
|
Integer orderType;
|
||||||
// Integer orderType;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2,18 +2,6 @@ package com.evotech.hd.common.core.constant;
|
|||||||
|
|
||||||
public interface HDConstant {
|
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
|
* 大华设备相关CONSTANT
|
||||||
*/
|
*/
|
||||||
@ -24,133 +12,6 @@ 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
|
* 大华设备相关CONSTANT
|
||||||
*/
|
*/
|
||||||
@ -172,6 +33,7 @@ public interface HDConstant {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 权限相关CONSTANT
|
* 权限相关CONSTANT
|
||||||
*/
|
*/
|
||||||
@ -314,8 +176,4 @@ public interface HDConstant {
|
|||||||
* 预约单失效前缀
|
* 预约单失效前缀
|
||||||
*/
|
*/
|
||||||
String preOrder="pre_order:";
|
String preOrder="pre_order:";
|
||||||
/***
|
|
||||||
* 站控推送策略
|
|
||||||
*/
|
|
||||||
String STRATEGY_NAME = "站控推送";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
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,6 +16,4 @@ import java.util.List;
|
|||||||
public interface BatteryStationCdStrategyDao extends BaseMapper<BatteryStationCdStrategy> {
|
public interface BatteryStationCdStrategyDao extends BaseMapper<BatteryStationCdStrategy> {
|
||||||
|
|
||||||
List<BatteryStationCdStrategy> listCdStrategy(@Param("stationCode") String stationCode, @Param("status") Integer status);
|
List<BatteryStationCdStrategy> listCdStrategy(@Param("stationCode") String stationCode, @Param("status") Integer status);
|
||||||
|
|
||||||
BatteryStationCdStrategy getBatteryStationCdStrategyByName(@Param("stationCode") String stationCode, @Param("name") String name);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
package com.evotech.hd.common.core.dao.cloud;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
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,10 +1,20 @@
|
|||||||
package com.evotech.hd.common.core.dao.cloud;
|
package com.evotech.hd.common.core.dao.cloud;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
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.constant.HDConstant;
|
||||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||||
import com.evotech.hd.common.core.permission.DataScope;
|
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 com.evotech.hd.common.core.permission.DataScopes;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
@ -14,24 +24,20 @@ import com.evotech.hd.common.core.permission.DataScopes;
|
|||||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
@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),
|
@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> {
|
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);
|
|
||||||
|
|
||||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
|
||||||
//因为站端不需要显示金额, 所有重新写一个
|
List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
|
||||||
//
|
List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||||
// Long homeFindOrderCountData(@Param("date") Date date);
|
|
||||||
//
|
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||||
// Double homeFindOrderAmountData(@Param("date") Date date);
|
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||||
//
|
|
||||||
// List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
Long homeFindOrderCountData(@Param("date") Date date);
|
||||||
|
|
||||||
|
Double homeFindOrderAmountData(@Param("date") Date date);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
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,9 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.evotech.hd.common.core.constant.HDConstant;
|
import com.evotech.hd.common.core.constant.HDConstant;
|
||||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||||
import com.evotech.hd.common.core.permission.DataScope;
|
import com.evotech.hd.common.core.permission.DataScope;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
@ -15,6 +12,4 @@ import java.util.List;
|
|||||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "creater", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_AUTH_USER_UID)
|
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "creater", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_AUTH_USER_UID)
|
||||||
public interface AuthUserDao extends BaseMapper<AuthUser> {
|
public interface AuthUserDao extends BaseMapper<AuthUser> {
|
||||||
|
|
||||||
List<String> findWuIdByStationCodeAndProxyCode(@Param("stationCode") String stationCode, @Param("proxyCode") String proxyCode);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,12 +2,18 @@ package com.evotech.hd.common.core.entity;
|
|||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.Hidden;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,16 +23,25 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(name = "BaseEntity", description = "基础实体类")
|
@Schema(name = "BaseEntity", description = "基础实体类")
|
||||||
public class BaseEntity extends IdEntity {
|
public class BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "pk_id", type = IdType.AUTO)
|
||||||
|
@Hidden
|
||||||
|
private Integer pkId;
|
||||||
|
|
||||||
@Schema(description = "创建人", hidden = true)
|
@Schema(description = "创建人", hidden = true)
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private String creater;
|
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)
|
@Schema(description = "更新人", hidden = true)
|
||||||
@TableField(fill = FieldFill.UPDATE)
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
private String updater;
|
private String updater;
|
||||||
@ -37,10 +52,4 @@ public class BaseEntity extends IdEntity {
|
|||||||
@TableField(fill = FieldFill.UPDATE)
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
private Date uptime;
|
private Date uptime;
|
||||||
|
|
||||||
public BaseEntity() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaseEntity(Integer pkId) {
|
|
||||||
super(pkId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
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,171 +1,164 @@
|
|||||||
//package com.evotech.hd.common.core.entity;
|
package com.evotech.hd.common.core.entity;
|
||||||
//
|
|
||||||
//import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
//
|
|
||||||
//import com.evotech.hd.common.core.enums.CodeMsg;
|
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||||
//
|
|
||||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
//import lombok.Data;
|
import lombok.Data;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * @author zrb
|
* @author zrb
|
||||||
// * @date 2024年9月2日17:25:54
|
* @date 2024年9月2日17:25:54
|
||||||
// */
|
*/
|
||||||
//@Data
|
@Data
|
||||||
//@Schema(name = "请求返回对象")
|
@Schema(name = "请求返回对象")
|
||||||
//public class Result<T> implements Serializable {
|
public class Result<T> implements Serializable {
|
||||||
//
|
|
||||||
// private static final long serialVersionUID = -7806513009135956518L;
|
private static final long serialVersionUID = -7806513009135956518L;
|
||||||
//
|
|
||||||
// @Schema(description = "请求处理状态", example = "1")
|
@Schema(description = "请求处理状态", example = "1")
|
||||||
// private Integer status;
|
private Integer status;
|
||||||
// @Schema(description = "状态码", example = "1000")
|
@Schema(description = "状态码", example = "1000")
|
||||||
// private String code;
|
private String code;
|
||||||
// @Schema(description = "返回消息")
|
@Schema(description = "返回消息")
|
||||||
// private String msg;
|
private String msg;
|
||||||
// @Schema(description = "返回数据")
|
@Schema(description = "返回数据")
|
||||||
// private Object data;
|
private Object data;
|
||||||
//
|
|
||||||
// private T obj;
|
private T obj;
|
||||||
//
|
|
||||||
//
|
|
||||||
// public Result(Integer status, String code, String msg, Object data) {
|
public Result(Integer status, String code, String msg, Object data) {
|
||||||
// this.status = status;
|
this.status = status;
|
||||||
// this.code = code;
|
this.code = code;
|
||||||
// this.msg = msg;
|
this.msg = msg;
|
||||||
// this.data = data;
|
this.data = data;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result(Integer status, String msg, Object data) {
|
public Result(Integer status, String msg, Object data) {
|
||||||
// this.status = status;
|
this.status = status;
|
||||||
// this.msg = msg;
|
this.msg = msg;
|
||||||
// this.data = data;
|
this.data = data;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result(Integer status) {
|
public Result(Integer status) {
|
||||||
// this.status = status;
|
this.status = status;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result() {
|
public Result() {
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result(Integer status, String code, String msg) {
|
public Result(Integer status, String code, String msg) {
|
||||||
// this.status = status;
|
this.status = status;
|
||||||
// this.code = code;
|
this.code = code;
|
||||||
// this.msg = msg;
|
this.msg = msg;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result(Integer status, String msg) {
|
public Result(Integer status, String msg) {
|
||||||
// this.status = status;
|
this.status = status;
|
||||||
// this.msg = msg;
|
this.msg = msg;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result<T> success() {
|
public Result<T> success(Object o) {
|
||||||
// this.status = 1;
|
this.status = 1;
|
||||||
// this.code = CodeMsg.SUCCESS.getCode();
|
this.code = CodeMsg.SUCCESS.getCode();
|
||||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
this.msg = CodeMsg.SUCCESS.getMsg();
|
||||||
// return this;
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> success(Object o) {
|
|
||||||
// this.status = 1;
|
public Result<T> success(String msg, Object o) {
|
||||||
// this.code = CodeMsg.SUCCESS.getCode();
|
this.status = 1;
|
||||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
this.code = CodeMsg.SUCCESS.getCode();
|
||||||
// this.data = o;
|
this.msg = msg;
|
||||||
// return this;
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> success(String msg, Object o) {
|
|
||||||
// this.status = 1;
|
public Result<T> success(String msg) {
|
||||||
// this.code = CodeMsg.SUCCESS.getCode();
|
this.status = 1;
|
||||||
// this.msg = msg;
|
this.code = CodeMsg.SUCCESS.getCode();
|
||||||
// this.data = o;
|
this.msg = msg;
|
||||||
// return this;
|
this.data = CodeMsg.SUCCESS.getMsg();
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> success(String msg) {
|
|
||||||
// this.status = 1;
|
public Result<T> success(String code, String msg, Object o) {
|
||||||
// this.code = CodeMsg.SUCCESS.getCode();
|
this.status = 1;
|
||||||
// this.msg = msg;
|
this.code = code;
|
||||||
// this.data = CodeMsg.SUCCESS.getMsg();
|
this.msg = msg;
|
||||||
// return this;
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> success(String code, String msg, Object o) {
|
|
||||||
// this.status = 1;
|
public Result<T> success(CodeMsg cm, Object o) {
|
||||||
// this.code = code;
|
this.status = 0;
|
||||||
// this.msg = msg;
|
this.code = cm.getCode();
|
||||||
// this.data = o;
|
this.msg = cm.getMsg();
|
||||||
// return this;
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> success(CodeMsg cm, Object o) {
|
|
||||||
// this.status = 0;
|
public Result<T> error(String msg) {
|
||||||
// this.code = cm.getCode();
|
this.status = 0;
|
||||||
// this.msg = cm.getMsg();
|
this.code = CodeMsg.ERROR.getCode();
|
||||||
// this.data = o;
|
this.msg = msg;
|
||||||
// return this;
|
this.data = "ERROR";
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> error(String msg) {
|
|
||||||
// this.status = 0;
|
public Result<T> error(String code, String msg) {
|
||||||
// this.code = CodeMsg.ERROR.getCode();
|
this.status = 0;
|
||||||
// this.msg = msg;
|
this.code = code;
|
||||||
// this.data = "ERROR";
|
this.msg = msg;
|
||||||
// return this;
|
this.data = "ERROR";
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> error(String code, String msg) {
|
|
||||||
// this.status = 0;
|
public Result<T> error(CodeMsg cm) {
|
||||||
// this.code = code;
|
this.status = 0;
|
||||||
// this.msg = msg;
|
this.code = cm.getCode();
|
||||||
// this.data = "ERROR";
|
this.msg = cm.getMsg();
|
||||||
// return this;
|
return this;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Result<T> error(CodeMsg cm) {
|
public Result<T> error(CodeMsg cm, Object o) {
|
||||||
// this.status = 0;
|
return error(cm.getCode(), cm.getMsg(), o);
|
||||||
// this.code = cm.getCode();
|
}
|
||||||
// this.msg = cm.getMsg();
|
|
||||||
// return this;
|
public Result<T> error(String code, String msg, Object o) {
|
||||||
// }
|
this.status = 0;
|
||||||
//
|
this.code = code;
|
||||||
// public Result<T> error(CodeMsg cm, Object o) {
|
this.msg = msg;
|
||||||
// return error(cm.getCode(), cm.getMsg(), o);
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> error(String code, String msg, Object o) {
|
|
||||||
// this.status = 0;
|
public Result<T> error(String msg, Object o) {
|
||||||
// this.code = code;
|
this.status = 0;
|
||||||
// this.msg = msg;
|
this.code = CodeMsg.ERROR.getCode();
|
||||||
// this.data = o;
|
this.msg = msg;
|
||||||
// return this;
|
this.data = o;
|
||||||
// }
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> error(String msg, Object o) {
|
|
||||||
// this.status = 0;
|
|
||||||
// this.code = CodeMsg.ERROR.getCode();
|
public Result<T> exception(Object data) {
|
||||||
// this.msg = msg;
|
this.status = -1;
|
||||||
// this.data = o;
|
this.code = CodeMsg.ERROR.getCode();
|
||||||
// return this;
|
this.msg = CodeMsg.ERROR.getMsg();
|
||||||
// }
|
this.data = data==null?"未知异常":data;
|
||||||
//
|
return this;
|
||||||
//
|
}
|
||||||
// public Result<T> exception(Object data) {
|
|
||||||
// this.status = -1;
|
|
||||||
// this.code = CodeMsg.ERROR.getCode();
|
public Result<T> bussinessException(String code, String msg, Object o) {
|
||||||
// this.msg = CodeMsg.ERROR.getMsg();
|
this.status = -1;
|
||||||
// this.data = data==null?"未知异常":data;
|
this.code = code;
|
||||||
// return this;
|
this.msg = msg;
|
||||||
// }
|
this.data = o;
|
||||||
//
|
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;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
|
|||||||
@ -57,10 +57,6 @@ public class BatteryStation extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "地址-区县")
|
@Schema(description = "地址-区县")
|
||||||
private String addressArea;
|
private String addressArea;
|
||||||
|
|
||||||
@Schema(description = "区划编码", requiredMode = RequiredMode.REQUIRED)
|
|
||||||
@NotBlank(message = "区划编码不能为空")
|
|
||||||
private String divisionNo;
|
|
||||||
|
|
||||||
@Schema(description = "注册日期")
|
@Schema(description = "注册日期")
|
||||||
private String registerDate;
|
private String registerDate;
|
||||||
|
|
||||||
@ -135,7 +131,4 @@ public class BatteryStation extends BaseEntity implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "场地Code--DH")
|
@Schema(description = "场地Code--DH")
|
||||||
private String orgCode;
|
private String orgCode;
|
||||||
|
|
||||||
@Schema(description = "告警状态", hidden = true)
|
|
||||||
private Boolean alarm;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,22 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
package com.evotech.hd.common.core.entity.cloud;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
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;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2025-02-10
|
* @since 2025-02-10
|
||||||
@ -44,18 +50,4 @@ public class BatteryStationCdStrategyDetail extends BaseEntity implements Serial
|
|||||||
|
|
||||||
@Schema(description = "充电功率")
|
@Schema(description = "充电功率")
|
||||||
private Double chargingPower;
|
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,7 +1,16 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
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.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
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;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
@ -9,8 +18,6 @@ import jakarta.validation.constraints.NotNull;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2024-10-17
|
* @since 2024-10-17
|
||||||
@ -47,16 +54,11 @@ public class BatteryStationDc extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "站码或车牌照", requiredMode = RequiredMode.REQUIRED)
|
@Schema(description = "站码或车牌照", requiredMode = RequiredMode.REQUIRED)
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String sourceCode;
|
private String sourceCode;
|
||||||
/***
|
|
||||||
* 具体参考 HDConstant.DcConstant.STATUS_*
|
|
||||||
*/
|
|
||||||
@Schema(description = "状态:1-出租中,2-充电中,3-空闲,4-故障,5-其它", requiredMode = RequiredMode.REQUIRED)
|
@Schema(description = "状态:1-出租中,2-充电中,3-空闲,4-故障,5-其它", requiredMode = RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "状态不能为空")
|
@NotNull(message = "状态不能为空")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/***
|
|
||||||
* 具体参考 HDConstant.DcConstant.POINT_TYPE_*
|
|
||||||
*/
|
|
||||||
@Schema(description = "轨迹点类型:1-电站,2-车辆")
|
@Schema(description = "轨迹点类型:1-电站,2-车辆")
|
||||||
private Integer pointType;
|
private Integer pointType;
|
||||||
|
|
||||||
@ -70,7 +72,7 @@ public class BatteryStationDc extends BaseEntity implements Serializable {
|
|||||||
private Integer soc;
|
private Integer soc;
|
||||||
|
|
||||||
@Schema(description = "电池仓位号")
|
@Schema(description = "电池仓位号")
|
||||||
private String dccNo;
|
private Integer dccNo;
|
||||||
|
|
||||||
@Schema(description = "删除标志:1-已删除,0-未删除", hidden = true)
|
@Schema(description = "删除标志:1-已删除,0-未删除", hidden = true)
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|||||||
@ -1,19 +1,27 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
package com.evotech.hd.common.core.entity.cloud;
|
||||||
|
|
||||||
import cn.hutool.core.date.DatePattern;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
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;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2024-10-17
|
* @since 2024-10-17
|
||||||
@ -36,9 +44,6 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
|||||||
@Schema(description = "换电站编码")
|
@Schema(description = "换电站编码")
|
||||||
private String stationName;
|
private String stationName;
|
||||||
|
|
||||||
@Schema(description = "基本服务费")
|
|
||||||
private BigDecimal serviceFee;
|
|
||||||
|
|
||||||
@Schema(description = "开始日期", requiredMode = RequiredMode.REQUIRED, example = DatePattern.PURE_DATE_PATTERN)
|
@Schema(description = "开始日期", requiredMode = RequiredMode.REQUIRED, example = DatePattern.PURE_DATE_PATTERN)
|
||||||
@NotBlank(message = "开始时间不能为空")
|
@NotBlank(message = "开始时间不能为空")
|
||||||
private String dayBegin;
|
private String dayBegin;
|
||||||
@ -56,9 +61,6 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
|||||||
@Schema(description = "每度电收费")
|
@Schema(description = "每度电收费")
|
||||||
private BigDecimal eachKwhFee;
|
private BigDecimal eachKwhFee;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "正常换电服务费")
|
@Schema(description = "正常换电服务费")
|
||||||
private BigDecimal commonRemainFee;
|
private BigDecimal commonRemainFee;
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,26 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
package com.evotech.hd.common.core.entity.cloud;
|
||||||
|
|
||||||
import cn.hutool.core.date.DatePattern;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
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;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
@ -35,9 +42,6 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Integer standardId;
|
private Integer standardId;
|
||||||
|
|
||||||
@Schema(description = "服务费")
|
|
||||||
private BigDecimal serviceFee;
|
|
||||||
|
|
||||||
@Schema(description = "每公里收费")
|
@Schema(description = "每公里收费")
|
||||||
private BigDecimal eachKmFee;
|
private BigDecimal eachKmFee;
|
||||||
|
|
||||||
@ -57,5 +61,6 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
|||||||
@DateTimeFormat(pattern = DatePattern.NORM_TIME_PATTERN)
|
@DateTimeFormat(pattern = DatePattern.NORM_TIME_PATTERN)
|
||||||
private LocalTime timeEnd;
|
private LocalTime timeEnd;
|
||||||
|
|
||||||
|
@Schema(description = "谷段服务费")
|
||||||
|
private BigDecimal timeServiceFee;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,55 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
@ -1,17 +1,21 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
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.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
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;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
@ -31,7 +35,7 @@ public class OrderSwapBatteryPre extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "来源是站端时,记录发送Id,其他来源不需要", hidden = true)
|
@Schema(description = "来源是站端时,记录发送Id,其他来源不需要", hidden = true)
|
||||||
private String sourceId;
|
private String sourceId;
|
||||||
|
|
||||||
@Schema(description = "预约人的微信Id", requiredMode = RequiredMode.REQUIRED)
|
@Schema(description = "预约人编码", requiredMode = RequiredMode.REQUIRED)
|
||||||
private String ucode;
|
private String ucode;
|
||||||
|
|
||||||
@Schema(description = "预约人姓名", requiredMode = RequiredMode.REQUIRED)
|
@Schema(description = "预约人姓名", requiredMode = RequiredMode.REQUIRED)
|
||||||
|
|||||||
@ -1,15 +1,19 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
package com.evotech.hd.common.core.entity.cloud;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2024-12-11
|
* @since 2024-12-11
|
||||||
@ -31,7 +35,6 @@ public class OrderSwapBatteryStep extends BaseEntity implements Serializable {
|
|||||||
private String stepName;
|
private String stepName;
|
||||||
|
|
||||||
@Schema(description = "步骤时间")
|
@Schema(description = "步骤时间")
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date stepTime;
|
private Date stepTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,19 @@
|
|||||||
package com.evotech.hd.common.core.entity.cloud;
|
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.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
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.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2024-11-22
|
* @since 2024-11-22
|
||||||
@ -24,34 +28,38 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "换电站编码")
|
@Schema(description = "换电站编码")
|
||||||
private String stationCode;
|
private String stationCode;
|
||||||
|
|
||||||
@Schema(description = "交易人微信Id")
|
@Schema(description = "交易人")
|
||||||
private String plateCompanyCode;
|
|
||||||
|
|
||||||
@Schema(description = "交易人name")
|
|
||||||
private String trader;
|
private String trader;
|
||||||
|
|
||||||
@Schema(description = "交易人微信Id")
|
@Schema(description = "交易人编码")
|
||||||
private String traderCode;
|
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 = "交易编码")
|
@Schema(description = "交易编码")
|
||||||
private String outTradeNo;
|
private String outTradeNo;
|
||||||
|
|
||||||
@Schema(description = "交易类型:1-充值,2-订单消费,3-退款, 9-提现")
|
@Schema(description = "支付方式:1-账户余额,2-微信,3-支付宝,4-网银,5 -充电补偿")
|
||||||
private Integer tradeType;
|
|
||||||
|
|
||||||
@Schema(description = "支付方式:1-账户余额,2-微信,3-支付宝,4-网银,5 -充电补偿, 6-公对公转账")
|
|
||||||
private Integer payType;
|
private Integer payType;
|
||||||
@Schema(description = "微信支付API类型")
|
|
||||||
private String wechatPayApiType;
|
|
||||||
/***
|
|
||||||
* 交易信息
|
|
||||||
*/
|
|
||||||
private String tradeMessage;
|
|
||||||
/***
|
|
||||||
* 交易账号
|
|
||||||
*/
|
|
||||||
// @Schema(description = "变动金额的钱包账户,钱包金额不变时不需要")
|
|
||||||
private String payAccount;
|
|
||||||
|
|
||||||
@Schema(description = "订单数量")
|
@Schema(description = "订单数量")
|
||||||
private Integer orderCount;
|
private Integer orderCount;
|
||||||
@ -71,11 +79,14 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "微信支付订单号")
|
@Schema(description = "微信支付订单号")
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
|
|
||||||
@Schema(description = "支付结果,暂用微信结果的枚举类型, 新增 paymentInProgress 结算中类型")
|
@Schema(description = "支付结果,暂用微信结果的枚举类型")
|
||||||
private String payResult;
|
private String payResult;
|
||||||
|
|
||||||
|
@Schema(description = "在微信等支付网关创建支付订单时失败,返回的失败原因")
|
||||||
|
private String payMsg;
|
||||||
|
|
||||||
@Schema(description = "付款人编码,对于个人账户,交易发起人和付款人一般是同一人。公司账户交易发起人是公司,付款人可能是 微信账户")
|
@Schema(description = "付款人编码,对于个人账户,交易发起人和付款人一般是同一人。公司账户交易发起人是公司,付款人可能是 微信账户")
|
||||||
private String payWechatId;
|
private String payer;
|
||||||
|
|
||||||
@Schema(description = "支付完成时间")
|
@Schema(description = "支付完成时间")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ -85,33 +96,12 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
|||||||
@Schema(description = "删除标识,1-已删除,0-未删除", hidden = true)
|
@Schema(description = "删除标识,1-已删除,0-未删除", hidden = true)
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
@Schema(description = "appid")
|
@Schema(description = "退款结果: 0-未退款, 1-退款中,2-已退款, 3-退款失败")
|
||||||
private String appid;
|
private Integer refundResult;
|
||||||
//
|
|
||||||
@Schema(description = "银行类型")
|
|
||||||
private String bankType;
|
|
||||||
|
|
||||||
@Schema(description = "收款商户号")
|
@Schema(description = "在微信等退款网关创建退款订单时失败,返回的失败原因")
|
||||||
private String mchid;
|
private String refundMsg;
|
||||||
|
|
||||||
@Schema(description = "订单总描述")
|
@Schema(description = "退款返回数据")
|
||||||
private String description;
|
private String refundReturn;
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,4 @@ public class PageListWalletRequest extends BasePageRequest {
|
|||||||
@Schema(description = "引入站点")
|
@Schema(description = "引入站点")
|
||||||
private String stationCode;
|
private String stationCode;
|
||||||
|
|
||||||
@Schema(description = "客户电话")
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,39 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,108 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -101,7 +101,4 @@ public class AuthUser extends BaseEntity implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String stationCodes;
|
private String stationCodes;
|
||||||
|
|
||||||
@Schema(description = "微信用户id")
|
|
||||||
private String wuid;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
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,9 +1,5 @@
|
|||||||
package com.evotech.hd.common.core.enums;
|
package com.evotech.hd.common.core.enums;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 100 Continue 继续。客户端应继续其请求
|
* 100 Continue 继续。客户端应继续其请求
|
||||||
101 Switching Protocols 切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议,例如,切换到HTTP的新版本协议
|
101 Switching Protocols 切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议,例如,切换到HTTP的新版本协议
|
||||||
@ -104,10 +100,4 @@ public enum CodeMsg {
|
|||||||
this.msg = msg;
|
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;
|
package com.evotech.hd.common.core.enums;
|
||||||
|
|
||||||
public enum OrderStatusEnums implements BaseEnum<Integer, String> {
|
public enum OrderStatusEnums {
|
||||||
|
|
||||||
CREATE(1, "已创建"),
|
CREATE(1, "已创建"),
|
||||||
|
|
||||||
SWAP(2, "换电中"),
|
SWAP(2, "换电开始"),
|
||||||
|
|
||||||
SWAPOVER(3, "换电完成"),
|
SWAPOVER(3, "换电完成"),
|
||||||
|
|
||||||
@ -16,24 +16,13 @@ public enum OrderStatusEnums implements BaseEnum<Integer, String> {
|
|||||||
|
|
||||||
FINISH(7, "已完成"),
|
FINISH(7, "已完成"),
|
||||||
|
|
||||||
SETTLEMENT_IN_PROGRESS(8, "结算中"),
|
CANCLE(9, "已取消");
|
||||||
|
|
||||||
CANCLE(9, "已取消"),
|
|
||||||
|
|
||||||
REFUND(-1, "订单退款"),
|
|
||||||
|
|
||||||
REFUND_PART(-2, "订单不分退款"),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Integer code;
|
Integer code;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Integer getCode() {
|
public Integer getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@ -47,14 +36,4 @@ public enum OrderStatusEnums implements BaseEnum<Integer, String> {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getKey() {
|
|
||||||
return this.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getValue() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,9 +9,6 @@ public enum PayTypeEnums {
|
|||||||
ALIPAY(3, "支付宝"),
|
ALIPAY(3, "支付宝"),
|
||||||
|
|
||||||
BANK(4, "网银"),
|
BANK(4, "网银"),
|
||||||
CHARGING_COMPENSATION(5, "充电补偿"),
|
|
||||||
|
|
||||||
BUSINESS_TO_BUSINESS(6, "公对公"),
|
|
||||||
|
|
||||||
OTHER(9, "其他");
|
OTHER(9, "其他");
|
||||||
|
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
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, "对中机构"),
|
|
||||||
|
|
||||||
DISMANTLE_OLD_ELECTRICITY(4, "拆旧电"),
|
|
||||||
|
|
||||||
DISCHARGE_OLD_ELECTRICITY(5, "放旧电"),
|
|
||||||
|
|
||||||
GET_NEW_ELECTRICITY(6, "取新电"),
|
|
||||||
|
|
||||||
INSTALL_NEW_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;}
|
|
||||||
}
|
|
||||||
@ -1,203 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -45,6 +45,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* @DES 检查集合为空
|
* @DES 检查集合为空
|
||||||
* @author andy.shi
|
* @author andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @createDate 2020年12月25日下午2:14:43
|
* @createDate 2020年12月25日下午2:14:43
|
||||||
* @methodName Collections.isEmpty
|
* @methodName Collections.isEmpty
|
||||||
* @param list
|
* @param list
|
||||||
@ -58,6 +59,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* @DES 检查集合不为空
|
* @DES 检查集合不为空
|
||||||
* @author andy.shi
|
* @author andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @createDate 2020年12月25日下午2:15:07
|
* @createDate 2020年12月25日下午2:15:07
|
||||||
* @methodName Collections.isNotEmpty
|
* @methodName Collections.isNotEmpty
|
||||||
* @param collection
|
* @param collection
|
||||||
@ -71,6 +73,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 将list进行分页
|
* 将list进行分页
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月15日上午9:37:07
|
* @date 2020年9月15日上午9:37:07
|
||||||
* @param <T> 泛型, 根据传入的对对象类型,返回类型
|
* @param <T> 泛型, 根据传入的对对象类型,返回类型
|
||||||
* @param list 需要分组的集合
|
* @param list 需要分组的集合
|
||||||
@ -106,6 +109,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 创建对象
|
* 创建对象
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月15日上午9:37:07
|
* @date 2020年9月15日上午9:37:07
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @return
|
* @return
|
||||||
@ -117,6 +121,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* @DES 数组转对象
|
* @DES 数组转对象
|
||||||
* @author andy.shi
|
* @author andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @createDate 2020年12月25日下午2:09:14
|
* @createDate 2020年12月25日下午2:09:14
|
||||||
* @methodName Collections.asList
|
* @methodName Collections.asList
|
||||||
* @param objs
|
* @param objs
|
||||||
@ -152,6 +157,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 去除集合的重复项
|
* 去除集合的重复项
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月24日上午9:09:07
|
* @date 2020年9月24日上午9:09:07
|
||||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||||
* @param list1 去重的集合1
|
* @param list1 去重的集合1
|
||||||
@ -166,6 +172,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 去除集合的重复项
|
* 去除集合的重复项
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月24日上午9:13:09
|
* @date 2020年9月24日上午9:13:09
|
||||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||||
* @param listArray 去重的集合数组
|
* @param listArray 去重的集合数组
|
||||||
@ -196,6 +203,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 获取重复数据
|
* 获取重复数据
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月24日上午9:46:03
|
* @date 2020年9月24日上午9:46:03
|
||||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||||
* @param list1 查重的集合1
|
* @param list1 查重的集合1
|
||||||
@ -209,6 +217,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* 获取重复数据
|
* 获取重复数据
|
||||||
* @author Andy.shi
|
* @author Andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @date 2020年9月24日上午9:44:30
|
* @date 2020年9月24日上午9:44:30
|
||||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||||
* @param listArray 需要查重的集合数组
|
* @param listArray 需要查重的集合数组
|
||||||
@ -272,6 +281,7 @@ public class Collections implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* @DES 组装map数据对象
|
* @DES 组装map数据对象
|
||||||
* @author andy.shi
|
* @author andy.shi
|
||||||
|
* @company 龙腾工作室
|
||||||
* @createDate 2020年12月25日下午1:37:05
|
* @createDate 2020年12月25日下午1:37:05
|
||||||
* @methodName MapLists.createMap
|
* @methodName MapLists.createMap
|
||||||
* @param args
|
* @param args
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
package com.evotech.hd.common.core.utils;
|
package com.evotech.hd.common.core.utils;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
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 {
|
public class CommonUtil {
|
||||||
|
|
||||||
@ -51,18 +48,5 @@ public class CommonUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
package com.evotech.hd.common.core.utils;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类
|
|
||||||
*
|
|
||||||
* @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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -2,8 +2,6 @@ package com.evotech.hd.common.config;
|
|||||||
|
|
||||||
import com.mongodb.ConnectionString;
|
import com.mongodb.ConnectionString;
|
||||||
import lombok.Data;
|
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.MongoDatabaseFactory;
|
||||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||||
@ -25,25 +23,12 @@ import java.util.List;
|
|||||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Configuration
|
|
||||||
public abstract class AbstractMongoDbConfig{
|
public abstract class AbstractMongoDbConfig{
|
||||||
|
|
||||||
// MongoDB Properties
|
// MongoDB Properties
|
||||||
@Value("${yt.base_properties.uri:}")
|
private String uri, userName, password, host, dataBase, authenticationDataBase;
|
||||||
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;
|
private Integer port;
|
||||||
|
|
||||||
|
|
||||||
public MongoDatabaseFactory mongoDbFactory(){
|
public MongoDatabaseFactory mongoDbFactory(){
|
||||||
//String connectionString = "mongodb://" + userName + ":" + password+ "@"+ host+":"+port+"/" + dataBase+"?authSource="+authenticationDataBase;
|
//String connectionString = "mongodb://" + userName + ":" + password+ "@"+ host+":"+port+"/" + dataBase+"?authSource="+authenticationDataBase;
|
||||||
return new SimpleMongoClientDatabaseFactory(getConnectionString());
|
return new SimpleMongoClientDatabaseFactory(getConnectionString());
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConfigurationProperties(prefix = "yt.battery-box", ignoreInvalidFields = true)
|
@ConfigurationProperties(prefix = "yt.battery-box", ignoreUnknownFields = true)
|
||||||
public class BatteryBoxProperties extends AbstractMongoDbConfig {
|
public class BatteryBoxProperties extends AbstractMongoDbConfig {
|
||||||
|
|
||||||
@Bean("mongoTemplateBatteryBox")
|
@Bean("mongoTemplateBatteryBox")
|
||||||
|
|||||||
@ -17,9 +17,8 @@ import org.springframework.data.mongodb.core.MongoTemplate;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConfigurationProperties(prefix = "yt.battery-info", ignoreInvalidFields = true)
|
@ConfigurationProperties(prefix = "yt.battery-info", ignoreUnknownFields = true)
|
||||||
public class BatteryInfoProperties extends AbstractMongoDbConfig {
|
public class BatteryInfoProperties extends AbstractMongoDbConfig {
|
||||||
|
|
||||||
@Primary
|
@Primary
|
||||||
@Bean("mongoTemplateBatteryInfo")
|
@Bean("mongoTemplateBatteryInfo")
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -10,18 +10,10 @@ package com.evotech.hd.common.constant;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class MongoConstant {
|
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_DATA_BASE="battery_info";
|
||||||
//电池箱实时信息数据库
|
//电池箱实时信息数据库
|
||||||
public static final String BATTERY_BOX_DATA_BASE="battery_box";
|
public static final String BATTERY_BOX_DATA_BASE="battery_box";
|
||||||
//电池箱实时信息数据库
|
|
||||||
public static final String STATION_INFO_BASE="station_info";
|
|
||||||
|
|
||||||
public static final String SEPARATION = "_";
|
public static final String SEPARATION = "_";
|
||||||
/***
|
/***
|
||||||
@ -33,7 +25,7 @@ public class MongoConstant {
|
|||||||
* 条件查询, 示例
|
* 条件查询, 示例
|
||||||
* put(查询类型+"条件名称","条件值")
|
* put(查询类型+"条件名称","条件值")
|
||||||
*/
|
*/
|
||||||
public static final String EQ = "and";
|
public static final String AND = "and";
|
||||||
public static final String IN = "in";
|
public static final String IN = "in";
|
||||||
public static final String NOT_IN = "not_in";
|
public static final String NOT_IN = "not_in";
|
||||||
public static final String GT = "gt";
|
public static final String GT = "gt";
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.evotech.hd.common.documnet;
|
package com.evotech.hd.common.documnet;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,12 +14,22 @@ import org.springframework.data.mongodb.core.mapping.Document;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Document
|
@Document
|
||||||
public class BatData extends BaseDocumentEntity{
|
public class BatData {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 时间戳做id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
String id;
|
||||||
|
|
||||||
|
String stationCode;
|
||||||
|
|
||||||
String batCode;
|
String batCode;
|
||||||
|
|
||||||
String cabinetNo;
|
String cabinetNo;
|
||||||
|
|
||||||
|
String value;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* value 内容参考
|
* value 内容参考
|
||||||
* 仓位序号 cabinetNo int 仓位序号
|
* 仓位序号 cabinetNo int 仓位序号
|
||||||
@ -53,7 +64,9 @@ public class BatData extends BaseDocumentEntity{
|
|||||||
public BatData() {
|
public BatData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BatData(String batCode, String cabinetNo, String value) {
|
public BatData(String id, String stationCode, String batCode, String cabinetNo, String value) {
|
||||||
|
this.id = id;
|
||||||
|
this.stationCode = stationCode;
|
||||||
this.batCode = batCode;
|
this.batCode = batCode;
|
||||||
this.cabinetNo = cabinetNo;
|
this.cabinetNo = cabinetNo;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.evotech.hd.common.documnet;
|
package com.evotech.hd.common.documnet;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,12 +15,21 @@ import org.springframework.data.mongodb.core.mapping.Document;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Document
|
@Document
|
||||||
public class ChargingData extends BaseDocumentEntity{
|
public class ChargingData {
|
||||||
|
/***
|
||||||
|
* 时间戳做id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
String id;
|
||||||
|
|
||||||
|
String stationCode;
|
||||||
|
|
||||||
String batCode;
|
String batCode;
|
||||||
|
|
||||||
String chgSn;
|
String chgSn;
|
||||||
|
|
||||||
|
String value;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* value 内容参考
|
* value 内容参考
|
||||||
* 充电机编号 chgID string 充电机编号,采用 16 位数字编码
|
* 充电机编号 chgID string 充电机编号,采用 16 位数字编码
|
||||||
@ -158,7 +168,9 @@ public class ChargingData extends BaseDocumentEntity{
|
|||||||
public ChargingData() {
|
public ChargingData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChargingData(String batCode, String chgSn, String value) {
|
public ChargingData(String id,String stationCode, String batCode, String chgSn, String value) {
|
||||||
|
this.id = id;
|
||||||
|
this.stationCode = stationCode;
|
||||||
this.batCode = batCode;
|
this.batCode = batCode;
|
||||||
this.chgSn = chgSn;
|
this.chgSn = chgSn;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -18,11 +18,6 @@ public class MongoDBException extends Exception{
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MongoDBException(Exception e) {
|
|
||||||
super(e);
|
|
||||||
log.error("mongodb 数据库存储异常============{}", e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MongoDBException(String message) {
|
public MongoDBException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
log.error("mongodb 数据库存储异常============{}", message);
|
log.error("mongodb 数据库存储异常============{}", message);
|
||||||
|
|||||||
@ -39,6 +39,7 @@ public class MongoDBService {
|
|||||||
private void init(){
|
private void init(){
|
||||||
if(!CollectionUtils.isEmpty(mongoTemplates)){
|
if(!CollectionUtils.isEmpty(mongoTemplates)){
|
||||||
for (MongoTemplate mongoTemplate: mongoTemplates){
|
for (MongoTemplate mongoTemplate: mongoTemplates){
|
||||||
|
System.out.println(mongoTemplate.getDb().getName());
|
||||||
mongoTemplateMap.put(mongoTemplate.getDb().getName(),mongoTemplate);
|
mongoTemplateMap.put(mongoTemplate.getDb().getName(),mongoTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +178,7 @@ public class MongoDBService {
|
|||||||
String[] keyAndQueryType = key.split(MongoConstant.SEPARATION);
|
String[] keyAndQueryType = key.split(MongoConstant.SEPARATION);
|
||||||
//根据类型做查询
|
//根据类型做查询
|
||||||
switch (keyAndQueryType[0]){
|
switch (keyAndQueryType[0]){
|
||||||
case MongoConstant.EQ:
|
case MongoConstant.AND:
|
||||||
query.addCriteria(Criteria.where(keyAndQueryType[1]).is(params.get(key)));
|
query.addCriteria(Criteria.where(keyAndQueryType[1]).is(params.get(key)));
|
||||||
break;
|
break;
|
||||||
case MongoConstant.IN:
|
case MongoConstant.IN:
|
||||||
|
|||||||
@ -26,8 +26,12 @@ public class InsertAndUpdateMybatisHandler implements MetaObjectHandler {
|
|||||||
public void insertFill(MetaObject metaObject) {
|
public void insertFill(MetaObject metaObject) {
|
||||||
try {
|
try {
|
||||||
AuthUser user = RedisPermissionUtils.getUser();
|
AuthUser user = RedisPermissionUtils.getUser();
|
||||||
if(BeanUtil.isNotEmpty(metaObject) && BeanUtil.isNotEmpty(user)){
|
if(BeanUtil.isEmpty(user)){
|
||||||
mySetFieldValByName("creater",(BeanUtil.isEmpty(user) ? "system" : user.getUid()),metaObject);
|
log.info("当前操作位登录, 无需执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(BeanUtil.isNotEmpty(metaObject)){
|
||||||
|
mySetFieldValByName("creater",user.getUid(),metaObject);
|
||||||
mySetFieldValByName("ctime",new Date(),metaObject);
|
mySetFieldValByName("ctime",new Date(),metaObject);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -47,9 +51,13 @@ public class InsertAndUpdateMybatisHandler implements MetaObjectHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void updateFill(MetaObject metaObject) {
|
public void updateFill(MetaObject metaObject) {
|
||||||
try {
|
try {
|
||||||
AuthUser user = RedisPermissionUtils.getUser();
|
AuthUser user = RedisPermissionUtils.getUser();
|
||||||
if(BeanUtil.isNotEmpty(metaObject) && BeanUtil.isNotEmpty(user)){
|
if(BeanUtil.isEmpty(user)){
|
||||||
mySetFieldValByName("updater",(BeanUtil.isEmpty(user) ? "system" : user.getUid()),metaObject);
|
log.info("当前操作未登录, 无需执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(BeanUtil.isNotEmpty(metaObject)){
|
||||||
|
mySetFieldValByName("updater",user.getUid(),metaObject);
|
||||||
mySetFieldValByName("uptime",new Date(),metaObject);
|
mySetFieldValByName("uptime",new Date(),metaObject);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -128,7 +128,7 @@ public class RedisPermissionUtils {
|
|||||||
private static Object getRedisObjectValue(String key) {
|
private static Object getRedisObjectValue(String key) {
|
||||||
String token = SpringUtil.getToken();
|
String token = SpringUtil.getToken();
|
||||||
if(StringUtils.isEmpty(token)){
|
if(StringUtils.isEmpty(token)){
|
||||||
// log.info("SpringUtil.getRedisValue========== token is null");
|
log.error("SpringUtil.getRedisValue========== token is null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String jti = null;
|
String jti = null;
|
||||||
@ -163,6 +163,9 @@ public class RedisPermissionUtils {
|
|||||||
*/
|
*/
|
||||||
private static Object getValue(String key){
|
private static Object getValue(String key){
|
||||||
RedisUtil redisUtil = SpringUtil.getBean(RedisUtil.class);
|
RedisUtil redisUtil = SpringUtil.getBean(RedisUtil.class);
|
||||||
|
if(ObjectUtils.isEmpty(redisUtil)){
|
||||||
|
log.error("SpringUtil.getRedisValue========== redisUtil is null");
|
||||||
|
}
|
||||||
Object obj = redisUtil.get(key);
|
Object obj = redisUtil.get(key);
|
||||||
if(ObjectUtils.isEmpty(obj)){
|
if(ObjectUtils.isEmpty(obj)){
|
||||||
log.error("SpringUtil.getRedisValue=={}========== obj is null",key);
|
log.error("SpringUtil.getRedisValue=={}========== obj is null",key);
|
||||||
|
|||||||
@ -1,47 +0,0 @@
|
|||||||
package com.evotech.hd.common.redis.utils;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类
|
|
||||||
*
|
|
||||||
* @ClassName:RedisServiceUtils
|
|
||||||
* @date: 2025年06月18日 14:43
|
|
||||||
* @author: andy.shi
|
|
||||||
* @contact: 17330188597
|
|
||||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class RedisServiceUtils {
|
|
||||||
|
|
||||||
private static RedisUtil redisUtil;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public RedisServiceUtils(RedisUtil redisUtil){
|
|
||||||
this.redisUtil = redisUtil;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static boolean set(String key, Object value){
|
|
||||||
return redisUtil.set(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean set(String key, Object value, long time){
|
|
||||||
return redisUtil.set(key, value, time);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Object get(String key){
|
|
||||||
return redisUtil.get(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getStr(String key){
|
|
||||||
return redisUtil.getStringValue(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void del(String... key){
|
|
||||||
redisUtil.del(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,17 +1,18 @@
|
|||||||
package com.evotech.hd.common.web.exception;
|
package com.evotech.hd.common.web.exception;
|
||||||
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import java.util.stream.Collectors;
|
||||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.dao.DataIntegrityViolationException;
|
import org.springframework.dao.DataIntegrityViolationException;
|
||||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||||
import org.springframework.validation.FieldError;
|
|
||||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局异常处理
|
* 全局异常处理
|
||||||
@ -35,7 +36,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = NullPointerException.class)
|
@ExceptionHandler(value = NullPointerException.class)
|
||||||
public Result<String> exceptionHandler(HttpServletRequest req, NullPointerException e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, NullPointerException e) {
|
||||||
log.error("\r\n===>>>空指针异常:", e);
|
log.error("\r\n===>>>空指针异常:", e);
|
||||||
return new Result<String>().businessException(CodeMsg.ERROR.getCode(), e.getMessage(), null);
|
return new Result<String>().bussinessException(CodeMsg.ERROR.getCode(), e.getMessage(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = HttpMessageNotReadableException.class)
|
@ExceptionHandler(value = HttpMessageNotReadableException.class)
|
||||||
public Result<String> exceptionHandler(HttpServletRequest req, HttpMessageNotReadableException e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, HttpMessageNotReadableException e) {
|
||||||
log.error("\r\n===>>>http请求参数解析异常:", e);
|
log.error("\r\n===>>>http请求参数解析异常:", e);
|
||||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), "http请求参数解析异常", e.getMessage());
|
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), "http请求参数解析异常", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,7 +57,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = MyArgumentException.class)
|
@ExceptionHandler(value = MyArgumentException.class)
|
||||||
public Result<String> exceptionHandler(HttpServletRequest req, MyArgumentException e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, MyArgumentException e) {
|
||||||
log.error("\r\n===>>>请求参数异常:", e);
|
log.error("\r\n===>>>请求参数异常:", e);
|
||||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), CodeMsg.PARAM_ERROR.getMsg(), String.join(",", e.getParamArr()));
|
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), CodeMsg.PARAM_ERROR.getMsg(), e.getParamArr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -69,7 +70,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = DataIntegrityViolationException.class)
|
@ExceptionHandler(value = DataIntegrityViolationException.class)
|
||||||
public Result<String> exceptionHandler(HttpServletRequest req, DataIntegrityViolationException e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, DataIntegrityViolationException e) {
|
||||||
log.error("\r\n===>>>sql语句异常:", e);
|
log.error("\r\n===>>>sql语句异常:", e);
|
||||||
return new Result<String>().businessException(CodeMsg.SQL_RUN_ERROR.getCode(), e.getCause().toString(), null);
|
return new Result<String>().bussinessException(CodeMsg.SQL_RUN_ERROR.getCode(), e.getCause().toString(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,7 +80,7 @@ public class GlobalExceptionHandler {
|
|||||||
public Result<String> exceptionHandler(HttpServletRequest req, MethodArgumentNotValidException e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, MethodArgumentNotValidException e) {
|
||||||
log.error("\r\n===>>>传参 自动检测出 错误:", e);
|
log.error("\r\n===>>>传参 自动检测出 错误:", e);
|
||||||
String param = e.getBindingResult().getFieldErrors().stream().map(i -> i.getField()).collect(Collectors.joining(","));
|
String param = e.getBindingResult().getFieldErrors().stream().map(i -> i.getField()).collect(Collectors.joining(","));
|
||||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), param, e.getBindingResult().getFieldErrors().stream().map(FieldError::getField).collect(Collectors.joining()));
|
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), param, e.getBindingResult().getFieldErrors());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,7 +91,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = Exception.class)
|
@ExceptionHandler(value = Exception.class)
|
||||||
public Result<String> exceptionHandler(HttpServletRequest req, Exception e) {
|
public Result<String> exceptionHandler(HttpServletRequest req, Exception e) {
|
||||||
log.error("\r\n===>>>捕获运行异常:", e);
|
log.error("\r\n===>>>捕获运行异常:", e);
|
||||||
return new Result<String>().businessException(CodeMsg.ERROR.getCode(), e instanceof RuntimeException?e.getMessage():e.toString(), null);
|
return new Result<String>().bussinessException(CodeMsg.ERROR.getCode(), e instanceof RuntimeException?e.getMessage():e.toString(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,40 +0,0 @@
|
|||||||
package com.evotech.hd.common.web.util;
|
|
||||||
|
|
||||||
import com.evotech.hd.common.core.enums.BaseEnum;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 类
|
|
||||||
* @ClassName:EnumUtils
|
|
||||||
* @date: 2025年05月19日 15:30
|
|
||||||
* @author: andy.shi
|
|
||||||
* @contact: 17330188597
|
|
||||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class EnumUtils extends org.apache.commons.lang3.EnumUtils{
|
|
||||||
|
|
||||||
|
|
||||||
public static <E extends BaseEnum<K,V>, K, V> E getEnumProperty(final Class<E> enumClass, final K k) {
|
|
||||||
List<E> el = new ArrayList<>(Arrays.asList(enumClass.getEnumConstants()));
|
|
||||||
for (E e: el){
|
|
||||||
if(e.getKey().equals(k)){
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public static <E extends BaseEnum<K,V>, K,V> V getEnumPropertyValue(final Class<E> enumClass, final K k) {
|
|
||||||
List<E> el = new ArrayList<>(Arrays.asList(enumClass.getEnumConstants()));
|
|
||||||
for (E e: el){
|
|
||||||
if(e.getKey().equals(k)){
|
|
||||||
return e.getValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (V)"未知属性";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -3,15 +3,13 @@ package com.evotech.hd.cloud;
|
|||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
|
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@ComponentScan("com.evotech.hd.**")
|
@ComponentScan("com.evotech.hd.**")
|
||||||
@MapperScan({"com.evotech.hd.cloud.dao.**", "com.evotech.hd.common.core.dao.**"})
|
@MapperScan({"com.evotech.hd.cloud.dao.**", "com.evotech.hd.common.core.dao.**"})
|
||||||
|
|||||||
@ -1,27 +1,29 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationCdStrategyService;
|
import java.util.List;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategy;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategyDetail;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import com.evotech.hd.cloud.service.BatteryStationCdStrategyService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategy;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategyDetail;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@Tag(name = "充电策略")
|
@Tag(name = "充电策略")
|
||||||
@ApiSupport(order = 48)
|
@ApiSupport(order = 48)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/cd/strategy")
|
@RequestMapping("/batterystation/cd/strategy")
|
||||||
public class BatteryStationCdStrategyController {
|
public class BatteryStationCdStrategyController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationRequest;
|
import com.evotech.hd.cloud.entity.request.PageListBatteryStationRequest;
|
||||||
import com.evotech.hd.cloud.mqtt.message.handle.RequestMessageService;
|
import com.evotech.hd.cloud.mqtt.message.handle.RequestMessageService;
|
||||||
import com.evotech.hd.cloud.service.BatteryStationService;
|
import com.evotech.hd.cloud.service.BatteryStationService;
|
||||||
@ -26,7 +25,7 @@ import java.util.Map;
|
|||||||
@Tag(name = "换电站")
|
@Tag(name = "换电站")
|
||||||
@ApiSupport(order = 11)
|
@ApiSupport(order = 11)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station")
|
@RequestMapping("/batterystation")
|
||||||
public class BatteryStationController {
|
public class BatteryStationController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -37,36 +36,43 @@ public class BatteryStationController {
|
|||||||
@Operation(summary = "增加")
|
@Operation(summary = "增加")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
public Result<Integer> add(@Valid @ParameterObject BatteryStation bs) {
|
public com.evotech.hd.common.core.entity.Result<Integer> add(@Valid @ParameterObject BatteryStation bs) {
|
||||||
return batteryStationService.add(bs);
|
return batteryStationService.add(bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
@PostMapping("/del")
|
@PostMapping("/del")
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
public Result<Integer> delete(Integer id) {
|
public com.evotech.hd.common.core.entity.Result<Integer> delete(Integer id) {
|
||||||
return batteryStationService.delete(id);
|
return batteryStationService.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PostMapping({"/update"})
|
@PostMapping({"/update"})
|
||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 3)
|
||||||
public Result<Integer> update(@ParameterObject BatteryStation bs) {
|
public com.evotech.hd.common.core.entity.Result<Integer> update(@ParameterObject BatteryStation bs) {
|
||||||
return batteryStationService.update(bs);
|
return batteryStationService.update(bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询")
|
@Operation(summary = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
public Result<Page<BatteryStation>> list(@ParameterObject PageListBatteryStationRequest plbsr) {
|
public com.evotech.hd.common.core.entity.Result<List<BatteryStation>> list(@ParameterObject PageListBatteryStationRequest plbsr) {
|
||||||
return batteryStationService.list(plbsr);
|
return batteryStationService.list(plbsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询2")
|
||||||
|
@GetMapping("/liststation")
|
||||||
|
@Hidden
|
||||||
|
public com.evotech.hd.common.core.entity.Result<List<BatteryStationVO>> listStation(@RequestParam(required = false) String plateNum) {
|
||||||
|
return batteryStationService.listStation(plateNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "站点秘钥")
|
@Operation(summary = "站点秘钥")
|
||||||
@PostMapping("/rsa_secret_key")
|
@PostMapping("/rsa_secret_key")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
public Result<Map<String, String>> RsaSecretKey(@NotBlank @RequestParam String stationCode) {
|
public com.evotech.hd.common.core.entity.Result<Map<String, String>> RsaSecretKey(@NotBlank @RequestParam String stationCode) {
|
||||||
return batteryStationService.RsaSecretKey(stationCode);
|
return batteryStationService.RsaSecretKey(stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,12 +109,4 @@ public class BatteryStationController {
|
|||||||
return batteryStationService.resourceList(pkIds);
|
return batteryStationService.resourceList(pkIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "微信首页换电站地图信息")
|
|
||||||
@GetMapping("/list/station")
|
|
||||||
@Hidden
|
|
||||||
public Result<List<BatteryStationVO>> listStation(@RequestParam(required = false) String longitudeAndLatitude, @RequestParam(required = false) String plateNum) {
|
|
||||||
return batteryStationService.listStation(longitudeAndLatitude, plateNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +1,31 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.List;
|
||||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDcRequest;
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationDcService;
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDc;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryTrace;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDcRequest;
|
||||||
|
import com.evotech.hd.cloud.service.BatteryStationDcService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationDc;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryTrace;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
|
||||||
@Tag(name = "换电站电池")
|
@Tag(name = "换电站电池")
|
||||||
@ApiSupport(order = 12)
|
@ApiSupport(order = 12)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/dc")
|
@RequestMapping("/batterystation/dc")
|
||||||
public class BatteryStationDcController {
|
public class BatteryStationDcController {
|
||||||
|
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ public class BatteryStationDcController {
|
|||||||
@Operation(summary = "查询")
|
@Operation(summary = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
public Result<Page<BatteryStationDc>> list(@ParameterObject PageListBatteryStationDcRequest plbsdcr) {
|
public Result<List<BatteryStationDc>> list(@ParameterObject PageListBatteryStationDcRequest plbsdcr) {
|
||||||
return batteryStationDcService.list(plbsdcr);
|
return batteryStationDcService.list(plbsdcr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,29 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.List;
|
||||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDccRequest;
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationDccService;
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDcc;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDccRequest;
|
||||||
|
import com.evotech.hd.cloud.service.BatteryStationDccService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationDcc;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@Tag(name = "换电站电池仓")
|
@Tag(name = "换电站电池仓")
|
||||||
@ApiSupport(order = 13)
|
@ApiSupport(order = 13)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/dcc")
|
@RequestMapping("/batterystation/dcc")
|
||||||
public class BatteryStationDccController {
|
public class BatteryStationDccController {
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +54,7 @@ public class BatteryStationDccController {
|
|||||||
@Operation(summary = "查询")
|
@Operation(summary = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
public Result<Page<BatteryStationDcc>> list(@ParameterObject PageListBatteryStationDccRequest plbsDccr) {
|
public Result<List<BatteryStationDcc>> list(@ParameterObject PageListBatteryStationDccRequest plbsDccr) {
|
||||||
return batteryStationDccService.list(plbsDccr);
|
return batteryStationDccService.list(plbsDccr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,29 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.List;
|
||||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDjRequest;
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationDjService;
|
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDj;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDjRequest;
|
||||||
|
import com.evotech.hd.cloud.service.BatteryStationDjService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationDj;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@Tag(name = "换电站电机")
|
@Tag(name = "换电站电机")
|
||||||
@ApiSupport(order = 14)
|
@ApiSupport(order = 14)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/dj")
|
@RequestMapping("/batterystation/dj")
|
||||||
public class BatteryStationDjController {
|
public class BatteryStationDjController {
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +54,7 @@ public class BatteryStationDjController {
|
|||||||
@Operation(summary = "查询")
|
@Operation(summary = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
public Result<Page<BatteryStationDj>> list(@ParameterObject PageListBatteryStationDjRequest plbsdjr) {
|
public Result<List<BatteryStationDj>> list(@ParameterObject PageListBatteryStationDjRequest plbsdjr) {
|
||||||
return batteryStationDjService.list(plbsdjr);
|
return batteryStationDjService.list(plbsdjr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,28 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardService;
|
import java.util.List;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@Tag(name = "换电站费用标准")
|
@Tag(name = "换电站费用标准")
|
||||||
@ApiSupport(order = 16)
|
@ApiSupport(order = 16)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/fee")
|
@RequestMapping("/batterystation/fee")
|
||||||
public class BatteryStationHdFeeStandardController {
|
public class BatteryStationHdFeeStandardController {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,28 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardDetailService;
|
import java.util.List;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandardDetail;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardDetailService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandardDetail;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@Tag(name = "换电站费用标准明细")
|
@Tag(name = "换电站费用标准明细")
|
||||||
@ApiSupport(order = 17)
|
@ApiSupport(order = 17)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/fee/detail")
|
@RequestMapping("/batterystation/fee/detail")
|
||||||
public class BatteryStationHdFeeStandardDetailController {
|
public class BatteryStationHdFeeStandardDetailController {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,27 +1,29 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
import com.evotech.hd.cloud.service.BatteryStationRobotService;
|
import java.util.List;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
|
||||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationRobot;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import com.evotech.hd.cloud.service.BatteryStationRobotService;
|
||||||
|
import com.evotech.hd.common.core.entity.Result;
|
||||||
|
import com.evotech.hd.common.core.entity.cloud.BatteryStationRobot;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
|
||||||
@Tag(name = "换电站机器人")
|
@Tag(name = "换电站机器人")
|
||||||
@ApiSupport(order = 15)
|
@ApiSupport(order = 15)
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/battery/station/robot")
|
@RequestMapping("/batterystation/robot")
|
||||||
public class BatteryStationRobotController {
|
public class BatteryStationRobotController {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.evotech.hd.cloud.controller;
|
package com.evotech.hd.cloud.controller;
|
||||||
|
|
||||||
|
import com.evotech.hd.cloud.entity.request.HomeDataRequest;
|
||||||
import com.evotech.hd.cloud.entity.vo.*;
|
import com.evotech.hd.cloud.entity.vo.*;
|
||||||
import com.evotech.hd.cloud.service.HomeService;
|
import com.evotech.hd.cloud.service.HomeService;
|
||||||
import com.evotech.hd.common.core.Dto.Result;
|
import com.evotech.hd.common.core.Dto.Result;
|
||||||
@ -8,6 +9,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -24,134 +26,59 @@ public class HomeController {
|
|||||||
@Resource
|
@Resource
|
||||||
private HomeService homeService;
|
private HomeService homeService;
|
||||||
|
|
||||||
@Operation(summary = "平台首页===> 数据1-运营商,换电站,认证公司, 机器人 电池")
|
@Operation(summary = "数据1-运营商,换电站,电池,机器人")
|
||||||
@GetMapping("/platform/data1")
|
@GetMapping("/data1")
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
public Result<HomePlatformData1> platformData1() {
|
public Result<HomeData1> homeData1(@ParameterObject HomeDataRequest hd) {
|
||||||
return homeService.platformData1();
|
return homeService.homeData1(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "平台首页===> 数据2-金额 占比, 半年交易情况等")
|
@Operation(summary = "数据2-公司、用户、车辆")
|
||||||
@GetMapping("/platform/data2")
|
@GetMapping("/data2")
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
public Result<HomePlatformData2> platformData2() {
|
public Result<HomeData2> homeData2() {
|
||||||
return homeService.platformData2();
|
return homeService.homeData2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "数据3-订单总数 订单占比")
|
||||||
@Operation(summary = "运营商首页===> 换电站 机器人 电池")
|
@GetMapping("/data3")
|
||||||
@GetMapping("/roxy/data1")
|
|
||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 3)
|
||||||
public Result<HomePoxyData> roxyData1() {
|
public Result<HomeData3> homeData3(@ParameterObject HomeDataRequest hd) {
|
||||||
return homeService.roxyData1();
|
return homeService.homeData3(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "运营商首页===> 当月订单情况, 和近半年情况 ")
|
@Operation(summary = "数据4-收入/支出金额")
|
||||||
@GetMapping("/roxy/data2")
|
@GetMapping("/data4")
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
public Result<HomePoxyData2> roxyData2() {
|
public Result<HomeData4> homeData4(@ParameterObject HomeDataRequest hd) {
|
||||||
return homeService.roxyData2();
|
return homeService.homeData4(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "数据5-近6个月订单统计")
|
||||||
@Operation(summary = "站端首页===> 机器人 电池 , 订单")
|
@GetMapping("/data5")
|
||||||
@GetMapping("/station/data1")
|
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
public Result<HomeStationData> stationData1() {
|
public Result<List<HomeData5>> homeData5(@ParameterObject HomeDataRequest hd) {
|
||||||
return homeService.stationData1();
|
return homeService.homeData5(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "数据6-近6个月交易统计")
|
||||||
@Operation(summary = "公司首页")
|
@GetMapping("/data6")
|
||||||
@GetMapping("/company/data")
|
|
||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
public Result<HomeCompanyData> company() {
|
public Result<List<HomeData6>> homeData6(@ParameterObject HomeDataRequest hd) {
|
||||||
return homeService.company();
|
return homeService.homeData6(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "告警信息")
|
@Operation(summary = "数据7-同比、环比")
|
||||||
@GetMapping("/alarm/data")
|
@GetMapping("/data7")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 7)
|
||||||
public Result<List<HomeAlarmData>> alarmData() {
|
public Result<HomeData7> homeData7(Integer type) {
|
||||||
return homeService.alarmData();
|
return homeService.homeData7(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
@GetMapping("/login/data")
|
||||||
//
|
public void loginData() {
|
||||||
//
|
homeService.loginData();
|
||||||
//
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据1-运营商,换电站,电池,机器人")
|
|
||||||
// @GetMapping("/data1")
|
|
||||||
// @ApiOperationSupport(order = 1)
|
|
||||||
// public Result<HomeData1> homeData1(@ParameterObject HomeDataRequest hd) {
|
|
||||||
// return homeService.homeData1(hd);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据2-公司、用户、车辆")
|
|
||||||
// @GetMapping("/data2")
|
|
||||||
// @ApiOperationSupport(order = 2)
|
|
||||||
// public Result<HomeData2> homeData2() {
|
|
||||||
// return homeService.homeData2();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据3-订单总数 订单占比")
|
|
||||||
// @GetMapping("/data3")
|
|
||||||
// @ApiOperationSupport(order = 3)
|
|
||||||
// public Result<HomeData3> homeData3(@ParameterObject HomeDataRequest hd) {
|
|
||||||
// return homeService.homeData3(hd);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据4-收入/支出金额")
|
|
||||||
// @GetMapping("/data4")
|
|
||||||
// @ApiOperationSupport(order = 4)
|
|
||||||
// public Result<HomeData4> homeData4(@ParameterObject HomeDataRequest hd) {
|
|
||||||
// return homeService.homeData4(hd);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据5-近6个月订单统计")
|
|
||||||
// @GetMapping("/data5")
|
|
||||||
// @ApiOperationSupport(order = 5)
|
|
||||||
// public Result<List<HomeData5>> homeData5(@ParameterObject HomeDataRequest hd) {
|
|
||||||
// return homeService.homeData5(hd);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据6-近6个月交易统计")
|
|
||||||
// @GetMapping("/data6")
|
|
||||||
// @ApiOperationSupport(order = 6)
|
|
||||||
// public Result<List<HomeData6>> homeData6(@ParameterObject HomeDataRequest hd) {
|
|
||||||
// return homeService.homeData6(hd);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Operation(summary = "数据7-同比、环比")
|
|
||||||
// @GetMapping("/data7")
|
|
||||||
// @ApiOperationSupport(order = 7)
|
|
||||||
// public Result<HomeData7> homeData7(Integer type) {
|
|
||||||
// return homeService.homeData7(type);
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
|
||||||
// @Operation(hidden = true)
|
|
||||||
// @GetMapping("/login/data")
|
|
||||||
// public void loginData() {
|
|
||||||
// homeService.loginData();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user