Commit ae12c65a by 涂亚平

第一次上线。

1 parent 75c4b84b
Showing with 1950 additions and 481 deletions
2024-08-08 16:25:04,800 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 -
***************************
APPLICATION FAILED TO START
***************************
Description:
Field memberService in com.subsidy.controller.MemberController required a bean of type 'com.subsidy.service.MemberService' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.subsidy.service.MemberService' in your configuration.
2024-08-08 16:27:32,443 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 -
***************************
APPLICATION FAILED TO START
***************************
Description:
Field memberService in com.subsidy.controller.MemberController required a bean of type 'com.subsidy.service.MemberService' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.subsidy.service.MemberService' in your configuration.
2024-08-26 10:13:31,985 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:244 - Multiple Spring Data modules found, entering strict repository configuration mode!
2024-08-26 10:13:31,991 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:126 - Bootstrapping Spring Data repositories in DEFAULT mode.
2024-08-26 10:13:32,027 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate:182 - Finished Spring Data repository scanning in 24ms. Found 0 repository interfaces.
2024-08-26 10:13:32,323 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$494f2635] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2024-08-26 10:13:32,410 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'redisConfig' of type [com.subsidy.common.configure.RedisConfig$$EnhancerBySpringCGLIB$$4917313c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2024-08-26 10:13:32,675 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 23502 (http)
2024-08-26 10:13:32,685 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-23502"]
2024-08-26 10:13:32,690 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat]
2024-08-26 10:13:32,691 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22]
2024-08-26 10:13:32,695 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4].
2024-08-26 10:13:32,695 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2024-08-26 10:13:32,695 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2024-08-26 10:13:32,697 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023]
2024-08-26 10:13:32,790 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext
2024-08-26 10:13:32,791 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1529 ms
2024-08-26 10:13:32,871 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource
2024-08-26 10:13:33,785 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited
2024-08-26 10:13:34,720 [main] INFO org.quartz.impl.StdSchedulerFactory:1208 - Using default implementation for ThreadExecutor
2024-08-26 10:13:34,731 [main] INFO org.quartz.core.SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2024-08-26 10:13:34,732 [main] INFO org.quartz.core.QuartzScheduler:229 - Quartz Scheduler v.2.3.1 created.
2024-08-26 10:13:34,735 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:672 - Using db table-based data access locking (synchronization).
2024-08-26 10:13:34,736 [main] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:145 - JobStoreCMT initialized.
2024-08-26 10:13:34,737 [main] INFO org.quartz.core.QuartzScheduler:294 - Scheduler meta-data: Quartz Scheduler (v2.3.1) 'schedulerFactoryBean' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered.
2024-08-26 10:13:34,737 [main] INFO org.quartz.impl.StdSchedulerFactory:1362 - Quartz scheduler 'schedulerFactoryBean' initialized from an externally provided properties instance.
2024-08-26 10:13:34,737 [main] INFO org.quartz.impl.StdSchedulerFactory:1366 - Quartz scheduler version: 2.3.1
2024-08-26 10:13:34,737 [main] INFO org.quartz.core.QuartzScheduler:2293 - JobFactory set to: com.subsidy.common.configure.JobFactory@42b4df5a
2024-08-26 10:13:35,245 [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)]
2024-08-26 10:13:35,400 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor'
2024-08-26 10:13:35,992 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler:171 - Initializing ExecutorService 'taskScheduler'
2024-08-26 10:13:36,045 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed
2024-08-26 10:13:36,059 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s)
2024-08-26 10:13:36,084 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references
2024-08-26 10:13:36,222 [main] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:731 - Will start Quartz Scheduler [schedulerFactoryBean] in 1 seconds
2024-08-26 10:13:36,231 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-23502"]
2024-08-26 10:13:36,251 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 23502 (http) with context path ''
2024-08-26 10:13:37,226 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.SchedulerFactoryBean:747 - Starting Quartz Scheduler now, after delay of 1 seconds
2024-08-26 10:13:37,284 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:866 - Freed 0 triggers from 'acquired' / 'blocked' state.
2024-08-26 10:13:37,302 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:876 - Recovering 0 jobs that were in-progress at the time of the last shut-down.
2024-08-26 10:13:37,302 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:889 - Recovery complete.
2024-08-26 10:13:37,310 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:896 - Removed 0 'complete' triggers.
2024-08-26 10:13:37,319 [Quartz Scheduler [schedulerFactoryBean]] INFO org.springframework.scheduling.quartz.LocalDataSourceJobStore:901 - Removed 0 stale fired job entries.
2024-08-26 10:13:37,336 [Quartz Scheduler [schedulerFactoryBean]] INFO org.quartz.core.QuartzScheduler:547 - Scheduler schedulerFactoryBean_$_NON_CLUSTERED started.
2024-07-30 10:15:04,665 [main] ERROR org.apache.catalina.util.LifecycleBase:175 - Failed to start component [Connector[HTTP/1.1-23497]]
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.subsidy.MeishuApplication.main(MeishuApplication.java:22)
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
2024-07-30 10:15:04,683 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 -
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 23497 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 23497, or configure this application to listen on another port.
......@@ -275,7 +275,7 @@
</dependencies>
<build>
<finalName>subsidy-interShip</finalName>
<finalName>subsidy-mate</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.ChangeServiceDTO;
import com.subsidy.model.AdministerDO;
import com.subsidy.service.AdministerService;
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;
......@@ -16,7 +27,38 @@ import io.swagger.annotations.Api;
*/
@RestController
@Api(tags = "管理平台用户")
@RequestMapping("/administer-do")
@RequestMapping("/administer")
public class AdministerController {
@Autowired
private AdministerService administerService;
@PostMapping("/login")
@ApiOperation("登录接口(非中心端登录入口) accountName password")
public ResponseVO login(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.login(administerDO));
}
@PostMapping("/getPermissions")
@ApiOperation("权限查询")
@LoginRequired
public ResponseVO getPermissions() {
return ResponseData.generateCreatedResponse(0, administerService.getPermissions());
}
@PostMapping("auth")
@ApiOperation("授权到应用端免密登录 accountName 用户名 id ")
public ResponseVO qxy(@RequestBody AdministerDO administerDO){
return ResponseData.generateCreatedResponse(0,administerService.auth(administerDO));
}
@PostMapping("changeService")
@ApiOperation("查看账号下的所有伙伴 id 账号id laborServiceName pagSize pageNum")
public ResponseVO changeService(@RequestBody ChangeServiceDTO changeServiceDTO){
return ResponseData.generateCreatedResponse(0,administerService.changeService(changeServiceDTO));
}
}
......@@ -8,15 +8,15 @@ import io.swagger.annotations.Api;
/**
* <p>
* 管理员-项目映射表 前端控制器
* 管理员-伙伴映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-07-30
*/
@RestController
@Api(tags = "管理员-项目映射表")
@RequestMapping("/administer-project-mapping-do")
public class AdministerProjectMappingController {
@Api(tags = "管理员-伙伴映射表")
@RequestMapping("/administer-labor-mapping-do")
public class AdministerLaborMappingController {
}
package com.subsidy.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 2024-07-23
*/
@RestController
@Api(tags = "群组人员映射表")
@RequestMapping("/group-member-mapping-do")
public class GroupMemberMappingController {
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.LaborGroupDictDO;
import com.subsidy.service.LaborGroupDictService;
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 2024-07-23
*/
@RestController
@Api(tags = "伙伴群组字典表")
@RequestMapping("/laborGroupDict")
public class LaborGroupDictController {
@Autowired
private LaborGroupDictService laborGroupDictService;
@PostMapping("allGroups")
@ApiOperation("查看所有群组+人数 laborId")
public ResponseVO allGroups(@RequestBody LaborGroupDictDO laborGroupDictDO){
return ResponseData.generateCreatedResponse(0,laborGroupDictService.allGroups(laborGroupDictDO));
}
@PostMapping("addGroup")
@ApiOperation("添加群组 laborId parentId 父节点id groupName")
public ResponseVO addGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.addGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("updateGroup")
@ApiOperation("修改群组 id groupName")
public ResponseVO updateGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.updateGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("deleteGroup")
@ApiOperation("删除群组 id")
public ResponseVO deleteGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.deleteGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.labor.AbnormalRecordDTO;
import com.subsidy.dto.labor.AddProjectDTO;
import com.subsidy.dto.labor.ProjectManageDTO;
import com.subsidy.dto.labor.ProjectsDTO;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.ProjectDO;
import com.subsidy.model.ProjectMemberMappingDO;
import com.subsidy.service.LaborServiceDictService;
import com.subsidy.vo.labor.ProjectManageVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
......@@ -36,68 +18,5 @@ import io.swagger.annotations.Api;
@RequestMapping("/laborServiceDict")
public class LaborServiceDictController {
@Autowired
private LaborServiceDictService laborServiceDictService;
@PostMapping("login")
@ApiOperation("登录 accountName password ")
public ResponseVO login(@RequestBody AdministerDO administerDO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.login(administerDO));
}
@PostMapping("projects")
@ApiOperation("项目列表 userId 当前用户id projectName pageSize pageNum")
public ResponseVO projects(@RequestBody ProjectsDTO projectsDTO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.projects(projectsDTO));
}
@PostMapping("addProject")
@ApiOperation("添加项目 userId projectName companyId laborServiceId salaryDate startDate endDate")
public ResponseVO addProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.addProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("updateProject")
@ApiOperation("修改项目 id userId projectName companyId laborServiceId salaryDate startDate endDate")
public ResponseVO updateProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.updateProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("deleteProject")
@ApiOperation("删除项目 id userId")
public ResponseVO deleteProject(@RequestBody AddProjectDTO addProjectDTO){
laborServiceDictService.deleteProject(addProjectDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("projectManage")
@ApiOperation("详情--项目管理 projectId 项目id userInfo 姓名或手机号")
public ResponseVO projectManage(@RequestBody ProjectManageDTO projectManageDTO){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.projectManage(projectManageDTO));
}
@PostMapping("updateJobName")
@ApiOperation("id : projectManage接口返回的mappingId jobName 修改职位")
public ResponseVO updateJobName(@RequestBody ProjectMemberMappingDO projectMemberMappingDO){
laborServiceDictService.updateJobName(projectMemberMappingDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("fireMember")
@ApiOperation("操作离职 id : projectManage接口返回的mappingId ")
public ResponseVO fireMember(@RequestBody ProjectMemberMappingDO projectMemberMappingDO){
laborServiceDictService.fireMember(projectMemberMappingDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("abnormalRecord")
@ApiOperation("异动记录 projectId 项目id pageSize pageNum userInfo 姓名或者手机号")
public ResponseVO abnormalRecord(@RequestBody AbnormalRecordDTO abnormalRecordDTO ){
return ResponseData.generateCreatedResponse(0,laborServiceDictService.abnormalRecord(abnormalRecordDTO));
}
}
package com.subsidy.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.administer.DownloadFailMembersDTO;
import com.subsidy.dto.member.AddMemberDTO;
import com.subsidy.dto.member.QueryMembersDTO;
import com.subsidy.model.GroupMemberMappingDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.MemberService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import org.springframework.web.multipart.MultipartFile;
/**
* <p>
......@@ -15,8 +26,58 @@ import io.swagger.annotations.Api;
* @since 2024-07-18
*/
@RestController
@Api(tags = "")
@RequestMapping("/member-do")
@Api(tags = "人才表")
@RequestMapping("/member")
public class MemberController {
@Autowired
private MemberService memberService;
@PostMapping("addMember")
@ApiOperation("添加人才 groupId userName telephone gender idCard payrollAccount bank ")
public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO) {
memberService.addMember(addMemberDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("updateMember")
@ApiOperation("修改 id userName telephone gender idCard payrollAccount bank ")
public ResponseVO updateMember(@RequestBody AddMemberDTO addMemberDTO) {
memberService.updateMember(addMemberDTO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("deleteMember")
@ApiOperation("删除 id ")
public ResponseVO deleteMember(@RequestBody MemberDO memberDO) {
memberService.deleteMember(memberDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("queryMembers")
@ApiOperation("花名册 groupId 组别id userInfo pageSize pageNum ")
public ResponseVO queryMembers(@RequestBody QueryMembersDTO queryMembersDTO) {
return ResponseData.generateCreatedResponse(0, memberService.queryMembers(queryMembersDTO));
}
@PostMapping("detail")
@ApiOperation("花名册--详情 memberId 人才id")
public ResponseVO detail(@RequestBody GroupMemberMappingDO groupMemberMappingDO){
return ResponseData.generateCreatedResponse(0, memberService.detail(groupMemberMappingDO));
}
@PostMapping("importMember")
@ApiOperation("导入学生 {groupId file}" +
"模板地址:https://ykhl-bigger.oss-cn-beijing.aliyuncs.com/%E4%BA%BA%E6%89%8D%E6%A8%A1%E6%9D%BF.xlsx")
// @LoginRequired
public ResponseVO importMember(Long groupId, @RequestParam("file") MultipartFile file) throws Exception {
return ResponseData.generateCreatedResponse(0, memberService.importMember(groupId, file));
}
@PostMapping("downloadFailMembers")
@ApiOperation("下载失败的学员 importMemberVOS[] 字段是导出失败的字段")
public void downloadFailMembers(@RequestBody DownloadFailMembersDTO downloadFailMembersDTO){
memberService.downloadFailMembers(downloadFailMembersDTO);
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
import com.subsidy.service.ProductDictService;
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 2024-07-30
*/
@RestController
@Api(tags = "产品管理字典表")
@RequestMapping("/productDict")
public class ProductDictController {
@Autowired
private ProductDictService productDictService;
@PostMapping("allProducts")
@ApiOperation("查看所有产品 productName pageSize pageNum productType 0:企业产品 1:院校产品 2:伙伴产品 groundingStatus" )
public ResponseVO allProducts(@RequestBody AllProductsDTO allProductsDTO){
return ResponseData.generateCreatedResponse(0,productDictService.allProducts(allProductsDTO));
}
@PostMapping("frontPage")
@ApiOperation("首页展示产品 productType 0:企业产品 1:院校产品 2:伙伴产品 ")
public ResponseVO frontPage(@RequestBody ProductDictDO productDictDO){
return ResponseData.generateCreatedResponse(0,productDictService.frontPage(productDictDO));
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.AdministerLaborMappingDO;
import com.subsidy.service.ServiceAdministerMappingService;
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 2024-07-30
*/
@RestController
@Api(tags = "应用账户-业务映射表")
@RequestMapping("/serviceAdministerMapping")
public class ServiceAdministerMappingController {
@Autowired
private ServiceAdministerMappingService serviceAdministerMappingService;
@PostMapping("administerServices")
@ApiOperation("查看某个人所有的服务 administerId laborId")
public ResponseVO administerServices(@RequestBody AdministerLaborMappingDO administerLaborMappingDO){
return ResponseData.generateCreatedResponse(0,serviceAdministerMappingService.administerServices(administerLaborMappingDO));
}
}
package com.subsidy.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 2024-07-30
*/
@RestController
@Api(tags = "业务管理字典表")
@RequestMapping("/service-dict-do")
public class ServiceDictController {
}
package com.subsidy.dto.administer;
import lombok.Data;
@Data
public class ChangeServiceDTO {
private String laborServiceName;
private Integer pageSize;
private Integer pageNum;
private Long id;
}
package com.subsidy.dto.administer;
import lombok.Data;
import java.util.List;
@Data
public class DownloadFailMembersDTO {
private List<ImportMemberVO> importMemberVOS;
}
package com.subsidy.dto.administer;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
@Data
public class ImportMemberVO {
@ExcelColumn(value = "姓名", col = 1)
private String userName;
@ExcelColumn(value = "手机号", col = 2)
private String telephone;
@ExcelColumn(value = "身份证号码", col = 3)
private String idCard;
@ExcelColumn(value = "性别(男/女)", col = 4)
private String gender;
@ExcelColumn(value = "工资账户", col = 5)
private String payrollAccount;
@ExcelColumn(value = "开户行", col = 6)
private String bank;
@ExcelColumn(value = "原因", col = 7)
private String reason;
}
package com.subsidy.dto.member;
import lombok.Data;
@Data
public class AddMemberDTO {
private Long id;
private Long groupId;
/**
* 姓名
*/
private String userName;
/**
* 手机号
*/
private String telephone;
/**
* 性别
*/
private String gender;
/**
* 身份证号
*/
private String idCard;
/**
* 工资账户
*/
private String payrollAccount;
/**
* 开户行
*/
private String bank;
/**
* 0:学生 2:职工 3:人才
*/
private Integer memberType;
/**
* 微信的openId
*/
private String openId;
}
package com.subsidy.dto.member;
import com.subsidy.util.excel.ExcelColumnUtil;
import lombok.Data;
@Data
public class ImportMemberDTO {
@ExcelColumnUtil(value = "姓名", col = 1)
private String userName;
@ExcelColumnUtil(value = "手机号", col = 2)
private String telephone;
@ExcelColumnUtil(value = "身份证号码", col = 3)
private String idCard;
@ExcelColumnUtil(value = "性别(男/女)", col = 4)
private String gender;
@ExcelColumnUtil(value = "工资账户", col = 5)
private String payrollAccount;
@ExcelColumnUtil(value = "开户行", col = 6)
private String bank;
}
package com.subsidy.dto.member;
import lombok.Data;
@Data
public class QueryMembersDTO {
private Integer pageSize;
private Integer pageNum;
private Long groupId;
private String userInfo;
}
package com.subsidy.dto.product;
import lombok.Data;
@Data
public class AllProductsDTO {
private Integer pageSize;
private Integer pageNum;
private String productName;
private Integer productType;
private String groundingStatus;
}
package com.subsidy.mapper;
import com.subsidy.model.AdministerLaborMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 管理员-伙伴映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Repository
public interface AdministerLaborMappingMapper extends BaseMapper<AdministerLaborMappingDO> {
}
package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.AdministerDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.model.LaborServiceDictDO;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.vo.administer.PermissionsVO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 管理平台用户 Mapper 接口
......@@ -12,7 +18,14 @@ import org.springframework.stereotype.Repository;
* @author Tuyp
* @since 2024-07-18
*/
@Repository
@Repository
public interface AdministerMapper extends BaseMapper<AdministerDO> {
List<PermissionsVO> getPermissions(Long id);
IPage<LaborServiceDictDO> administerLabors(IPage page,Long administerId,String laborServiceName);
List<ServiceDictDO> administerServices(Long administerId);
}
package com.subsidy.mapper;
import com.subsidy.model.GroupMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.labor.AllGroupsVO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 群组人员映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@Repository
public interface GroupMemberMappingMapper extends BaseMapper<GroupMemberMappingDO> {
/**
* 查群组父节点的名称和人数
*/
AllGroupsVO parentCnt(Long laborId);
/**
* 查群组子节点的名称和人数
*/
List<AllGroupsVO> childCnt(Long laborId);
}
package com.subsidy.mapper;
import com.subsidy.model.LaborGroupDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.labor.AllGroupsVO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 伙伴群组字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@Repository
public interface LaborGroupDictMapper extends BaseMapper<LaborGroupDictDO> {
List<AllGroupsVO> allGroups(Long laborId);
Long getProjectId(Long groupId);
}
......@@ -19,10 +19,4 @@ import org.springframework.stereotype.Repository;
@Repository
public interface LaborServiceDictMapper extends BaseMapper<LaborServiceDictDO> {
IPage<ProjectsVO> projects(IPage iPage,String projectName, Long administerId);
IPage<ProjectManageVO> projectManage(IPage iPage, Long projectId, String userInfo);
IPage<AbnormalRecordVO> abnormalRecord(IPage page, Long projectId, String userInfo);
}
package com.subsidy.mapper;
import com.subsidy.model.MemberDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.MemberDO;
import com.subsidy.vo.member.QueryMembersVO;
import org.springframework.stereotype.Repository;
/**
......@@ -12,7 +14,16 @@ import org.springframework.stereotype.Repository;
* @author Tuyp
* @since 2024-07-18
*/
@Repository
@Repository
public interface MemberMapper extends BaseMapper<MemberDO> {
IPage<QueryMembersVO> queryMembers(IPage iPage, Long groupId,String userInfo);
/**
* 查看该人才是否已经存在
*/
int checkTalentMember(String idCard,String telephone,Long id);
int checkMember(String idCard,String telephone);
}
package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.ProductDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 产品管理字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Repository
public interface ProductDictMapper extends BaseMapper<ProductDictDO> {
IPage<ProductDictDO> allProducts(IPage iPage, String productName, Integer productType,String groundingStatus);
}
......@@ -2,6 +2,7 @@ package com.subsidy.mapper;
import com.subsidy.model.ProjectMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.member.DetailVO;
import org.springframework.stereotype.Repository;
import java.util.List;
......@@ -17,4 +18,9 @@ import java.util.List;
@Repository
public interface ProjectMemberMappingMapper extends BaseMapper<ProjectMemberMappingDO> {
/**
* 查看某个人的入职记录
*/
List<DetailVO> detail(Long memberId);
}
package com.subsidy.mapper;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 应用账户-业务映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Repository
public interface ServiceAdministerMappingMapper extends BaseMapper<ServiceAdministerMappingDO> {
}
package com.subsidy.mapper;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.model.ServiceDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 管理员-项目映射表 Mapper 接口
* 业务管理字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-07-30
*/
@Repository
public interface AdministerProjectMappingMapper extends BaseMapper<AdministerProjectMappingDO> {
public interface ServiceDictMapper extends BaseMapper<ServiceDictDO> {
}
......@@ -74,4 +74,5 @@ public class AdministerDO extends BaseModel {
private String remark;
private Long laborId;
}
......@@ -9,16 +9,16 @@ import lombok.EqualsAndHashCode;
/**
* <p>
* 管理员-项目映射表
* 管理员-伙伴映射表
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-07-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("administer_project_mapping")
public class AdministerProjectMappingDO extends BaseModel {
@TableName("administer_labor_mapping")
public class AdministerLaborMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
......@@ -27,7 +27,7 @@ public class AdministerProjectMappingDO extends BaseModel {
private Long administerId;
private Long projectId;
private Long laborId;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 群组人员映射表
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("group_member_mapping")
public class GroupMemberMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long groupId;
private Long memberId;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 伙伴群组字典表
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("labor_group_dict")
public class LaborGroupDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long parentId;
private Long laborId;
private String groupName;
}
......@@ -27,5 +27,10 @@ public class LaborServiceDictDO extends BaseModel {
private String laborServiceName;
private String shortName;
private String location;
private String serviceCode;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author Tuyp
* @since 2024-08-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("member_role")
public class MemberRoleDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long memberId;
/**
* 0:学生 2:职工 3:人才
*/
private Integer roleType;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 产品管理字典表
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("product_dict")
public class ProductDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 产品名称
*/
private String productName;
/**
* 产品图标
*/
private String productLogo;
/**
* 产品描述
*/
private String productDesc;
/**
* 联系方式
*/
private String contactInfo;
private String groundingStatus;
/**
* 高亮
*/
private String highlightTag;
/**
* 排序
*/
private Integer orderNo;
/**
* 是否展示首页 1:展示在首页,0:不展示在首页
*/
private Integer frontPage;
/**
* 0:企业产品 1:院校产品
*/
private Integer productType;
}
......@@ -41,6 +41,11 @@ public class ProjectMemberMappingDO extends BaseModel {
private String jobName;
/**
* 工资
*/
private String salary;
/**
* 排序
*/
private Integer orderNo;
......
......@@ -31,9 +31,9 @@ public class ProjectSalaryHistoryDO extends BaseModel {
private Long memberId;
/**
* 项目id
* 映射id
*/
private Long projectId;
private Long projectMappingId;
/**
* 工资
......@@ -46,6 +46,16 @@ public class ProjectSalaryHistoryDO extends BaseModel {
private String salaryMark;
/**
* 发放时间
*/
private String salaryDate;
/**
* 几月工资
*/
private String salaryMonth;
/**
* 开户行
*/
private String bank;
......@@ -55,5 +65,9 @@ public class ProjectSalaryHistoryDO extends BaseModel {
*/
private String payrollAccount;
/**
* 提交状态 1已提交 - 0未提交
*/
private Integer commitStatus;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 应用账户-业务映射表
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_administer_mapping")
public class ServiceAdministerMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long administerId;
private Long serviceId;
}
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 业务管理字典表
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_dict")
public class ServiceDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 业务名称
*/
private String serviceName;
}
package com.subsidy.service;
import com.subsidy.model.AdministerLaborMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 管理员-伙伴映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
public interface AdministerLaborMappingService extends IService<AdministerLaborMappingDO> {
}
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.administer.ChangeServiceDTO;
import com.subsidy.model.AdministerDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.LaborServiceDictDO;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.vo.administer.AdministerPermissionVO;
import com.subsidy.vo.administer.AuthVO;
import com.subsidy.vo.labor.LoginVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +22,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface AdministerService extends IService<AdministerDO> {
LoginVO login(AdministerDO administerDO);
AdministerPermissionVO getPermissions();
AuthVO auth(AdministerDO administerDO);
IPage<LaborServiceDictDO> changeService(ChangeServiceDTO changeServiceDTO);
}
package com.subsidy.service;
import com.subsidy.model.GroupMemberMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 群组人员映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
public interface GroupMemberMappingService extends IService<GroupMemberMappingDO> {
}
package com.subsidy.service;
import com.subsidy.model.LaborGroupDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.labor.AllGroupsVO;
import java.util.List;
/**
* <p>
* 伙伴群组字典表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
public interface LaborGroupDictService extends IService<LaborGroupDictDO> {
AllGroupsVO allGroups(LaborGroupDictDO laborGroupDictDO);
void addGroup(LaborGroupDictDO laborGroupDictDO);
void updateGroup(LaborGroupDictDO laborGroupDictDO);
void deleteGroup(LaborGroupDictDO laborGroupDictDO);
}
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.common.configure.VODConfig;
import com.subsidy.dto.labor.AbnormalRecordDTO;
import com.subsidy.dto.labor.AddProjectDTO;
import com.subsidy.dto.labor.ProjectManageDTO;
import com.subsidy.dto.labor.ProjectsDTO;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.LaborServiceDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.ProjectDO;
import com.subsidy.model.ProjectMemberMappingDO;
import com.subsidy.vo.labor.AbnormalRecordVO;
import com.subsidy.vo.labor.LoginVO;
import com.subsidy.vo.labor.ProjectManageVO;
import com.subsidy.vo.labor.ProjectsVO;
import com.subsidy.model.LaborServiceDictDO;
/**
* <p>
......@@ -27,21 +14,4 @@ import com.subsidy.vo.labor.ProjectsVO;
public interface LaborServiceDictService extends IService<LaborServiceDictDO> {
LoginVO login(AdministerDO administerDO);
IPage<ProjectsVO> projects(ProjectsDTO projectsDTO);
void addProject(AddProjectDTO addProjectDTO);
void updateProject(AddProjectDTO addProjectDTO);
void deleteProject(AddProjectDTO addProjectDTO);
IPage<ProjectManageVO> projectManage(ProjectManageDTO projectManageDTO);
void updateJobName(ProjectMemberMappingDO projectMemberMappingDO);
void fireMember(ProjectMemberMappingDO projectMemberMappingDO);
IPage<AbnormalRecordVO> abnormalRecord(AbnormalRecordDTO abnormalRecordDTO);
}
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.administer.DownloadFailMembersDTO;
import com.subsidy.dto.member.AddMemberDTO;
import com.subsidy.dto.member.QueryMembersDTO;
import com.subsidy.model.GroupMemberMappingDO;
import com.subsidy.model.MemberDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.member.DetailVO;
import com.subsidy.vo.member.ImportMemberResultVO;
import com.subsidy.vo.member.QueryMembersVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* <p>
......@@ -13,4 +24,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface MemberService extends IService<MemberDO> {
void addMember(AddMemberDTO addMemberDTO);
void updateMember(AddMemberDTO addMemberDTO);
void deleteMember(MemberDO memberDO);
IPage<QueryMembersVO> queryMembers(QueryMembersDTO queryMembersDTO);
List<DetailVO> detail(GroupMemberMappingDO groupMemberMappingDO);
ImportMemberResultVO importMember(Long companyId, MultipartFile multipartFile)throws Exception;
void downloadFailMembers(DownloadFailMembersDTO downloadFailMembersDTO);
}
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 产品管理字典表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
public interface ProductDictService extends IService<ProductDictDO> {
IPage<ProductDictDO> allProducts(AllProductsDTO allProductsDTO);
List<ProductDictDO> frontPage(ProductDictDO productDictDO);
}
package com.subsidy.service;
import com.subsidy.model.AdministerLaborMappingDO;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.vo.administer.AdministerServicesVO;
import java.util.List;
/**
* <p>
* 应用账户-业务映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
public interface ServiceAdministerMappingService extends IService<ServiceAdministerMappingDO> {
List<ServiceDictDO> administerServices(AdministerLaborMappingDO administerLaborMappingDO);
}
package com.subsidy.service;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.model.ServiceDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 管理员-项目映射表 服务类
* 业务管理字典表 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-07-30
*/
public interface AdministerProjectMappingService extends IService<AdministerProjectMappingDO> {
public interface ServiceDictService extends IService<ServiceDictDO> {
}
package com.subsidy.service.impl;
import com.subsidy.model.AdministerLaborMappingDO;
import com.subsidy.mapper.AdministerLaborMappingMapper;
import com.subsidy.service.AdministerLaborMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 管理员-伙伴映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Service
public class AdministerLaborMappingServiceImpl extends ServiceImpl<AdministerLaborMappingMapper, AdministerLaborMappingDO> implements AdministerLaborMappingService {
}
package com.subsidy.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.subsidy.common.exception.HttpException;
import com.subsidy.dto.administer.ChangeServiceDTO;
import com.subsidy.mapper.LaborGroupDictMapper;
import com.subsidy.mapper.LaborServiceDictMapper;
import com.subsidy.mapper.ServiceDictMapper;
import com.subsidy.model.AdministerDO;
import com.subsidy.mapper.AdministerMapper;
import com.subsidy.model.LaborServiceDictDO;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.service.AdministerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.util.JwtUtil;
import com.subsidy.util.Localstorage;
import com.subsidy.util.SecretUtils;
import com.subsidy.vo.administer.AdministerPermissionVO;
import com.subsidy.vo.administer.AuthVO;
import com.subsidy.vo.administer.PermissionsVO;
import com.subsidy.vo.labor.LoginVO;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.impl.client.CloseableHttpClient;
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>
* 管理平台用户 服务实现类
......@@ -17,4 +42,121 @@ import org.springframework.stereotype.Service;
@Service
public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, AdministerDO> implements AdministerService {
@Autowired
private LaborServiceDictMapper laborServiceDictMapper;
public LoginVO login(AdministerDO administerDO) {
LoginVO loginVO = new LoginVO();
List<Integer> integers = new ArrayList<>();
integers.add(0);
integers.add(6);
integers.add(7);
AdministerDO administerDO1 = this.baseMapper.selectOne(new QueryWrapper<AdministerDO>()
.lambda()
.eq(AdministerDO::getAccountName, administerDO.getAccountName())
.in(AdministerDO::getRole, integers));
if (null == administerDO1) {
throw new HttpException(10012);
}
if ("0".equals(administerDO1.getStatus())) {
throw new HttpException(10013);
}
if (administerDO1.getPassword().equals(administerDO.getPassword())) {
String token = JwtUtil.generateToken(administerDO1.getId(), ConstantUtils.ADMINISTER_TERMINATE);
loginVO.setToken(token);
return loginVO;
}else {
throw new HttpException(10029);
}
}
public AdministerPermissionVO getPermissions() {
AdministerPermissionVO administerPermissionVO = new AdministerPermissionVO();
AdministerDO administerDO = (AdministerDO) Localstorage.getUser();
if (administerDO == null) {
throw new HttpException(10012);
}
BeanUtils.copyProperties(administerDO, administerPermissionVO);
List<PermissionsVO> list = this.baseMapper.getPermissions(administerDO.getId());
List<PermissionsVO> treeList = new ArrayList();
if (list != null) {
list.forEach(permission -> {
if (permission.getParentId() == null) {
treeList.add(permission);
}
list.forEach(p -> {
if (null != p.getParentId() && p.getParentId().equals(permission.getId())) {
if (permission.getChildren() == null) {
permission.setChildren(new ArrayList<>());
}
permission.getChildren().add(p);
}
});
});
}
administerPermissionVO.setPermissions(treeList);
administerPermissionVO.setTelephone(administerDO.getTelephone());
administerPermissionVO.setAccountName(administerDO.getAccountName());
return administerPermissionVO;
}
public AuthVO auth(AdministerDO administerDO){
CloseableHttpClient client = null;
CloseableHttpResponse response = null;
String resValue = "";
// long timestamp = System.currentTimeMillis();
// String nonce = SecretUtils.getNonce(5);
// String appId = subsidyConfig.getAppId();
//
// String appKey = subsidyConfig.getSecurityKey();
// String accountName = administerDO.getAccountName();
//鉴权逻辑 对不对
String preAuthen = "appId=qxywz5nnWMI7ABCS"
+"&id="+administerDO.getId()
+"&accountName="+administerDO.getAccountName()
+ "&appSecret=626737T1-65K0-5xC2-0Y0V-2Aq9QUAJ";
String signature = SecretUtils.getMD5String(preAuthen);
try {
AuthVO qxyVO = new AuthVO();
qxyVO.setToken(signature);
return qxyVO;
// }
} catch (Exception e) {
e.printStackTrace();
}
return new AuthVO();
}
public IPage<LaborServiceDictDO> changeService(ChangeServiceDTO changeServiceDTO) {
Page pager = new Page(changeServiceDTO.getPageNum(), changeServiceDTO.getPageSize());
AdministerDO administerDO = this.baseMapper.selectById(changeServiceDTO.getId());
if (6 == administerDO.getRole()){
return laborServiceDictMapper.selectPage(pager,new QueryWrapper<LaborServiceDictDO>()
.lambda()
.eq(LaborServiceDictDO::getId,administerDO.getLaborId()));
}else if (0== administerDO.getRole()){
return laborServiceDictMapper.selectPage(pager,null);
}
else {
return this.baseMapper.administerLabors(pager,changeServiceDTO.getId(),changeServiceDTO.getLaborServiceName());
}
}
}
package com.subsidy.service.impl;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.mapper.AdministerProjectMappingMapper;
import com.subsidy.service.AdministerProjectMappingService;
import com.subsidy.model.GroupMemberMappingDO;
import com.subsidy.mapper.GroupMemberMappingMapper;
import com.subsidy.service.GroupMemberMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 管理员-项目映射表 服务实现类
* 群组人员映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-07-23
*/
@Service
public class AdministerProjectMappingServiceImpl extends ServiceImpl<AdministerProjectMappingMapper, AdministerProjectMappingDO> implements AdministerProjectMappingService {
public class GroupMemberMappingServiceImpl extends ServiceImpl<GroupMemberMappingMapper, GroupMemberMappingDO> implements GroupMemberMappingService {
}
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.common.exception.HttpException;
import com.subsidy.mapper.GroupMemberMappingMapper;
import com.subsidy.model.GroupMemberMappingDO;
import com.subsidy.model.LaborGroupDictDO;
import com.subsidy.mapper.LaborGroupDictMapper;
import com.subsidy.service.GroupMemberMappingService;
import com.subsidy.service.LaborGroupDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.labor.AllGroupsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 伙伴群组字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@Service
public class LaborGroupDictServiceImpl extends ServiceImpl<LaborGroupDictMapper, LaborGroupDictDO> implements LaborGroupDictService {
@Autowired
private GroupMemberMappingMapper groupMemberMappingMapper;
public AllGroupsVO allGroups(LaborGroupDictDO laborGroupDictDO) {
//父节点的人数不包含子节点的人数
AllGroupsVO parentCnt = groupMemberMappingMapper.parentCnt(laborGroupDictDO.getLaborId());
//子节点人数
List<AllGroupsVO> childCnt = groupMemberMappingMapper.childCnt(laborGroupDictDO.getLaborId());
parentCnt.setAllGroupsVOS(childCnt);
return parentCnt;
}
public void addGroup(LaborGroupDictDO laborGroupDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<LaborGroupDictDO>()
.lambda()
.eq(LaborGroupDictDO::getLaborId, laborGroupDictDO.getLaborId())
.eq(LaborGroupDictDO::getGroupName, laborGroupDictDO.getGroupName()));
if (count > 0) {
throw new HttpException(31003);
}
this.baseMapper.insert(laborGroupDictDO);
}
public void updateGroup(LaborGroupDictDO laborGroupDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<LaborGroupDictDO>()
.lambda()
.eq(LaborGroupDictDO::getLaborId, laborGroupDictDO.getLaborId())
.eq(LaborGroupDictDO::getGroupName, laborGroupDictDO.getGroupName())
.ne(LaborGroupDictDO::getId, laborGroupDictDO.getId()));
if (count > 0) {
throw new HttpException(31003);
}
this.baseMapper.updateById(laborGroupDictDO);
}
public void deleteGroup(LaborGroupDictDO laborGroupDictDO){
//删除前确认群组下是否有人
int count = groupMemberMappingMapper.selectCount(new QueryWrapper<GroupMemberMappingDO>()
.lambda()
.eq(GroupMemberMappingDO::getGroupId,laborGroupDictDO.getId()));
if (count > 0){
throw new HttpException(31004);
}
this.baseMapper.deleteById(laborGroupDictDO.getId());
}
}
package com.subsidy.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.subsidy.common.exception.HttpException;
import com.subsidy.dto.labor.AbnormalRecordDTO;
import com.subsidy.dto.labor.AddProjectDTO;
import com.subsidy.dto.labor.ProjectManageDTO;
import com.subsidy.dto.labor.ProjectsDTO;
import com.subsidy.mapper.*;
import com.subsidy.model.*;
import com.subsidy.service.LaborServiceDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.service.ProjectService;
import com.subsidy.vo.labor.AbnormalRecordVO;
import com.subsidy.vo.labor.LoginVO;
import com.subsidy.vo.labor.ProjectManageVO;
import com.subsidy.vo.labor.ProjectsVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.subsidy.mapper.LaborServiceDictMapper;
import com.subsidy.model.LaborServiceDictDO;
import com.subsidy.service.LaborServiceDictService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 劳务公司字典表 服务实现类
......@@ -35,110 +17,5 @@ import java.util.List;
@Service
public class LaborServiceDictServiceImpl extends ServiceImpl<LaborServiceDictMapper, LaborServiceDictDO> implements LaborServiceDictService {
@Autowired
private AdministerMapper administerMapper;
@Autowired
private ProjectMapper projectMapper;
@Autowired
private AdministerProjectMappingMapper administerProjectMappingMapper;
@Autowired
private ProjectMemberMappingMapper projectMemberMappingMapper;
public LoginVO login(AdministerDO administerDO) {
LoginVO loginVO = new LoginVO();
List<Long> longs = new ArrayList<>();
longs.add(6L);
longs.add(7L);
AdministerDO administerDO1 = administerMapper.selectOne(new QueryWrapper<AdministerDO>()
.lambda()
.eq(AdministerDO::getAccountName, administerDO.getAccountName())
.in(AdministerDO::getRole, longs));
BeanUtils.copyProperties(administerDO1, loginVO);
return loginVO;
}
public IPage<ProjectsVO> projects(ProjectsDTO projectsDTO) {
Page page = new Page(projectsDTO.getPageNum(), projectsDTO.getPageSize());
IPage<ProjectsVO> projects = this.baseMapper.projects(page, projectsDTO.getProjectName(), projectsDTO.getUserId());
return projects;
}
public void addProject(AddProjectDTO addProjectDTO) {
int count = projectMapper.selectCount(new QueryWrapper<ProjectDO>()
.lambda()
.eq(ProjectDO::getCompanyId, addProjectDTO.getCompanyId())
.eq(ProjectDO::getLaborServiceId, addProjectDTO.getLaborServiceId())
.eq(ProjectDO::getProjectName, addProjectDTO.getProjectName()));
if (count > 0) {
throw new HttpException(31002);
}
ProjectDO projectDO = new ProjectDO();
BeanUtils.copyProperties(addProjectDTO, projectDO);
projectMapper.insert(projectDO);
//添加管理员账户映射关系
AdministerProjectMappingDO administerProjectMappingDO = new AdministerProjectMappingDO();
administerProjectMappingDO.setProjectId(projectDO.getId());
administerProjectMappingDO.setAdministerId(addProjectDTO.getUserId());
administerProjectMappingMapper.insert(administerProjectMappingDO);
}
public void updateProject(AddProjectDTO addProjectDTO) {
int count = projectMapper.selectCount(new QueryWrapper<ProjectDO>()
.lambda()
.eq(ProjectDO::getCompanyId, addProjectDTO.getCompanyId())
.eq(ProjectDO::getLaborServiceId, addProjectDTO.getLaborServiceId())
.eq(ProjectDO::getProjectName, addProjectDTO.getProjectName())
.ne(ProjectDO::getId, addProjectDTO.getId()));
if (count > 0) {
throw new HttpException(31002);
}
ProjectDO projectDO = new ProjectDO();
BeanUtils.copyProperties(addProjectDTO, projectDO);
projectMapper.updateById(projectDO);
}
public void deleteProject(AddProjectDTO addProjectDTO) {
projectMapper.deleteById(addProjectDTO.getId());
administerProjectMappingMapper.delete(new QueryWrapper<AdministerProjectMappingDO>()
.lambda()
.eq(AdministerProjectMappingDO::getAdministerId, addProjectDTO.getUserId())
.eq(AdministerProjectMappingDO::getProjectId, addProjectDTO.getId()));
}
public IPage<ProjectManageVO> projectManage(ProjectManageDTO projectManageDTO) {
Page page = new Page(projectManageDTO.getPageNum(), projectManageDTO.getPageSize());
return this.baseMapper.projectManage(page, projectManageDTO.getProjectId(), projectManageDTO.getUserInfo());
}
public void updateJobName(ProjectMemberMappingDO projectMemberMappingDO) {
projectMemberMappingMapper.updateById(projectMemberMappingDO);
}
public void fireMember(ProjectMemberMappingDO projectMemberMappingDO) {
projectMemberMappingMapper.deleteById(projectMemberMappingDO.getId());
}
public IPage<AbnormalRecordVO> abnormalRecord(AbnormalRecordDTO abnormalRecordDTO) {
Page page = new Page(abnormalRecordDTO.getPageNum(), abnormalRecordDTO.getPageSize());
return this.baseMapper.abnormalRecord(page,abnormalRecordDTO.getProjectId(),abnormalRecordDTO.getUserInfo());
}
}
package com.subsidy.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.subsidy.dto.product.AllProductsDTO;
import com.subsidy.mapper.ProductDictMapper;
import com.subsidy.model.ProductDictDO;
import com.subsidy.service.ProductDictService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 产品管理字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Service
public class ProductDictServiceImpl extends ServiceImpl<ProductDictMapper, ProductDictDO> implements ProductDictService {
public IPage<ProductDictDO> allProducts(AllProductsDTO allProductsDTO) {
Page pager = new Page(allProductsDTO.getPageNum(), allProductsDTO.getPageSize());
return this.baseMapper.allProducts(pager, allProductsDTO.getProductName(), allProductsDTO.getProductType(),allProductsDTO.getGroundingStatus());
}
public List<ProductDictDO> frontPage(ProductDictDO productDictDO) {
return this.baseMapper.selectList(new QueryWrapper<ProductDictDO>()
.lambda()
.eq(ProductDictDO::getFrontPage, 1)
.eq(ProductDictDO::getProductType, productDictDO.getProductType())
.orderByDesc(ProductDictDO::getCreateDate));
}
}
package com.subsidy.service.impl;
import com.subsidy.mapper.AdministerMapper;
import com.subsidy.mapper.ServiceDictMapper;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.AdministerLaborMappingDO;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.subsidy.mapper.ServiceAdministerMappingMapper;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.service.ServiceAdministerMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.administer.AdministerServicesVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 应用账户-业务映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Service
public class ServiceAdministerMappingServiceImpl extends ServiceImpl<ServiceAdministerMappingMapper, ServiceAdministerMappingDO> implements ServiceAdministerMappingService {
@Autowired
private AdministerMapper administerMapper;
@Autowired
private ServiceDictMapper serviceDictMapper;
public List<ServiceDictDO> administerServices(AdministerLaborMappingDO administerLaborMappingDO) {
List<ServiceDictDO> serviceDictDOS = administerMapper.administerServices(administerLaborMappingDO.getAdministerId());
AdministerDO administerDO = administerMapper.selectById(administerLaborMappingDO.getAdministerId());
if (administerDO.getRole()==6 || administerDO.getRole() ==7){
//如果是伙伴账户的话,就把也返回
ServiceDictDO serviceDictDO = serviceDictMapper.selectById(5);
serviceDictDOS.add(serviceDictDO);
}
return serviceDictDOS;
}
}
package com.subsidy.service.impl;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.mapper.ServiceDictMapper;
import com.subsidy.service.ServiceDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 业务管理字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-30
*/
@Service
public class ServiceDictServiceImpl extends ServiceImpl<ServiceDictMapper, ServiceDictDO> implements ServiceDictService {
}
package com.subsidy.vo.administer;
import lombok.Data;
import java.util.List;
@Data
public class AdministerPermissionVO {
private Long id;
private String userName;
private Integer role;
private String img;
private Boolean isRole;
private String companyName;
private String telephone;
private String accountName;
private String shortName;
private List<PermissionsVO> permissions;
// private List<GetAllCompanyVO> getAllCompanyVOS;
}
package com.subsidy.vo.administer;
import lombok.Data;
@Data
public class AdministerServicesVO {
private Long id;
private String serviceName;
private Long serviceCompanyId;
}
package com.subsidy.vo.administer;
import lombok.Data;
@Data
public class AuthVO {
private String token;
}
package com.subsidy.vo.administer;
import lombok.Data;
import java.util.List;
@Data
public class PermissionsVO {
private Long id;
private Long parentId;
private String name;
private List<PermissionsVO> children;
}
package com.subsidy.vo.labor;
import lombok.Data;
import java.util.List;
@Data
public class AllGroupsVO {
private Long id;
private String groupName;
private Integer cnt;
private List<AllGroupsVO> allGroupsVOS;
}
package com.subsidy.vo.labor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
@Data
public class LoginVO {
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 公司名称
*/
private Long companyId;
/**
* 账号
*/
private String accountName;
/**
* 手机号/企业账号
*/
private String telephone;
/**
* 成员名称
*/
private String userName;
/**
* 头像
*/
private String img;
/**
* 1:启用 0:禁用
*/
private String status;
/**
* role 0:平台运营者 1:超级管理员 2:普通成员
*/
private Integer role;
/**
* 备注
*/
private String remark;
private String token;
}
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class DetailVO {
private Long id;
private String projectName;
private String jobName;
private String hireTime;
}
package com.subsidy.vo.member;
import com.subsidy.dto.administer.ImportMemberVO;
import lombok.Data;
import java.util.List;
@Data
public class ImportMemberResultVO {
private List<ImportMemberVO> importMemberVOS;
private Integer successCount;
private Integer failCount;
}
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class QueryMembersVO {
private Long mappingId;
private Long id;
private String userName;
private String gender;
private String telephone;
private String idCard;
private String payrollAccount;
private String bank;
private String wechatStatus;
private String fireStatus;
}
# 本地环境配置
spring.server.port=23497
spring.server.port=23502
# 数据源配置
#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 生产环境配置
spring.server.port=23497
spring.server.port=23502
# 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 环境配置 顶岗实习
spring.profiles.active=dev
# 环境配置 服务端
spring.profiles.active=prod
#和CPU数
spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100
......
......@@ -83,3 +83,5 @@ meishu.code-message[20003]=提交时间过短,请稍后尝试
meishu.code-message[30002]=该产品已存在
meishu.code-message[31001]=该类别已存在
meishu.code-message[31002]=该项目已存在
meishu.code-message[31003]=该群组已存在
meishu.code-message[31004]=该群组下还有成员,无法删除
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.AdministerLaborMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.AdministerLaborMappingDO">
<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="administer_id" property="administerId" />
<result column="labor_id" property="laborId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, administer_id, labor_id
</sql>
</mapper>
......@@ -2,29 +2,48 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.AdministerMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.AdministerDO">
<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="telephone" property="telephone" />
<result column="account_name" property="accountName" />
<result column="password" property="password" />
<result column="company_id" property="companyId" />
<result column="user_name" property="userName" />
<result column="img" property="img" />
<result column="status" property="status" />
<result column="role" property="role" />
<result column="remark" property="remark" />
</resultMap>
<select id="getPermissions" resultType="com.subsidy.vo.administer.PermissionsVO">
SELECT DISTINCT
t4.*
FROM
role_administer_mapping t
LEFT JOIN role_dict t2 ON t.role_id = t2.id
LEFT JOIN role_permission_mapping t3 ON t2.id = t3.role_id
LEFT JOIN permissions_dict t4 ON t3.permission_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t4.delete_date IS NULL
<if test="id !=null and id !=''">
and t.administer_id = #{id}
</if>
</select>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, telephone, account_name, password, company_id, user_name, img, status, role, remark
</sql>
<select id="administerLabors" parameterType="long" resultType="com.subsidy.model.LaborServiceDictDO">
SELECT
t2.*
FROM
administer_labor_mapping t
LEFT JOIN labor_service_dict t2 ON t.labor_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
<if test="laborServiceName != null and laborServiceName != ''">
and t2.labor_service_name like concat('%', #{laborServiceName},'%')
</if>
</select>
<select id="administerServices" parameterType="long" resultType="com.subsidy.model.ServiceDictDO">
SELECT
t2.*
FROM
service_administer_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
</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.subsidy.mapper.GroupMemberMappingMapper">
<select id="parentCnt" parameterType="long" resultType="com.subsidy.vo.labor.AllGroupsVO">
SELECT
t.id,
t.group_name,
count( t2.id ) cnt
FROM
labor_group_dict t
LEFT JOIN group_member_mapping t2 ON t.id = t2.group_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.parent_id IS NULL
AND t.labor_id = #{laborId}
GROUP BY
t.id,
t.group_name
</select>
<select id="childCnt" parameterType="long" resultType="com.subsidy.vo.labor.AllGroupsVO">
SELECT
t.id,
t.group_name,
count( t2.member_id ) cnt
FROM
labor_group_dict t
LEFT JOIN group_member_mapping t2 ON t.id = t2.group_id AND t2.delete_date IS NULL
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.parent_id IS NOT NULL
AND t.labor_id = #{laborId}
GROUP BY
t.id,
t.group_name
</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.subsidy.mapper.LaborGroupDictMapper">
<select id="allGroups" parameterType="long" resultType="com.subsidy.vo.labor.AllGroupsVO">
SELECT
t.id,
t.group_name,
count(t2.member_id) as cnt
FROM
labor_group_dict t
LEFT JOIN group_member_mapping t2 ON t.id = t2.group_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.labor_id = #{laborId}
GROUP BY
t.id,
t.group_name
</select>
<select id="getProjectId" parameterType="long" resultType="long">
</select>
</mapper>
......@@ -2,84 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.LaborServiceDictMapper">
<select id="projects" parameterType="long" resultType="com.subsidy.vo.labor.ProjectsVO">
SELECT
t.id,
t.project_name,
t2.company_name,
t5.labor_service_name,
t.salary_date,
t.start_date,
t.end_date,
count( t3.id ) AS cnt
FROM
project t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
LEFT JOIN project_member_mapping t3 ON t.id = t3.project_id
LEFT JOIN administer_project_mapping t4 ON t.id = t4.project_id
LEFT JOIN labor_service_dict t5 ON t.labor_service_id = t5.id
WHERE
t.delete_date IS NULL
AND t4.administer_id = #{administerId}
<if test="projectName != null and projectName != ''">
and t.project_name like concat('%', #{projectName},'%')
</if>
GROUP BY
t.id,
t.project_name,
t2.company_name,
t5.labor_service_name,
t.start_date,
t.end_date
</select>
<select id="projectManage" resultType="com.subsidy.vo.labor.ProjectManageVO">
SELECT
t2.id,
t.id as mappingId,
t2.user_name,
t2.gender,
t2.telephone,
t2.id_card,
t2.email,
t2.payroll_account,
t2.bank,
t2.open_id,
t.job_name
FROM
project_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.project_id = #{projectId}
<if test="userInfo != null and userInfo != ''">
and (t2.user_name like concat('%', #{userInfo},'%') or t2.telephone like concat('%', #{userInfo},'%'))
</if>
</select>
<select id="abnormalRecord" resultType="com.subsidy.vo.labor.AbnormalRecordVO">
SELECT
t2.id,
t2.gender,
t2.telephone,
t2.id_card,
t2.payroll_account,
t2.bank,
if(t2.open_id is null,'是','否') as wechatStatus,
IF
( t.delete_date IS NULL, '入职', '离职' ) fireStatus,
IFNULL( t.delete_date, t.create_date ) AS hireTime
FROM
project_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.project_id = #{projectId}
<if test="userInfo != null and userInfo != ''">
and (t2.user_name like concat('%', #{userInfo},'%') or t2.telephone like concat('%', #{userInfo},'%'))
</if>
ORDER BY
IFNULL( t.delete_date, t.create_date )
</select>
</mapper>
......@@ -2,47 +2,59 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.MemberMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.MemberDO">
<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="academy_id" property="academyId" />
<result column="company_id" property="companyId" />
<result column="user_name" property="userName" />
<result column="account_name" property="accountName" />
<result column="account_name_en" property="accountNameEn" />
<result column="email" property="email" />
<result column="work_no" property="workNo" />
<result column="induction_date" property="inductionDate" />
<result column="telephone" property="telephone" />
<result column="password" property="password" />
<result column="gender" property="gender" />
<result column="image" property="image" />
<result column="check_image" property="checkImage" />
<result column="check_time" property="checkTime" />
<result column="id_card" property="idCard" />
<result column="id_card_photo" property="idCardPhoto" />
<result column="status" property="status" />
<result column="first_login" property="firstLogin" />
<result column="qq_no" property="qqNo" />
<result column="wechat" property="wechat" />
<result column="practice_status" property="practiceStatus" />
<result column="college_id" property="collegeId" />
<result column="major" property="major" />
<result column="enrollment_year" property="enrollmentYear" />
<result column="payroll_account" property="payrollAccount" />
<result column="bank" property="bank" />
<result column="member_type" property="memberType" />
</resultMap>
<select id="queryMembers" resultType="com.subsidy.vo.member.QueryMembersVO">
SELECT
t.id AS mappingId,
t2.id,
t2.user_name,
t2.gender,
t2.telephone,
t2.payroll_account,
t2.bank,
t2.id_card,
if( t2.open_id IS NULL, '未绑定', '已绑定' ) AS wechatStatus
FROM
group_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t2.delete_date IS NULL
and t.delete_date is null
AND t.group_id = #{groupId}
<if test="userInfo != null and userInfo != ''">
and (t2.user_name like concat('%', #{userInfo},'%') or t2.telephone like concat('%', #{userInfo},'%') or t2.id_card like concat('%', #{userInfo},'%') )
</if>
</select>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, academy_id, company_id, user_name, account_name, account_name_en, email, work_no, induction_date, telephone, password, gender, image, check_image, check_time, id_card, id_card_photo, status, first_login, qq_no, wechat, practice_status, college_id, major, enrollment_year, payroll_account, bank, member_type
</sql>
<select id="checkTalentMember" resultType="integer">
SELECT
count( 1 )
FROM
member t
LEFT JOIN member_role t2 ON t.id = t2.member_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t2.role_type = 3
AND (
t.id_card = #{idCard}
OR t.telephone = #{telephone})
<if test=" id != null">
and t.id != #{id}
</if>
</select>
<select id="checkMember">
SELECT
count( 1 )
FROM
member t
LEFT JOIN member_role t2 ON t.id = t2.member_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND (
t.id_card = #{idCard}
OR t.telephone = #{telephone})
</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.subsidy.mapper.ProductDictMapper">
<select id="allProducts" resultType="com.subsidy.model.ProductDictDO">
SELECT
*
FROM
product_dict t
WHERE
t.delete_date IS NULL
AND t.product_name like concat('%',#{productName} ,'%')
and t.product_type = #{productType}
<if test="groundingStatus != null and groundingStatus != ''">
and t.grounding_status = #{groundingStatus}
</if>
order by t.order_no
</select>
</mapper>
......@@ -2,4 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ProjectMemberMappingMapper">
<select id="detail" parameterType="long" resultType="com.subsidy.vo.member.DetailVO">
SELECT
t.id,
t2.project_name,
t.job_name,
ifnull( t.delete_date, t.create_date ) AS hireTime
FROM
project_member_mapping t
LEFT JOIN project t2 ON t.project_id = t2.id
WHERE
t2.delete_date IS NULL
AND t.member_id = #{memberId}
ORDER BY
ifnull( t.delete_date, t.create_date ) DESC
</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.subsidy.mapper.AdministerProjectMappingMapper">
<mapper namespace="com.subsidy.mapper.ServiceAdministerMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.AdministerProjectMappingDO">
<resultMap id="BaseResultMap" type="com.subsidy.model.ServiceAdministerMappingDO">
<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="administer_id" property="administerId" />
<result column="project_id" property="projectId" />
<result column="service_id" property="serviceId" />
</resultMap>
<!-- 通用查询结果列 -->
......@@ -17,7 +17,7 @@
create_date,
update_date,
delete_date,
id, administer_id, project_id
id, administer_id, service_id
</sql>
</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.subsidy.mapper.ServiceDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.ServiceDictDO">
<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="service_name" property="serviceName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, service_name
</sql>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!