Commit d2833c74 by 涂亚平

演示前版本备份

1 parent 85f1a48e
Showing with 2971 additions and 2411 deletions
2023-05-22 09:54:53,188 [http-nio-34567-exec-2] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token 2023-08-15 15:57:34,530 [http-nio-34567-exec-9] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from String "2023-08-09": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2023-08-09' could not be parsed at index 10; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.LocalDateTime` from String "2023-08-09": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2023-08-09' could not be parsed at index 10
at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"]) at [Source: (PushbackInputStream); line: 1, column: 113] (through reference chain: com.laowu.dto.member.AddMemberDTO["homecomingDate"])
2023-05-22 09:56:25,376 [http-nio-34567-exec-5] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value
at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"])
2023-05-22 09:56:54,840 [http-nio-34567-exec-8] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"])
2023-07-06 16:53:26,161 [main] ERROR org.apache.catalina.util.LifecycleBase:175 - Failed to start component [Connector[HTTP/1.1-34567]]
org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)
at com.laowu.LaowuApplication.main(LaowuApplication.java:14)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005)
... 14 common frames omitted
2023-07-06 16:53:26,184 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 -
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 34567 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 34567, or configure this application to listen on another port.
2023-07-06 17:05:55,745 [main] ERROR org.apache.catalina.util.LifecycleBase:175 - Failed to start component [Connector[HTTP/1.1-34567]]
org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)
at com.laowu.LaowuApplication.main(LaowuApplication.java:14)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005)
... 14 common frames omitted
2023-07-06 17:05:55,766 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 -
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 34567 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 34567, or configure this application to listen on another port.
2023-07-31 11:16:43,146 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$856a7738] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2023-09-04 10:22:15,737 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$610e7030] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-07-31 11:16:43,335 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 34567 (http) 2023-09-04 10:22:15,939 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 34567 (http)
2023-07-31 11:16:43,345 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-34567"] 2023-09-04 10:22:15,950 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-34567"]
2023-07-31 11:16:43,350 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] 2023-09-04 10:22:15,957 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat]
2023-07-31 11:16:43,350 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] 2023-09-04 10:22:15,958 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22]
2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4]. 2023-09-04 10:22:15,963 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4].
2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2023-09-04 10:22:15,963 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 2023-09-04 10:22:15,964 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2023-07-31 11:16:43,366 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] 2023-09-04 10:22:15,974 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023]
2023-07-31 11:16:43,445 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext 2023-09-04 10:22:16,055 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext
2023-07-31 11:16:43,445 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1339 ms 2023-09-04 10:22:16,056 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1407 ms
2023-07-31 11:16:43,541 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource 2023-09-04 10:22:16,157 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource
2023-07-31 11:16:44,656 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited 2023-09-04 10:22:17,297 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited
2023-07-31 11:16:46,295 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69 - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] 2023-09-04 10:22:18,939 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69 - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2023-07-31 11:16:46,375 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' 2023-09-04 10:22:19,028 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor'
2023-07-31 11:16:46,563 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed 2023-09-04 10:22:19,226 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed
2023-07-31 11:16:46,576 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) 2023-09-04 10:22:19,239 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s)
2023-07-31 11:16:46,602 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references 2023-09-04 10:22:19,266 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references
2023-07-31 11:16:46,781 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addCollegeUsingPOST_1 2023-09-04 10:22:19,499 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addJobUsingPOST_1
2023-07-31 11:16:46,782 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteCollegeUsingPOST_1 2023-09-04 10:22:19,500 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteJobUsingPOST_1
2023-07-31 11:16:46,783 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateCollegeUsingPOST_1 2023-09-04 10:22:19,501 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateJobUsingPOST_1
2023-07-31 11:16:46,813 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addJobUsingPOST_1 2023-09-04 10:22:19,525 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_1
2023-07-31 11:16:46,814 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteJobUsingPOST_1 2023-09-04 10:22:19,526 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_1
2023-07-31 11:16:46,815 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateJobUsingPOST_1 2023-09-04 10:22:19,527 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_1
2023-07-31 11:16:46,824 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_1 2023-09-04 10:22:19,550 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: importUsersUsingPOST_1
2023-07-31 11:16:46,825 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_1 2023-09-04 10:22:19,558 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addAdministerUsingPOST_1
2023-07-31 11:16:46,826 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_1 2023-09-04 10:22:19,566 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateAdministerUsingPOST_1
2023-07-31 11:16:46,846 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_2 2023-09-04 10:22:19,568 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addGeoUsingPOST_1
2023-07-31 11:16:46,847 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_2 2023-09-04 10:22:19,569 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteGeoUsingPOST_1
2023-07-31 11:16:46,848 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_2 2023-09-04 10:22:19,570 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateGeoUsingPOST_1
2023-07-31 11:16:46,880 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: importUsersUsingPOST_1 2023-09-04 10:22:19,571 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteRequireUsingPOST_1
2023-07-31 11:16:46,887 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addAdministerUsingPOST_1 2023-09-04 10:22:19,571 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requireStationsUsingPOST_1
2023-07-31 11:16:46,892 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateAdministerUsingPOST_1 2023-09-04 10:22:19,572 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requiresUsingPOST_1
2023-07-31 11:16:46,894 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addGeoUsingPOST_1 2023-09-04 10:22:19,573 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: shareUsingPOST_1
2023-07-31 11:16:46,894 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteGeoUsingPOST_1 2023-09-04 10:22:19,586 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-34567"]
2023-07-31 11:16:46,895 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateGeoUsingPOST_1 2023-09-04 10:22:19,604 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 34567 (http) with context path ''
2023-07-31 11:16:46,897 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteRequireUsingPOST_1 2023-09-04 10:22:57,210 [http-nio-34567-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-07-31 11:16:46,897 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requireStationsUsingPOST_1 2023-09-04 10:22:57,210 [http-nio-34567-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:524 - Initializing Servlet 'dispatcherServlet'
2023-07-31 11:16:46,898 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requiresUsingPOST_1 2023-09-04 10:22:57,216 [http-nio-34567-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:546 - Completed initialization in 6 ms
2023-07-31 11:16:46,898 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: shareUsingPOST_1 2023-09-04 14:29:16,253 [Thread-13] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:208 - Shutting down ExecutorService 'applicationTaskExecutor'
2023-07-31 11:16:46,911 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-34567"] 2023-09-04 14:29:16,268 [Thread-13] INFO com.alibaba.druid.pool.DruidDataSource:2029 - {dataSource-1} closing ...
2023-07-31 11:16:46,929 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 34567 (http) with context path '' 2023-09-04 14:29:16,317 [Thread-13] INFO com.alibaba.druid.pool.DruidDataSource:2101 - {dataSource-1} closed
...@@ -114,6 +114,12 @@ ...@@ -114,6 +114,12 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.5.2</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId> <groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId> <artifactId>java-jwt</artifactId>
<version>${java-jwt.version}</version> <version>${java-jwt.version}</version>
......
package com.laowu.common;
import org.springframework.context.annotation.Bean;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import java.util.ArrayList;
import java.util.List;
@Component
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate() {
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter());
return restTemplate;
}
public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
public WxMappingJackson2HttpMessageConverter(){
List<MediaType> mediaTypes = new ArrayList<>();
mediaTypes.add(MediaType.TEXT_PLAIN);
mediaTypes.add(MediaType.TEXT_HTML);
setSupportedMediaTypes(mediaTypes);
}
}
}
...@@ -8,15 +8,15 @@ import io.swagger.annotations.Api; ...@@ -8,15 +8,15 @@ import io.swagger.annotations.Api;
/** /**
* <p> * <p>
* 团队成员映射表 前端控制器 * 前端控制器
* </p> * </p>
* *
* @author Tuyp * @author Tuyp
* @since 2023-03-29 * @since 2023-08-23
*/ */
@RestController @RestController
@Api(tags = "团队成员映射表") @Api(tags = "")
@RequestMapping("/member-team-mapping-do") @RequestMapping("/access-token-do")
public class MemberTeamMappingController { public class AccessTokenController {
} }
...@@ -52,7 +52,7 @@ public class AdministerController { ...@@ -52,7 +52,7 @@ public class AdministerController {
} }
@PostMapping("addAdminister") @PostMapping("addAdminister")
@ApiOperation("新增管理员 addAdminister userName telephone remark stationIds") @ApiOperation("新增管理员 addAdminister userName telephone remark stationIds[]")
public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO){ public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO){
return ResponseData.generateCreatedResponse(0,administerService.addAdminister(addAdministerDTO)); return ResponseData.generateCreatedResponse(0,administerService.addAdminister(addAdministerDTO));
} }
......
package com.laowu.controller;
import com.laowu.common.interceptor.LoginRequired;
import com.laowu.common.interceptor.TimeRequired;
import com.laowu.dto.image.CheckResultDTO;
import com.laowu.model.ImageCheckRecordDO;
import com.laowu.service.ImageCheckRecordService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 人脸识别记录表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-08-22
*/
@RestController
@Api(tags = "人脸识别记录表")
@RequestMapping("/imageCheckRecord")
public class ImageCheckRecordController {
@Autowired
private ImageCheckRecordService imageCheckRecordService;
@PostMapping("getImageCheckHistory")
@ApiOperation("获取某人某个班级的验证历史 memberId ")
@LoginRequired
public ResponseVO getImageCheckHistory(@RequestBody ImageCheckRecordDO imageCheckRecordDO) {
return ResponseData.generateCreatedResponse(0, imageCheckRecordService.getImageCheckHistory(imageCheckRecordDO));
}
@PostMapping("imageCheck")
@ApiOperation("课程/测评人身核验(权威库:身份证) PC端 memberId 用户id ")
@TimeRequired
public ResponseVO imageCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO) throws Exception {
return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckRecordDO));
}
@PostMapping("h5ImageCheck")
@ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 memberId 用户id ")
@TimeRequired
public ResponseVO h5CheckResult(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckRecordDO));
}
// @PostMapping("loginCheck")
// @ApiOperation("签到页做人脸核验 (权威库:身份证) PC端 id 用户id")
// @TimeRequired
// public ResponseVO loginCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{
// return ResponseData.generateCreatedResponse(0,imageCheckRecordService.loginCheck(imageCheckRecordDO));
// }
//
// @PostMapping("h5LoginCheck")
// @ApiOperation("签到页做人脸核验 (权威库:身份证) id 用户id")
// @TimeRequired
// public ResponseVO h5LoginCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{
// return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5LoginCheck(imageCheckRecordDO));
// }
@PostMapping("checkResult")
@ApiOperation("人脸验证结果 存图片 id 订单号 ")
public ResponseVO checkResult(@RequestBody CheckResultDTO checkResultDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.checkResult(checkResultDTO));
}
}
...@@ -31,7 +31,7 @@ public class MemberCertsController { ...@@ -31,7 +31,7 @@ public class MemberCertsController {
@PostMapping("addMemberCert") @PostMapping("addMemberCert")
@ApiOperation("添加证书信息 memberId cert") @ApiOperation("添加证书信息 memberId cert certNo")
public ResponseVO addMemberCert(@RequestBody MemberCertsDO memberCertsDO){ public ResponseVO addMemberCert(@RequestBody MemberCertsDO memberCertsDO){
return ResponseData.generateCreatedResponse(0,memberCertsService.addMemberCert(memberCertsDO)); return ResponseData.generateCreatedResponse(0,memberCertsService.addMemberCert(memberCertsDO));
} }
...@@ -43,7 +43,7 @@ public class MemberCertsController { ...@@ -43,7 +43,7 @@ public class MemberCertsController {
} }
@PostMapping("updateMemberCert") @PostMapping("updateMemberCert")
@ApiOperation("修改证书信息 id cert") @ApiOperation("修改证书信息 id cert certNo")
public ResponseVO updateMemberCert(@RequestBody MemberCertsDO memberCertsDO){ public ResponseVO updateMemberCert(@RequestBody MemberCertsDO memberCertsDO){
return ResponseData.generateCreatedResponse(0,memberCertsService.updateMemberCert(memberCertsDO)); return ResponseData.generateCreatedResponse(0,memberCertsService.updateMemberCert(memberCertsDO));
} }
......
package com.laowu.controller;
import com.laowu.model.MemberCollegeMappingDO;
import com.laowu.service.MemberCollegeMappingService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 学员-学校映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-04-04
*/
@RestController
@Api(tags = "学员-学校映射表")
@RequestMapping("/memberCollege")
public class MemberCollegeMappingController {
@Autowired
private MemberCollegeMappingService memberCollegeMappingService;
@PostMapping("addCollege")
@ApiOperation("添加院校信息 schoolType collegeId memberId startDate endDate majorId rank educationType")
public ResponseVO addCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){
return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.addCollege(memberCollegeMappingDO));
}
@PostMapping("updateCollege")
@ApiOperation("修改院校 id schoolType collegeId memberId startDate endDate majorId rank educationType")
public ResponseVO updateCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){
return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.updateCollege(memberCollegeMappingDO));
}
@PostMapping("deleteCollege")
@ApiOperation("删除院校 id")
public ResponseVO deleteCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){
return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.deleteCollege(memberCollegeMappingDO));
}
}
...@@ -43,8 +43,14 @@ public class MemberDictController { ...@@ -43,8 +43,14 @@ public class MemberDictController {
} }
@PostMapping("addMember") @PostMapping("addMember")
@ApiOperation("添加自然人 userId module userName status 学生/社会 telephone idCardType idCard province city county address education" + @ApiOperation("添加自然人 workstationId userName idCardType idCard telephone hostUserName hostIdCardType hostIdCard province city county town village team address" +
"isPoor isMigration isParty jobStatus stationId positionIds[] teamId") "provinceNow cityNow countyNow townNow villageNow addressNow familyCnt hostRelation " +
"gender age nation isParty education health" +
"isPoor monitorType isMigration migrationType migrationName fisherman insured pensionInsurance insurePlace" +
"memberType laborAbility jobStatus jobType jobAge yearJobMonth averageSalary " +
"incomeStatement employmentWillingness provinceEmployment cityEmployment " +
"employmentTrainingWillingness homecoming homecomingDate homecomingReason " +
"comment positionIds[] ")
public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){ public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberDictService.addMember(addMemberDTO)); return ResponseData.generateCreatedResponse(0,memberDictService.addMember(addMemberDTO));
} }
...@@ -56,8 +62,13 @@ public class MemberDictController { ...@@ -56,8 +62,13 @@ public class MemberDictController {
} }
@PostMapping("updateMember") @PostMapping("updateMember")
@ApiOperation("修改自然人 id userId module userName status 学生/社会 telephone idCardType idCard province city county address education" + @ApiOperation("修改自然人 workstationId id userName idCardType idCard telephone hostId province city county town village team address" +
"isPoor isMigration isParty jobStatus infoOrigin positionIds[]") "provinceNow cityNow countyNow townNow villageNow addressNow familyCnt hostRelation " +
"gender age nation isParty education health isPoor monitorType isMigration migrationType " +
"migrationName fisherman insured pensionInsurance insurePlace" +
"memberType laborAbility jobStatus jobType jobAge yearJobMonth averageSalary " +
"incomeStatement employmentWillingness provinceEmployment cityEmployment " +
"employmentTrainingWillingness homecoming homecomingDate homecomingReason commentpositionIds[] ")
public ResponseVO updateMember(@RequestBody UpdateMemberDTO updateMemberDTO){ public ResponseVO updateMember(@RequestBody UpdateMemberDTO updateMemberDTO){
return ResponseData.generateCreatedResponse(0,memberDictService.updateMember(updateMemberDTO)); return ResponseData.generateCreatedResponse(0,memberDictService.updateMember(updateMemberDTO));
} }
...@@ -69,9 +80,9 @@ public class MemberDictController { ...@@ -69,9 +80,9 @@ public class MemberDictController {
} }
@PostMapping("importUsers") @PostMapping("importUsers")
@ApiOperation("导入用户 workstationId teamId file") @ApiOperation("导入用户 workstationId file")
public ResponseVO importUsers(@RequestParam("workstationId") String workstationId,@RequestParam("teamId") String teamId,@RequestParam("file") MultipartFile file){ public ResponseVO importUsers(@RequestParam("workstationId") String workstationId,@RequestParam("file") MultipartFile file){
return ResponseData.generateCreatedResponse(0,memberDictService.importMember(workstationId,teamId,file)); return ResponseData.generateCreatedResponse(0,memberDictService.importMember(workstationId,file));
} }
@PostMapping("downloadErrorData") @PostMapping("downloadErrorData")
...@@ -80,18 +91,38 @@ public class MemberDictController { ...@@ -80,18 +91,38 @@ public class MemberDictController {
return ResponseData.generateCreatedResponse(0,memberDictService.downloadErrorData(downloadErrorDataDTO)); return ResponseData.generateCreatedResponse(0,memberDictService.downloadErrorData(downloadErrorDataDTO));
} }
@PostMapping("downloadUsers")
@ApiOperation("导出花名册 pageSize,pageNum,stationId,positionId,province,city,county,town,village,gender,maxAge," +
"minAge,isParty,education,health,provinceNow,cityNow,countyNow,townNow,isPoor,monitorType,isMigration,migrationType," +
"fisherman,insured,pensionInsurance,insurePlace,memberType,laborAbility,jobStatus,jobType,provinceJob,cityJob,countyJob," +
"townJob,jobDestination,jobsStartDate,jobsEndDate,businessId,maxAverageSalary,minAverageSalary," +
"maxJobAge,minJobAge,employmentWillingness,provinceEmployment,cityEmployment,willingBusinessId,employmentTrainingWillingness,trainType,homecoming,userId")
public ResponseVO downloadUsers(@RequestBody MemberManagementDTO memberManagementDTO){
return ResponseData.generateCreatedResponse(0,memberDictService.downloadUsers(memberManagementDTO));
}
@PostMapping("address") @PostMapping("address")
@ApiOperation("地址 导入省市县镇") @ApiOperation("地址 导入省市县镇")
public void address (@RequestBody List<AddressDTO> addressDTO){ public void address (@RequestBody List<AddressDTO> addressDTO){
memberDictService.address(addressDTO); memberDictService.address(addressDTO);
} }
@PostMapping("roster") @PostMapping("roster")
@ApiOperation("花名册 pageSize pageNum province city county ") @ApiOperation("花名册 pageSize pageNum province city county ")
public ResponseVO roster(@RequestBody RosterDTO rosterDTO){ public ResponseVO roster(@RequestBody RosterDTO rosterDTO){
return ResponseData.generateCreatedResponse(0,memberDictService.roster(rosterDTO)); return ResponseData.generateCreatedResponse(0,memberDictService.roster(rosterDTO));
} }
@PostMapping("checkLogin")
@ApiOperation("登录验证 userName idCard")
public ResponseVO checkLogin(@RequestBody MemberDictDO memberDictDO){
return ResponseData.generateCreatedResponse(0,memberDictService.checkLogin(memberDictDO));
}
@PostMapping("tokenLogin")
@ApiOperation("免密跳转 idCard")
public ResponseVO tokenLogin(@RequestBody MemberDictDO memberDictDO){
return ResponseData.generateCreatedResponse(0,memberDictService.tokenLogin(memberDictDO));
}
} }
...@@ -30,13 +30,13 @@ public class MemberJobInfoController { ...@@ -30,13 +30,13 @@ public class MemberJobInfoController {
private MemberJobInfoService memberJobInfoService; private MemberJobInfoService memberJobInfoService;
@PostMapping("addJob") @PostMapping("addJob")
@ApiOperation("添加工作 memberId jobSource jobType job province city town address companyId startDate endDate jobMonth salary ") @ApiOperation("添加工作 memberId province city county town village jobDestination jobIndustry startDate endDate jobMonth salary ")
public ResponseVO addJob(@RequestBody MemberJobInfoDO memberJobInfoDO){ public ResponseVO addJob(@RequestBody MemberJobInfoDO memberJobInfoDO){
return ResponseData.generateCreatedResponse(0,memberJobInfoService.addJob(memberJobInfoDO)); return ResponseData.generateCreatedResponse(0,memberJobInfoService.addJob(memberJobInfoDO));
} }
@PostMapping("updateJob") @PostMapping("updateJob")
@ApiOperation("修改工作 id memberId jobSource jobType job province city town address companyId startDate endDate jobMonth salary ") @ApiOperation("修改工作 id memberId province city county town village jobDestination jobIndustry startDate endDate jobMonth salary ")
public ResponseVO updateJob(@RequestBody MemberJobInfoDO memberJobInfoDO){ public ResponseVO updateJob(@RequestBody MemberJobInfoDO memberJobInfoDO){
return ResponseData.generateCreatedResponse(0,memberJobInfoService.updateJob(memberJobInfoDO)); return ResponseData.generateCreatedResponse(0,memberJobInfoService.updateJob(memberJobInfoDO));
} }
......
package com.laowu.controller; package com.laowu.controller;
import com.laowu.dto.member.AddTrainDTO;
import com.laowu.model.MemberTrainInfoDO; import com.laowu.model.MemberTrainInfoDO;
import com.laowu.service.MemberTrainInfoService; import com.laowu.service.MemberTrainInfoService;
import com.laowu.util.ResponseData; import com.laowu.util.ResponseData;
...@@ -32,9 +31,9 @@ public class MemberTrainInfoController { ...@@ -32,9 +31,9 @@ public class MemberTrainInfoController {
private MemberTrainInfoService memberTrainInfoService; private MemberTrainInfoService memberTrainInfoService;
@PostMapping("addTrain") @PostMapping("addTrain")
@ApiOperation("添加培训 memberId trainFrom trainType trainName startDate endDate province city county trainContent trainResult positionIds[]") @ApiOperation("添加培训 memberId trainType trainJob businessId startDate endDate")
public ResponseVO addTrain(@RequestBody AddTrainDTO addTrainDTO){ public ResponseVO addTrain(@RequestBody MemberTrainInfoDO memberTrainInfoDO){
return ResponseData.generateCreatedResponse(0,memberTrainInfoService.addTrain(addTrainDTO)); return ResponseData.generateCreatedResponse(0,memberTrainInfoService.addTrain(memberTrainInfoDO));
} }
@PostMapping("deleteTrain") @PostMapping("deleteTrain")
...@@ -44,9 +43,9 @@ public class MemberTrainInfoController { ...@@ -44,9 +43,9 @@ public class MemberTrainInfoController {
} }
@PostMapping("updateTrain") @PostMapping("updateTrain")
@ApiOperation("修改培训 id memberId trainFrom trainType trainName startDate endDate province city county trainContent trainResult positionIds[] ") @ApiOperation("修改培训 id memberId trainType trainJob businessId startDate endDate")
public ResponseVO updateTrain(@RequestBody AddTrainDTO addTrainDTO){ public ResponseVO updateTrain(@RequestBody MemberTrainInfoDO memberTrainInfoDO){
return ResponseData.generateCreatedResponse(0,memberTrainInfoService.updateTrain(addTrainDTO)); return ResponseData.generateCreatedResponse(0,memberTrainInfoService.updateTrain(memberTrainInfoDO));
} }
......
package com.laowu.controller;
import com.laowu.model.MemberTrainPositionsDO;
import com.laowu.service.MemberTrainPositionsService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 培训关联职业范围 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-04-12
*/
@RestController
@Api(tags = "培训关联职业范围")
@RequestMapping("/memberTrainPositions")
public class MemberTrainPositionsController {
@Autowired
private MemberTrainPositionsService memberTrainPositionsService;
@PostMapping("addPosition")
@ApiOperation("添加职业技能范围 memberTrainId positionId")
public ResponseVO addPosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){
return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.addPosition(memberTrainPositionsDO));
}
@PostMapping("deletePosition")
@ApiOperation("删除职业技能范围 id ")
public ResponseVO deletePosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){
return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.deletePosition(memberTrainPositionsDO));
}
@PostMapping("updatePosition")
@ApiOperation("修改职业技能范围 id positionId")
public ResponseVO updatePosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){
return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.updatePosition(memberTrainPositionsDO));
}
}
package com.laowu.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 公司更新日志表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-04-07
*/
@RestController
@Api(tags = "公司更新日志表")
@RequestMapping("/member-update-history-do")
public class MemberUpdateHistoryController {
}
package com.laowu.controller;
import com.laowu.dto.team.*;
import com.laowu.model.TeamDictDO;
import com.laowu.service.TeamDictService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团队字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
@RestController
@Api(tags = "团队字典表")
@RequestMapping("/teamDict")
public class TeamDictController {
@Autowired
private TeamDictService teamDictService;
@PostMapping("teams")
@ApiOperation("工作站下的团队 pageSize pageNum province stationId teamName")
public ResponseVO teams(@RequestBody TeamsDTO teamsDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.teams(teamsDTO));
}
@PostMapping("totalTeams")
@ApiOperation("总团队数 stationId")
public ResponseVO totalTeams(@RequestBody TeamDictDO teamDictDO){
return ResponseData.generateCreatedResponse(0,teamDictService.totalTeams(teamDictDO));
}
@PostMapping("deleteTeam")
@ApiOperation("删除团队 id")
public ResponseVO deleteTeam(@RequestBody TeamDictDO teamDictDO){
return ResponseData.generateCreatedResponse(0,teamDictService.deleteTeam(teamDictDO));
}
@PostMapping("addTeam")
@ApiOperation("添加团队 stationId teamName comment memberId")
public ResponseVO addTeam(@RequestBody TeamDictDO teamDictDO){
return ResponseData.generateCreatedResponse(0,teamDictService.addTeam(teamDictDO));
}
@PostMapping("updateTeam")
@ApiOperation("id stationId teamName comment memberId")
public ResponseVO updateTeam(@RequestBody TeamDictDO teamDict){
return ResponseData.generateCreatedResponse(0,teamDictService.updateTeam(teamDict));
}
@PostMapping("teamMember")
@ApiOperation("查看团队成员信息 teamId")
public ResponseVO teamMember(@RequestBody TeamMemberDTO teamMemberDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.teamMember(teamMemberDTO));
}
@PostMapping("oneTeamInfo")
@ApiOperation("查看一个团队详情 id")
public ResponseVO oneTeamInfo(@RequestBody TeamDictDO teamDictDO){
return ResponseData.generateCreatedResponse(0,teamDictService.oneTeamInfo(teamDictDO));
}
@PostMapping("noTeamMembers")
@ApiOperation("查看没有团队的成员信息 pageSize pageNum teamId userName")
public ResponseVO noTeamMembers(@RequestBody TeamMemberDTO teamMemberDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.noTeamMembers(teamMemberDTO));
}
@PostMapping("updateTeamMembers")
@ApiOperation("编辑团队信息 teamId memberIds[] ")
public ResponseVO updateMembers(@RequestBody UpdateTeamMembersDTO updateTeamMembersDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.updateMembers(updateTeamMembersDTO));
}
@PostMapping("leaderMembers")
@ApiOperation("团队带头人 stationId pageSize pageNum ")
public ResponseVO leaderMembers(@RequestBody LeaderMembersDTO leaderMembersDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.leaderMembers(leaderMembersDTO));
}
@PostMapping("leaderMemberCounts")
@ApiOperation("团队带头人数 stationId")
public ResponseVO leaderMemberCounts(@RequestBody TeamDictDO teamDictDO){
return ResponseData.generateCreatedResponse(0,teamDictService.leaderMemberCounts(teamDictDO));
}
@PostMapping("provinceStationTeam")
@ApiOperation("省-工作站-团队 userId")
public ResponseVO provinceStationTeam(@RequestBody ProvinceStationTeamDTO provinceStationTeamDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.provinceStationTeam(provinceStationTeamDTO));
}
@PostMapping("memberManagement")
@ApiOperation("人员管理 pageSize pageNum userId teamId stationId province jobStatus userName positionId 技能范围")
public ResponseVO memberManagement (@RequestBody MemberManagementDTO memberManagementDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.memberManagement(memberManagementDTO));
}
@PostMapping("memberManagementCount")
@ApiOperation("人员管理 人数 teamId stationId province jobStatus userName")
public ResponseVO memberManagementCount(@RequestBody MemberManagementDTO memberManagementDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.memberManagementCount(memberManagementDTO));
}
}
...@@ -6,6 +6,7 @@ import com.laowu.dto.station.StationAccountDTO; ...@@ -6,6 +6,7 @@ import com.laowu.dto.station.StationAccountDTO;
import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.StationsDTO;
import com.laowu.dto.station.UpdateAdministerDTO; import com.laowu.dto.station.UpdateAdministerDTO;
import com.laowu.model.AdministerDO; import com.laowu.model.AdministerDO;
import com.laowu.model.LibGeoLocationDO;
import com.laowu.model.WorkstationDictDO; import com.laowu.model.WorkstationDictDO;
import com.laowu.service.WorkstationDictService; import com.laowu.service.WorkstationDictService;
import com.laowu.util.ResponseData; import com.laowu.util.ResponseData;
...@@ -71,7 +72,7 @@ public class WorkstationDictController { ...@@ -71,7 +72,7 @@ public class WorkstationDictController {
} }
@PostMapping("provinceStations") @PostMapping("provinceStations")
@ApiOperation("以省为单位查看工作站 ") @ApiOperation("以省为单位查看工作站 userId")
public ResponseVO provinceStations(@RequestBody ProvinceStationsDTO provinceStationsDTO){ public ResponseVO provinceStations(@RequestBody ProvinceStationsDTO provinceStationsDTO){
return ResponseData.generateCreatedResponse(0,workstationDictService.provinceStations(provinceStationsDTO)); return ResponseData.generateCreatedResponse(0,workstationDictService.provinceStations(provinceStationsDTO));
} }
...@@ -94,4 +95,27 @@ public class WorkstationDictController { ...@@ -94,4 +95,27 @@ public class WorkstationDictController {
return ResponseData.generateCreatedResponse(0,workstationDictService.homepage(workstationDictDO)); return ResponseData.generateCreatedResponse(0,workstationDictService.homepage(workstationDictDO));
} }
@PostMapping("screen1")
@ApiOperation("大屏1 province city")
public ResponseVO screen1(@RequestBody LibGeoLocationDO libGeoLocationDO){
return ResponseData.generateCreatedResponse(0,workstationDictService.screen1(libGeoLocationDO));
}
@PostMapping("screen2")
@ApiOperation("大屏2 province city")
public ResponseVO screen2(@RequestBody LibGeoLocationDO libGeoLocationDO){
return ResponseData.generateCreatedResponse(0,workstationDictService.screen2(libGeoLocationDO));
}
@PostMapping("screen3")
@ApiOperation("大屏3 province city")
public ResponseVO screen3(@RequestBody LibGeoLocationDO libGeoLocationDO){
return ResponseData.generateCreatedResponse(0,workstationDictService.screen3(libGeoLocationDO));
}
@PostMapping("ageGender")
public ResponseVO ageGender(){
return ResponseData.generateCreatedResponse(0,workstationDictService.ageGender());
}
} }
package com.laowu.controller; package com.laowu.controller;
import com.laowu.dto.member.MemberManagementDTO;
import com.laowu.service.WorkstationMemberMappingService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
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 io.swagger.annotations.Api;
/** /**
* <p> * <p>
...@@ -16,7 +23,20 @@ import io.swagger.annotations.Api; ...@@ -16,7 +23,20 @@ import io.swagger.annotations.Api;
*/ */
@RestController @RestController
@Api(tags = "学员--工作站映射关系") @Api(tags = "学员--工作站映射关系")
@RequestMapping("/workstation-member-mapping-do") @RequestMapping("/workstationMemberMapping")
public class WorkstationMemberMappingController { public class WorkstationMemberMappingController {
@Autowired
private WorkstationMemberMappingService workstationMemberMappingService;
@PostMapping("memberManagement")
@ApiOperation("人员管理 pageSize,pageNum,userName,stationId,positionId,province,city,county,town,village,gender,maxAge," +
"minAge,isParty,education,health,provinceNow,cityNow,countyNow,townNow,isPoor,monitorType,isMigration,migrationType," +
"fisherman,insured,pensionInsurance,insurePlace,memberType,laborAbility,jobStatus,jobType,provinceJob,cityJob,countyJob," +
"townJob,jobDestination,jobsStartDate,jobsEndDate,businessId,maxAverageSalary,minAverageSalary," +
"maxJobAge,minJobAge,employmentWillingness,provinceEmployment,cityEmployment,willingBusinessId,employmentTrainingWillingness,trainType,homecoming,userId")
public ResponseVO memberManagement (@RequestBody MemberManagementDTO memberManagementDTO){
return ResponseData.generateCreatedResponse(0,workstationMemberMappingService.memberManagement(memberManagementDTO));
}
} }
package com.laowu.dto.team; package com.laowu.dto.image;
import lombok.Data; import lombok.Data;
@Data @Data
public class ProvinceStationTeamDTO { public class CheckResultDTO {
private Long userId; private String id;
} }
...@@ -8,14 +8,10 @@ import java.util.List; ...@@ -8,14 +8,10 @@ import java.util.List;
@Data @Data
public class AddMemberDTO extends MemberDictDO { public class AddMemberDTO extends MemberDictDO {
private Long userId; private Long workstationId;
private String module;
private Long stationId;
private Long teamId;
private List<Long> positionIds; private List<Long> positionIds;
private List<Long> jobIds;
} }
package com.laowu.dto.member;
import com.laowu.model.MemberTrainInfoDO;
import lombok.Data;
import java.util.List;
@Data
public class AddTrainDTO extends MemberTrainInfoDO {
private List<Long> positionIds;
}
package com.laowu.dto.member;
import lombok.Data;
@Data
public class MemberManagementDTO {
private Integer pageSize;
private Integer pageNum;
private String userName;
private Long stationId;
private Long positionId;
private String province;
private String city;
private String county;
private String town;
private String village;
private String gender;
private Integer maxAge;
private Integer minAge;
private String isParty;
private String education;
private String health;
private String provinceNow;
private String cityNow;
private String countyNow;
private String townNow;
private String isPoor;
private String monitorType;
private String isMigration;
private String migrationType;
private String fisherman;
private String insured;
private String pensionInsurance;
private String insurePlace;
private String memberType;
private String laborAbility;
private String jobStatus;
private String jobType;
private String provinceJob;
private String cityJob;
private String countyJob;
private String townJob;
private String jobDestination;
private String jobsStartDate;
private String jobsEndDate;
private Long businessId;
private Integer maxAverageSalary;
private Integer minAverageSalary;
private Integer maxJobAge;
private Integer minJobAge;
private Long willingBusinessId;
private String employmentWillingness;
private String provinceEmployment;
private String cityEmployment;
private String employmentTrainingWillingness;
private String homecoming;
private String trainType;
private Long userId;
}
...@@ -11,10 +11,6 @@ public class UpdateMemberDTO extends MemberDictDO { ...@@ -11,10 +11,6 @@ public class UpdateMemberDTO extends MemberDictDO {
private List<MemberJobInfoVO> memberJobInfoVOS; private List<MemberJobInfoVO> memberJobInfoVOS;
private Long userId;
private String module;
private List<Long> positionIds; private List<Long> positionIds;
} }
package com.laowu.dto.team;
import lombok.Data;
@Data
public class LeaderMembersDTO {
private Integer pageSize;
private Integer pageNum;
private Long stationId;
private String userName;
}
package com.laowu.dto.team;
import lombok.Data;
@Data
public class MemberManagementDTO {
private Integer pageSize;
private Integer pageNum;
private Long teamId;
private Long stationId;
private String province;
private String jobStatus;
private String userName;
private Long userId;
private Long positionId;
}
package com.laowu.dto.team;
import lombok.Data;
@Data
public class TeamMemberDTO {
private Integer pageSize;
private Integer pageNum;
private Long teamId;
private String userName;
}
package com.laowu.dto.team;
import lombok.Data;
@Data
public class TeamsDTO {
private Integer pageSize;
private Integer pageNum;
private Long stationId;
private String teamName;
private String province;
}
package com.laowu.dto.team;
import lombok.Data;
import java.util.List;
@Data
public class UpdateTeamMembersDTO {
private Long teamId;
private List<Long> memberIds;
}
package com.laowu.mapper; package com.laowu.mapper;
import com.laowu.model.MemberUpdateHistoryDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.laowu.model.AccessTokenDO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
/** /**
* <p> * <p>
* 公司更新日志表 Mapper 接口 * Mapper 接口
* </p> * </p>
* *
* @author Tuyp * @author DengMin
* @since 2023-04-07 * @since 2022-02-18
*/ */
@Repository @Repository
public interface MemberUpdateHistoryMapper extends BaseMapper<MemberUpdateHistoryDO> { public interface AccessTokenMapper extends BaseMapper<AccessTokenDO> {
} }
package com.laowu.mapper; package com.laowu.mapper;
import com.laowu.model.MemberCollegeMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.laowu.model.ImageCheckRecordDO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
/** /**
* <p> * <p>
* 学员-学校映射表 Mapper 接口 * 人脸识别记录表 Mapper 接口
* </p> * </p>
* *
* @author Tuyp * @author Tuyp
* @since 2023-04-04 * @since 2023-08-22
*/ */
@Repository @Repository
public interface MemberCollegeMappingMapper extends BaseMapper<MemberCollegeMappingDO> { public interface ImageCheckRecordMapper extends BaseMapper<ImageCheckRecordDO> {
} }
package com.laowu.mapper; package com.laowu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.MemberDictDO; import com.laowu.model.MemberDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.laowu.model.PositionDictDO; import com.laowu.model.PositionDictDO;
import com.laowu.vo.member.AllMembersVO; import com.laowu.vo.member.AllMembersVO;
import com.laowu.vo.station.BusinessTop7VO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -35,6 +36,44 @@ public interface MemberDictMapper extends BaseMapper<MemberDictDO> { ...@@ -35,6 +36,44 @@ public interface MemberDictMapper extends BaseMapper<MemberDictDO> {
*/ */
List<PositionDictDO> memberPositions(Long memberId); List<PositionDictDO> memberPositions(Long memberId);
/**
* 劳动力总数:只算技能劳动力,普通劳动力,部分丧失劳动力
*/
Integer laborAbility(String province,String city,String county,String isPoor);
/**
* 在沪就业人数
*/
Integer cityEmployeeCnt(String province,String city);
/**
* 转移人数
*/
Integer migrationCnt(String province,String city,String isMigration);
/**
* 持证人数
*/
Integer memberCertCnt(String province,String city);
/**
* 就业行业占比
*/
List<BusinessTop7VO> businessTop7(String province, String city);
/**
* 薪资中位数
*/
List<Double> middleSalary(String province, String city);
/**
* 学历查询
*/
Integer education(String province,String city,String county,String education,String destinationProvince);
/**
* 某个地方某个年龄段的劳动力
*/
Integer ageLabor(String province,String city,String county,Integer minAge,Integer maxAge);
} }
package com.laowu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.MemberDictDO;
import com.laowu.model.MemberTeamMappingDO;
import org.springframework.stereotype.Repository;
/**
* <p>
* 团队成员映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
@Repository
public interface MemberTeamMappingMapper extends BaseMapper<MemberTeamMappingDO> {
/**
* 查看某个团队的成员
*/
IPage<MemberDictDO> teamMembers(IPage page,Long teamId);
/**
* 查看还不在这个团队里的人
*/
IPage<MemberDictDO> noTeamMembers(IPage iPage,Long teamId,String userName);
}
package com.laowu.mapper;
import com.laowu.model.MemberTrainPositionsDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.laowu.model.PositionDictDO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 培训关联职业范围 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-04-12
*/
@Repository
public interface MemberTrainPositionsMapper extends BaseMapper<MemberTrainPositionsDO> {
List<Long> positionIds(Long memberTrainId);
List<PositionDictDO> positions(Long memberTrainId);
}
package com.laowu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.TeamDictDO;
import com.laowu.vo.team.LeaderMembersVO;
import com.laowu.vo.team.MemberManagementVO;
import com.laowu.vo.team.TeamsVO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 团队字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
@Repository
public interface TeamDictMapper extends BaseMapper<TeamDictDO> {
IPage<TeamsVO> teams(IPage iPage, Long stationId, String teamName,String province);
/**
* 查看某个工作站的带头人总数
*/
Integer leaderMemberCounts(Long stationId);
/**
* 查看带头人的团队情况
*/
IPage<LeaderMembersVO> leaderMembers(IPage iPage, Long stationId, String userName);
/**
* 人员管理
*/
IPage<MemberManagementVO> memberManagement(IPage page, Long teamId, Long stationId, String province, String jobStatus, String userName, List<Long> workstationIds,Long positionId);
/**
* 人员管理---人数
*/
Integer memberManagementCount(Long teamId, Long stationId, String province, String jobStatus,Long positionId);
/**
* 将组长为memberId的team职位空
*/
void noLeader(Long id);
}
...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.WorkstationDictDO; import com.laowu.model.WorkstationDictDO;
import com.laowu.vo.station.StationAccountVO; import com.laowu.vo.station.StationAccountVO;
import com.laowu.vo.station.StationsVO; import com.laowu.vo.station.StationsVO;
import com.laowu.vo.team.HomepageVO; import com.laowu.vo.station.HomepageVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
......
package com.laowu.mapper; package com.laowu.mapper;
import com.laowu.model.WorkstationMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.WorkstationMemberMappingDO;
import com.laowu.vo.member.MemberManagementVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
/** /**
...@@ -12,9 +14,18 @@ import org.springframework.stereotype.Repository; ...@@ -12,9 +14,18 @@ import org.springframework.stereotype.Repository;
* @author Tuyp * @author Tuyp
* @since 2023-04-07 * @since 2023-04-07
*/ */
@Repository @Repository
public interface WorkstationMemberMappingMapper extends BaseMapper<WorkstationMemberMappingDO> { public interface WorkstationMemberMappingMapper extends BaseMapper<WorkstationMemberMappingDO> {
/**
* 人员管理
*/
IPage<MemberManagementVO> memberManagement(IPage page,String userName,Long stationId,Long positionId,String province,String city,String county,String town,String village,String gender,Integer maxAge,
Integer minAge,String isParty,String education,String health,String provinceNow,String cityNow,String countyNow,String townNow,
String isPoor,String monitorType,String isMigration,String migrationType,String fisherman,String insured,String pensionInsurance,
String insurePlace,String memberType,String laborAbility,String jobStatus,String jobType,String provinceJob,String cityJob,String countyJob,
String townJob,String jobDestination,String jobsStartDate,String jobsEndDate,Long businessId,Integer maxAverageSalary,Integer minAverageSalary,Integer maxJobAge,Integer minJobAge,
String employmentWillingness,String provinceEmployment,String cityEmployment,Long willingBusinessId,String employmentTrainingWillingness,String homecoming,Long userId,String trainType);
} }
package com.laowu.model; package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.laowu.util.BaseModel; import com.laowu.util.BaseModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* <p> * <p>
* 团队成员映射表 *
* </p> * </p>
* *
* @author Tuyp * @author DengMin
* @since 2023-03-29 * @since 2022-02-18
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("member_team_mapping") @TableName("access_token")
public class MemberTeamMappingDO extends BaseModel { public class AccessTokenDO extends BaseModel {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Integer id;
private Long memberId;
private Long teamId; private String accessToken;
} }
package com.laowu.model; package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.laowu.util.BaseModel; import com.laowu.util.BaseModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
* 学员-学校映射 * 人脸识别记录
* </p> * </p>
* *
* @author Tuyp * @author Tuyp
* @since 2023-04-04 * @since 2023-08-22
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("member_college_mapping") @TableName("image_check_record")
public class MemberCollegeMappingDO extends BaseModel { public class ImageCheckRecordDO extends BaseModel {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,44 +28,39 @@ public class MemberCollegeMappingDO extends BaseModel { ...@@ -26,44 +28,39 @@ public class MemberCollegeMappingDO extends BaseModel {
private Long id; private Long id;
/** /**
* 学校类型 * 学员id
*/
private String schoolType;
/**
* 成员id
*/ */
private Long memberId; private Long memberId;
/** /**
* 院校id * 活体检测得分
*/ */
private Long collegeId; private String liveRate;
/** /**
* 开始时间 * 人脸比对得分
*/ */
private String startDate; private String similarity;
/** /**
* 结束时间 * 刷脸时间
*/ */
private String endDate; private LocalDateTime occurredTime;
/** /**
* 专业id * 图片
*/ */
private Long majorId; private String photo;
/** /**
* 成绩排名 * 流水号
*/ */
private String rank; private String bizSeqNo;
/** /**
* 学历类型 * 结果
*/ */
private String educationType; private Integer result;
} }
...@@ -35,5 +35,10 @@ public class MemberCertsDO extends BaseModel { ...@@ -35,5 +35,10 @@ public class MemberCertsDO extends BaseModel {
*/ */
private String cert; private String cert;
/**
* 证书编号
*/
private String certNo;
} }
...@@ -7,6 +7,8 @@ import com.laowu.util.BaseModel; ...@@ -7,6 +7,8 @@ import com.laowu.util.BaseModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
* 自然人表 * 自然人表
...@@ -31,9 +33,19 @@ public class MemberDictDO extends BaseModel { ...@@ -31,9 +33,19 @@ public class MemberDictDO extends BaseModel {
private String userName; private String userName;
/** /**
* 学生/社会 * 个人证件类型
*/ */
private String status; private String idCardType;
/**
* 个人证件
*/
private String idCard;
/**
* 头像
*/
private String img;
/** /**
* 手机号码 * 手机号码
...@@ -41,94 +53,179 @@ public class MemberDictDO extends BaseModel { ...@@ -41,94 +53,179 @@ public class MemberDictDO extends BaseModel {
private String telephone; private String telephone;
/** /**
* 个人证件类型 * 户主姓名
*/ */
private String idCardType; private String hostUserName;
/** /**
* 个人证件 * 户主证件类型
*/ */
private String idCard; private String hostIdCardType;
/** /**
* 省 * 户主证件
*/
private String hostIdCard;
/**
* 省(户籍)
*/ */
private String province; private String province;
/** /**
* 市 * 市(户籍)
*/ */
private String city; private String city;
/** /**
* 县 * 县(户籍)
*/ */
private String county; private String county;
/** /**
* 镇 * 镇(户籍)
*/ */
private String town; private String town;
/** /**
* 村 * 村(户籍)
*/ */
private String village; private String village;
/** /**
* 具体地址 * 组(户籍)
*/
private String team;
/**
* 具体地址(户籍)
*/ */
private String address; private String address;
/** /**
* 学历 * 省(现居)
*/ */
private String education; private String provinceNow;
/**
* 市(现居)
*/
private String cityNow;
/**
* 县(现居)
*/
private String countyNow;
/**
* 镇(现居)
*/
private String townNow;
/**
* 村(现居)
*/
private String villageNow;
/** /**
* 学历类型 * 具体地址(现居)
*/ */
private String educationType; private String addressNow;
/** /**
* 院校id * 家庭人数
*/ */
private Long collegeId; private Integer familyCnt;
/** /**
* 开始时间 * 与户主关系
*/ */
private String startDate; private String hostRelation;
/** /**
* 结束时间 * 性别
*/ */
private String endDate; private String gender;
/** /**
* 专业id * 年龄
*/ */
private Long majorId; private Integer age;
/** /**
* 排名 * 民族
*/ */
private String rank; private String nation;
/** /**
* 是否为脱贫劳动力 * 是否党员
*/
private String isParty;
/**
* 学历
*/
private String education;
/**
* 健康状态
*/
private String health;
/**
* 是否为脱贫户
*/ */
private String isPoor; private String isPoor;
/** /**
* 监测对象类型
*/
private String monitorType;
/**
* 是否易迁户 * 是否易迁户
*/ */
private String isMigration; private String isMigration;
/** /**
* 是否党员 * 搬迁类型
*/ */
private String isParty; private String migrationType;
/**
* 搬迁点名称
*/
private String migrationName;
/**
* 是否退捕渔民
*/
private String fisherman;
/**
* 是否参保
*/
private String insured;
/**
* 养老保险参保情况
*/
private String pensionInsurance;
/**
* 当前参保地
*/
private String insurePlace;
/**
* 人员类别
*/
private String memberType;
/**
* 劳动能力
*/
private String laborAbility;
/** /**
* 就业状态 * 就业状态
...@@ -136,8 +233,103 @@ public class MemberDictDO extends BaseModel { ...@@ -136,8 +233,103 @@ public class MemberDictDO extends BaseModel {
private String jobStatus; private String jobStatus;
/** /**
* 信息来源 * 就业类型
*/
private String jobType;
/**
* 就业行业id
*/
private Long businessId;
/**
* 工龄
*/
private String jobAge;
/**
* 本年内务工月数
*/
private String yearJobMonth;
/**
* 年平均收入
*/
private Double averageSalary;
/**
* 收入情况说明
*/
private String incomeStatement;
/**
* 就业意愿
*/
private String employmentWillingness;
/**
* 省(就业意愿)
*/
private String provinceEmployment;
/**
* 市(就业意愿)
*/
private String cityEmployment;
/**
* 就业培训意愿
*/
private String employmentTrainingWillingness;
/**
* 意愿培训行业
*/
private Long willingBusinessId;
/**
* 培训开始时间
*/
private String willingStartDate;
/**
* 培训结束时间
*/
private String willingEndDate;
/**
* 是否返乡
*/
private String homecoming;
/**
* 返乡时间
*/
private String homecomingDate;
/**
* 返乡原因
*/
private String homecomingReason;
/**
* 备注(异常原因)
*/
private String comment;
/**
* 户最后更新时间
*/
private LocalDateTime hostLastUpdate;
/**
* 基础信息更新时间
*/
private LocalDateTime baseLastUpdate;
/**
* 就业信息更新时间
*/ */
private String infoOrigin; private LocalDateTime employmentLastUpdate;
} }
...@@ -31,21 +31,6 @@ public class MemberJobInfoDO extends BaseModel { ...@@ -31,21 +31,6 @@ public class MemberJobInfoDO extends BaseModel {
private Long memberId; private Long memberId;
/** /**
* 就业来源
*/
private String jobSource;
/**
* 就业类型
*/
private String jobType;
/**
* 就业岗位
*/
private String job;
/**
* 省 * 省
*/ */
private String province; private String province;
...@@ -61,14 +46,19 @@ public class MemberJobInfoDO extends BaseModel { ...@@ -61,14 +46,19 @@ public class MemberJobInfoDO extends BaseModel {
private String county; private String county;
/** /**
* 具体地址 * 镇
*/
private String town;
/**
* 村
*/ */
private String address; private String village;
/** /**
* 公司名称 * 就业去向
*/ */
private Long companyId; private String jobDestination;
/** /**
* 开始时间 * 开始时间
...@@ -76,7 +66,7 @@ public class MemberJobInfoDO extends BaseModel { ...@@ -76,7 +66,7 @@ public class MemberJobInfoDO extends BaseModel {
private String startDate; private String startDate;
/** /**
* 结束实际上 * 结束时间
*/ */
private String endDate; private String endDate;
...@@ -90,5 +80,4 @@ public class MemberJobInfoDO extends BaseModel { ...@@ -90,5 +80,4 @@ public class MemberJobInfoDO extends BaseModel {
*/ */
private String salary; private String salary;
} }
...@@ -31,54 +31,15 @@ public class MemberTrainInfoDO extends BaseModel { ...@@ -31,54 +31,15 @@ public class MemberTrainInfoDO extends BaseModel {
private Long memberId; private Long memberId;
/** /**
* 培训项目来源
*/
private String trainFrom;
/**
* 培训类型 * 培训类型
*/ */
private String trainType; private String trainType;
/** /**
* 培训项目名称 * 培训工种
*/
private String trainName;
/**
* 培训开始时间
*/
private String startDate;
/**
* 培训结束时间
*/
private String endDate;
/**
* 省
*/ */
private String province; private String trainJob;
/**
* 市
*/
private String city;
/**
* 县
*/
private String county;
/**
* 培训内容
*/
private String trainContent;
/**
* 培训结果
*/
private String trainResult;
} }
package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.laowu.util.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 培训关联职业范围
* </p>
*
* @author Tuyp
* @since 2023-04-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("member_train_positions")
public class MemberTrainPositionsDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long memberTrainId;
private Long positionId;
}
package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.laowu.util.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 团队字典表
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("team_dict")
public class TeamDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 工作站id
*/
private Long stationId;
/**
* 团队名称
*/
private String teamName;
/**
* 备注
*/
private String comment;
/**
* 团队带头人
*/
private Long memberId;
}
package com.laowu.service; package com.laowu.service;
import com.laowu.model.MemberTeamMappingDO; import com.laowu.model.AccessTokenDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* <p> * <p>
* 团队成员映射表 服务类 * 服务类
* </p> * </p>
* *
* @author Tuyp * @author Tuyp
* @since 2023-03-29 * @since 2023-08-23
*/ */
public interface MemberTeamMappingService extends IService<MemberTeamMappingDO> { public interface AccessTokenService extends IService<AccessTokenDO> {
} }
...@@ -10,7 +10,7 @@ import com.laowu.model.CompanyDictDO; ...@@ -10,7 +10,7 @@ import com.laowu.model.CompanyDictDO;
import com.laowu.model.WorkstationDictDO; import com.laowu.model.WorkstationDictDO;
import com.laowu.vo.company.CompanyCardVO; import com.laowu.vo.company.CompanyCardVO;
import com.laowu.vo.company.CompanyVO; import com.laowu.vo.company.CompanyVO;
import com.laowu.vo.team.TotalTeamsVO; import com.laowu.vo.station.TotalTeamsVO;
/** /**
* <p> * <p>
......
package com.laowu.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.laowu.dto.image.CheckResultDTO;
import com.laowu.model.ImageCheckRecordDO;
import com.laowu.model.MemberDictDO;
import com.laowu.vo.image.SendIdCardInfoVO;
import java.util.List;
/**
* <p>
* 人脸识别记录表 服务类
* </p>
*
* @author Tuyp
* @since 2023-08-22
*/
public interface ImageCheckRecordService extends IService<ImageCheckRecordDO> {
List<ImageCheckRecordDO> getImageCheckHistory(ImageCheckRecordDO imageCheckRecordDO);
SendIdCardInfoVO imageCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception;
SendIdCardInfoVO h5CheckResult(ImageCheckRecordDO imageCheckRecordDO) throws Exception;
// SendIdCardInfoVO loginCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception;
//
// SendIdCardInfoVO h5LoginCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception;
MemberDictDO checkResult(CheckResultDTO checkResultDTO)throws Exception;
}
package com.laowu.service;
import com.laowu.model.MemberCollegeMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 学员-学校映射表 服务类
* </p>
*
* @author Tuyp
* @since 2023-04-04
*/
public interface MemberCollegeMappingService extends IService<MemberCollegeMappingDO> {
String addCollege(MemberCollegeMappingDO memberCollegeMappingDO);
String updateCollege(MemberCollegeMappingDO memberCollegeMappingDO);
String deleteCollege(MemberCollegeMappingDO memberCollegeMappingDO);
}
...@@ -31,12 +31,18 @@ public interface MemberDictService extends IService<MemberDictDO> { ...@@ -31,12 +31,18 @@ public interface MemberDictService extends IService<MemberDictDO> {
MemberCardVO memberCard(MemberDictDO memberDictDO); MemberCardVO memberCard(MemberDictDO memberDictDO);
ImportMemberDictVO importMember(String workstationId,String teamId,MultipartFile multipartFile); ImportMemberDictVO importMember(String workstationId,MultipartFile multipartFile);
String downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO); String downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO);
String downloadUsers(MemberManagementDTO memberManagementDTO);
void address(List<AddressDTO> addressDTO); void address(List<AddressDTO> addressDTO);
IPage<RosterVO> roster(RosterDTO rosterDTO); IPage<RosterVO> roster(RosterDTO rosterDTO);
Long checkLogin(MemberDictDO memberDictDO);
TokenLoginVO tokenLogin(MemberDictDO memberDictDO);
} }
package com.laowu.service; package com.laowu.service;
import com.laowu.dto.member.AddTrainDTO;
import com.laowu.model.MemberTrainInfoDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.laowu.model.MemberTrainInfoDO;
/** /**
* <p> * <p>
...@@ -14,9 +13,9 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -14,9 +13,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface MemberTrainInfoService extends IService<MemberTrainInfoDO> { public interface MemberTrainInfoService extends IService<MemberTrainInfoDO> {
String addTrain(AddTrainDTO addTrainDTO); String addTrain(MemberTrainInfoDO memberTrainInfoDO);
String deleteTrain(MemberTrainInfoDO memberTrainInfoDO); String deleteTrain(MemberTrainInfoDO memberTrainInfoDO);
String updateTrain(AddTrainDTO addTrainDTO); String updateTrain(MemberTrainInfoDO memberTrainInfoDO);
} }
package com.laowu.service;
import com.laowu.model.MemberTrainPositionsDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 培训关联职业范围 服务类
* </p>
*
* @author Tuyp
* @since 2023-04-12
*/
public interface MemberTrainPositionsService extends IService<MemberTrainPositionsDO> {
String addPosition(MemberTrainPositionsDO memberTrainPositionsDO);
String deletePosition(MemberTrainPositionsDO memberTrainPositionsDO);
String updatePosition(MemberTrainPositionsDO memberTrainPositionsDO);
}
package com.laowu.service;
import com.laowu.model.MemberUpdateHistoryDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 公司更新日志表 服务类
* </p>
*
* @author Tuyp
* @since 2023-04-07
*/
public interface MemberUpdateHistoryService extends IService<MemberUpdateHistoryDO> {
}
package com.laowu.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.laowu.dto.team.*;
import com.laowu.model.MemberDictDO;
import com.laowu.model.TeamDictDO;
import com.laowu.vo.team.*;
import java.util.List;
/**
* <p>
* 团队字典表 服务类
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
public interface TeamDictService extends IService<TeamDictDO> {
IPage<TeamsVO> teams(TeamsDTO teamsDTO);
TotalTeamsVO totalTeams(TeamDictDO teamDictDO);
String deleteTeam(TeamDictDO teamDictDO);
String addTeam(TeamDictDO teamDictDO);
String updateTeam(TeamDictDO teamDictDO);
IPage<MemberDictDO> teamMember(TeamMemberDTO teamMemberDTO);
OneTeamInfoVO oneTeamInfo(TeamDictDO teamDictDO);
IPage<MemberDictDO> noTeamMembers(TeamMemberDTO teamMemberDTO);
String updateMembers(UpdateTeamMembersDTO updateTeamMembersDTO);
IPage<LeaderMembersVO> leaderMembers(LeaderMembersDTO leaderMembersDTO);
TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO);
List<ProvinceStationTeamVO> provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO);
IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO);
TotalTeamsVO memberManagementCount(MemberManagementDTO memberManagementDTO);
}
...@@ -7,10 +7,9 @@ import com.laowu.dto.station.StationAccountDTO; ...@@ -7,10 +7,9 @@ import com.laowu.dto.station.StationAccountDTO;
import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.StationsDTO;
import com.laowu.dto.station.UpdateAdministerDTO; import com.laowu.dto.station.UpdateAdministerDTO;
import com.laowu.model.AdministerDO; import com.laowu.model.AdministerDO;
import com.laowu.model.LibGeoLocationDO;
import com.laowu.model.WorkstationDictDO; import com.laowu.model.WorkstationDictDO;
import com.laowu.vo.station.OneStationAccountVO; import com.laowu.vo.station.*;
import com.laowu.vo.station.ProvinceStationsVO;
import com.laowu.vo.team.HomepageVO;
import java.util.List; import java.util.List;
...@@ -43,4 +42,12 @@ public interface WorkstationDictService extends IService<WorkstationDictDO> { ...@@ -43,4 +42,12 @@ public interface WorkstationDictService extends IService<WorkstationDictDO> {
String addAdminister(UpdateAdministerDTO updateAdministerDTO); String addAdminister(UpdateAdministerDTO updateAdministerDTO);
HomepageVO homepage(WorkstationDictDO workstationDictDO); HomepageVO homepage(WorkstationDictDO workstationDictDO);
Screen1VO screen1(LibGeoLocationDO libGeoLocationDO);
Screen2VO screen2(LibGeoLocationDO libGeoLocationDO);
List<Screen3VO> screen3(LibGeoLocationDO libGeoLocationDO);
String ageGender();
} }
package com.laowu.service; package com.laowu.service;
import com.laowu.model.WorkstationMemberMappingDO; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.laowu.dto.member.MemberManagementDTO;
import com.laowu.model.WorkstationMemberMappingDO;
import com.laowu.vo.member.MemberManagementVO;
/** /**
* <p> * <p>
...@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface WorkstationMemberMappingService extends IService<WorkstationMemberMappingDO> { public interface WorkstationMemberMappingService extends IService<WorkstationMemberMappingDO> {
IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO);
} }
package com.laowu.service.impl; package com.laowu.service.impl;
import com.laowu.model.MemberTeamMappingDO; import com.laowu.model.AccessTokenDO;
import com.laowu.mapper.MemberTeamMappingMapper; import com.laowu.mapper.AccessTokenMapper;
import com.laowu.service.MemberTeamMappingService; import com.laowu.service.AccessTokenService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
* <p> * <p>
* 团队成员映射表 服务实现类 * 服务实现类
* </p> * </p>
* *
* @author Tuyp * @author Tuyp
* @since 2023-03-29 * @since 2023-08-23
*/ */
@Service @Service
public class MemberTeamMappingServiceImpl extends ServiceImpl<MemberTeamMappingMapper, MemberTeamMappingDO> implements MemberTeamMappingService { public class AccessTokenServiceImpl extends ServiceImpl<AccessTokenMapper, AccessTokenDO> implements AccessTokenService {
} }
...@@ -107,6 +107,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -107,6 +107,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
administerPermissionVO.setIsRole(false); administerPermissionVO.setIsRole(false);
//站长所有的工作站 //站长所有的工作站
List<WorkstationDictDO> workstationDictDOS = workstationAdministersMapper.workstations(administerDO.getId()); List<WorkstationDictDO> workstationDictDOS = workstationAdministersMapper.workstations(administerDO.getId());
administerPermissionVO.setWorkstationDictDOS(workstationDictDOS); administerPermissionVO.setWorkstationDictDOS(workstationDictDOS);
} }
......
...@@ -17,7 +17,7 @@ import com.laowu.vo.company.CompanyCardVO; ...@@ -17,7 +17,7 @@ import com.laowu.vo.company.CompanyCardVO;
import com.laowu.vo.company.CompanyUpdateHistoryVO; import com.laowu.vo.company.CompanyUpdateHistoryVO;
import com.laowu.vo.company.CompanyVO; import com.laowu.vo.company.CompanyVO;
import com.laowu.vo.company.RelateWorkVO; import com.laowu.vo.company.RelateWorkVO;
import com.laowu.vo.team.TotalTeamsVO; import com.laowu.vo.station.TotalTeamsVO;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.hash.Hashing;
import com.laowu.common.RestTemplateConfig;
import com.laowu.common.exception.HttpException;
import com.laowu.dto.image.CheckResultDTO;
import com.laowu.mapper.AccessTokenMapper;
import com.laowu.mapper.ImageCheckRecordMapper;
import com.laowu.mapper.MemberDictMapper;
import com.laowu.model.AccessTokenDO;
import com.laowu.model.ImageCheckRecordDO;
import com.laowu.model.MemberDictDO;
import com.laowu.service.ImageCheckRecordService;
import com.laowu.util.OSSUtils;
import com.laowu.util.RandomUtil;
import com.laowu.vo.image.*;
import org.apache.commons.codec.Charsets;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* <p>
* 人脸识别记录表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-08-22
*/
@Service
public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMapper, ImageCheckRecordDO> implements ImageCheckRecordService {
@Autowired
private MemberDictMapper memberDictMapper;
@Autowired
private RestTemplateConfig restTemplateConfig;
@Autowired
private AccessTokenMapper accessTokenMapper;
@Autowired
private ImageCheckRecordMapper imageCheckRecordMapper;
public static final String WBAPPID = "IDAaOibN";
public static final String SECRET = "GD6Z55rHXSlBZB4oxEEowwI5h4IgwUdh0xOOHi6fambXYMFcHuDaBRxtnMx5FVhk";
// public static final String WBAPPID = "TIDAbX8x";
// public static final String SECRET = "cWAMlQ8Aq7aOad0wrtfJcSpcgksCLFT62qHC4uDHFCGx0SPKqtpt1PungiAKya2M";
public static final String NONCE = "08f1209ee37b4ba29e61e51f3643a24e";
public List<ImageCheckRecordDO> getImageCheckHistory(ImageCheckRecordDO imageCheckRecordDO) {
return this.baseMapper.selectList(new QueryWrapper<ImageCheckRecordDO>()
.lambda()
.eq(ImageCheckRecordDO::getMemberId, imageCheckRecordDO.getMemberId())
.orderByDesc(ImageCheckRecordDO::getCreateDate));
}
public SendIdCardInfoVO imageCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception {
return PCCheckIdCard(imageCheckRecordDO.getMemberId());
}
public SendIdCardInfoVO h5CheckResult(ImageCheckRecordDO imageCheckRecordDO) throws Exception {
return H5IdCheckCard(imageCheckRecordDO.getMemberId());
}
// public SendIdCardInfoVO loginCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception {
// return PCCheckIdCard(imageCheckRecordDO.getMemberId());
// }
//
// public SendIdCardInfoVO h5LoginCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception {
// return H5IdCheckCard(imageCheckRecordDO.getMemberId());
// }
/**
* 当天验证次数超过
*/
public void getDailyCheckCnt(Long memberId) {
int count = imageCheckRecordMapper.selectCount(new QueryWrapper<ImageCheckRecordDO>()
.lambda()
.eq(ImageCheckRecordDO::getMemberId, memberId)
.ge(ImageCheckRecordDO::getCreateDate, LocalDateTime.now()));
if (count > 3) {
throw new HttpException(80001);
}
}
/**
* H5端调取权威库(身份证)验证 权威库
*/
public SendIdCardInfoVO H5IdCheckCard(Long id) {
getDailyCheckCnt(id);
//获取这个学生的基本信息
MemberDictDO memberDictDO = memberDictMapper.selectById(id);
if (StringUtils.isEmpty(memberDictDO.getIdCard())) {
throw new HttpException(10025);
}
// 生成订单
ImageCheckRecordDO imageCheckRecordDO = new ImageCheckRecordDO();
imageCheckRecordDO.setMemberId(id);
imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber());
imageCheckRecordMapper.insert(imageCheckRecordDO);
//获取signTicket
IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken());
//生成签名
List<String> signList1 = new ArrayList<>();
signList1.add(WBAPPID);
signList1.add(memberDictDO.getId() + "");
signList1.add("1.0.0");
signList1.add(NONCE);
String sign = sign(signList1, idCardTicketsVO.getValue());
//合作方后台上送身份信息
SendIdCardInfoVO sendIdCardInfoVO = null;
if (StringUtils.isEmpty(memberDictDO.getImg())) {
sendIdCardInfoVO = this.h5SendIdCardInfo(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign);
} else {
sendIdCardInfoVO = this.h5SendIdCardInfoCompare(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign, OSSUtils.image2Base64(memberDictDO.getImg()));
}
if (!"0".equals(sendIdCardInfoVO.getCode())) {
imageCheckRecordMapper.deleteById(imageCheckRecordDO.getId());
throw new HttpException(10026);
}
//获取 NONCE ticket
IdCardTicketsVO nonceTicket = this.nonceTicket(getLatestAccessToken(), memberDictDO.getId() + "");
//签名2
List<String> signList2 = new ArrayList<>();
signList2.add(WBAPPID);
signList2.add(imageCheckRecordDO.getBizSeqNo());
signList2.add(memberDictDO.getId() + "");
signList2.add("1.0.0");
signList2.add(sendIdCardInfoVO.getResult().getFaceId());
signList2.add(NONCE);
String sign2 = sign(signList2, nonceTicket.getValue());
sendIdCardInfoVO.getResult().setWbAppId(WBAPPID);
sendIdCardInfoVO.getResult().setNonce(NONCE);
sendIdCardInfoVO.getResult().setUserId(memberDictDO.getId());
sendIdCardInfoVO.getResult().setSign(sign2);
return sendIdCardInfoVO;
}
/**
* PC端调取权威库(身份证)验证 权威库
* 1,签到页 0 班级内
*/
public SendIdCardInfoVO PCCheckIdCard(Long id) {
getDailyCheckCnt(id);
//获取这个学生的基本信息
MemberDictDO memberDictDO = memberDictMapper.selectById(id);
if (StringUtils.isEmpty(memberDictDO.getIdCard())) {
throw new HttpException(10025);
}
//生成订单
ImageCheckRecordDO imageCheckRecordDO = new ImageCheckRecordDO();
imageCheckRecordDO.setMemberId(memberDictDO.getId());
imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber());
imageCheckRecordMapper.insert(imageCheckRecordDO);
//获取signTicket
IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken());
//生成签名
List<String> signList1 = new ArrayList<>();
signList1.add(WBAPPID);
signList1.add(imageCheckRecordDO.getBizSeqNo());
signList1.add(memberDictDO.getId() + "");
signList1.add("1.0.0");
String sign = "";
//合作方后台上送身份信息
// 查看之前是否有验证过,没有的话就调取权威库,有的话就进行两个图片对比
SendIdCardInfoVO sendIdCardInfoVO = null;
if (StringUtils.isEmpty(memberDictDO.getImg())) {
signList1.add(memberDictDO.getUserName());
signList1.add(memberDictDO.getIdCard());
sign = sign(signList1, idCardTicketsVO.getValue());
sendIdCardInfoVO = this.sendIdCardInfo(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign);
} else {
sign = sign(signList1, idCardTicketsVO.getValue());
sendIdCardInfoVO = this.sendIdCardInfoCompare(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign, OSSUtils.image2Base64(memberDictDO.getImg()));
}
if (!"0".equals(sendIdCardInfoVO.getCode())) {
//删除这个订单
imageCheckRecordMapper.deleteById(imageCheckRecordDO.getId());
throw new HttpException(10026);
}
//获取 NONCE ticket
IdCardTicketsVO nonceTicket = this.nonceTicket(getLatestAccessToken(), memberDictDO.getId() + "");
//签名2 faceId ===>H5FaceId
List<String> signList2 = new ArrayList(Arrays.asList(WBAPPID, memberDictDO.getId() + "", NONCE, "1.0.0", sendIdCardInfoVO.getResult().getH5faceId(), sendIdCardInfoVO.getResult().getOrderNo()));
String sign2 = sign(signList2, nonceTicket.getValue());
sendIdCardInfoVO.getResult().setWbAppId(WBAPPID);
sendIdCardInfoVO.getResult().setNonce(NONCE);
sendIdCardInfoVO.getResult().setUserId(memberDictDO.getId());
sendIdCardInfoVO.getResult().setSign(sign2);
return sendIdCardInfoVO;
}
@Transactional(rollbackFor = Exception.class)
public MemberDictDO checkResult(CheckResultDTO checkResultDTO) throws Exception {
//获取signTicket
IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken());
//签名3
List<String> signList3 = new ArrayList<>();
signList3.add(WBAPPID);
signList3.add(checkResultDTO.getId());
signList3.add("1.0.0");
signList3.add(NONCE);
String sign3 = sign(signList3, idCardTicketsVO.getValue());
//人身核验结果
ResultVO resultVO = this.checkResult(checkResultDTO.getId(), sign3);
//存数据库
ImageCheckRecordDO imageCheckRecordDO = imageCheckRecordMapper.selectOne(new QueryWrapper<ImageCheckRecordDO>()
.lambda()
.eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId()));
MemberDictDO memberDictDO = memberDictMapper.selectById(imageCheckRecordDO.getMemberId());
if (!StringUtils.isEmpty(resultVO.getSimilarity())) {
BeanUtils.copyProperties(resultVO, imageCheckRecordDO);
try {
imageCheckRecordDO.setPhoto(OSSUtils.uploadOneFile(resultVO.getPhotoList().get(resultVO.getPhotoList().size() - 1)));
if ((Double.valueOf(imageCheckRecordDO.getSimilarity()) > 50)) {
imageCheckRecordDO.setResult(1);
memberDictDO.setImg(imageCheckRecordDO.getPhoto());
memberDictMapper.updateById(memberDictDO);
} else {
imageCheckRecordDO.setResult(0);
throw new HttpException(40004);
}
} catch (Exception e) {
imageCheckRecordDO.setResult(0);
e.printStackTrace();
}
imageCheckRecordMapper.updateById(imageCheckRecordDO);
}
return memberDictDO;
}
/**
* 获取accessToken
*/
public IdCardAccessTokenVO accessToken() {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/access_token?app_id=" + WBAPPID
+ "&secret=" + SECRET + "&grant_type=client_credential&version=1.0.0";
ResponseEntity<IdCardAccessTokenVO> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, IdCardAccessTokenVO.class);
return response.getBody();
}
/**
* 获取sign_ticket
*/
public IdCardTicketsVO signTickets(String accessToken) {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/api_ticket?app_id=" + WBAPPID + "&access_token=" + accessToken + "&type=SIGN&version=1.0.0";
ResponseEntity<IdCardSignTicketVO> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, IdCardSignTicketVO.class);
return response.getBody().getTickets().get(0);
}
/**
* 获取签名
*/
public static String sign(List<String> values, String ticket) { //values传ticket外的其他参数
if (values == null) {
throw new NullPointerException("values is null");
}
values.removeAll(Collections.singleton(null));// remove null
values.add(ticket);
java.util.Collections.sort(values);
StringBuilder sb = new StringBuilder();
for (String s : values) {
sb.append(s);
}
return Hashing.sha1().hashString(sb, Charsets.UTF_8).toString().toUpperCase();
}
/**
* PC端 合作方后台上送身份信息 POST请求 权威库 姓名+身份证
*/
public SendIdCardInfoVO sendIdCardInfo(String orderNo, MemberDictDO memberDictDO, String sign) {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/server/h5/geth5faceid?orderNo=" + orderNo;
String input = "{\n" +
" \"webankAppId\":\"" + WBAPPID + "\",\n" +
" \"orderNo\":\"" + orderNo + "\",\n" +
" \"name\":\"" + memberDictDO.getUserName() + "\"," +
" \"idNo\":\"" + memberDictDO.getIdCard() + "\"," +
" \"userId\":\"" + memberDictDO.getId() + "\"," +
" \"version\":\"1.0.0\"," +
" \"sign\":\"" + sign + "\"" +
"}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
ResponseEntity<SendIdCardInfoVO> responseEntity = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class);
return responseEntity.getBody();
}
/**
* PC端 合作方后台上送身份信息 POST请求 图片对比
*/
public SendIdCardInfoVO sendIdCardInfoCompare(String orderNo, MemberDictDO memberDictDO, String sign, String sourceImg) {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/server/h5/geth5faceid?orderNo=" + orderNo;
String input = "{\n" +
" \"webankAppId\":\"" + WBAPPID + "\",\n" +
" \"orderNo\":\"" + orderNo + "\",\n" +
" \"sourcePhotoStr\":\"" + sourceImg + "\"," +
" \"sourcePhotoType\":\"" + 2 + "\"," +
" \"userId\":\"" + memberDictDO.getId() + "\"," +
" \"version\":\"1.0.0\"," +
" \"sign\":\"" + sign + "\"" +
"}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
ResponseEntity<SendIdCardInfoVO> responseEntity = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class);
return responseEntity.getBody();
}
/**
* H5端 合作方后台上送身份信息 POST请求 权威库 姓名+身份证
*/
public SendIdCardInfoVO h5SendIdCardInfo(String orderNo, MemberDictDO memberDictDO, String sign) {
String url = "https://kyc.qcloud.com/api/server/getAdvFaceId?orderNo=" + orderNo;
String input = "{\n" +
" \"appId\":\"" + WBAPPID + "\",\n" +
" \"orderNo\":\"" + orderNo + "\",\n" +
" \"name\":\"" + memberDictDO.getUserName() + "\"," +
" \"idNo\":\"" + memberDictDO.getIdCard() + "\"," +
" \"userId\":\"" + memberDictDO.getId() + "\"," +
" \"version\":\"1.0.0\"," +
" \"sign\":\"" + sign + "\"," +
" \"nonce\":\"" + NONCE + "\"" +
"}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
ResponseEntity<SendIdCardInfoVO> responseEntity = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class);
return responseEntity.getBody();
}
/**
* H5端 合作方后台上送身份信息 POST请求 图片对比
*/
public SendIdCardInfoVO h5SendIdCardInfoCompare(String orderNo, MemberDictDO memberDictDO, String sign, String sourceImg) {
String url = "https://kyc.qcloud.com/api/server/getAdvFaceId?orderNo=" + orderNo;
String input = "{\n" +
" \"appId\":\"" + WBAPPID + "\",\n" +
" \"orderNo\":\"" + orderNo + "\",\n" +
" \"sourcePhotoStr\":\"" + sourceImg + "\"," +
" \"sourcePhotoType\":\"" + 2 + "\"," +
" \"userId\":\"" + memberDictDO.getId() + "\"," +
" \"version\":\"1.0.0\"," +
" \"sign\":\"" + sign + "\"," +
" \"nonce\":\"" + NONCE + "\"" +
"}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
ResponseEntity<SendIdCardInfoVO> responseEntity = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class);
return responseEntity.getBody();
}
/**
* 获取nonce ticket
*/
public IdCardTicketsVO nonceTicket(String accessToken, String usrId) {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/api_ticket?app_id=" + WBAPPID +
"&access_token=" + accessToken +
"&type=NONCE&version=1.0.0&user_id=" + usrId;
ResponseEntity<IdCardSignTicketVO> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, IdCardSignTicketVO.class);
return response.getBody().getTickets().get(0);
}
/**
* 人脸核身结果查询 POST
*/
public ResultVO checkResult(String orderNo, String sign) {
String url = "https://miniprogram-kyc.tencentcloudapi.com/api/v2/base/queryfacerecord?orderNo=" + orderNo;
String input = "{\n" +
" \"appId\":\"" + WBAPPID + "\",\n" +
" \"version\":\"1.0.0\",\n" +
" \"nonce\":\"" + NONCE + "\"," +
" \"orderNo\":\"" + orderNo + "\"," +
" \"sign\":\"" + sign + "\"," +
" \"getPhotos\":\"" + 1 + "\"," +
" \"getFile\":\"2\"," +
" \"queryVersion\":\"\"" +
"}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
ResponseEntity<CheckResultVO> responseEntity = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.POST, new HttpEntity<>(input.getBytes(), headers), CheckResultVO.class);
return responseEntity.getBody().getResult();
}
//获取最新的accessToken
public String getLatestAccessToken() {
AccessTokenDO accessTokenDO = accessTokenMapper.selectOne(new QueryWrapper<AccessTokenDO>()
.lambda() //21min //39min
.gt(AccessTokenDO::getCreateDate, LocalDateTime.now().minusMinutes(19L)));
//数据库没有的话
if (null == accessTokenDO) {
accessTokenMapper.delete(null);
//获取token
IdCardAccessTokenVO idCardAccessTokenVO = this.accessToken();
accessTokenDO = new AccessTokenDO();
accessTokenDO.setAccessToken(idCardAccessTokenVO.getAccess_token());
accessTokenMapper.insert(accessTokenDO);
}
return accessTokenDO.getAccessToken();
}
}
package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.common.exception.HttpException;
import com.laowu.mapper.MemberCollegeMappingMapper;
import com.laowu.model.MemberCollegeMappingDO;
import com.laowu.service.MemberCollegeMappingService;
import com.laowu.util.ConstantUtils;
import org.springframework.stereotype.Service;
/**
* <p>
* 学员-学校映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-04-04
*/
@Service
public class MemberCollegeMappingServiceImpl extends ServiceImpl<MemberCollegeMappingMapper, MemberCollegeMappingDO> implements MemberCollegeMappingService {
public String addCollege(MemberCollegeMappingDO memberCollegeMappingDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberCollegeMappingDO>()
.lambda()
.eq(MemberCollegeMappingDO::getCollegeId, memberCollegeMappingDO.getCollegeId())
.eq(MemberCollegeMappingDO::getMemberId, memberCollegeMappingDO.getMemberId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.insert(memberCollegeMappingDO);
return ConstantUtils.ADD_SUCCESS;
}
public String updateCollege(MemberCollegeMappingDO memberCollegeMappingDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberCollegeMappingDO>()
.lambda()
.eq(MemberCollegeMappingDO::getCollegeId, memberCollegeMappingDO.getCollegeId())
.eq(MemberCollegeMappingDO::getMemberId, memberCollegeMappingDO.getMemberId())
.ne(MemberCollegeMappingDO::getId, memberCollegeMappingDO.getId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.updateById(memberCollegeMappingDO);
return ConstantUtils.SUCCESS_UPDATE;
}
public String deleteCollege(MemberCollegeMappingDO memberCollegeMappingDO) {
this.baseMapper.deleteById(memberCollegeMappingDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
}
...@@ -11,6 +11,7 @@ import com.laowu.model.*; ...@@ -11,6 +11,7 @@ import com.laowu.model.*;
import com.laowu.service.MemberDictService; import com.laowu.service.MemberDictService;
import com.laowu.util.ConstantUtils; import com.laowu.util.ConstantUtils;
import com.laowu.util.ExcelUtil; import com.laowu.util.ExcelUtil;
import com.laowu.util.SecretUtils;
import com.laowu.vo.member.*; import com.laowu.vo.member.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -38,33 +39,9 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -38,33 +39,9 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
private MemberJobInfoMapper memberJobInfoMapper; private MemberJobInfoMapper memberJobInfoMapper;
@Autowired @Autowired
private LibCollegeMapper libCollegeMapper;
@Autowired
private LibMajorMapper libMajorMapper;
@Autowired
private CompanyDictMapper companyDictMapper;
@Autowired
private MemberCollegeMappingMapper memberCollegeMappingMapper;
@Autowired
private WorkstationDictMapper workstationDictMapper;
@Autowired
private MemberUpdateHistoryMapper memberUpdateHistoryMapper;
@Autowired
private WorkstationMemberMappingMapper workstationMemberMappingMapper; private WorkstationMemberMappingMapper workstationMemberMappingMapper;
@Autowired @Autowired
private MemberTeamMappingMapper memberTeamMappingMapper;
@Autowired
private TeamDictMapper teamDictMapper;
@Autowired
private MemberPositionsMapper memberPositionsMapper; private MemberPositionsMapper memberPositionsMapper;
@Autowired @Autowired
...@@ -74,14 +51,14 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -74,14 +51,14 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
private MemberTrainInfoMapper memberTrainInfoMapper; private MemberTrainInfoMapper memberTrainInfoMapper;
@Autowired @Autowired
private MemberTrainPositionsMapper memberTrainPositionsMapper;
@Autowired
private PositionDictMapper positionDictMapper; private PositionDictMapper positionDictMapper;
@Autowired @Autowired
private LibGeoLocationMapper libGeoLocationMapper; private LibGeoLocationMapper libGeoLocationMapper;
@Autowired
private WorkstationAdministersMapper workstationAdministersMapper;
public IPage<AllMembersVO> allMembers(AllMembersDTO allMembersDTO) { public IPage<AllMembersVO> allMembers(AllMembersDTO allMembersDTO) {
Page pager = new Page(allMembersDTO.getPageNum(), allMembersDTO.getPageSize()); Page pager = new Page(allMembersDTO.getPageNum(), allMembersDTO.getPageSize());
...@@ -100,10 +77,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -100,10 +77,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
public String deleteMember(AddMemberDTO addMemberDTO) { public String deleteMember(AddMemberDTO addMemberDTO) {
this.baseMapper.deleteById(addMemberDTO.getId()); this.baseMapper.deleteById(addMemberDTO.getId());
memberTeamMappingMapper.delete(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getMemberId, addMemberDTO.getId()));
workstationMemberMappingMapper.delete(new QueryWrapper<WorkstationMemberMappingDO>() workstationMemberMappingMapper.delete(new QueryWrapper<WorkstationMemberMappingDO>()
.lambda() .lambda()
.eq(WorkstationMemberMappingDO::getMemberId, addMemberDTO.getId())); .eq(WorkstationMemberMappingDO::getMemberId, addMemberDTO.getId()));
...@@ -112,22 +85,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -112,22 +85,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
.lambda() .lambda()
.eq(MemberJobInfoDO::getMemberId, addMemberDTO.getId())); .eq(MemberJobInfoDO::getMemberId, addMemberDTO.getId()));
//团队领导人为id的团队组长职位空
List<TeamDictDO> teamDictDOS = teamDictMapper.selectList(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getMemberId, addMemberDTO.getId()));
for (TeamDictDO teamDictDO : teamDictDOS) {
teamDictMapper.noLeader(teamDictDO.getId());
}
//历史
MemberUpdateHistoryDO memberUpdateHistoryDO = new MemberUpdateHistoryDO();
memberUpdateHistoryDO.setAdministerId(addMemberDTO.getUserId());
memberUpdateHistoryDO.setModule(addMemberDTO.getModule());
memberUpdateHistoryDO.setMemberId(addMemberDTO.getId());
memberUpdateHistoryDO.setOpr("删除了该成员");
memberUpdateHistoryMapper.insert(memberUpdateHistoryDO);
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
...@@ -144,16 +101,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -144,16 +101,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
MemberDictDO memberDictDO = new MemberDictDO(); MemberDictDO memberDictDO = new MemberDictDO();
BeanUtils.copyProperties(addMemberDTO, memberDictDO); BeanUtils.copyProperties(addMemberDTO, memberDictDO);
this.baseMapper.insert(memberDictDO);
//信息来源
if (null != addMemberDTO.getStationId()) {
WorkstationDictDO workstationDictDO = workstationDictMapper.selectById(addMemberDTO.getStationId());
if (null != workstationDictDO) {
memberDictDO.setInfoOrigin(workstationDictDO.getWorkstationName());
}
} else {
memberDictDO.setInfoOrigin("自然人数据库");
}
List<Long> positionIds = addMemberDTO.getPositionIds(); List<Long> positionIds = addMemberDTO.getPositionIds();
for (Long positionId : positionIds) { for (Long positionId : positionIds) {
...@@ -163,29 +111,13 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -163,29 +111,13 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
memberPositionsMapper.insert(memberPositionsDO); memberPositionsMapper.insert(memberPositionsDO);
} }
this.baseMapper.insert(memberDictDO); if (null != addMemberDTO.getWorkstationId()) {
if (null != addMemberDTO.getStationId()) {
WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO(); WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO();
workstationMemberMappingDO.setMemberId(memberDictDO.getId()); workstationMemberMappingDO.setMemberId(memberDictDO.getId());
workstationMemberMappingDO.setStationId(addMemberDTO.getStationId()); workstationMemberMappingDO.setStationId(addMemberDTO.getWorkstationId());
workstationMemberMappingMapper.insert(workstationMemberMappingDO); workstationMemberMappingMapper.insert(workstationMemberMappingDO);
} }
if (null != addMemberDTO.getTeamId()) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setMemberId(memberDictDO.getId());
memberTeamMappingDO.setTeamId(addMemberDTO.getTeamId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
//历史
MemberUpdateHistoryDO memberUpdateHistoryDO = new MemberUpdateHistoryDO();
memberUpdateHistoryDO.setAdministerId(addMemberDTO.getUserId());
memberUpdateHistoryDO.setModule(addMemberDTO.getModule());
memberUpdateHistoryDO.setMemberId(memberDictDO.getId());
memberUpdateHistoryDO.setOpr("创建了该成员");
memberUpdateHistoryMapper.insert(memberUpdateHistoryDO);
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
...@@ -195,93 +127,39 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -195,93 +127,39 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
MemberDictDO memberDictDO1 = this.baseMapper.selectById(memberDictDO.getId()); MemberDictDO memberDictDO1 = this.baseMapper.selectById(memberDictDO.getId());
BeanUtils.copyProperties(memberDictDO1, oneMemberVO); BeanUtils.copyProperties(memberDictDO1, oneMemberVO);
if (null != memberDictDO1.getCollegeId()) {
LibCollegeDO libCollegeDO = libCollegeMapper.selectById(memberDictDO1.getCollegeId());
oneMemberVO.setCollege(libCollegeDO.getCollege());
}
if (null != memberDictDO1.getMajorId()) {
LibMajorDO libMajorDO = libMajorMapper.selectById(memberDictDO1.getMajorId());
oneMemberVO.setMajor(libMajorDO.getMajor());
}
//院校信息
List<MemberCollegeVO> memberCollegeVOS = new ArrayList<>();
List<MemberCollegeMappingDO> memberCollegeMappingDOS = memberCollegeMappingMapper.selectList(new QueryWrapper<MemberCollegeMappingDO>()
.lambda()
.eq(MemberCollegeMappingDO::getMemberId, memberDictDO1.getId()));
for (MemberCollegeMappingDO mcmd : memberCollegeMappingDOS) {
MemberCollegeVO memberCollegeVO = new MemberCollegeVO();
BeanUtils.copyProperties(mcmd, memberCollegeVO);
LibCollegeDO libCollegeDO = libCollegeMapper.selectById(mcmd.getCollegeId());
memberCollegeVO.setCollege(libCollegeDO.getCollege());
LibMajorDO libMajorDO = libMajorMapper.selectById(mcmd.getMajorId());
memberCollegeVO.setMajor(libMajorDO.getMajor());
memberCollegeVOS.add(memberCollegeVO);
}
oneMemberVO.setMemberCollegeVOS(memberCollegeVOS);
//就业信息 //就业信息
List<MemberJobInfoVO> memberJobInfoVOS = new ArrayList<MemberJobInfoVO>();
List<MemberJobInfoDO> memberJobInfoDOS = memberJobInfoMapper.selectList(new QueryWrapper<MemberJobInfoDO>() List<MemberJobInfoDO> memberJobInfoDOS = memberJobInfoMapper.selectList(new QueryWrapper<MemberJobInfoDO>()
.lambda() .lambda()
.eq(MemberJobInfoDO::getMemberId, memberDictDO1.getId()) .eq(MemberJobInfoDO::getMemberId, memberDictDO1.getId())
.orderByDesc(MemberJobInfoDO::getStartDate)); .orderByDesc(MemberJobInfoDO::getStartDate));
for (MemberJobInfoDO memberJobInfoDO : memberJobInfoDOS) { oneMemberVO.setMemberJobInfoVOS(memberJobInfoDOS);
MemberJobInfoVO memberJobInfoVO = new MemberJobInfoVO();
BeanUtils.copyProperties(memberJobInfoDO, memberJobInfoVO);
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberJobInfoDO.getCompanyId());
memberJobInfoVO.setCompanyName(companyDictDO.getCompanyName());
memberJobInfoVOS.add(memberJobInfoVO);
}
oneMemberVO.setMemberJobInfoVOS(memberJobInfoVOS);
//专业技能信息 //专业技能信息
List<PositionDictDO> memberPositions = memberPositionsMapper.memberPositions(memberDictDO.getId()); List<PositionDictDO> memberPositions = memberPositionsMapper.memberPositions(memberDictDO.getId());
oneMemberVO.setPositionDictDOS(memberPositions); oneMemberVO.setPositionDictDOS(memberPositions);
//专业证书信息
List<MemberCertsDO> memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper<MemberCertsDO>()
.lambda()
.eq(MemberCertsDO::getMemberId, memberDictDO1.getId()));
oneMemberVO.setMemberCertsDOS(memberCertsDOS);
//培训信息 //培训信息
List<MemberTrainInfoVO> memberTrainInfoVOS = new ArrayList<>();
List<MemberTrainInfoDO> memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper<MemberTrainInfoDO>() List<MemberTrainInfoDO> memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper<MemberTrainInfoDO>()
.lambda() .lambda()
.eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId())); .eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId()));
oneMemberVO.setMemberTrainInfoVOS(memberTrainInfoDOS);
for (MemberTrainInfoDO mtid : memberTrainInfoDOS) { //专业证书信息
MemberTrainInfoVO memberTrainInfoVO = new MemberTrainInfoVO(); List<MemberCertsDO> memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper<MemberCertsDO>()
BeanUtils.copyProperties(mtid, memberTrainInfoVO); .lambda()
.eq(MemberCertsDO::getMemberId, memberDictDO1.getId()));
//技能 oneMemberVO.setMemberCertsDOS(memberCertsDOS);
List<PositionDictDO> positionDictDOS = memberTrainPositionsMapper.positions(mtid.getId());
memberTrainInfoVO.setPositionDictDOS(positionDictDOS);
memberTrainInfoVOS.add(memberTrainInfoVO);
}
oneMemberVO.setMemberTrainInfoVOS(memberTrainInfoVOS);
return oneMemberVO; return oneMemberVO;
} }
public String updateMember(UpdateMemberDTO updateMemberDTO) { public String updateMember(UpdateMemberDTO updateMemberDTO) {
MemberDictDO memberDictDO1 = this.baseMapper.selectById(updateMemberDTO.getId());
MemberDictDO memberDictDO = new MemberDictDO(); MemberDictDO memberDictDO = new MemberDictDO();
BeanUtils.copyProperties(updateMemberDTO, memberDictDO); BeanUtils.copyProperties(updateMemberDTO, memberDictDO);
this.baseMapper.updateById(memberDictDO); this.baseMapper.updateById(memberDictDO);
List<MemberJobInfoVO> memberJobInfoVOS = updateMemberDTO.getMemberJobInfoVOS(); List<MemberJobInfoVO> memberJobInfoVOS = updateMemberDTO.getMemberJobInfoVOS();
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("变更了“");
if (null != memberJobInfoVOS) { if (null != memberJobInfoVOS) {
memberJobInfoMapper.delete(new QueryWrapper<MemberJobInfoDO>() memberJobInfoMapper.delete(new QueryWrapper<MemberJobInfoDO>()
.lambda() .lambda()
...@@ -291,7 +169,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -291,7 +169,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
BeanUtils.copyProperties(memberJobInfoVO, memberJobInfoDO); BeanUtils.copyProperties(memberJobInfoVO, memberJobInfoDO);
memberJobInfoMapper.insert(memberJobInfoDO); memberJobInfoMapper.insert(memberJobInfoDO);
} }
stringBuffer.append("就业信息、");
} }
if (null != updateMemberDTO.getPositionIds()) { if (null != updateMemberDTO.getPositionIds()) {
...@@ -323,59 +200,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -323,59 +200,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
.eq(MemberPositionsDO::getPositionId, id)); .eq(MemberPositionsDO::getPositionId, id));
} }
} }
}
//历史
MemberUpdateHistoryDO memberUpdateHistoryDO = new MemberUpdateHistoryDO();
memberUpdateHistoryDO.setAdministerId(updateMemberDTO.getUserId());
memberUpdateHistoryDO.setModule(updateMemberDTO.getModule());
memberUpdateHistoryDO.setMemberId(memberDictDO.getId());
if (null != updateMemberDTO.getUserName() && !updateMemberDTO.getUserName().equals(memberDictDO1.getUserName())) {
stringBuffer.append("姓名、");
}
if (null != updateMemberDTO.getTelephone() && !updateMemberDTO.getTelephone().equals(memberDictDO1.getProvince())) {
stringBuffer.append("手机号码、");
}
if (null != updateMemberDTO.getProvince() && !updateMemberDTO.getProvince().equals(memberDictDO1.getProvince())) {
stringBuffer.append("省、");
} }
if (null != updateMemberDTO.getCity() && !updateMemberDTO.getCity().equals(memberDictDO1.getCity())) {
stringBuffer.append("市、");
}
if (null != updateMemberDTO.getCounty() && !updateMemberDTO.getCounty().equals(memberDictDO1.getCounty())) {
stringBuffer.append("县、");
}
if (null != updateMemberDTO.getAddress() && !updateMemberDTO.getAddress().equals(memberDictDO1.getAddress())) {
stringBuffer.append("具体地址、");
}
if (null != updateMemberDTO.getEducation() && !updateMemberDTO.getEducation().equals(memberDictDO1.getEducation())) {
stringBuffer.append("学历、");
}
if (null != updateMemberDTO.getEducationType() && !updateMemberDTO.getEducationType().equals(memberDictDO1.getEducationType())) {
stringBuffer.append("学历类型、");
}
if (null != updateMemberDTO.getCollegeId() && !updateMemberDTO.getCollegeId().equals(memberDictDO1.getCollegeId())) {
stringBuffer.append("院校、");
}
if (null != updateMemberDTO.getIsPoor() && !updateMemberDTO.getIsPoor().equals(memberDictDO1.getIsPoor())) {
stringBuffer.append("是否为脱贫劳动力、");
}
if (null != updateMemberDTO.getIsMigration() && !updateMemberDTO.getIsMigration().equals(memberDictDO1.getIsMigration())) {
stringBuffer.append("是否易迁户、");
}
if (null != updateMemberDTO.getIsParty() && !updateMemberDTO.getIsParty().equals(memberDictDO1.getIsParty())) {
stringBuffer.append("是否党员、");
}
if (null != updateMemberDTO.getJobStatus() && !updateMemberDTO.getJobStatus().equals(memberDictDO1.getJobStatus())) {
stringBuffer.append("就业状态、");
}
String opr = stringBuffer.substring(0, stringBuffer.length() - 1) + "”";
memberUpdateHistoryDO.setOpr(opr);
memberUpdateHistoryMapper.insert(memberUpdateHistoryDO);
return ConstantUtils.SUCCESS_UPDATE; return ConstantUtils.SUCCESS_UPDATE;
} }
...@@ -390,7 +215,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -390,7 +215,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
List<PositionDictDO> positionDictDOS = this.baseMapper.memberPositions(memberDictDO.getId()); List<PositionDictDO> positionDictDOS = this.baseMapper.memberPositions(memberDictDO.getId());
memberCardVO.setPositionDictDOS(positionDictDOS); memberCardVO.setPositionDictDOS(positionDictDOS);
String age = ""; int age = 0;
//计算年龄,性别 //计算年龄,性别
if (StringUtils.isNotEmpty(memberDictDO1.getIdCard())) { if (StringUtils.isNotEmpty(memberDictDO1.getIdCard())) {
...@@ -403,9 +228,9 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -403,9 +228,9 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
int day = Integer.valueOf(memberDictDO1.getIdCard().substring(12, 14)); int day = Integer.valueOf(memberDictDO1.getIdCard().substring(12, 14));
int genderTmp = Integer.valueOf(memberDictDO1.getIdCard().substring(16, 17)); int genderTmp = Integer.valueOf(memberDictDO1.getIdCard().substring(16, 17));
if ((month < monthNow) || (month == monthNow && day <= dayNow)) { if ((month < monthNow) || (month == monthNow && day <= dayNow)) {
age = String.valueOf(yearNow - year); age = yearNow - year;
} else { } else {
age = String.valueOf(yearNow - year - 1); age = yearNow - year - 1;
} }
if (genderTmp % 2 == 1) { if (genderTmp % 2 == 1) {
memberCardVO.setGender("男"); memberCardVO.setGender("男");
...@@ -426,21 +251,11 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -426,21 +251,11 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
memberCardVO.setPunishment("无"); memberCardVO.setPunishment("无");
//培训信息 //培训信息
List<MemberTrainInfoVO> memberTrainInfoVOS = new ArrayList<>();
List<MemberTrainInfoDO> memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper<MemberTrainInfoDO>() List<MemberTrainInfoDO> memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper<MemberTrainInfoDO>()
.lambda() .lambda()
.eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId())); .eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId()));
for (MemberTrainInfoDO mtid : memberTrainInfoDOS) { memberCardVO.setMemberTrainInfoVOS(memberTrainInfoDOS);
MemberTrainInfoVO memberTrainInfoVO = new MemberTrainInfoVO();
BeanUtils.copyProperties(mtid, memberTrainInfoVO);
//技能
List<PositionDictDO> positionDictDOS1 = memberTrainPositionsMapper.positions(mtid.getId());
memberTrainInfoVO.setPositionDictDOS(positionDictDOS1);
memberTrainInfoVOS.add(memberTrainInfoVO);
}
memberCardVO.setMemberTrainInfoVOS(memberTrainInfoVOS);
//技能证书 //技能证书
List<MemberCertsDO> memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper<MemberCertsDO>() List<MemberCertsDO> memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper<MemberCertsDO>()
...@@ -457,9 +272,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -457,9 +272,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
for (MemberJobInfoDO memberJobInfoDO : memberJobInfoDOS) { for (MemberJobInfoDO memberJobInfoDO : memberJobInfoDOS) {
MemberJobInfoVO memberJobInfoVO = new MemberJobInfoVO(); MemberJobInfoVO memberJobInfoVO = new MemberJobInfoVO();
BeanUtils.copyProperties(memberJobInfoDO, memberJobInfoVO); BeanUtils.copyProperties(memberJobInfoDO, memberJobInfoVO);
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberJobInfoDO.getCompanyId());
memberJobInfoVO.setCompanyName(companyDictDO.getCompanyName());
memberJobInfoVOS.add(memberJobInfoVO); memberJobInfoVOS.add(memberJobInfoVO);
} }
memberCardVO.setMemberJobInfoVOS(memberJobInfoVOS); memberCardVO.setMemberJobInfoVOS(memberJobInfoVOS);
...@@ -467,7 +279,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -467,7 +279,7 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
return memberCardVO; return memberCardVO;
} }
public ImportMemberDictVO importMember(String workstationId, String teamId, MultipartFile multipartFile) { public ImportMemberDictVO importMember(String workstationId, MultipartFile multipartFile) {
/** /**
* 模板地址: * 模板地址:
...@@ -558,7 +370,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -558,7 +370,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
continue; continue;
} }
String[] majors = importMemberDTO.getMajor().split(","); String[] majors = importMemberDTO.getMajor().split(",");
List<MemberPositionsDO> memberPositionsDOS = new ArrayList<MemberPositionsDO>(); List<MemberPositionsDO> memberPositionsDOS = new ArrayList<MemberPositionsDO>();
for (String fullName : majors) { for (String fullName : majors) {
...@@ -584,12 +395,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -584,12 +395,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
MemberDictDO memberDictDO1 = new MemberDictDO(); MemberDictDO memberDictDO1 = new MemberDictDO();
BeanUtils.copyProperties(importMemberDTO, memberDictDO1); BeanUtils.copyProperties(importMemberDTO, memberDictDO1);
memberDictDO1.setIdCardType("身份证"); memberDictDO1.setIdCardType("身份证");
if (StringUtils.isNotEmpty(workstationId)) {
WorkstationDictDO workstationDictDO = workstationDictMapper.selectById(workstationId);
memberDictDO1.setInfoOrigin(workstationDictDO.getWorkstationName());
} else {
memberDictDO1.setInfoOrigin("自然人数据库");
}
this.baseMapper.insert(memberDictDO1); this.baseMapper.insert(memberDictDO1);
memberPositionsDOS.stream().forEach(x -> { memberPositionsDOS.stream().forEach(x -> {
...@@ -597,12 +402,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -597,12 +402,6 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
memberPositionsMapper.insert(x); memberPositionsMapper.insert(x);
}); });
if (StringUtils.isNotEmpty(teamId)) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setTeamId(Long.valueOf(teamId));
memberTeamMappingDO.setMemberId(memberDictDO1.getId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
if (StringUtils.isNotEmpty(workstationId)) { if (StringUtils.isNotEmpty(workstationId)) {
WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO(); WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO();
...@@ -621,11 +420,26 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -621,11 +420,26 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
} }
public String downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO) { public String downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO) {
List<ImportMemberVO> importMemberVOS = downloadErrorDataDTO.getImportMemberVOS(); List<ImportMemberVO> importMemberVOS = downloadErrorDataDTO.getImportMemberVOS();
ExcelUtil.writeExcel(importMemberVOS, ImportMemberVO.class); ExcelUtil.writeExcel(importMemberVOS, ImportMemberVO.class);
return ConstantUtils.SUCCESS_DOWNLOAD;
}
public String downloadUsers(MemberManagementDTO memberManagementDTO) {
Page pager = new Page(1, -1);
//查看某个人所在的工作站
// List<Long> workstationIds = workstationAdministersMapper.administerStations(memberManagementDTO.getUserId());
IPage<MemberManagementVO> memberManagementVOIPage = workstationMemberMappingMapper.memberManagement(pager, memberManagementDTO.getUserName(), memberManagementDTO.getStationId(), memberManagementDTO.getPositionId(),
memberManagementDTO.getProvince(), memberManagementDTO.getCity(), memberManagementDTO.getCounty(), memberManagementDTO.getTown(), memberManagementDTO.getVillage(), memberManagementDTO.getGender(),
memberManagementDTO.getMaxAge(), memberManagementDTO.getMinAge(), memberManagementDTO.getIsParty(), memberManagementDTO.getEducation(), memberManagementDTO.getHealth(),
memberManagementDTO.getProvinceNow(), memberManagementDTO.getCityNow(), memberManagementDTO.getCountyNow(), memberManagementDTO.getTownNow(), memberManagementDTO.getIsPoor(),
memberManagementDTO.getMonitorType(), memberManagementDTO.getIsMigration(), memberManagementDTO.getMigrationType(), memberManagementDTO.getFisherman(), memberManagementDTO.getInsured(),
memberManagementDTO.getPensionInsurance(), memberManagementDTO.getInsurePlace(), memberManagementDTO.getMemberType(), memberManagementDTO.getLaborAbility(), memberManagementDTO.getJobStatus(),
memberManagementDTO.getJobType(), memberManagementDTO.getProvinceJob(), memberManagementDTO.getCityJob(), memberManagementDTO.getCountyJob(), memberManagementDTO.getTownJob(),
memberManagementDTO.getJobDestination(), memberManagementDTO.getJobsStartDate(), memberManagementDTO.getJobsEndDate(), memberManagementDTO.getBusinessId(),
memberManagementDTO.getMaxAverageSalary(), memberManagementDTO.getMinAverageSalary(), memberManagementDTO.getMaxJobAge(), memberManagementDTO.getMinJobAge(), memberManagementDTO.getEmploymentWillingness(),
memberManagementDTO.getProvinceEmployment(), memberManagementDTO.getCityEmployment(), memberManagementDTO.getWillingBusinessId(), memberManagementDTO.getEmploymentTrainingWillingness(), memberManagementDTO.getHomecoming(), memberManagementDTO.getUserId(), memberManagementDTO.getTrainType());
ExcelUtil.writeExcel(memberManagementVOIPage.getRecords(), MemberManagementVO.class);
return ConstantUtils.SUCCESS_DOWNLOAD; return ConstantUtils.SUCCESS_DOWNLOAD;
} }
...@@ -653,9 +467,51 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -653,9 +467,51 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
} }
public IPage<RosterVO> roster(RosterDTO rosterDTO){ public IPage<RosterVO> roster(RosterDTO rosterDTO) {
return null; return null;
} }
public Long checkLogin(MemberDictDO memberDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberDictDO>()
.lambda()
.eq(MemberDictDO::getUserName, memberDictDO.getUserName()));
if (count == 0) {
throw new HttpException(40002);
}
MemberDictDO memberDictDO1 = this.baseMapper.selectOne(new QueryWrapper<MemberDictDO>()
.lambda()
.eq(MemberDictDO::getUserName, memberDictDO.getUserName())
.eq(MemberDictDO::getIdCard, memberDictDO.getIdCard()));
if (null == memberDictDO1) {
throw new HttpException(40003);
}
return memberDictDO1.getId();
}
public TokenLoginVO tokenLogin(MemberDictDO memberDictDO) {
TokenLoginVO tokenLoginVO = new TokenLoginVO();
tokenLoginVO.setIdCard(memberDictDO.getIdCard());
tokenLoginVO.setTimestamp(System.currentTimeMillis());
//鉴权逻辑 对不对
String preAuthen = "appId=9a79cda9ef6f4a5ha1"
+ "&idCard=" + memberDictDO.getIdCard()
+ "&timestamp=" + tokenLoginVO.getTimestamp()
+ "&appSecret=552a4147db2d4026bc4e9021acd61ka1";
String sign = SecretUtils.getMD5String(preAuthen);
tokenLoginVO.setSign(sign);
return tokenLoginVO;
}
} }
package com.laowu.service.impl; package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.common.exception.HttpException;
import com.laowu.model.MemberJobInfoDO;
import com.laowu.mapper.MemberJobInfoMapper; import com.laowu.mapper.MemberJobInfoMapper;
import com.laowu.model.MemberJobInfoDO;
import com.laowu.service.MemberJobInfoService; import com.laowu.service.MemberJobInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.util.ConstantUtils; import com.laowu.util.ConstantUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -22,33 +20,12 @@ public class MemberJobInfoServiceImpl extends ServiceImpl<MemberJobInfoMapper, M ...@@ -22,33 +20,12 @@ public class MemberJobInfoServiceImpl extends ServiceImpl<MemberJobInfoMapper, M
public String addJob(MemberJobInfoDO memberJobInfoDO) { public String addJob(MemberJobInfoDO memberJobInfoDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberJobInfoDO>()
.lambda()
.eq(MemberJobInfoDO::getMemberId, memberJobInfoDO.getMemberId())
.eq(MemberJobInfoDO::getCompanyId, memberJobInfoDO.getCompanyId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.insert(memberJobInfoDO); this.baseMapper.insert(memberJobInfoDO);
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public String updateJob(MemberJobInfoDO memberJobInfoDO) { public String updateJob(MemberJobInfoDO memberJobInfoDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberJobInfoDO>()
.lambda()
.eq(MemberJobInfoDO::getMemberId, memberJobInfoDO.getMemberId())
.eq(MemberJobInfoDO::getCompanyId, memberJobInfoDO.getCompanyId())
.ne(MemberJobInfoDO::getId, memberJobInfoDO.getId()));
if (count > 0){
throw new HttpException(70001);
}
this.baseMapper.updateById(memberJobInfoDO); this.baseMapper.updateById(memberJobInfoDO);
return ConstantUtils.SUCCESS_UPDATE; return ConstantUtils.SUCCESS_UPDATE;
} }
......
package com.laowu.service.impl; package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.dto.member.AddTrainDTO;
import com.laowu.mapper.MemberTrainInfoMapper; import com.laowu.mapper.MemberTrainInfoMapper;
import com.laowu.mapper.MemberTrainPositionsMapper;
import com.laowu.model.MemberTrainInfoDO; import com.laowu.model.MemberTrainInfoDO;
import com.laowu.model.MemberTrainPositionsDO;
import com.laowu.service.MemberTrainInfoService; import com.laowu.service.MemberTrainInfoService;
import com.laowu.util.ConstantUtils; import com.laowu.util.ConstantUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* <p> * <p>
* 学员培训信息 服务实现类 * 学员培训信息 服务实现类
...@@ -27,74 +18,18 @@ import java.util.List; ...@@ -27,74 +18,18 @@ import java.util.List;
@Service @Service
public class MemberTrainInfoServiceImpl extends ServiceImpl<MemberTrainInfoMapper, MemberTrainInfoDO> implements MemberTrainInfoService { public class MemberTrainInfoServiceImpl extends ServiceImpl<MemberTrainInfoMapper, MemberTrainInfoDO> implements MemberTrainInfoService {
@Autowired public String addTrain(MemberTrainInfoDO memberTrainInfoDO) {
private MemberTrainPositionsMapper memberTrainPositionsMapper;
public String addTrain(AddTrainDTO addTrainDTO) {
MemberTrainInfoDO memberTrainInfoDO = new MemberTrainInfoDO();
BeanUtils.copyProperties(addTrainDTO, memberTrainInfoDO);
this.baseMapper.insert(memberTrainInfoDO); this.baseMapper.insert(memberTrainInfoDO);
List<Long> positionIds = addTrainDTO.getPositionIds();
for (Long positionId : positionIds) {
MemberTrainPositionsDO memberTrainPositionsDO = new MemberTrainPositionsDO();
memberTrainPositionsDO.setMemberTrainId(memberTrainInfoDO.getId());
memberTrainPositionsDO.setPositionId(positionId);
memberTrainPositionsMapper.insert(memberTrainPositionsDO);
}
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public String deleteTrain(MemberTrainInfoDO memberTrainInfoDO) { public String deleteTrain(MemberTrainInfoDO memberTrainInfoDO) {
this.baseMapper.deleteById(memberTrainInfoDO.getId()); this.baseMapper.deleteById(memberTrainInfoDO.getId());
memberTrainPositionsMapper.delete(new QueryWrapper<MemberTrainPositionsDO>()
.lambda()
.eq(MemberTrainPositionsDO::getMemberTrainId, memberTrainInfoDO.getId()));
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
public String updateTrain(AddTrainDTO addTrainDTO) { public String updateTrain(MemberTrainInfoDO memberTrainInfoDO) {
MemberTrainInfoDO memberTrainInfoDO = new MemberTrainInfoDO();
BeanUtils.copyProperties(addTrainDTO, memberTrainInfoDO);
this.baseMapper.updateById(memberTrainInfoDO); this.baseMapper.updateById(memberTrainInfoDO);
//找到已经有的work
List<Long> oldIds = memberTrainPositionsMapper.positionIds(memberTrainInfoDO.getId());
List<Long> newIds = addTrainDTO.getPositionIds();
List<Long> newIds2 = new ArrayList<Long>();
for (Long id : newIds) {
newIds2.add(id);
}
newIds.removeAll(oldIds); //新增的人在newIds里面
if (newIds.size() > 0) {
for (Long id : newIds) {
MemberTrainPositionsDO memberTrainPositionsDO = new MemberTrainPositionsDO();
memberTrainPositionsDO.setMemberTrainId(addTrainDTO.getId());
memberTrainPositionsDO.setPositionId(id);
memberTrainPositionsMapper.insert(memberTrainPositionsDO);
}
}
oldIds.removeAll(newIds2);//删掉以前的
if (oldIds.size() > 0) {
for (Long id : oldIds) {
memberTrainPositionsMapper.delete(new QueryWrapper<MemberTrainPositionsDO>()
.lambda()
.eq(MemberTrainPositionsDO::getMemberTrainId, addTrainDTO.getId())
.eq(MemberTrainPositionsDO::getPositionId, id));
}
}
return ConstantUtils.SUCCESS_UPDATE; return ConstantUtils.SUCCESS_UPDATE;
} }
} }
package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.laowu.common.exception.HttpException;
import com.laowu.model.MemberTrainPositionsDO;
import com.laowu.mapper.MemberTrainPositionsMapper;
import com.laowu.service.MemberTrainPositionsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.util.ConstantUtils;
import org.springframework.stereotype.Service;
/**
* <p>
* 培训关联职业范围 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-04-12
*/
@Service
public class MemberTrainPositionsServiceImpl extends ServiceImpl<MemberTrainPositionsMapper, MemberTrainPositionsDO> implements MemberTrainPositionsService {
public String addPosition(MemberTrainPositionsDO memberTrainPositionsDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberTrainPositionsDO>()
.lambda()
.eq(MemberTrainPositionsDO::getMemberTrainId, memberTrainPositionsDO.getMemberTrainId())
.eq(MemberTrainPositionsDO::getPositionId, memberTrainPositionsDO.getPositionId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.insert(memberTrainPositionsDO);
return ConstantUtils.ADD_SUCCESS;
}
public String deletePosition(MemberTrainPositionsDO memberTrainPositionsDO) {
this.baseMapper.deleteById(memberTrainPositionsDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
public String updatePosition(MemberTrainPositionsDO memberTrainPositionsDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<MemberTrainPositionsDO>()
.lambda()
.ne(MemberTrainPositionsDO::getId, memberTrainPositionsDO.getId())
.eq(MemberTrainPositionsDO::getPositionId, memberTrainPositionsDO.getPositionId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.updateById(memberTrainPositionsDO);
return ConstantUtils.SUCCESS_UPDATE;
}
}
package com.laowu.service.impl;
import com.laowu.model.MemberUpdateHistoryDO;
import com.laowu.mapper.MemberUpdateHistoryMapper;
import com.laowu.service.MemberUpdateHistoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 公司更新日志表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-04-07
*/
@Service
public class MemberUpdateHistoryServiceImpl extends ServiceImpl<MemberUpdateHistoryMapper, MemberUpdateHistoryDO> implements MemberUpdateHistoryService {
}
package com.laowu.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.common.exception.HttpException;
import com.laowu.dto.team.*;
import com.laowu.mapper.*;
import com.laowu.model.*;
import com.laowu.service.TeamDictService;
import com.laowu.util.ConstantUtils;
import com.laowu.vo.job.RecentJobInfoVO;
import com.laowu.vo.team.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 团队字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-03-29
*/
@Service
public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> implements TeamDictService {
@Autowired
private MemberDictMapper memberDictMapper;
@Autowired
private MemberTeamMappingMapper memberTeamMappingMapper;
@Autowired
private WorkstationDictMapper workstationDictMapper;
@Autowired
private MemberJobInfoMapper memberJobInfoMapper;
@Autowired
private RoleAdministerMappingMapper roleAdministerMappingMapper;
@Autowired
private WorkstationAdministersMapper workstationAdministersMapper;
@Autowired
private MemberPositionsMapper memberPositionsMapper;
public IPage<TeamsVO> teams(TeamsDTO teamsDTO) {
Page pager = new Page(teamsDTO.getPageNum(), teamsDTO.getPageSize());
return this.baseMapper.teams(pager, teamsDTO.getStationId(), teamsDTO.getTeamName(),teamsDTO.getProvince());
}
public TotalTeamsVO totalTeams(TeamDictDO teamDictDO) {
TotalTeamsVO totalTeamsVO = new TotalTeamsVO();
int count = this.baseMapper.selectCount(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, teamDictDO.getStationId()));
totalTeamsVO.setCount(count);
return totalTeamsVO;
}
public String deleteTeam(TeamDictDO teamDictDO) {
this.baseMapper.deleteById(teamDictDO.getId());
//将该团队里的人的teamId置为空
memberTeamMappingMapper.delete(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId()));
return ConstantUtils.DELETE_SUCCESS;
}
public String addTeam(TeamDictDO teamDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, teamDictDO.getStationId())
.eq(TeamDictDO::getTeamName, teamDictDO.getTeamName()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.insert(teamDictDO);
if (null != teamDictDO.getMemberId()) {
int cnt = memberTeamMappingMapper.selectCount(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getMemberId, teamDictDO.getMemberId())
.eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId()));
if (cnt == 0) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setTeamId(teamDictDO.getId());
memberTeamMappingDO.setMemberId(teamDictDO.getMemberId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
}
return ConstantUtils.ADD_SUCCESS;
}
public String updateTeam(TeamDictDO teamDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, teamDictDO.getStationId())
.eq(TeamDictDO::getTeamName, teamDictDO.getTeamName())
.ne(TeamDictDO::getId, teamDictDO.getId()));
if (count > 0) {
throw new HttpException(70001);
}
this.baseMapper.updateById(teamDictDO);
if (null != teamDictDO.getMemberId()) {
int cnt = memberTeamMappingMapper.selectCount(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getMemberId, teamDictDO.getMemberId())
.eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId()));
if (cnt == 0) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setTeamId(teamDictDO.getId());
memberTeamMappingDO.setMemberId(teamDictDO.getMemberId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
}
return ConstantUtils.SUCCESS_UPDATE;
}
public IPage<MemberDictDO> teamMember(TeamMemberDTO teamMemberDTO) {
Page pager = new Page(teamMemberDTO.getPageNum(), teamMemberDTO.getPageSize());
return memberTeamMappingMapper.teamMembers(pager, teamMemberDTO.getTeamId());
}
public OneTeamInfoVO oneTeamInfo(TeamDictDO teamDictDO) {
OneTeamInfoVO oneTeamInfoVO = new OneTeamInfoVO();
TeamDictDO teamDictDO1 = this.baseMapper.selectById(teamDictDO.getId());
BeanUtils.copyProperties(teamDictDO1, oneTeamInfoVO);
Page pager = new Page(1, -1);
List<MemberDictDO> memberDictDOS = memberTeamMappingMapper.teamMembers(pager, teamDictDO.getId()).getRecords();
oneTeamInfoVO.setMemberDictDOS(memberDictDOS);
//团队带头人
if (null != teamDictDO1.getMemberId()){
MemberDictDO teamMember = memberDictMapper.selectById(teamDictDO1.getMemberId());
if (null != teamMember){
oneTeamInfoVO.setUserName(teamMember.getUserName());
}
}
//团队人数
int count = memberTeamMappingMapper.selectCount(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getTeamId,teamDictDO.getId()));
oneTeamInfoVO.setCt(String.valueOf(count));
return oneTeamInfoVO;
}
public IPage<MemberDictDO> noTeamMembers(TeamMemberDTO teamMemberDTO) {
Page pager = new Page(teamMemberDTO.getPageNum(), teamMemberDTO.getPageSize());
return memberTeamMappingMapper.noTeamMembers(pager, teamMemberDTO.getTeamId(), teamMemberDTO.getUserName());
}
public String updateMembers(UpdateTeamMembersDTO updateTeamMembersDTO) {
//找到已存在的成员
List<Long> oldIds = memberDictMapper.members(updateTeamMembersDTO.getTeamId());
List<Long> newIds = updateTeamMembersDTO.getMemberIds();
List<Long> newIds2 = new ArrayList<Long>();
for (Long id : newIds) {
newIds2.add(id);
}
newIds.removeAll(oldIds); //新增的人在newIds里面
if (newIds.size() > 0) {
for (Long id : newIds) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setMemberId(id);
memberTeamMappingDO.setTeamId(updateTeamMembersDTO.getTeamId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
}
oldIds.removeAll(newIds2);//删掉以前的
if (oldIds.size() > 0) {
for (Long id : oldIds) {
memberTeamMappingMapper.delete(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getMemberId, id)
.eq(MemberTeamMappingDO::getTeamId, updateTeamMembersDTO.getTeamId()));
}
}
return ConstantUtils.SUCCESS_UPDATE;
}
public IPage<LeaderMembersVO> leaderMembers(LeaderMembersDTO leaderMembersDTO) {
Page pager = new Page(leaderMembersDTO.getPageNum(), leaderMembersDTO.getPageSize());
return this.baseMapper.leaderMembers(pager, leaderMembersDTO.getStationId(), leaderMembersDTO.getUserName());
}
public TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO) {
TotalTeamsVO totalTeamsVO = new TotalTeamsVO();
totalTeamsVO.setCount(this.baseMapper.leaderMemberCounts(teamDictDO.getStationId()));
return totalTeamsVO;
}
public List<ProvinceStationTeamVO> provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO) {
//判断该角色是管理员还是站长
int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda()
.eq(RoleAdministerMappingDO::getAdministerId,provinceStationTeamDTO.getUserId())
.eq(RoleAdministerMappingDO::getRoleId,1));
List<ProvinceStationTeamVO> provinceStationTeamVOS = new ArrayList<>();
List<String> provinces = workstationDictMapper.provinces();
if (count>0){
//先查出所有省
for (String province : provinces) {
ProvinceStationTeamVO provinceStationTeamVO = new ProvinceStationTeamVO();
//工作站
List<WorkstationDictDO> workstationDictDOS = workstationDictMapper.selectList(new QueryWrapper<WorkstationDictDO>()
.lambda()
.eq(WorkstationDictDO::getProvince, province));
List<WorkstationDictVO> workstationDictVOS = new ArrayList<>();
for (WorkstationDictDO workstationDictDO : workstationDictDOS) {
WorkstationDictVO workstationDictVO = new WorkstationDictVO();
BeanUtils.copyProperties(workstationDictDO, workstationDictVO);
List<TeamDictDO> teamDictDOS = this.baseMapper.selectList(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, workstationDictDO.getId()));
workstationDictVO.setTeamDictDOS(teamDictDOS);
workstationDictVOS.add(workstationDictVO);
provinceStationTeamVO.setWorkstationDictVOS(workstationDictVOS);
}
provinceStationTeamVO.setProvince(province);
provinceStationTeamVOS.add(provinceStationTeamVO);
}
}else {
//站长
for (String province : provinces) {
ProvinceStationTeamVO provinceStationTeamVO = new ProvinceStationTeamVO();
List<WorkstationDictDO> workstationDictDOS = workstationDictMapper.administerProvinceStations(province,provinceStationTeamDTO.getUserId());
List<WorkstationDictVO> workstationDictVOS = new ArrayList<>();
for (WorkstationDictDO workstationDictDO : workstationDictDOS) {
WorkstationDictVO workstationDictVO = new WorkstationDictVO();
BeanUtils.copyProperties(workstationDictDO, workstationDictVO);
List<TeamDictDO> teamDictDOS = this.baseMapper.selectList(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, workstationDictDO.getId()));
workstationDictVO.setTeamDictDOS(teamDictDOS);
workstationDictVOS.add(workstationDictVO);
provinceStationTeamVO.setWorkstationDictVOS(workstationDictVOS);
}
provinceStationTeamVO.setProvince(province);
provinceStationTeamVOS.add(provinceStationTeamVO);
}
}
return provinceStationTeamVOS;
}
public IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO) {
Page pager = new Page(memberManagementDTO.getPageNum(), memberManagementDTO.getPageSize());
//查看某个人所在的工作站
List<Long> workstationIds = workstationAdministersMapper.administerStations(memberManagementDTO.getUserId());
IPage<MemberManagementVO> memberManagementVOIPage = this.baseMapper.memberManagement(pager, memberManagementDTO.getTeamId(), memberManagementDTO.getStationId(), memberManagementDTO.getProvince(), memberManagementDTO.getJobStatus(), memberManagementDTO.getUserName(),workstationIds,memberManagementDTO.getPositionId());
List<MemberManagementVO> memberManagementVOS = memberManagementVOIPage.getRecords();
for (MemberManagementVO memberManagementVO : memberManagementVOS) {
RecentJobInfoVO recentJobInfoVO = memberJobInfoMapper.recentJobInfo(memberManagementVO.getId());
if (null != recentJobInfoVO) {
//就业单位
memberManagementVO.setCompanyName(recentJobInfoVO.getCompanyName());
//就业月数
memberManagementVO.setJobMonth(recentJobInfoVO.getJobMonth());
//月均收入
memberManagementVO.setSalary(recentJobInfoVO.getSalary());
memberManagementVO.setCompanyProvince(recentJobInfoVO.getProvince());
memberManagementVO.setCompanyCity(recentJobInfoVO.getCity());
memberManagementVO.setCompanyCounty(recentJobInfoVO.getCounty());
memberManagementVO.setCompanyAddress(recentJobInfoVO.getAddress());
}
//技能信息
List<PositionDictDO> positionDictDOS = memberDictMapper.memberPositions(memberManagementVO.getId());
memberManagementVO.setPositionDictDOList(positionDictDOS);
}
return memberManagementVOIPage;
}
public TotalTeamsVO memberManagementCount(MemberManagementDTO memberManagementDTO) {
TotalTeamsVO totalTeamsVO = new TotalTeamsVO();
totalTeamsVO.setCount(this.baseMapper.memberManagementCount(memberManagementDTO.getTeamId(), memberManagementDTO.getStationId(), memberManagementDTO.getProvince(), memberManagementDTO.getJobStatus(),memberManagementDTO.getPositionId()));
return totalTeamsVO;
}
}
...@@ -9,23 +9,18 @@ import com.laowu.dto.station.ProvinceStationsDTO; ...@@ -9,23 +9,18 @@ import com.laowu.dto.station.ProvinceStationsDTO;
import com.laowu.dto.station.StationAccountDTO; import com.laowu.dto.station.StationAccountDTO;
import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.StationsDTO;
import com.laowu.dto.station.UpdateAdministerDTO; import com.laowu.dto.station.UpdateAdministerDTO;
import com.laowu.mapper.AdministerMapper; import com.laowu.mapper.*;
import com.laowu.mapper.RoleAdministerMappingMapper; import com.laowu.model.*;
import com.laowu.mapper.WorkstationAdministersMapper;
import com.laowu.mapper.WorkstationDictMapper;
import com.laowu.model.AdministerDO;
import com.laowu.model.RoleAdministerMappingDO;
import com.laowu.model.WorkstationAdministersDO;
import com.laowu.model.WorkstationDictDO;
import com.laowu.service.WorkstationDictService; import com.laowu.service.WorkstationDictService;
import com.laowu.util.ConstantUtils; import com.laowu.util.ConstantUtils;
import com.laowu.util.MathUtil;
import com.laowu.vo.station.*; import com.laowu.vo.station.*;
import com.laowu.vo.team.HomepageVO;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.List; import java.util.List;
/** /**
...@@ -48,6 +43,12 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe ...@@ -48,6 +43,12 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe
@Autowired @Autowired
private RoleAdministerMappingMapper roleAdministerMappingMapper; private RoleAdministerMappingMapper roleAdministerMappingMapper;
@Autowired
private MemberDictMapper memberDictMapper;
@Autowired
private LibGeoLocationMapper libGeoLocationMapper;
public IPage<StationsVO> stations(StationsDTO stationsDTO) { public IPage<StationsVO> stations(StationsDTO stationsDTO) {
Page pager = new Page(stationsDTO.getPageNum(), stationsDTO.getPageSize()); Page pager = new Page(stationsDTO.getPageNum(), stationsDTO.getPageSize());
...@@ -123,13 +124,13 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe ...@@ -123,13 +124,13 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe
//判断该角色是管理员还是站长 //判断该角色是管理员还是站长
int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>() int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda() .lambda()
.eq(RoleAdministerMappingDO::getAdministerId,provinceStationsDTO.getUserId()) .eq(RoleAdministerMappingDO::getAdministerId, provinceStationsDTO.getUserId())
.eq(RoleAdministerMappingDO::getRoleId,1)); .eq(RoleAdministerMappingDO::getRoleId, 1));
List<ProvinceStationsVO> provinceStationsVOS = new ArrayList<>(); List<ProvinceStationsVO> provinceStationsVOS = new ArrayList<>();
//先查出所有省 //先查出所有省
List<String> provinces = this.baseMapper.provinces(); List<String> provinces = this.baseMapper.provinces();
if (count > 0){ if (count > 0) {
//管理员 //管理员
//省下面的工作站 //省下面的工作站
for (String province : provinces) { for (String province : provinces) {
...@@ -142,13 +143,13 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe ...@@ -142,13 +143,13 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe
provinceStationsVO.setWorkstationDictDOS(workstationDictDOS); provinceStationsVO.setWorkstationDictDOS(workstationDictDOS);
provinceStationsVOS.add(provinceStationsVO); provinceStationsVOS.add(provinceStationsVO);
} }
}else { } else {
//站长 //站长
for (String province : provinces) { for (String province : provinces) {
ProvinceStationsVO provinceStationsVO = new ProvinceStationsVO(); ProvinceStationsVO provinceStationsVO = new ProvinceStationsVO();
provinceStationsVO.setProvince(province); provinceStationsVO.setProvince(province);
List<WorkstationDictDO> workstationDictDOS = this.baseMapper.administerProvinceStations(province,provinceStationsDTO.getUserId()); List<WorkstationDictDO> workstationDictDOS = this.baseMapper.administerProvinceStations(province, provinceStationsDTO.getUserId());
provinceStationsVO.setWorkstationDictDOS(workstationDictDOS); provinceStationsVO.setWorkstationDictDOS(workstationDictDOS);
provinceStationsVOS.add(provinceStationsVO); provinceStationsVOS.add(provinceStationsVO);
} }
...@@ -209,6 +210,8 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe ...@@ -209,6 +210,8 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe
workstationAdministersDO.setAdministerId(administerDO.getId()); workstationAdministersDO.setAdministerId(administerDO.getId());
workstationAdministersDO.setWorkstationId(id); workstationAdministersDO.setWorkstationId(id);
workstationAdministersMapper.insert(workstationAdministersDO); workstationAdministersMapper.insert(workstationAdministersDO);
} }
} }
...@@ -220,10 +223,207 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe ...@@ -220,10 +223,207 @@ public class WorkstationDictServiceImpl extends ServiceImpl<WorkstationDictMappe
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public HomepageVO homepage(WorkstationDictDO workstationDictDO) { public HomepageVO homepage(WorkstationDictDO workstationDictDO) {
return this.baseMapper.homepage(workstationDictDO.getId()); return this.baseMapper.homepage(workstationDictDO.getId());
} }
public Screen1VO screen1(LibGeoLocationDO libGeoLocationDO) {
Screen1VO screen1VO = new Screen1VO();
//市总人数
int count = memberDictMapper.selectCount(new QueryWrapper<MemberDictDO>()
.lambda()
.eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince())
.eq(MemberDictDO::getCity, libGeoLocationDO.getCity()));
//市/县劳动能力总数
Integer totalLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, null);
screen1VO.setTotalLaborCnt(totalLaborCnt);
//取整数 四舍五入
screen1VO.setTotalLaborPercent(MathUtil.round(totalLaborCnt, count));
//市脱贫劳动力
Integer poorLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "是");
screen1VO.setPoorLaborCnt(poorLaborCnt);
screen1VO.setPoorLaborPercent(MathUtil.round(poorLaborCnt, count));
//三类人员
Integer monitorTypeCnt = memberDictMapper.selectCount(new QueryWrapper<MemberDictDO>()
.lambda()
.eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince())
.eq(MemberDictDO::getCity, libGeoLocationDO.getCity())
.isNotNull(MemberDictDO::getMonitorType));
screen1VO.setMonitorTypeCnt(monitorTypeCnt);
screen1VO.setMonitorTypePercent(MathUtil.round(monitorTypeCnt, count));
return screen1VO;
}
public Screen2VO screen2(LibGeoLocationDO libGeoLocationDO) {
Screen2VO screen2VO = new Screen2VO();
//在沪就业人数:现居or就业都在上海的
Integer cityEmployeeCnt = memberDictMapper.cityEmployeeCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity());
screen2VO.setCityEmployeeCnt(cityEmployeeCnt);
//2023年转移人数:isMigration 是 并且现居or就业是上海市的
Integer migrationCnt = memberDictMapper.migrationCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), "是");
screen2VO.setMigrationCnt(migrationCnt);
//持证人数: 主要持有一个证就算是持证
Integer memberCertCnt = memberDictMapper.memberCertCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity());
screen2VO.setCertCnt(memberCertCnt);
// //市总人数
// int count = memberDictMapper.selectCount(new QueryWrapper<MemberDictDO>()
// .lambda()
// .eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince())
// .eq(MemberDictDO::getCity, libGeoLocationDO.getCity()));
//持证人数占比
screen2VO.setCertPercent(MathUtil.round(memberCertCnt, cityEmployeeCnt));
//就业行业占比 businessId
List<BusinessTop7VO> businessTop7VOS = memberDictMapper.businessTop7(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity());
businessTop7VOS.stream().forEach(x -> {
x.setPercent(MathUtil.round(x.getCnt(), cityEmployeeCnt));
});
screen2VO.setBusinessTop7VOS(businessTop7VOS);
//薪酬情况中位数:年薪/12 排名中间的那个人
List<Double> salaries = memberDictMapper.middleSalary(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity());
if (salaries.size() > 0) {
double middleSalary = salaries.get(salaries.size() / 2);
screen2VO.setMiddleSalary(middleSalary);
} else {
screen2VO.setMiddleSalary(0.00);
}
//区域
// //学历情况:初中学历,高中学历,大专及以上,其他
// //初中学历
// Integer chuzhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "初中", "上海市");
// screen2VO.setChuzhongCnt(chuzhongCnt);
//
// //高中学历
// Integer gaozhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "高中", "上海市");
// screen2VO.setGaozhongCnt(gaozhongCnt);
//
// //大专及以上
// Integer daxueCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "大学专科及以上", "上海市");
// screen2VO.setDaxueCnt(daxueCnt);
//其他
// Integer otherCnt = cityEmployeeCnt - chuzhongCnt - gaozhongCnt - daxueCnt;
// screen2VO.setOtherCnt(otherCnt);
return screen2VO;
}
public List<Screen3VO> screen3(LibGeoLocationDO libGeoLocationDO) {
List<Screen3VO> screen3VOS = new ArrayList<>();
//查看省下面的县,做遍历
List<String> counties = libGeoLocationMapper.county(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity());
for (String county : counties) {
Screen3VO screen3VO = new Screen3VO();
screen3VO.setCounty(county);
//市劳动能力总数
Integer totalLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, null);
screen3VO.setTotalLaborCnt(totalLaborCnt);
//市脱贫劳动力
Integer poorLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "是");
screen3VO.setPoorLaborCnt(poorLaborCnt);
screen3VO.setPoorLaborPercent(MathUtil.round(poorLaborCnt, totalLaborCnt));
//三类人员
Integer monitorTypeCnt = memberDictMapper.selectCount(new QueryWrapper<MemberDictDO>()
.lambda()
.eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince())
.eq(MemberDictDO::getCity, libGeoLocationDO.getCity())
.eq(MemberDictDO::getCounty, county)
.isNotNull(MemberDictDO::getMonitorType));
screen3VO.setMonitorTypeCnt(monitorTypeCnt);
screen3VO.setMonitorTypePercent(MathUtil.round(monitorTypeCnt, totalLaborCnt));
//16-45岁劳动力
Integer ageLabor = memberDictMapper.ageLabor(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, 16, 45);
screen3VO.setAgeLaborCnt(ageLabor);
screen3VO.setAgeLaborPercent(MathUtil.round(ageLabor, totalLaborCnt));
//学历情况
//学历情况:初中学历,高中学历,大专及以上,其他
//初中学历
Integer chuzhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "初中", null);
screen3VO.setChuzhongCnt(chuzhongCnt);
//高中学历
Integer gaozhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "高中", null);
screen3VO.setGaozhongCnt(gaozhongCnt);
//大专及以上
Integer daxueCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "大学专科及以上", null);
screen3VO.setDaxueCnt(daxueCnt);
//其他
Integer otherCnt = totalLaborCnt - chuzhongCnt - gaozhongCnt - daxueCnt;
screen3VO.setOtherCnt(otherCnt);
screen3VOS.add(screen3VO);
}
return screen3VOS;
}
public String ageGender() {
List<MemberDictDO> memberDictDOS = memberDictMapper.selectList(new QueryWrapper<MemberDictDO>()
.lambda()
.isNull(MemberDictDO::getAge));
for (MemberDictDO memberDictDO : memberDictDOS) {
int age = 0;
//年龄
if (null != memberDictDO.getIdCard()) {
Calendar cal = Calendar.getInstance();
try {
int yearNow = cal.get(Calendar.YEAR);
int monthNow = cal.get(Calendar.MONTH) + 1;
int dayNow = cal.get(Calendar.DATE);
int year = Integer.valueOf(memberDictDO.getIdCard().substring(6, 10));
int month = Integer.valueOf(memberDictDO.getIdCard().substring(10, 12));
int day = Integer.valueOf(memberDictDO.getIdCard().substring(12, 14));
int genderTmp = Integer.valueOf(memberDictDO.getIdCard().substring(16, 17));
if ((month < monthNow) || (month == monthNow && day <= dayNow)) {
age = yearNow - year;
} else {
age = yearNow - year - 1;
}
if (genderTmp % 2 == 1) {
memberDictDO.setGender("男");
} else {
memberDictDO.setGender("女");
}
memberDictDO.setAge(age);
memberDictMapper.updateById(memberDictDO);
} catch (Exception e) {
e.printStackTrace();
}
}
}
return null;
}
} }
package com.laowu.service.impl; package com.laowu.service.impl;
import com.laowu.model.WorkstationMemberMappingDO; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.dto.member.MemberManagementDTO;
import com.laowu.mapper.MemberDictMapper;
import com.laowu.mapper.MemberJobInfoMapper;
import com.laowu.mapper.WorkstationMemberMappingMapper; import com.laowu.mapper.WorkstationMemberMappingMapper;
import com.laowu.model.PositionDictDO;
import com.laowu.model.WorkstationMemberMappingDO;
import com.laowu.service.WorkstationMemberMappingService; import com.laowu.service.WorkstationMemberMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.laowu.vo.job.RecentJobInfoVO;
import com.laowu.vo.member.MemberManagementVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* <p> * <p>
* 学员--工作站映射关系 服务实现类 * 学员--工作站映射关系 服务实现类
...@@ -17,4 +28,42 @@ import org.springframework.stereotype.Service; ...@@ -17,4 +28,42 @@ import org.springframework.stereotype.Service;
@Service @Service
public class WorkstationMemberMappingServiceImpl extends ServiceImpl<WorkstationMemberMappingMapper, WorkstationMemberMappingDO> implements WorkstationMemberMappingService { public class WorkstationMemberMappingServiceImpl extends ServiceImpl<WorkstationMemberMappingMapper, WorkstationMemberMappingDO> implements WorkstationMemberMappingService {
@Autowired
private MemberJobInfoMapper memberJobInfoMapper;
@Autowired
private MemberDictMapper memberDictMapper;
public IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO) {
Page pager = new Page(memberManagementDTO.getPageNum(), memberManagementDTO.getPageSize());
IPage<MemberManagementVO> memberManagementVOIPage = this.baseMapper.memberManagement(pager,memberManagementDTO.getUserName(), memberManagementDTO.getStationId(),memberManagementDTO.getPositionId(),memberManagementDTO.getProvince(),memberManagementDTO.getCity(),memberManagementDTO.getCounty(),memberManagementDTO.getTown(),memberManagementDTO.getVillage(),memberManagementDTO.getGender(),
memberManagementDTO.getMaxAge(),memberManagementDTO.getMinAge(),memberManagementDTO.getIsParty(),memberManagementDTO.getEducation(),memberManagementDTO.getHealth(),
memberManagementDTO.getProvinceNow(),memberManagementDTO.getCityNow(),memberManagementDTO.getCountyNow(),memberManagementDTO.getTownNow(),memberManagementDTO.getIsPoor(),
memberManagementDTO.getMonitorType(),memberManagementDTO.getIsMigration(),memberManagementDTO.getMigrationType(),memberManagementDTO.getFisherman(),memberManagementDTO.getInsured(),
memberManagementDTO.getPensionInsurance(),memberManagementDTO.getInsurePlace(),memberManagementDTO.getMemberType(),memberManagementDTO.getLaborAbility(),memberManagementDTO.getJobStatus(),
memberManagementDTO.getJobType(),memberManagementDTO.getProvinceJob(),memberManagementDTO.getCityJob(),memberManagementDTO.getCountyJob(),memberManagementDTO.getTownJob(),
memberManagementDTO.getJobDestination(),memberManagementDTO.getJobsStartDate(),memberManagementDTO.getJobsEndDate(),memberManagementDTO.getBusinessId(),
memberManagementDTO.getMaxAverageSalary(),memberManagementDTO.getMinAverageSalary(),memberManagementDTO.getMaxJobAge(),memberManagementDTO.getMinJobAge(),memberManagementDTO.getEmploymentWillingness(),
memberManagementDTO.getProvinceEmployment(),memberManagementDTO.getCityEmployment(),memberManagementDTO.getWillingBusinessId(),memberManagementDTO.getEmploymentTrainingWillingness(),memberManagementDTO.getHomecoming(),memberManagementDTO.getUserId(),memberManagementDTO.getTrainType());
List<MemberManagementVO> memberManagementVOS = memberManagementVOIPage.getRecords();
for (MemberManagementVO memberManagementVO : memberManagementVOS) {
RecentJobInfoVO recentJobInfoVO = memberJobInfoMapper.recentJobInfo(memberManagementVO.getId());
if (null != recentJobInfoVO){
memberManagementVO.setRecentStartDate(recentJobInfoVO.getStartDate());
memberManagementVO.setRecentEndDate(recentJobInfoVO.getEndDate());
memberManagementVO.setRecentMonth(recentJobInfoVO.getJobMonth());
}
//技能信息
List<PositionDictDO> positionDictDOS = memberDictMapper.memberPositions(memberManagementVO.getId());
memberManagementVO.setPositionDictDOList(positionDictDOS);
}
return memberManagementVOIPage;
}
} }
package com.laowu.util;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.imageio.stream.FileImageInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class Base64Util {
/**
* 字符串转图片
* @param base64Str
* @return
*/
public static byte[] decode(String base64Str){
byte[] b = null;
BASE64Decoder decoder = new BASE64Decoder();
try {
b = decoder.decodeBuffer(replaceEnter(base64Str));
} catch (IOException e) {
e.printStackTrace();
}
return b;
}
/**
* 图片转字符串
* @param image
* @return
*/
public static String encode(byte[] image){
BASE64Encoder decoder = new BASE64Encoder();
return replaceEnter(decoder.encode(image));
}
public static void main(String[] args) {
System.out.println(encode("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"));
}
public static String encode(String uri){
BASE64Encoder encoder = new BASE64Encoder();
return replaceEnter(encoder.encode(uri.getBytes()));
}
/**
*
* @path 图片路径
* @return
*/
public static byte[] imageTobyte(String path){
byte[] data = null;
FileImageInputStream input = null;
try {
input = new FileImageInputStream(new File(path));
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int numBytesRead = 0;
while((numBytesRead = input.read(buf)) != -1){
output.write(buf, 0, numBytesRead);
}
data = output.toByteArray();
output.close();
input.close();
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
public static String replaceEnter(String str){
String reg ="[\n-\r]";
Pattern p = Pattern.compile(reg);
Matcher m = p.matcher(str);
return m.replaceAll("");
}
}
\ No newline at end of file
...@@ -9,8 +9,6 @@ public class MathUtil { ...@@ -9,8 +9,6 @@ public class MathUtil {
/** /**
* 4位自增字符 * 4位自增字符
*/ */
public static String getRandomCode(int randomLength) { public static String getRandomCode(int randomLength) {
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
Random random = new Random(); Random random = new Random();
...@@ -176,4 +174,9 @@ public class MathUtil { ...@@ -176,4 +174,9 @@ public class MathUtil {
} }
return retStr; return retStr;
} }
public static String round(Integer a,Integer b){
return Math.round((double) a*100 / (double) b)+"";
}
} }
package com.laowu.util;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DateTime;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.UUID;
public class OSSUtils {
// @Value("${aliyun.oss.accessKeyId}")
private static String accessKeyId = "LTAI5tPAH7P7WQVeowo517BE";
// @Value("${aliyun.oss.accessKeySecret}")
private static String secretAccessKey = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY";
// @Value("${aliyun.oss.endpoint}")
private static String endPoint = "oss-cn-beijing.aliyuncs.com";
// @Value("${aliyun.oss.bucketName}")
private static String bucketName = "laowu-pro";
public static String uploadOneFile(String file) throws IOException {
// 创建OSSClient实例。
OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, secretAccessKey);
// 设置文件名
String fileName = new DateTime().toString("yyyy-MM-dd")
+ UUID.randomUUID().toString() + ".jpg";
// 获取文件后缀名
// int originalFilenameStartIndex = file.indexOf('/');
// int originalFilenameEndIndex = file.indexOf(';');
// String originalFilename = file.substring(originalFilenameStartIndex+1,originalFilenameEndIndex);
// 获取base64的文件
// file = file.split(",")[1];
byte[] bytesFile = Base64.decode(file);
try {
// 创建PutObject请求。
InputStream inputStream = new ByteArrayInputStream(bytesFile);
ossClient.putObject(bucketName, fileName, inputStream);
String url = "http://" + bucketName + "." + endPoint + "/" + fileName+"?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg";
// System.out.println(url);
return url;
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if (ossClient != null) {
ossClient.shutdown();
}
}
}
public static String image2Base64(String imgUrl) {
URL url = null;
InputStream is = null;
ByteArrayOutputStream outStream = null;
HttpURLConnection httpUrl = null;
try {
url = new URL(imgUrl);
httpUrl = (HttpURLConnection) url.openConnection();
httpUrl.connect();
httpUrl.getInputStream();
is = httpUrl.getInputStream();
outStream = new ByteArrayOutputStream();
// 创建一个Buffer字符串
byte[] buffer = new byte[1024];
// 每次读取的字符串长度,如果为-1,代表全部读取完毕
int len = 0;
// 使用一个输入流从buffer里把数据读取出来
while ((len = is.read(buffer)) != -1) {
// 用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度
outStream.write(buffer, 0, len);
}
// 对字节数组Base64编码
return Base64Util.encode(outStream.toByteArray());
} catch (Exception e) {
e.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (outStream != null) {
try {
outStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (httpUrl != null) {
httpUrl.disconnect();
}
}
return imgUrl;
}
public static void main(String[] args) {
// System.out.println(image2Base64("https://shixischool.oss-cn-beijing.aliyuncs.com/2022-12-219df5b721-99b7-48c4-916e-e474a4eca946.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"));
System.out.println(image2Base64("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"));
}
}
package com.laowu.util;
import cn.hutool.core.lang.UUID;
import java.util.Random;
public class RandomUtil {
public static int getCode() {
return (int)((Math.random() * 9 + 1) * 100000);
}
public static String getRandomCode(int randomLength) {
StringBuilder str = new StringBuilder();
Random random = new Random();
for (int i = 0; i < randomLength; i++) {
str.append(random.nextInt(10));
}
return str.toString();
}
/**
* 随机生成订单号
*/
public static String randomOrderNumber(){
return UUID.fastUUID().toString().replace("-","").substring(0,29);
}
public static void main(String[] args) {
System.out.println(randomOrderNumber());
}
}
package com.laowu.util;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Random;
import java.util.UUID;
public class SecretUtils {
/**
* 对用户登录密码进行MD5加密
*
* @param str
* @return
*/
public static String getMD5String(String str) {
try {
// 生成一个MD5加密计算摘要
return DigestUtils.md5Hex(str).toUpperCase();
// MessageDigest md = MessageDigest.getInstance("MD5");
// 计算md5函数
// md.update(str.getBytes("utf-8"));
// digest()最后确定返回md5 hash值,返回值为8位字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符
// BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值
//一个byte是八位二进制,也就是2位十六进制字符(2的8次方等于16的2次方)
// byte[] digest = md.digest(str.getBytes("utf-8"));
// return new BigInteger(1, digest).toString(16);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 对字符串进行SHA加密
*
* @param
*/
public static String getSHAString(String str) {
try {
MessageDigest sha = MessageDigest.getInstance("SHA-1");
byte[] byteArray = str.getBytes(StandardCharsets.UTF_8);
byte[] md5Bytes = sha.digest(byteArray);
StringBuffer hexValue = new StringBuffer();
for (int i = 0; i < md5Bytes.length; i++) {
int val = ((int) md5Bytes[i]) & 0xff;
if (val < 16) {
hexValue.append("0");
}
hexValue.append(Integer.toHexString(val));
}
return hexValue.toString();
} catch (Exception e) {
return null;
}
}
/**
* Q学友SHA加密
* @param arr
* @return
*/
public static String gen(String... arr) {
if (StringUtils.isAnyEmpty(arr)) {
throw new IllegalArgumentException("非法请求参数,有部分参数为空 : " + Arrays.toString(arr));
} else {
Arrays.sort(arr);
StringBuilder sb = new StringBuilder();
String[] var2 = arr;
int var3 = arr.length;
for (int var4 = 0; var4 < var3; ++var4) {
String a = var2[var4];
sb.append(a);
}
return DigestUtils.sha1Hex(sb.toString());
}
}
public static String getNonce(int length) {
String val = "";
Random random = new Random();
//参数length,表示生成几位随机数
for (int i = 0; i < length; i++) {
val += String.valueOf(random.nextInt(10));
}
return val;
}
private static byte[] md5(String s)
{
MessageDigest algorithm;
try
{
algorithm = MessageDigest.getInstance("MD5");
algorithm.reset();
algorithm.update(s.getBytes(StandardCharsets.UTF_8));
byte[] messageDigest = algorithm.digest();
return messageDigest;
}
catch (Exception e)
{
}
return null;
}
private static final String toHex(byte[] hash)
{
if (hash == null)
{
return null;
}
StringBuffer buf = new StringBuffer(hash.length * 2);
int i;
for (i = 0; i < hash.length; i++)
{
if ((hash[i] & 0xff) < 0x10)
{
buf.append("0");
}
buf.append(Long.toString(hash[i] & 0xff, 16));
}
return buf.toString();
}
public static String hash(String s)
{
try
{
return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
}
catch (Exception e)
{
return s;
}
}
public static void main(String[] args) {
String uuid = UUID.randomUUID().toString();
System.out.println(uuid.replace("-",""));
// System.out.println(hash(uuid+"ixihs"));
// System.out.println(System.currentTimeMillis());
}
}
\ No newline at end of file
package com.laowu.vo.image;
import lombok.Data;
@Data
public class CheckResultVO {
private String code;
private String msg;
private String bizSeqNo;
private ResultVO result;
private String transactionTime;
}
package com.laowu.vo.image;
import lombok.Data;
@Data
public class GetMemberCheckDetailVO {
private Long id;
private String occurredTime;
private String photo;
private Double similarity;
private String result;
}
package com.laowu.vo.image;
import lombok.Data;
@Data
public class IdCardAccessTokenVO {
private String code;
private String msg;
private String transactionTime;
private String access_token;
private String expire_time;
private String expire_in;
}
package com.laowu.vo.image;
import lombok.Data;
import java.util.List;
@Data
public class IdCardSignTicketVO {
private String code;
private String msg;
private String transactionTime;
private List<IdCardTicketsVO> tickets;
}
package com.laowu.vo.image;
import lombok.Data;
@Data
public class IdCardTicketsVO {
private String value;
private String expire_in;
private String expire_time;
}
package com.laowu.vo.image;
import lombok.Data;
import java.util.List;
@Data
public class ResultVO {
private String orderNo;
private String liveRate;
private String similarity;
private String occurredTime;
private String appId;
private String photo;
private String video;
private String bizSeqNo;
private String sdkVersion;
private String trtcFlag;
private List<String> photoList;
}
package com.laowu.vo.image;
import lombok.Data;
@Data
public class SendIdCardInfoVO {
private String code;
private String msg;
private String bizSeqNo;
private SendResultVO result;
private String transactionTime;
}
package com.laowu.vo.image;
import lombok.Data;
@Data
public class SendResultVO {
private String bizSeqNo;
private String transactionTime;
private String orderNo;
private String h5faceId;
private String optimalDomain;
private Boolean success;
private String wbAppId;
private String nonce;
private Long userId;
private String sign;
private String faceId;
}
...@@ -5,11 +5,9 @@ import lombok.Data; ...@@ -5,11 +5,9 @@ import lombok.Data;
@Data @Data
public class RecentJobInfoVO { public class RecentJobInfoVO {
private String companyName; // private Long id;
private String jobMonth; private Long memberId;
private String salary;
private String province; private String province;
...@@ -17,5 +15,17 @@ public class RecentJobInfoVO { ...@@ -17,5 +15,17 @@ public class RecentJobInfoVO {
private String county; private String county;
private String address; private String town;
private String village;
private String jobDestination;
private String startDate;
private String endDate;
private String jobMonth;
private String salary;
} }
...@@ -2,6 +2,7 @@ package com.laowu.vo.member; ...@@ -2,6 +2,7 @@ package com.laowu.vo.member;
import com.laowu.model.MemberCertsDO; import com.laowu.model.MemberCertsDO;
import com.laowu.model.MemberDictDO; import com.laowu.model.MemberDictDO;
import com.laowu.model.MemberTrainInfoDO;
import com.laowu.model.PositionDictDO; import com.laowu.model.PositionDictDO;
import lombok.Data; import lombok.Data;
...@@ -12,14 +13,12 @@ public class MemberCardVO extends MemberDictDO { ...@@ -12,14 +13,12 @@ public class MemberCardVO extends MemberDictDO {
private List<PositionDictDO> positionDictDOS; private List<PositionDictDO> positionDictDOS;
private List<MemberTrainInfoVO> memberTrainInfoVOS; private List<MemberTrainInfoDO> memberTrainInfoVOS;
private List<MemberCertsDO> memberCertsDOS; private List<MemberCertsDO> memberCertsDOS;
private List<MemberJobInfoVO> memberJobInfoVOS; private List<MemberJobInfoVO> memberJobInfoVOS;
private String age;
private String starValue; private String starValue;
private String jobValue; private String jobValue;
......
package com.laowu.vo.member;
import com.laowu.model.PositionDictDO;
import com.laowu.util.ExcelColumnUtil;
import lombok.Data;
import java.util.List;
@Data
public class MemberManagementVO {
private Long id;
@ExcelColumnUtil(value = "姓名", col = 2)
private String userName;
@ExcelColumnUtil(value = "个人证件", col = 2)
private String idCardType;
@ExcelColumnUtil(value = "证件号码", col = 2)
private String idCard;
@ExcelColumnUtil(value = "手机号", col = 2)
private String telephone;
@ExcelColumnUtil(value = "户主姓名", col = 2)
private String hostUserName;
@ExcelColumnUtil(value = "户主证件", col = 2)
private String hostIdCardType;
@ExcelColumnUtil(value = "户主证件号码", col = 2)
private String hostIdCard;
@ExcelColumnUtil(value = "(户籍所在地)省", col = 2)
private String province;
@ExcelColumnUtil(value = "(户籍所在地)市", col = 2)
private String city;
@ExcelColumnUtil(value = "(户籍所在地)县", col = 2)
private String county;
@ExcelColumnUtil(value = "(户籍所在地)镇", col = 2)
private String town;
@ExcelColumnUtil(value = "(户籍所在地)村", col = 2)
private String village;
@ExcelColumnUtil(value = "(户籍所在地)组", col = 2)
private String team;
@ExcelColumnUtil(value = "(户籍所在地)地址", col = 2)
private String address;
@ExcelColumnUtil(value = "(现居所在地)省", col = 2)
private String provinceNow;
@ExcelColumnUtil(value = "(现居所在地)市", col = 2)
private String cityNow;
@ExcelColumnUtil(value = "(现居所在地)县", col = 2)
private String countyNow;
@ExcelColumnUtil(value = "(现居所在地)镇", col = 2)
private String townNow;
@ExcelColumnUtil(value = "(现居所在地)村", col = 2)
private String villageNow;
@ExcelColumnUtil(value = "(现居所在地)地址", col = 2)
private String addressNow;
@ExcelColumnUtil(value = "家庭人口数", col = 2)
private String familyCnt;
@ExcelColumnUtil(value = "与户主关系", col = 2)
private String hostRelation;
@ExcelColumnUtil(value = "性别", col = 2)
private String gender;
@ExcelColumnUtil(value = "年龄", col = 2)
private String age;
@ExcelColumnUtil(value = "民族", col = 2)
private String nation;
@ExcelColumnUtil(value = "政治面貌", col = 2)
private String isParty;
@ExcelColumnUtil(value = "文化程(最高学历)", col = 2)
private String education;
@ExcelColumnUtil(value = "健康状况", col = 2)
private String health;
@ExcelColumnUtil(value = "是否脱贫户", col = 2)
private String isPoor;
@ExcelColumnUtil(value = "检测对象类型", col = 2)
private String monitorType;
@ExcelColumnUtil(value = "是否搬迁对象", col = 2)
private String isMigration;
@ExcelColumnUtil(value = "搬迁类型", col = 2)
private String migrationType;
@ExcelColumnUtil(value = "搬迁点名称", col = 2)
private String migrationName;
@ExcelColumnUtil(value = "是否渔民", col = 2)
private String fisherman;
@ExcelColumnUtil(value = "是否参保", col = 2)
private String insured;
@ExcelColumnUtil(value = "养老保险参保情况", col = 2)
private String pensionInsurance;
@ExcelColumnUtil(value = "当前参保地", col = 2)
private String insurePlace;
@ExcelColumnUtil(value = "人员类别", col = 2)
private String memberType;
@ExcelColumnUtil(value = "劳动能力", col = 2)
private String laborAbility;
@ExcelColumnUtil(value = "是否就业", col = 2)
private String jobStatus;
@ExcelColumnUtil(value = "就业类型", col = 2)
private String jobType;
private Long businessId;
@ExcelColumnUtil(value = "(现居所在地)地址", col = 2)
private String business;
@ExcelColumnUtil(value = "工龄", col = 2)
private String jobAge;
private String recentStartDate;
private String recentEndDate;
private String recentMonth;
@ExcelColumnUtil(value = "本年内务工月数", col = 2)
private String yearJobMonth;
@ExcelColumnUtil(value = "年平均收入", col = 2)
private String averageSalary;
@ExcelColumnUtil(value = "收入情况说明", col = 2)
private String incomeStatement;
@ExcelColumnUtil(value = "就业意愿", col = 2)
private String employmentWillingness;
@ExcelColumnUtil(value = "就业意愿省", col = 2)
private String provinceEmployment;
@ExcelColumnUtil(value = "就业意愿市/地区", col = 2)
private String cityEmployment;
@ExcelColumnUtil(value = "就业培训意愿", col = 2)
private String employmentTrainingWillingness;
@ExcelColumnUtil(value = "是否返乡", col = 2)
private String homecoming;
@ExcelColumnUtil(value = "返乡时间", col = 2)
private String homecomingDate;
@ExcelColumnUtil(value = "返乡原因", col = 2)
private String homecomingReason;
@ExcelColumnUtil(value = "备注(异常原因)", col = 2)
private String comment;
@ExcelColumnUtil(value = "户最后更新时间", col = 2)
private String hostLastUpdate;
@ExcelColumnUtil(value = "基础信息更新时间", col = 2)
private String baseLastUpdate;
@ExcelColumnUtil(value = "就业信息更新时间", col = 2)
private String employmentLastUpdate;
private List<PositionDictDO> positionDictDOList;
}
package com.laowu.vo.member;
import com.laowu.model.MemberTrainInfoDO;
import com.laowu.model.PositionDictDO;
import lombok.Data;
import java.util.List;
@Data
public class MemberTrainInfoVO extends MemberTrainInfoDO {
private List<PositionDictDO> positionDictDOS;
}
package com.laowu.vo.member; package com.laowu.vo.member;
import com.laowu.model.MemberCertsDO; import com.laowu.model.*;
import com.laowu.model.MemberDictDO;
import com.laowu.model.PositionDictDO;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -10,18 +8,27 @@ import java.util.List; ...@@ -10,18 +8,27 @@ import java.util.List;
@Data @Data
public class OneMemberVO extends MemberDictDO { public class OneMemberVO extends MemberDictDO {
private String college; /**
* 户主姓名
*/
private String hostUserName;
private String major; /**
* 户主证件
*/
private String hostIdCardType;
private List<MemberJobInfoVO> memberJobInfoVOS; /**
* 户主证件号码
*/
private String hostIdCard;
private List<MemberCollegeVO> memberCollegeVOS; private List<MemberJobInfoDO> memberJobInfoVOS;
private List<PositionDictDO> positionDictDOS; private List<PositionDictDO> positionDictDOS;
private List<MemberCertsDO> memberCertsDOS; private List<MemberCertsDO> memberCertsDOS;
private List<MemberTrainInfoVO> memberTrainInfoVOS; private List<MemberTrainInfoDO> memberTrainInfoVOS;
} }
package com.laowu.vo.member; package com.laowu.vo.member;
import com.laowu.model.MemberCollegeMappingDO;
import lombok.Data; import lombok.Data;
@Data @Data
public class MemberCollegeVO extends MemberCollegeMappingDO { public class TokenLoginVO {
private String college; private Long timestamp;
private String major; private String idCard;
private String sign;
} }
package com.laowu.vo.station;
import lombok.Data;
@Data
public class BusinessTop7VO {
private String business;
private Integer cnt;
private String percent;
}
package com.laowu.vo.team; package com.laowu.vo.station;
import lombok.Data; import lombok.Data;
......
package com.laowu.vo.station;
import lombok.Data;
@Data
public class Screen1VO {
private Integer totalLaborCnt;
private String totalLaborPercent;
private Integer poorLaborCnt;
private String poorLaborPercent;
private Integer monitorTypeCnt;
private String monitorTypePercent;
}
package com.laowu.vo.station;
import lombok.Data;
import java.util.List;
@Data
public class Screen2VO {
private Integer cityEmployeeCnt;
private Integer migrationCnt;
private Integer certCnt;
private String certPercent;
private List<BusinessTop7VO> businessTop7VOS;
private Double middleSalary;
private Integer chuzhongCnt;
// private String chuzhongPercent;
private Integer gaozhongCnt;
// private String gaozhongPercent;
private Integer daxueCnt;
// private String daxuePercent;
private Integer otherCnt;
// private String otherPercent;
}
package com.laowu.vo.station;
import lombok.Data;
@Data
public class Screen3VO {
private String county;
private Integer totalLaborCnt;
// private String totalLaborPercent;
private Integer poorLaborCnt;
private String poorLaborPercent;
private Integer monitorTypeCnt;
private String monitorTypePercent;
private Integer ageLaborCnt;
private String ageLaborPercent;
private Integer chuzhongCnt;
// private String chuzhongPercent;
private Integer gaozhongCnt;
// private String gaozhongPercent;
private Integer daxueCnt;
// private String daxuePercent;
private Integer otherCnt;
// private String otherPercent;
}
package com.laowu.vo.team; package com.laowu.vo.station;
import lombok.Data; import lombok.Data;
......
package com.laowu.vo.team;
import lombok.Data;
@Data
public class LeaderMembersVO {
private Long id;
private String userName;
private String telephone;
private String idCardType;
private String idCard;
private String teamCnt;
private String teamTotalCnt;
}
package com.laowu.vo.team;
import com.laowu.model.PositionDictDO;
import lombok.Data;
import java.util.List;
@Data
public class MemberManagementVO {
private Long id;
private String userName;
private String jobStatus;
private String telephone;
private String idCardType;
private String idCard;
private String province;
private String city;
private String county;
private String address;
private String startDate;
private String endDate;
private String isPoor;
private String isMigration;
private String isParty;
private String companyName;
private String jobMonth;
private String salary;
private String companyProvince;
private String companyCity;
private String companyCounty;
private String companyAddress;
private List<PositionDictDO> positionDictDOList;
}
package com.laowu.vo.team;
import com.laowu.model.MemberDictDO;
import com.laowu.model.TeamDictDO;
import lombok.Data;
import java.util.List;
@Data
public class OneTeamInfoVO extends TeamDictDO {
private List<MemberDictDO> memberDictDOS;
private String ct;
private String userName;
}
package com.laowu.vo.team;
import lombok.Data;
import java.util.List;
@Data
public class ProvinceStationTeamVO {
private String province;
private List<WorkstationDictVO> workstationDictVOS;
}
package com.laowu.vo.team;
import lombok.Data;
@Data
public class TeamsVO {
private Long id;
private String teamName;
private String ct;
private String userName;
private String comment;
}
package com.laowu.vo.team;
import com.laowu.model.TeamDictDO;
import com.laowu.model.WorkstationDictDO;
import lombok.Data;
import java.util.List;
@Data
public class WorkstationDictVO extends WorkstationDictDO {
private List<TeamDictDO> teamDictDOS;
}
# 本地环境配置
spring.server.port=34567
# 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf6n8b2503cv42z232o.mysql.rds.aliyuncs.com:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=ykhl
spring.datasource.password=ykhladmin123=
spring.datasource.druid.initialSize=5
spring.datasource.druid.minIdle=5
spring.datasource.druid.maxActive=200
spring.datasource.druid.maxWait=60000
spring.datasource.druid.timeBetweenEvictionRunsMillis=60000
spring.datasource.druid.minEvictableIdleTimeMillis=300000
spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL
spring.datasource.druid.testWhileIdle=true
spring.datasource.druid.testOnBorrow=false
spring.datasource.druid.testOnReturn=false
spring.datasource.druid.poolPreparedStatements=true
spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20
spring.datasource.druid.useGlobalDataSourceStat=true
# 控制台日志打印
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
spring.redis.host=47.97.19.66
spring.redis.password=Ykhl@208
spring.redis.port=6389
spring.redis.lettuce.pool.max-idle=16
spring.redis.lettuce.pool.max-active=32
spring.redis.lettuce.pool.min-idle=8
...@@ -2,14 +2,11 @@ ...@@ -2,14 +2,11 @@
spring.server.port=34567 spring.server.port=34567
# 数据源配置 # 数据源配置
spring.datasource.url=jdbc:mysql://116.62.57.92:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.url=jdbc:mysql://139.224.253.21:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.username=ykadmin_new spring.datasource.username=root
#spring.datasource.password=youkedb608@good spring.datasource.password=ykhladmin302
spring.datasource.username=devloper
spring.datasource.password=dev@1553$
spring.datasource.druid.initialSize=5 spring.datasource.druid.initialSize=5
spring.datasource.druid.minIdle=5 spring.datasource.druid.minIdle=5
......
...@@ -7,6 +7,9 @@ laowu.code-message[20001]=该目录已存在 ...@@ -7,6 +7,9 @@ laowu.code-message[20001]=该目录已存在
laowu.code-message[30001]=该公司已存在 laowu.code-message[30001]=该公司已存在
laowu.code-message[40001]=该用户已存在 laowu.code-message[40001]=该用户已存在
laowu.code-message[40002]=工友信息不存在
laowu.code-message[40003]=工友信息不匹配
laowu.code-message[40004]=人脸识别失败
laowu.code-message[50001]=账号或密码错误 laowu.code-message[50001]=账号或密码错误
...@@ -14,3 +17,4 @@ laowu.code-message[60001]=该经营范围已存在 ...@@ -14,3 +17,4 @@ laowu.code-message[60001]=该经营范围已存在
laowu.code-message[70001]=该记录已存在 laowu.code-message[70001]=该记录已存在
meishu.code-message[80001]=已超过当日验证次数上线
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.MemberUpdateHistoryMapper"> <mapper namespace="com.laowu.mapper.AccessTokenMapper">
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.MemberUpdateHistoryDO"> <resultMap id="BaseResultMap" type="com.laowu.model.AccessTokenDO">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="create_date" property="createDate" /> <result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" /> <result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" /> <result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" /> <result column="access_token" property="accessToken" />
<result column="administer_id" property="administerId" />
<result column="opr" property="opr" />
<result column="module" property="module" />
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
...@@ -19,7 +16,7 @@ ...@@ -19,7 +16,7 @@
create_date, create_date,
update_date, update_date,
delete_date, delete_date,
id, company_id, administer_id, opr, module id, access_token
</sql> </sql>
</mapper> </mapper>
...@@ -2,17 +2,6 @@ ...@@ -2,17 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.CompanyDictMapper"> <mapper namespace="com.laowu.mapper.CompanyDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.CompanyDictDO">
<id column="id" property="id"/>
<result column="create_date" property="createDate"/>
<result column="update_date" property="updateDate"/>
<result column="delete_date" property="deleteDate"/>
<result column="company_name" property="companyName"/>
<result column="company_code" property="companyCode"/>
<result column="account" property="account"/>
</resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
create_date, create_date,
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.ImageCheckRecordMapper">
</mapper>
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t.province IS NOT NULL AND t.province IS NOT NULL
order by t.order_no
</select> </select>
<select id="cities" resultType="string"> <select id="cities" resultType="string">
...@@ -42,7 +41,6 @@ ...@@ -42,7 +41,6 @@
t.delete_date IS NULL t.delete_date IS NULL
AND t.city IS NOT NULL AND t.city IS NOT NULL
and t.province =#{province} and t.province =#{province}
order by t.order_no
</select> </select>
<select id="county" resultType="string"> <select id="county" resultType="string">
...@@ -55,7 +53,6 @@ ...@@ -55,7 +53,6 @@
AND t.county IS NOT NULL AND t.county IS NOT NULL
AND t.province = #{province} AND t.province = #{province}
AND t.city = #{city} AND t.city = #{city}
order by t.order_no
</select> </select>
<select id="towns" resultType="string"> <select id="towns" resultType="string">
...@@ -70,8 +67,6 @@ ...@@ -70,8 +67,6 @@
AND t.city = #{city} AND t.city = #{city}
AND t.county = #{county} AND t.county = #{county}
and town is not NULL and town is not NULL
ORDER BY
t.order_no
</select> </select>
<select id="villages" resultType="string"> <select id="villages" resultType="string">
...@@ -87,13 +82,11 @@ ...@@ -87,13 +82,11 @@
AND t.county = #{county} AND t.county = #{county}
AND t.town = #{town} AND t.town = #{town}
and t.village is not null and t.village is not null
ORDER BY
t.order_no
</select> </select>
<select id="geo" resultType="com.laowu.vo.geo.GeoVO"> <select id="geo" resultType="com.laowu.vo.geo.GeoVO">
SELECT SELECT
t1.id,
t1.province, t1.province,
t1.city, t1.city,
t1.county, t1.county,
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.MemberCollegeMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.MemberCollegeMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="member_id" property="memberId" />
<result column="college_id" property="collegeId" />
<result column="start_date" property="startDate" />
<result column="end_date" property="endDate" />
<result column="major_id" property="majorId" />
<result column="rank" property="rank" />
<result column="education_type" property="educationType" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, member_id, college_id, start_date, end_date, major_id, rank, education_type
</sql>
</mapper>
...@@ -2,34 +2,6 @@ ...@@ -2,34 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.MemberDictMapper"> <mapper namespace="com.laowu.mapper.MemberDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.MemberDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="user_name" property="userName" />
<result column="status" property="status" />
<result column="telephone" property="telephone" />
<result column="id_card_type" property="idCardType" />
<result column="id_card" property="idCard" />
<result column="province" property="province" />
<result column="city" property="city" />
<result column="county" property="county" />
<result column="address" property="address" />
<result column="education" property="education" />
<result column="education_type" property="educationType" />
<result column="college_id" property="collegeId" />
<result column="start_date" property="startDate" />
<result column="end_date" property="endDate" />
<result column="major_id" property="majorId" />
<result column="rank" property="rank" />
<result column="is_poor" property="isPoor" />
<result column="is_migration" property="isMigration" />
<result column="is_party" property="isParty" />
<result column="job_status" property="jobStatus" />
</resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
create_date, create_date,
...@@ -102,4 +74,160 @@ ...@@ -102,4 +74,160 @@
AND t.member_id = #{memberId} AND t.member_id = #{memberId}
</select> </select>
<select id="laborAbility" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND t.labor_ability IN ( '技能劳动力', '普通劳动力', '部分丧失劳动力' )
AND t.province = #{province}
AND t.city = #{city}
<if test="county != null and county != ''">
and t.county = #{county}
</if>
<if test="isPoor != null and isPoor != ''">
and t.is_poor = #{isPoor}
</if>
</select>
<select id="cityEmployeeCnt" parameterType="string" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND ( t.province_now = '上海市'
OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
</select>
<select id="migrationCnt" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
WHERE
t.delete_date IS NULL
and t.is_migration = #{isMigration}
AND ( t.province_now = '上海市'
OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
</select>
<select id="memberCertCnt" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
LEFT JOIN ( SELECT t.member_id FROM member_certs t WHERE t.delete_date IS NULL GROUP BY t.member_id HAVING count( 1 )> 0 ) t2 ON t.id = t2.member_id
WHERE
t.delete_date IS NULL
AND t2.member_id IS NOT NULL
AND ( t.province_now = '上海市'
OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
</select>
<select id="businessTop7" resultType="com.laowu.vo.station.BusinessTop7VO">
SELECT
t2.business,
count( 1 ) AS cnt
FROM
member_dict t
LEFT JOIN business_dict t2 ON t.business_id = t2.id
WHERE
t.delete_date IS NULL
AND t.business_id IS NOT NULL
AND t.business_id = 5
AND ( t.province_now = '上海市' OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
UNION
SELECT
t2.business,
cnt
FROM
(
SELECT
t.business_id,
count( 1 ) AS cnt
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND t.business_id IS NOT NULL
AND t.business_id != 5
AND ( t.province_now = '上海市' OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
GROUP BY
t.business_id
ORDER BY
count( 1 ) DESC
) t
LEFT JOIN business_dict t2 ON t.business_id = t2.id
LIMIT 7
</select>
<select id="middleSalary" resultType="double">
SELECT
t.average_salary
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND ( t.province_now = '上海市'
OR t.province_employment = '上海市')
and t.province = #{province}
AND t.city = #{city}
ORDER BY
t.average_salary
</select>
<select id="education" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND t.education = #{education}
<if test="destinationProvince != null and destinationProvince != ''">
AND ( t.province_now = #{destinationProvince}
OR t.province_employment = #{destinationProvince})
</if>
and t.province = #{province}
AND t.city = #{city}
<if test="county != null and county != ''">
and t.county = #{county}
</if>
</select>
<select id="ageLabor" resultType="integer">
SELECT
count( 1 )
FROM
member_dict t
WHERE
t.delete_date IS NULL
AND t.province = #{province}
AND t.city = #{city}
<if test="county != null and county != ''">
and t.county = #{county}
</if>
AND t.labor_ability IN ( '技能劳动力', '普通劳动力', '部分丧失劳动力' )
<if test="maxAge != null and maxAge != ''">
and t.age &lt;= #{maxAge}
</if>
<if test="minAge != null and minAge != ''">
and t.age >= #{minAge}
</if>
</select>
</mapper> </mapper>
...@@ -33,19 +33,22 @@ ...@@ -33,19 +33,22 @@
<select id="recentJobInfo" parameterType="long" resultType="com.laowu.vo.job.RecentJobInfoVO"> <select id="recentJobInfo" parameterType="long" resultType="com.laowu.vo.job.RecentJobInfoVO">
SELECT SELECT
t.province, id,
t.city, member_id,
t.county, province,
t2.company_name, city,
t.job_month, county,
t.salary, town,
t.address village,
job_destination,
start_date,
end_date,
job_month,
salary
FROM FROM
member_job_info t member_job_info t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.member_id = #{memberId} AND t.member_id = #{memberId}
ORDER BY ORDER BY
t.start_date DESC t.start_date DESC
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.MemberTeamMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.MemberTeamMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="member_id" property="memberId" />
<result column="team_id" property="teamId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, member_id, team_id
</sql>
<select id="teamMembers" parameterType="long" resultType="com.laowu.model.MemberDictDO">
SELECT
t2.*
FROM
member_team_mapping t
LEFT JOIN member_dict t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.team_id = #{teamId}
</select>
<select id="noTeamMembers" parameterType="long" resultType="com.laowu.model.MemberDictDO">
SELECT
t1.id,t1.user_name,t1.id_card_type,t1.id_card
FROM
member_dict t1
WHERE
t1.delete_date IS NULL
AND t1.id IN (
SELECT
t1.member_id
FROM
workstation_member_mapping t1
LEFT JOIN team_dict t2 ON t1.station_id = t2.station_id
WHERE
t2.id = #{teamId}
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
)
<if test="userName != null and userName != ''">
and t1.user_name LIKE concat('%', #{userName}, '%')
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.MemberTrainPositionsMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.MemberTrainPositionsDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="member_train_id" property="memberTrainId" />
<result column="position_id" property="positionId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, member_train_id, position_id
</sql>
<select id="positionIds" parameterType="long" resultType="long">
SELECT
t.position_id
FROM
member_train_positions t
WHERE
t.delete_date IS NULL
AND t.member_train_id = #{memberTrainId}
</select>
<select id="positions" parameterType="long" resultType="com.laowu.model.PositionDictDO">
SELECT
t2.*
FROM
member_train_positions t
left join position_dict t2 on t.position_id = t2.id
WHERE
t.delete_date IS NULL
and t2.delete_date is null
AND t.member_train_id = #{memberTrainId}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.TeamDictMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, station_id, team_name, comment, administer_id
</sql>
<select id="teams" resultType="com.laowu.vo.team.TeamsVO">
SELECT
t3.id,
t3.team_name,
t3.ct,
t4.user_name,
t3.`comment`
FROM
(
SELECT
t1.id,
t1.team_name,
IF
(
t2.id IS NULL,
0,
count(*)) AS ct,
t1.member_id,
t1.`comment`
FROM
team_dict t1
LEFT JOIN member_team_mapping t5 ON t1.id = t5.team_id and t5.delete_date is null
LEFT JOIN member_dict t2 ON t2.id = t5.member_id
left join workstation_dict t3 on t1.station_id = t3.id
WHERE
t1.delete_date IS NULL
<if test="stationId != null and stationId != ''">
and t1.station_id = #{stationId}
</if>
<if test="teamName != null and teamName != ''">
and t1.team_name like concat('%', #{teamName}, '%')
</if>
<if test=" province != null and province != ''">
and t3.province = #{province}
</if>
GROUP BY
t1.id
) t3
LEFT JOIN member_dict t4 ON t3.member_id = t4.id and t4.delete_date IS NULL
</select>
<select id="leaderMemberCounts" parameterType="long" resultType="integer">
SELECT
count(
DISTINCT ( t.member_id ))
FROM
team_dict t
WHERE
t.delete_date IS NULL
AND t.station_id = #{stationId}
AND t.member_id IS NOT NULL
</select>
<select id="leaderMembers" resultType="com.laowu.vo.team.LeaderMembersVO">
SELECT
t7.mi AS id,
t7.user_name,
t7.telephone,
t7.id_card_type,
t7.id_card,
t7.tct as teamCnt,
t8.pct as teamTotalCnt
FROM
(
SELECT
t1.id AS mi,
t1.user_name,
t1.telephone,
t1.id_card_type,
t1.id_card,
count(*) AS tct
FROM
member_dict t1
LEFT JOIN team_dict t2 ON t1.id = t2.member_id
WHERE
t2.member_id IS NOT NULL
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t2.station_id = #{stationId}
GROUP BY
t1.id
) t7
LEFT JOIN (
SELECT
mi1,
ct1 - rpt AS pct
FROM
(
SELECT
t1.id AS mi1,
COUNT(*) AS ct1
FROM
member_dict t1
LEFT JOIN team_dict t2 ON t1.id = t2.member_id
LEFT JOIN member_team_mapping t3 ON t2.id = t3.team_id
WHERE
t2.member_id IS NOT NULL
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
and t3.delete_date IS NULL
AND t2.station_id = #{stationId}
GROUP BY
t1.id
) t4
LEFT JOIN ( SELECT t6.member_id AS mi2, COUNT(*)- 1 AS rpt FROM member_team_mapping t6 WHERE t6.delete_date IS NULL GROUP BY t6.member_id ) t5 ON t4.mi1 = t5.mi2
) t8 ON t7.mi = t8.mi1
WHERE
t7.user_name LIKE concat('%', #{userName}, '%')
</select>
<select id="memberManagement" resultType="com.laowu.vo.team.MemberManagementVO">
SELECT DISTINCT
t1.id,
t1.user_name,
t1.job_status,
t1.telephone,
t1.id_card_type,
t1.id_card,
t1.province,
t1.city,
t1.county,
t1.address,
t1.start_date,
t1.end_date,
t1.is_poor,
t1.is_migration,
t1.is_party
FROM
member_dict t1
LEFT JOIN workstation_member_mapping t5 ON t1.id = t5.member_id and t5.delete_date is null
LEFT JOIN workstation_dict t4 ON t5.station_id = t4.id AND t4.delete_date IS NULL
LEFT JOIN member_team_mapping t2 ON t1.id = t2.member_id AND t2.delete_date IS NULL
LEFT JOIN team_dict t3 ON t2.team_id = t3.id AND t3.delete_date IS NULL
LEFT JOIN member_positions t6 ON t1.id = t6.member_id AND t6.delete_date IS NULL
left join position_dict t7 on t6.position_id = t7.id and t7.delete_date is null
left join position_dict t8 ON t7.parent_id = t8.id and t8.delete_date is null
WHERE
t1.delete_date IS NULL
<if test="jobStatus != null and jobStatus != ''">
AND t1.job_status = #{jobStatus}
</if>
<if test="province != null and province != ''">
AND t4.province = #{province}
</if>
<if test="stationId != null and stationId != '' and teamId == null and teamId == ''">
AND t4.id = #{stationId}
</if>
<if test="stationId != null and stationId != '' and teamId != null and teamId != ''">
AND t3.id = #{teamId}
</if>
<if test="userName != null and userName != ''">
and t1.user_name LIKE concat('%', #{userName}, '%')
</if>
<if test="workstationIds.size >0">
and t4.id in
<foreach collection="workstationIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="positionId != null and positionId != ''">
and ( t7.id = #{positionId} or t7.parent_id = #{positionId} or t8.parent_id = #{positionId} )
</if>
order by t1.create_date
</select>
<select id="memberManagementCount" resultType="integer">
SELECT count(DISTINCT
t1.id,
t1.user_name,
t1.job_status,
t1.telephone,
t1.id_card_type,
t1.id_card,
t1.province,
t1.city,
t1.address,
t1.start_date,
t1.end_date,
t1.is_poor,
t1.is_migration,
t1.is_party)
FROM
member_dict t1
LEFT JOIN member_team_mapping t2 ON t1.id = t2.member_id
LEFT JOIN team_dict t3 ON t2.team_id = t3.id
LEFT JOIN workstation_dict t4 ON t3.station_id = t4.id
LEFT JOIN member_positions t6 ON t1.id = t6.member_id AND t6.delete_date IS NULL
WHERE
t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t4.delete_date IS NULL
<if test="jobStatus != null and jobStatus != ''">
AND t1.job_status = #{jobStatus}
</if>
<if test="teamId != null and teamId != ''">
AND t3.id = #{teamId}
</if>
<if test="province != null and province != ''">
AND t1.province = #{province}
</if>
<if test="stationId != null and stationId != ''">
AND t4.id = #{stationId}
</if>
<if test="userName != null and userName != ''">
and t1.user_name like LIKE concat('%', #{userName}, '%')
</if>
<if test="positionId != null and positionId != ''">
and t6.position_id = #{positionId}
</if>
</select>
<update id="noLeader" parameterType="long">
update team_dict set member_id = null where id = #{id}
</update>
</mapper>
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
<select id="workstations" parameterType="long" resultType="com.laowu.model.WorkstationDictDO"> <select id="workstations" parameterType="long" resultType="com.laowu.model.WorkstationDictDO">
SELECT SELECT
t2.id, t2.id,
t2.workstation_name t2.workstation_name,
t2.province,
t2.city
FROM FROM
workstation_administers t workstation_administers t
LEFT JOIN workstation_dict t2 ON t.workstation_id = t2.id LEFT JOIN workstation_dict t2 ON t.workstation_id = t2.id
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</select> </select>
<select id="homepage" parameterType="long" resultType="com.laowu.vo.team.HomepageVO"> <select id="homepage" parameterType="long" resultType="com.laowu.vo.station.HomepageVO">
SELECT SELECT
t1.workstation_name, t1.workstation_name,
t1.province, t1.province,
......
...@@ -2,22 +2,243 @@ ...@@ -2,22 +2,243 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.laowu.mapper.WorkstationMemberMappingMapper"> <mapper namespace="com.laowu.mapper.WorkstationMemberMappingMapper">
<!-- 通用查询映射结果 --> <select id="memberManagement" resultType="com.laowu.vo.member.MemberManagementVO">
<resultMap id="BaseResultMap" type="com.laowu.model.WorkstationMemberMappingDO"> SELECT DISTINCT
<id column="id" property="id" /> t1.id,
<result column="create_date" property="createDate" /> t1.user_name,
<result column="update_date" property="updateDate" /> t1.id_card_type,
<result column="delete_date" property="deleteDate" /> t1.id_card,
<result column="member_id" property="memberId" /> t1.telephone,
<result column="station_id" property="stationId" /> t1.host_user_name,
</resultMap> t1.host_id_card_type,
t1.host_id_card,
t1.province,
t1.city,
t1.county,
t1.town,
t1.village,
t1.team,
t1.address,
t1.province_now,
t1.city_now,
t1.county_now,
t1.town_now,
t1.village_now,
t1.address_now,
t1.family_cnt,
t1.host_relation,
t1.gender,
t1.age,
t1.nation,
t1.is_party,
t1.education,
t1.health,
t1.is_poor,
t1.monitor_type,
t1.is_migration,
t1.migration_type,
t1.migration_name,
t1.fisherman,
t1.insured,
t1.pension_insurance,
t1.insure_place,
t1.member_type,
t1.labor_ability,
t1.job_status,
t1.job_type,
t1.business_id,
t3.business,
t1.job_age,
t1.year_job_month,
t1.average_salary,
t1.income_statement,
t1.employment_willingness,
t1.province_employment,
t1.city_employment,
t1.employment_training_willingness,
t1.homecoming,
t1.homecoming_date,
t1.homecoming_reason,
t1.comment,
t1.host_last_update,
t1.base_last_update,
t1.employment_last_update,
t1.create_date
FROM
member_dict t1
LEFT JOIN workstation_member_mapping t5 ON t1.id = t5.member_id and t5.delete_date is null
LEFT JOIN workstation_dict t4 ON t5.station_id = t4.id AND t4.delete_date IS NULL
LEFT JOIN member_positions t6 ON t1.id = t6.member_id AND t6.delete_date IS NULL
left join position_dict t7 on t6.position_id = t7.id and t7.delete_date is null
left join position_dict t8 ON t7.parent_id = t8.id and t8.delete_date is null
left join business_dict t3 on t1.business_id = t3.id
left join (SELECT
t.member_id,
t.province,
t.city,
t.county,
t.town,
t.village,
t.job_destination,
t.start_date,
t.end_date,
t.create_date
FROM
member_job_info t
RIGHT JOIN ( SELECT t.member_id, max( t.create_date ) create_date FROM member_job_info t GROUP BY t.member_id ) t2 ON t.member_id = t2.member_id
AND t.create_date = t2.create_date) t9 on t1.id = t9.member_id
left join member_job_info t10 on t1.id = t10.member_id and t10.delete_date is null
WHERE
t1.delete_date IS NULL
<if test="userName != null and userName != ''">
and(t1.user_name like concat('%', #{userName}, '%') or t1.id_card like concat('%', #{userName}, '%') or t1.telephone like concat('%', #{userName}, '%') )
</if>
<if test="province != null and province != ''">
and t1.province = #{province}
</if>
<if test="city != null and city != ''">
and t1.city = #{city}
</if>
<if test="county != null and county != ''">
and t1.county = #{county}
</if>
<if test="town != null and town != ''">
and t1.town = #{town}
</if>
<if test="village != null and village != ''">
and t1.village = #{village}
</if>
<if test="gender != null and gender != ''">
and t1.gender = #{gender}
</if>
<if test="maxAge != null and maxAge != ''">
and t1.age &lt;= #{maxAge}
</if>
<if test="minAge != null and minAge != ''">
and t1.age >= #{minAge}
</if>
<if test="isParty != null and isParty != ''">
and t1.is_party = #{isParty}
</if>
<if test="education != null and education != ''">
and t1.education = #{education}
</if>
<if test="health != null and health != ''">
and t1.health = #{health}
</if>
<if test="provinceNow != null and provinceNow != ''">
and t1.province_now = #{provinceNow}
</if>
<if test="cityNow != null and cityNow != ''">
and t1.city_now = #{cityNow}
</if>
<if test="countyNow != null and countyNow != ''">
and t1.county_now = #{countyNow}
</if>
<if test="townNow != null and townNow != ''">
and t1.town_now = #{townNow}
</if>
<if test="isPoor != null and isPoor != ''">
and t1.is_poor = #{isPoor}
</if>
<if test="monitorType != null and monitorType != ''">
and t1.monitor_type = #{monitorType}
</if>
<if test="isMigration != null and isMigration != ''">
and t1.is_migration = #{isMigration}
</if>
<if test="migrationType != null and migrationType != ''">
and t1.migration_type = #{migrationType}
</if>
<if test="fisherman != null and fisherman != ''">
and t1.fisherman = #{fisherman}
</if>
<if test="insured != null and insured != ''">
and t1.insured = #{insured}
</if>
<if test="pensionInsurance != null and pensionInsurance != ''">
and t1.pension_insurance = #{pensionInsurance}
</if>
<if test="insurePlace != null and insurePlace != ''">
and t1.insure_place = #{insurePlace}
</if>
<if test="memberType != null and memberType != ''">
and t1.member_type = #{memberType}
</if>
<if test="laborAbility != null and laborAbility != ''">
and t1.labor_ability = #{laborAbility}
</if>
<if test="jobStatus != null and jobStatus != ''">
and t1.job_status = #{jobStatus}
</if>
<if test="jobType != null and jobType !=''">
and t1.job_type = #{jobType}
</if>
<if test="provinceJob != null and provinceJob != ''">
and t9.province = #{provinceJob}
</if>
<if test="cityJob != null and cityJob != ''">
and t1.city = #{cityJob}
</if>
<if test="countyJob != null and countyJob != ''">
and t1.county = #{countyJob}
</if>
<if test="townJob != null and townJob != ''">
and t1.town = #{townJob}
</if>
<if test="jobDestination != null and jobDestination != ''">
and t9.job_destination = #{jobDestination}
</if>
<if test="jobsStartDate != null and jobsStartDate != ''">
and DATE_FORMAT( t9.start_date, '%Y-%m-%d' ) >= DATE_FORMAT( #{jobsStartDate}, '%Y-%m-%d' )
</if>
<if test="jobsEndDate != null and jobsEndDate != ''">
and DATE_FORMAT( t9.end_date, '%Y-%m-%d' ) &lt;= DATE_FORMAT( #{jobsEndDate}, '%Y-%m-%d' )
</if>
<if test="businessId != null and businessId != ''">
and t1.business_id = #{businessId}
</if>
<if test="maxAverageSalary != null and maxAverageSalary != ''">
and t1.average_salary &lt;= #{maxAverageSalary}
</if>
<if test="minAverageSalary != null and minAverageSalary != ''">
and t1.average_salary >= #{minAverageSalary}
</if>
<if test="maxJobAge != null and maxJobAge != ''">
and t1.job_age &lt;= #{maxJobAge}
</if>
<if test="minJobAge != null and minJobAge != ''">
and t1.job_age >= #{minJobAge}
</if>
<if test="employmentWillingness != null and employmentWillingness != ''">
and t1.employment_willingness = #{employmentWillingness}
</if>
<if test="provinceEmployment != null and provinceEmployment != ''">
and t1.province_employment = #{provinceEmployment}
</if>
<if test="cityEmployment != null and cityEmployment != ''">
and t1.city_employment = #{cityEmployment}
</if>
<if test="willingBusinessId != null and willingBusinessId != ''">
and t1.willing_business_id #{willingBusinessId}
</if>
<if test="employmentTrainingWillingness != null and employmentTrainingWillingness != ''">
and t1.employment_training_willingness = #{employmentTrainingWillingness}
</if>
<if test="homecoming != null and homecoming !=''">
and t1.homecoming = #{homecoming}
</if>
<if test="stationId != null and stationId != ''">
AND t4.id = #{stationId}
</if>
<if test="positionId != null and positionId != ''">
and ( t7.id = #{positionId} or t7.parent_id = #{positionId} or t8.parent_id = #{positionId} )
</if>
<if test="trainType != null and trainType != ''">
and t10.train_type = #{trainType}
</if>
order by t1.create_date
</select>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, member_id, station_id
</sql>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!