Commit 1292f41c by weijiguang

init

parents
/.idea/
/target/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.jair</groupId>
<artifactId>Auto</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>tsndu-service</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<mysql-connector.version>8.0.16</mysql-connector.version>
<mybatis-plus.version>3.0.3</mybatis-plus.version>
<druid.version>1.1.14</druid.version>
<swagger2.version>2.9.2</swagger2.version>
<spring-boot.version>2.1.6.RELEASE</spring-boot.version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-gateway</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.58</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>
<!-- 模板引擎,需要指定 mpg.setTemplateEngine(new FreemarkerTemplateEngine()); -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.23</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger2.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>releases</id>
<name>maven-releases</name>
<url>http://repository.sskuaixiu.com/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>maven-snapshots</name>
<url>http://repository.sskuaixiu.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>maven-central</id>
<name>maven-central</name>
<url>http://repository.sskuaixiu.com/repository/maven-public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-central</id>
<name>maven-central</name>
<url>http://repository.sskuaixiu.com/repository/maven-public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.jair;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
public class TsnduApplication {
public static void main(String[] args) {
SpringApplication.run(TsnduApplication.class, args);
}
}
package com.jair.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@MapperScan("com.jair.mapper")
public class MybatisConfig {
/**
* 分页拦截器
* @return
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
package com.jair.config;
import com.alibaba.fastjson.JSONObject;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.service.IAccountService;
import com.jair.util.BeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
@Component
@Slf4j
public class RequestFilter implements Filter {
@Autowired
private IAccountService accountService;
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
String requestUri = ((HttpServletRequest) request).getRequestURI();
if (StringUtils.isEmpty(requestUri)) {
chain.doFilter(request, response);
return;
}
if (requestUri.contains("/account/login")) {
chain.doFilter(request, response);
return;
}
TokenInfo tokenInfo = accountService.getTokenInfo(httpServletRequest);
if (tokenInfo == null) {
//重定向到登录页
tokenError(response);
return;
}
httpServletRequest.getServletContext().setAttribute("TokenInfo", tokenInfo);
chain.doFilter(request, response);
}
private void tokenError(ServletResponse response) throws IOException {
//303状态码表示由于请求对应的资源存在着另一个URI,应使用GET方法定向获取请求的资源
JSONObject resultVo = BeanUtil.transform(ResultVo.loginTimeOutError("token失效"), JSONObject.class);
response.setCharacterEncoding("UTF-8");
response.getWriter().write(resultVo.toJSONString());
}
}
package com.jair.controller;
import com.fasterxml.jackson.databind.ser.Serializers;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.CreateAccountPo;
import com.jair.entity.po.LoginPo;
import com.jair.entity.po.UpdateAccountStatusPo;
import com.jair.entity.po.UpdatePasswordPo;
import com.jair.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RestController
@RequestMapping("/account")
public class AccountController extends BaseController {
@Autowired
IAccountService accountService;
@PostMapping("/login")
public ResultVo login(HttpServletRequest request, HttpServletResponse response, @RequestBody LoginPo loginPo) {
return accountService.login(request, response, loginPo);
}
@PostMapping("/list/{companyId}")
public ResultVo list(HttpServletRequest request, @PathVariable Integer companyId) {
TokenInfo tokenInfo = getTokenInfo(request);
return ResultVo.success(accountService.listAccounts(tokenInfo, companyId, null));
}
@PostMapping("/list/mine")
public ResultVo listMine(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return ResultVo.success(accountService.listAccounts(tokenInfo, tokenInfo.getCompanyId(), null));
}
@PostMapping("/create")
public ResultVo create(HttpServletRequest request, @RequestBody CreateAccountPo createAccountPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return accountService.createAccount(tokenInfo, createAccountPo);
}
@PostMapping("/update/password")
public ResultVo create(HttpServletRequest request, @RequestBody UpdatePasswordPo updatePasswordPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return accountService.updatePassword(tokenInfo, updatePasswordPo);
}
@PostMapping("/update/status")
public ResultVo create(HttpServletRequest request, @RequestBody UpdateAccountStatusPo updateStatusPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return accountService.updateStatus(tokenInfo, updateStatusPo);
}
}
package com.jair.controller;
import com.jair.entity.bo.CfgFee;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.service.IAnalyticsService;
import com.jair.service.IFeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
@RestController
@RequestMapping("/analytics")
public class AnalyticsController extends BaseController {
@Autowired
private IAnalyticsService analyticsService;
@PostMapping("/dashboard")
public ResultVo list(HttpServletRequest request) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return analyticsService.dashboard(tokenInfo);
}
}
package com.jair.controller;
import com.jair.entity.common.TokenInfo;
import javax.servlet.http.HttpServletRequest;
public class BaseController {
public static String TOKEN_INFO = "TokenInfo";
public TokenInfo getTokenInfo(HttpServletRequest request) {
return (TokenInfo)request.getServletContext().getAttribute(TOKEN_INFO);
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.CompanyPo;
import com.jair.entity.po.SearchCompanyPo;
import com.jair.service.ICompanyService;
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 javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/company")
public class CompanyController extends BaseController {
@Autowired
ICompanyService companyService;
@PostMapping("/create")
public ResultVo createCompnay(HttpServletRequest request, @RequestBody CompanyPo companyPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.createCompany(tokenInfo, companyPo);
}
@PostMapping("/list")
public ResultVo listCompnay(HttpServletRequest request, @RequestBody PageInfo<SearchCompanyPo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.listCompanys(tokenInfo, pageInfo);
}
@PostMapping("/mine")
public ResultVo mine(HttpServletRequest request) throws InterruptedException {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.myCompany(tokenInfo);
}
@PostMapping("/update/status")
public ResultVo updateStatus(HttpServletRequest request, @RequestBody CompanyPo companyPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.updateStatus(tokenInfo, companyPo);
}
@PostMapping("/update/expired")
public ResultVo updateExpired(HttpServletRequest request, @RequestBody CompanyPo companyPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.updateExpiredDate(tokenInfo, companyPo);
}
@PostMapping("/update")
public ResultVo updateCompany(HttpServletRequest request, @RequestBody CompanyPo companyPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return companyService.updateCompany(tokenInfo, companyPo);
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.*;
import com.jair.service.IContractService;
import com.jair.service.IVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/contract")
public class ContractController extends BaseController {
@Autowired
private IContractService contractService;
@PostMapping("/list")
public ResultVo listVehicle(HttpServletRequest request, @RequestBody PageInfo<SearchContractPo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.listContracts(tokenInfo, pageInfo);
}
@PostMapping("/get/{contractId}")
public ResultVo get(HttpServletRequest request, @PathVariable Integer contractId) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.getContractById(tokenInfo, contractId);
}
@PostMapping("/sign")
public ResultVo signContract(HttpServletRequest request, @RequestBody SignContractPo contractPo) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.signContract(tokenInfo, contractPo);
}
@PostMapping("/update")
public ResultVo updateContract(HttpServletRequest request, @RequestBody UpdateContractPo contractPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.updateContract(tokenInfo, contractPo);
}
@PostMapping("/terminate")
public ResultVo terminateContract(HttpServletRequest request, @RequestBody TerminateContractPo contractPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.terminateContract(tokenInfo, contractPo);
}
@PostMapping("/return/deposit")
public ResultVo returnDeposit(HttpServletRequest request, @RequestBody ReturnDepositPo contractPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.returnDeposit(tokenInfo, contractPo);
}
@PostMapping("/logs/{contractId}")
public ResultVo contractLogs(HttpServletRequest request, @PathVariable Integer contractId) {
TokenInfo tokenInfo = getTokenInfo(request);
return contractService.getContractLogs(tokenInfo, contractId);
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.*;
import com.jair.service.ICompanyService;
import com.jair.service.IDataService;
import com.jair.service.IDriverService;
import com.jair.service.ISourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.websocket.server.PathParam;
@RestController
@RequestMapping("/data")
public class DataController extends BaseController {
@Autowired
IDataService dataService;
@Autowired
ISourceService sourceService;
@PostMapping("/sources")
public ResultVo listSource(HttpServletRequest request, @RequestBody SourcePo sourcePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return sourceService.listSources(tokenInfo, sourcePo);
}
@PostMapping("/source/update/status")
public ResultVo updateSourceStatus(HttpServletRequest request, @RequestBody SourcePo sourcePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return sourceService.updateSourceStatus(tokenInfo, sourcePo);
}
@PostMapping("/source/create")
public ResultVo createSource(HttpServletRequest request, @RequestBody SourcePo sourcePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return sourceService.createSource(tokenInfo, sourcePo);
}
@PostMapping("/source/update")
public ResultVo updateSource(HttpServletRequest request, @RequestBody SourcePo sourcePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return sourceService.updateSource(tokenInfo, sourcePo);
}
@PostMapping("/colors")
public ResultVo listColor(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listColors(tokenInfo);
}
@PostMapping("/environmentalStandards")
public ResultVo listEnvironmentalStandards(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listEnvironmentalStandards(tokenInfo);
}
@PostMapping("/engineTypes")
public ResultVo listEngineTypes(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listEngineTypes(tokenInfo);
}
@PostMapping("/vehicleTypes")
public ResultVo listVehicleTypes(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listVehicleTypes(tokenInfo);
}
@PostMapping("/useCharacters")
public ResultVo listUseCharacters(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listUseCharacters(tokenInfo);
}
@PostMapping("/brands")
public ResultVo listBrand(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listBrands(tokenInfo);
}
@PostMapping("/models")
public ResultVo listModel(HttpServletRequest request, @RequestBody SearchDataPo searchPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.listModels(tokenInfo, searchPo);
}
@PostMapping("/create")
public ResultVo createData(HttpServletRequest request, @RequestBody SysDataPo dataPo) {
TokenInfo tokenInfo = getTokenInfo(request);
return dataService.createData(tokenInfo, dataPo);
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.*;
import com.jair.service.IDataService;
import com.jair.service.IDriverService;
import com.jair.service.IVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/driver")
public class DriverController extends BaseController {
@Autowired
IDriverService driverService;
@PostMapping("/list")
public ResultVo listVehicle(HttpServletRequest request, @RequestBody PageInfo<SearchDriverPo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return driverService.listDrivers(tokenInfo, pageInfo);
}
@PostMapping("/get/{driverId}")
public ResultVo get(HttpServletRequest request, @PathVariable Integer driverId) {
TokenInfo tokenInfo = getTokenInfo(request);
return driverService.getDriverById(tokenInfo, driverId);
}
@PostMapping("/list/all")
public ResultVo listVehicle(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return driverService.listAllDrivers(tokenInfo);
}
@PostMapping("/create")
public ResultVo createDriver(HttpServletRequest request, @RequestBody DriverPo driverPo) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return driverService.createDriver(tokenInfo, driverPo);
}
@PostMapping("/update")
public ResultVo updateDriver(HttpServletRequest request, @RequestBody DriverPo driverPo) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return driverService.updateDriver(tokenInfo, driverPo);
}
}
package com.jair.controller;
import com.jair.entity.bo.CfgFee;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.SearchDataPo;
import com.jair.entity.po.SourcePo;
import com.jair.entity.po.SysDataPo;
import com.jair.service.IDataService;
import com.jair.service.IFeeService;
import com.jair.service.ISourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/fee")
public class FeeController extends BaseController {
@Autowired
IFeeService feeService;
@PostMapping("/list/{status}")
public ResultVo list(HttpServletRequest request, @PathVariable Integer status) {
TokenInfo tokenInfo = getTokenInfo(request);
return feeService.list(tokenInfo, status);
}
@PostMapping("/create")
public ResultVo createData(HttpServletRequest request, @RequestBody CfgFee fee) {
TokenInfo tokenInfo = getTokenInfo(request);
return feeService.create(tokenInfo, fee);
}
@PostMapping("/disable/{feeId}")
public ResultVo disable(HttpServletRequest request, @PathVariable Integer feeId) {
TokenInfo tokenInfo = getTokenInfo(request);
return feeService.disable(tokenInfo, feeId);
}
@PostMapping("/enable/{feeId}")
public ResultVo enable(HttpServletRequest request, @PathVariable Integer feeId) {
TokenInfo tokenInfo = getTokenInfo(request);
return feeService.enable(tokenInfo, feeId);
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.*;
import com.jair.service.IContractService;
import com.jair.service.IPlanningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/planning")
public class PlanningController extends BaseController {
@Autowired
private IPlanningService planningService;
@PostMapping("/list")
public ResultVo listPlanning(HttpServletRequest request, @RequestBody PageInfo<SearchPlanningPo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return planningService.listPlanning(tokenInfo, pageInfo);
}
@PostMapping("/list/logs")
public ResultVo listPlanningOperationLogs(HttpServletRequest request, @RequestBody PageInfo<SearchPlanningLogPo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return planningService.listLogs(tokenInfo, pageInfo);
}
@PostMapping("/list/{contractId}/{type}")
public ResultVo listPlanning(HttpServletRequest request, @PathVariable Integer contractId, @PathVariable Integer type) {
TokenInfo tokenInfo = getTokenInfo(request);
return planningService.listPlanningByContractId(tokenInfo, contractId, type);
}
@PostMapping("/paying")
public ResultVo paying(HttpServletRequest request, @RequestBody PayingPo payingPo) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return planningService.paying(tokenInfo, payingPo);
}
@PostMapping("/delay")
public ResultVo delay(HttpServletRequest request, @RequestBody DelayPo delayPo) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return planningService.delay(tokenInfo, delayPo);
}
}
package com.jair.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jair.entity.bo.Account;
import com.jair.service.IAccountService;
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.RestController;
import java.util.List;
@RestController
public class TestController {
@PostMapping("hello")
public String hello(@RequestBody String body) {
System.out.println("body:" + body);
return "hello";
}
}
package com.jair.controller;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.DetectImagePo;
import com.jair.service.IAttFileService;
import com.jair.util.BaiduAI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/file")
public class UploadController extends BaseController {
@Autowired
private IAttFileService attFileService;
@Autowired
private BaiduAI baiduAI;
@PostMapping("/upload")
public ResultVo uploadFile(HttpServletRequest request, @RequestParam("file") MultipartFile multipartFile) throws Exception {
TokenInfo tokenInfo = getTokenInfo(request);
return attFileService.upload(tokenInfo, multipartFile);
}
@PostMapping("/vehicle/license/detect")
public ResultVo detectVehicleLicense(@RequestBody DetectImagePo detectPo) throws Exception {
System.out.println(detectPo);
return ResultVo.success(baiduAI.vehicleLicenseDetect(detectPo.getUrl(), detectPo.getIsMain() == 1 ? true : false));
}
@PostMapping("/driver/license/detect")
public ResultVo detectDriverLicense(@RequestBody DetectImagePo detectPo) throws Exception {
System.out.println(detectPo);
return ResultVo.success(baiduAI.drivingLicenseDetect(detectPo.getUrl()));
}
@PostMapping("/identity/card/detect")
public ResultVo detectIdentityCard(@RequestBody DetectImagePo detectPo) throws Exception {
System.out.println(detectPo);
return ResultVo.success(baiduAI.identityCardDetect(detectPo.getUrl(), detectPo.getIsMain() == 3 ? true : false));
}
}
package com.jair.controller;
import com.jair.entity.common.PageInfo;
import com.jair.entity.common.ResultVo;
import com.jair.entity.common.TokenInfo;
import com.jair.entity.po.*;
import com.jair.service.ICompanyService;
import com.jair.service.IVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/vehicle")
public class VehicleController extends BaseController {
@Autowired
IVehicleService vehicleService;
@PostMapping("/list")
public ResultVo listVehicle(HttpServletRequest request, @RequestBody PageInfo<SearchVechiclePo> pageInfo) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.listVehicles(tokenInfo, pageInfo);
}
@PostMapping("/get/{vehicleId}")
public ResultVo get(HttpServletRequest request, @PathVariable Integer vehicleId) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.getVehicleById(tokenInfo, vehicleId);
}
@PostMapping("/create")
public ResultVo createVehicle(HttpServletRequest request, @RequestBody CreateVehiclePo vehiclePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.createVehicle(tokenInfo, vehiclePo);
}
@PostMapping("/update")
public ResultVo updateVehicle(HttpServletRequest request, @RequestBody UpdateVehiclePo vehiclePo) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.updateVehicle(tokenInfo, vehiclePo);
}
@PostMapping("/no/source/contract/vehicles")
public ResultVo listNoSourceContractVehicles(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.listNoSourceContractVehicles(tokenInfo);
}
@PostMapping("/allow/rent/vehicles")
public ResultVo listAllowRentVehicles(HttpServletRequest request) {
TokenInfo tokenInfo = getTokenInfo(request);
return vehicleService.listAllowRentVehicles(tokenInfo);
}
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 帐号
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Account implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 帐号 */
private String username;
/** 密码 */
private String password;
/** 姓名 */
private String realName;
/** 电话 */
private String phone;
/** 地址 */
private String address;
/** 状态:0停用,1有效 */
private Integer status;
private Date createTime;
private Integer createById;
private String createByName;
/** 帐号类型:0超管,1主帐号,2子帐号 */
private Integer type;
private Integer companyId;
private String companyName;
private String token;
private Date tokenExpiredTime;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class AttFile implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 原始文件名
*/
private String originName;
/**
* 文件url
*/
private String filePath;
/**
* 文件类型
*/
private Integer fileType;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CfgData implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer parentId;
private String code;
private String name;
@TableField("extends")
private String extend;
/** @DataTypeEnum */
private Integer type;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CfgFee implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
/** @FeeTimingEnum */
private Integer timing;
private Integer amount;
private Integer companyId;
private Integer status;
@TableField(exist = false)
private Integer firstPaidAmount;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 企业主体
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Company implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 公司名称
*/
private String name;
/**
* 简称
*/
private String abbr;
/**
* 地址
*/
private String address;
/**
* 联系人
*/
private String contactName;
/**
* 联系电话
*/
private String contactPhone;
/**
* 省
*/
private String province;
/**
* 市
*/
private String city;
/**
* 区
*/
private String district;
private Date createTime;
private Integer createById;
private String createByName;
/**
* 有效日期
*/
private Date expiredDate;
private Integer status;
private Integer level; // 1:5个子帐号,2:10个子帐号,3:50个子帐号
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Contract implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 合同类型,1车源合同,2司机合同 */
private Integer type;
/** 合同编号 */
private String code;
/** 车辆信息 */
private Integer vehicleId;
/** 车源信息 */
private Integer sourceId;
/** 司机信息 */
private Integer driverId;
/** 里程数 */
private Integer odograph;
/** ev里程数 */
private Integer odographEv;
/** 租赁开始日期 */
private Date startDate;
/** 租赁结束日期 */
private Date endDate;
/** 押金状态:@DepositStatusEnum */
private Integer depositStatus;
/** 应付押金 */
private Integer payableDepositAmount;
/** 已付押金 */
private Integer paidDepositAmount;
/** 返还押金金额 */
private Integer returnDepositAmount;
/** 租赁方式 */
private Integer leaseType;
/** 租金 */
private Integer rentAmount;
/** 状态:1正常有效,0已结束 */
private Integer status;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
private String remark;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ContractOperationLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 1车源合同,2司机合同
*/
private Integer type;
/**
* 合同id
*/
private Integer contractId;
/**
* 日志动作
*/
private String action;
/**
* 日志内容
*/
private String content;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date operationTime;
private Integer operatorId;
private String operatorName;
/**
* 1有效,0失效
*/
private Integer status;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ContractReturnVehicle implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer contractId;
private Integer license;
private Integer accident;
private Integer breakRulesAmount;
private Integer breakRulesDeduction;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ContractReturnVehicleAttachment implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 合同id
*/
private Integer returnId;
private Integer fileId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ContractSignAttachment implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 合同id
*/
private Integer contractId;
private Integer fileId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Driver implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 身份证号码 */
private String identityNumber;
/** 姓名 */
private String name;
/** 性别 */
private String gender;
/** 电话 */
private String phone;
/** 现住址 */
private String address;
/** 紧急联系人 */
private String contactName;
/** 紧急联系人电话 */
private String contactPhone;
/** 是否有网约车执照:0无,1有 */
private Integer serviceLicense;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
/** 身份证id */
private Integer identityId;
/** 驾驶证id */
private Integer licenseId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 驾驶证
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DrivingLicense implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 驾驶证号 */
private String credentialNo;
/** 档案编号 */
private String fileNo;
/** 国籍 */
private String country;
/** 首次发证日期 */
private Date firstIssue;
/** 准驾车型 */
@TableField("class")
private String drivingClass;
/** 有效期-起 */
private Date validPeriodStart;
/** 有效期-止 */
private Date validPeriodEnd;
/** 主页照片 */
private Integer mainFileId;
/** 副页照片 */
private Integer secondFileId;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-10-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class FeePlanning implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 费用类型 */
private Integer type;
/** 费用名称 */
private String name;
/** 合同ID */
private Integer contractId;
/** 合同类型 */
private Integer contractType;
/*** 计划执行日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDate;
/*** 延期至的 日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date delayDate;
/** 应付金额 */
private Integer payableAmount;
/** 已付金额 */
private Integer paidAmount;
/** 状态:0未付,1已付部分,2已付全部 */
private Integer paymentStatus;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
private Integer status;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class IdentityCard implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 民族 */
private String nation;
/** 出生日期 */
private Date birthday;
/** 身份证地址 */
private String originAddress;
/** 发证机关 */
private String issueOrganization;
/** 有效期-起 */
private Date validPeriodStart;
/** 有效期-止 */
private Date validPeriodEnd;
/** 正面照片 */
private Integer frontFileId;
/** 反面照片 */
private Integer backFileId;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Menu implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer accountType;
private String menus;
private Integer status;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 车队表
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Motorcade implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
private String contactName;
private String contactPhone;
private String address;
private String remark;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-10-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PlanningOperationLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 合同ID */
private Integer contractId;
/** 合同类型 */
private Integer planningId;
/** @PlanningLogActionEnum */
private Integer type;
/** @PlanningLogActionEnum */
private String action;
/** 金额 */
private Integer amount;
private String remark;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`sequence`")
public class Sequence implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 车源信息
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Source implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 车源名称
*/
private String name;
/**
* 地址
*/
private String address;
/**
* 联系人
*/
private String contactName;
/**
* 电话
*/
private String contactPhone;
private Date createTime;
private Integer createById;
private String createByName;
private Integer status;
/**
* 关联主体
*/
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 车辆信息
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Vehicle implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/** 车牌号码 */
private String plateNo;
/** 品牌 */
private String brandName;
/** 型号 */
private String model;
/** 排量 */
private String displacement;
/** 颜色 */
private String color;
/** 环保标准 */
private String environmentalStandards;
/** 动力类型 */
private String engineType;
private String remark;
private Integer licenseId;
/** 状态,1正常,0失效(已退) */
private Integer status;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 行驶证
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class VehicleLicense implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer licenseId;
/** 车辆类型:小型轿车 */
private String type;
/** 所有人 */
private String owner;
/** 住址 */
private String address;
/** 使用性质:非营运 */
private String useCharacter;
/** 型号 */
@TableField("model")
private String licenseModel;
/** 识别代号 */
private String vin;
/** 发动机号码 */
private String engineNo;
/** 注册日期 */
private Date registerDate;
/** 发证日期 */
private Date issueDate;
/** 核载人数 */
private String approvedPerson;
/** 总质量 */
private String weight;
/** 尺寸 */
private String outlineSize;
/** 行驶证主页照片 */
private Integer mainFileId;
/** 行驶证副页照片 */
private Integer secondFileId;
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
}
package com.jair.entity.common;
import lombok.Data;
import java.util.Date;
@Data
public class AppInfo {
private String token;
private Integer activeDuration;
private Date generateTime;
}
package com.jair.entity.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 分页页面信息
*
* @author caiyt
*/
@Data
@ApiModel(value = "分页页面信息", description = "分页页面的数据封装类")
public class PageInfo<T> {
@ApiModelProperty(value = "当前页数")
private Long current;
@ApiModelProperty(value = "页面数据量")
private Long size;
@ApiModelProperty(value = "数据总量")
private Long total;
@ApiModelProperty(value = "数据内容")
private T records;
@Override
public String toString() {
return "PageInfo{current=" + current + ", size=" + size + ", total=" + total + ", records=" + records + '}';
}
public PageInfo() {
}
public PageInfo(Long total, T records) {
this.total = total;
this.records = records;
}
public PageInfo(Long current, Long size) {
this.current = current;
this.size = size;
}
/**
* 对分页请求参数进行校验更正
*
* @param pageInfo
*/
public static PageInfo checkParam(PageInfo pageInfo) {
if (pageInfo == null) {
pageInfo = new PageInfo<>(1L, 10L);
} else {
if (pageInfo.getCurrent() == null || pageInfo.getCurrent() <= 0) {
pageInfo.setCurrent(1L);
}
if (pageInfo.getSize() == null || pageInfo.getSize() == 0) {
pageInfo.setSize(10L);
}
}
return pageInfo;
}
}
\ No newline at end of file
package com.jair.entity.common;
import lombok.Getter;
/**
* @author: mazhang
* @date: 2019/08/08 15:16 update by caiyt @2019/08/24
* @description: 返回的错误码常量类
*/
@Getter
public class ResultConstants {
/**
* 成功
*/
public static final int SUCCESS = 1;
/**
* 登陆超时
*/
public static final int LOGIN_TIMEOUT = 2;
/**
* 业务异常
*/
public static final int ILLEGAL_BUSINESS = 3;
/**
* 账户冻结
*/
public static final int FROZEN_ACCOUNT = 201;
/**
* 系统异常
*/
public static final int SYSTEM_ERROR = 999;
}
\ No newline at end of file
package com.jair.entity.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 响应封装类
*
* @param <T>
*/
@Data
@ApiModel("响应类")
public class ResultVo<T> {
@ApiModelProperty("响应码:1-成功 2-登陆超时 3-业务异常 4-系统异常")
private int code;
@ApiModelProperty("响应消息")
private String msg;
@ApiModelProperty("响应体")
private T data;
public static <T> ResultVo success() {
return success(null);
}
public static <T> ResultVo success(T data) {
return resultVo(ResultConstants.SUCCESS,"成功",data);
}
public static <T> ResultVo businessError(String message){
return resultVo(ResultConstants.ILLEGAL_BUSINESS,message,null);
}
public static <T> ResultVo accountFrozenError(String message){
return resultVo(ResultConstants.FROZEN_ACCOUNT,message,null);
}
public static <T> ResultVo systemError(String message){
return resultVo(ResultConstants.SYSTEM_ERROR,message,null);
}
public static <T> ResultVo loginTimeOutError(String message){
return resultVo(ResultConstants.LOGIN_TIMEOUT,message,null);
}
private static <T> ResultVo<T> resultVo(int code, String msg, T data){
ResultVo resultVo = new ResultVo();
resultVo.setCode(code);
resultVo.setMsg(msg);
if (data != null) {
resultVo.setData(data);
}
return resultVo;
}
public ResultVo() {
this(ResultConstants.SUCCESS, "成功");
}
public ResultVo(int code, String msg) {
this(code, msg, null);
}
public ResultVo(int code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public boolean isSuccess(){
return ResultConstants.SUCCESS==this.code;
}
}
\ No newline at end of file
package com.jair.entity.common;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("token信息相应类")
public class TokenInfo {
@ApiModelProperty("帐号id")
private Integer id;
@ApiModelProperty("用户账号")
private String username;
@ApiModelProperty("用户姓名")
private String realName;
@ApiModelProperty("电话")
private String phone;
@ApiModelProperty("帐号类型:0超管,1主帐号,2子帐号")
private Integer type;
@ApiModelProperty("用户所属组织id")
private Integer companyId;
@ApiModelProperty("用户所属组织名称")
private String companyName;
private String abbr;
private String token;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date tokenExpiredTime;
private String menus;
//
// /**
// * 获取系统用户
// *
// * @return
// */
// public static TokenInfoVo genSystemTokenInfo() {
// return new TokenInfoVo(SystemConstants.SYSTEM_ID, SystemConstants.SYSTEM_NAME);
// }
}
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum AccountTypeEnum {
ADMIN(0, "管理员"),
MAIN(1, "主帐号"),
SUB(2, "子帐号");
private Integer key;
private String value;
AccountTypeEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum ContractLogActionEnum {
CREATE("创建"),
UPDATE("修改"),
RENEW("续约"),
TERMINATE("中止"),
CHECK("验车"),
RETURN_VEHICLE("交车信息"),
RETURN_DEPOSIT("返还押金"),
;
private String name;
ContractLogActionEnum(String name) {
this.name = name;
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum ContractTypeEnum {
SOURCE_CONTRACT(1, "车源合同"),
DRIVER_CONTRACT(2, "司机合同");
private Integer key;
private String value;
ContractTypeEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum DataTypeEnum {
ENVIRONMENTAL_STANDARDS(1, "环保标准"),
CHARACTER(2, "车辆使用性质"),
COLOR(3, "颜色"),
ENGINE_TYPE(4, "动力类型"),
VEHICLE_TYPE(5, "车型类型"),
BRAND(6, "品牌"),
MODEL(7, "型号");
private Integer key;
private String value;
DataTypeEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum DepositStatusEnum {
ARREARAGE(-1, "押金不全"),
NORMAL(0, "正常"),
PORTION_RETURN(1, "部分已退"),
ALL_RETURN(2, "全部已退");
private Integer key;
private String value;
DepositStatusEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
public static String codeToName(Integer code) {
if (code == ARREARAGE.getKey()) {
return ARREARAGE.getValue();
} else if (code == NORMAL.getKey()) {
return NORMAL.getValue();
} else if (code == PORTION_RETURN.getKey()) {
return PORTION_RETURN.getValue();
} else if (code == ALL_RETURN.getKey()) {
return ALL_RETURN.getValue();
}
return "";
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
/** 费用周期 */
@Getter
public enum FeeTimingEnum {
ONCE(1, "一次性"),
WEEK(2, "周度"),
MONTH(3, "月度"),
QUARTER(4, "季度"),
YEAR(5, "年度");
private Integer key;
private String value;
FeeTimingEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum LeaseTypeEnum {
DAY_OF_MONTH(1, "月租(30天)"),
MONTH(2, "月租(自然月)"),
WEEK(3, "周租");
private Integer key;
private String value;
LeaseTypeEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
public static String codeToName(Integer code) {
if (code == DAY_OF_MONTH.getKey()) {
return DAY_OF_MONTH.getValue();
} else if (code == MONTH.getKey()) {
return MONTH.getValue();
} else if (code == WEEK.getKey()) {
return WEEK.getValue();
}
return "";
}
}
\ No newline at end of file
package com.jair.entity.constant;
import lombok.Getter;
@Getter
public enum PlanningLogActionEnum {
PAYING(1, "付款"),
DELAY(2, "延期"),
;
private Integer type;
private String name;
PlanningLogActionEnum(Integer type, String name) {
this.type = type;
this.name = name;
}
}
\ No newline at end of file
package com.jair.entity.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CfgFeePo implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String name;
/** @FeeTimingEnum */
private Integer timing;
private Integer amount;
private Integer firstPaidAmount;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data
public class CompanyPo extends Validation {
private Integer id;
/** 公司名称 */
private String name;
/** 简称 */
private String abbr;
/** 地址 */
private String address;
/** 联系人 */
private String contactName;
/** 联系电话 */
private String contactPhone;
/** 省 */
private String province;
/** 市 */
private String city;
/** 区 */
private String district;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date expiredDate;
private Integer status;
private Integer level;
@Override
public ValidateResult validate() {
if (StringUtils.isEmpty(this.getName())) {
return ValidateResult.fail("企业名称不能为空");
}
if (this.getName().length() < 4) {
return ValidateResult.fail("企业名称不能少于4位");
}
if (StringUtils.isEmpty(this.getAbbr())) {
return ValidateResult.fail("企业简称不能为空");
}
if (this.getAbbr().length() < 2) {
return ValidateResult.fail("企业简称不能少于2位");
}
if (StringUtils.isEmpty(this.getContactName()) || StringUtils.isEmpty(this.getContactPhone())) {
return ValidateResult.fail("企业联系人和联系电话不能为空");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import com.jair.entity.constant.AccountTypeEnum;
import lombok.Data;
import org.springframework.util.StringUtils;
@Data
public class CreateAccountPo extends Validation {
/** 帐号 */
private String username;
/** 密码 */
private String password;
/** 姓名 */
private String realName;
/** 电话 */
private String phone;
/** 地址 */
private String address;
/** 帐号类型:0超管,1主帐号,2子帐号 */
private Integer type;
private Integer companyId;
@Override
public ValidateResult validate() {
if (this.getCompanyId() == null || this.getCompanyId() <= 0) {
return ValidateResult.fail("未知的企业");
}
if (StringUtils.isEmpty(this.getUsername()) || this.getUsername().trim().length() < 4) {
return ValidateResult.fail("帐号长度不能小于4位");
}
if (StringUtils.isEmpty(this.getPassword()) || this.getPassword().length() < 6) {
return ValidateResult.fail("密码长度不能小于6位");
}
if (StringUtils.isEmpty(this.getRealName()) || this.getRealName().trim().length() < 2) {
return ValidateResult.fail("姓名长度不能小于2位");
}
if (StringUtils.isEmpty(this.getPhone()) || this.getPhone().trim().length() != 11) {
return ValidateResult.fail("电话输入不正确");
}
if (this.getType() != AccountTypeEnum.MAIN.getKey() && this.getType() != AccountTypeEnum.SUB.getKey()) {
return ValidateResult.fail("帐号类型不正确");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data
public class CreateVehiclePo extends Validation {
/** 品牌 */
private String brandName;
/** 型号 */
private String model;
/** 排量 */
private String displacement;
/** 颜色 */
private String color;
/** 环保标准 */
private String environmentalStandards;
/** 动力类型 */
private String engineType;
/** 车牌号码 */
private String plateNo;
/** 车辆类型:小型轿车 */
private String type;
/** 所有人 */
private String owner;
/** 住址 */
private String address;
/** 使用性质:非营运 */
private String useCharacter;
/** 型号 */
private String licenseModel;
/** 识别代号 */
private String vin;
/** 发动机号码 */
private String engineNo;
/** 注册日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registerDate;
/** 发证日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date issueDate;
/** 核载人数 */
private String approvedPerson;
/** 总质量 */
private String weight;
/** 尺寸 */
private String outlineSize;
/** 行驶证主页照片 */
private Integer mainFileId;
/** 行驶证副页照片 */
private Integer secondFileId;
private String remark;
@Override
public ValidateResult validate() {
if (StringUtils.isEmpty(this.getPlateNo())) {
return ValidateResult.fail("请输入完整车牌号");
}
this.setPlateNo(this.getPlateNo().toUpperCase());
if (!this.getPlateNo().matches("^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$")) {
return ValidateResult.fail("车牌号格式不正确");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class DelayPo extends Validation {
private Integer planningId;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date delayDate;
private String remark;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class DetectImagePo {
private String url;
private Integer isMain;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Data
public class DriverPo extends Validation {
private Integer id;
/** 姓名 */
private String name;
/** 身份证号码 */
private String identityNumber;
/** 性别 */
private String gender;
/** 电话 */
private String phone;
/** 现住址 */
private String address;
/** 紧急联系人 */
private String contactName;
/** 紧急联系人电话 */
private String contactPhone;
/** 是否有网约车执照:0无,1有 */
private Integer serviceLicense;
// 身份证信息
/** 民族 */
private String nation;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
/** 身份证地址 */
private String originAddress;
/** 发证机关 */
private String issueOrganization;
/** 身份证 有效期-起 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date identityValidPeriodStart;
/** 身份证 有效期-止 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date identityValidPeriodEnd;
/** 身份证 正面照片 */
private Integer frontFileId;
/** 身份证 反面照片 */
private Integer backFileId;
// 驾照信息
/** 驾驶证号 */
private String credentialNo;
/** 档案编号 */
private String fileNo;
/** 首次发证日期 */
private Date firstIssue;
/** 驾照 准驾车型 */
private String drivingClass;
/** 驾照 有效期-起 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date licenseValidPeriodStart;
/** 驾照 有效期-止 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date licenseValidPeriodEnd;
/** 驾照 主页照片 */
private Integer mainFileId;
/** 驾照 副页照片 */
private Integer secondFileId;
@Override
public ValidateResult validate() {
if (StringUtils.isEmpty(this.getName()) || this.getName().trim().length() < 2) {
return ValidateResult.fail("姓名不正确");
}
if (StringUtils.isEmpty(this.getGender())) {
return ValidateResult.fail("性别不正确");
}
List<String> genders = Arrays.asList("男", "女");
if (!genders.contains(this.getGender().trim())) {
return ValidateResult.fail("性别不正确");
}
if (StringUtils.isEmpty(this.getIdentityNumber())) {
return ValidateResult.fail("身份证号码不正确");
}
if (!this.getIdentityNumber().matches("^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$|^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$")) {
return ValidateResult.fail("身份证号码不正确");
}
if (StringUtils.isEmpty(this.getPhone()) || this.getPhone().trim().length() != 11) {
return ValidateResult.fail("手机号不正确");
}
// if (StringUtils.isEmpty(this.getAddress())) {
// return ValidateResult.fail("住址不正确");
// }
if (StringUtils.isEmpty(this.getNation())) {
return ValidateResult.fail("民族不正确");
}
if (this.getBirthday() == null) {
return ValidateResult.fail("出生日期不能为空");
}
if (StringUtils.isEmpty(this.getOriginAddress())) {
return ValidateResult.fail("身份证地址不正确");
}
if (StringUtils.isEmpty(this.getIssueOrganization())) {
return ValidateResult.fail("发证机关不正确");
}
if (this.getIdentityValidPeriodStart() == null || this.getIdentityValidPeriodEnd() == null) {
return ValidateResult.fail("身份证有效期不正确");
}
if (this.getIdentityValidPeriodStart().getTime() - this.getIdentityValidPeriodEnd().getTime() >= 0) {
return ValidateResult.fail("身份证有效期不正确");
}
if (this.getFrontFileId() == null || this.getFrontFileId() <= 0) {
return ValidateResult.fail("缺少身份证正面照片");
}
if (this.getBackFileId() == null || this.getBackFileId() <= 0) {
return ValidateResult.fail("缺少身份证反面照片");
}
if (StringUtils.isEmpty(this.getCredentialNo())) {
return ValidateResult.fail("驾驶证号码不正确");
}
// if (StringUtils.isEmpty(this.getFileNo())) {
// return ValidateResult.fail("驾驶证档案编号不正确");
// }
if (this.getFirstIssue() == null) {
return ValidateResult.fail("首次发证日期不正确");
}
if (this.getLicenseValidPeriodStart() == null || this.getLicenseValidPeriodEnd() == null) {
return ValidateResult.fail("驾驶证有效期不正确");
}
if (this.getLicenseValidPeriodStart().getTime() - this.getLicenseValidPeriodEnd().getTime() >= 0) {
return ValidateResult.fail("驾驶证有效期不正确");
}
if (this.getMainFileId() == null || this.getMainFileId() <= 0) {
return ValidateResult.fail("缺少驾驶证主页照片");
}
if (this.getSecondFileId() == null || this.getSecondFileId() <= 0) {
return ValidateResult.fail("缺少驾驶证副页照片");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class LoginPo extends Validation {
private String username;
private String password;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class PayingPo extends Validation {
private Integer planningId;
private Integer amount;
private String remark;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class ReturnDepositPo extends Validation {
private Integer contractId;
/** 返还金额 */
private Integer returnAmount;
/** */
private String remark;
}
package com.jair.entity.po;
import lombok.Data;
import java.util.List;
@Data
public class ReturnVehiclePo extends Validation {
private Integer contractId;
/** 是否有行驶证 */
private Integer license;
/** 是否有事故 */
private Integer accident;
/** 事故照片 */
private List<Integer> accidentFiles;
/** 违章罚款 */
private Integer breakRulesAmount;
/** 违章扣分 */
private Integer breakRulesDeduction;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SearchCompanyPo extends Validation {
/** 姓名 */
private String name;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class SearchContractPo extends Validation {
/** 合同类型,1车源合同,2司机合同 */
private Integer type;
/** 司机姓名 */
private String driverInfo;
/** 车牌号 */
private String vehicleInfo;
private Integer sourceId;
/** 合同日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDateStart;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDateEnd;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDateStart;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDateEnd;
/** 押金状态:-1押金不全,0未返还,1全部返还,2部分返还 */
private List<Integer> depositStatus;
/** 返还押金金额 */
private Integer returnDepositAmountMin;
private Integer returnDepositAmountMax;
private Date createTimeStart;
private Date createTimeEnd;
private Integer status;
private Integer companyId;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SearchDataPo {
Integer parentId;
Integer type;
String name;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SearchDriverPo extends Validation {
/** 身份证号码 */
private String identityNumber;
/** 姓名 */
private String name;
/** 电话 */
private String phone;
/** 现住址 */
private String address;
/** 紧急联系人 */
private String contactName;
/** 紧急联系人电话 */
private String contactPhone;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class SearchPlanningLogPo extends Validation {
/** 合同类型,1租金,2其它费用 */
private Integer type;
/** 合同类型,1付款,2延期 */
private Integer operationType;
/** 合同类型,1车源合同,2司机合同 */
private Integer contractType;
/** 司机姓名 */
private String driverInfo;
/** 车牌号 */
private String vehicleInfo;
/** 计划日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDateStart;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDateEnd;
/** 创建日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createDateStart;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createDateEnd;
private Integer companyId;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class SearchPlanningPo extends Validation {
/** 合同类型,1租金,2其它费用 */
private Integer type;
private String typeName;
/** 合同类型,1车源合同,2司机合同 */
private Integer contractType;
/** 司机姓名 */
private String driverInfo;
/** 车牌号 */
private String vehicleInfo;
/** 计划日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDateStart;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDateEnd;
private Integer paymentStatus;
private Integer status;
private Integer companyId;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SearchVechiclePo extends Validation {
private String plateNo;
private String brandName;
private String model;
private String environmentalStandards;
private String engineType;
private Integer status;
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jair.entity.bo.CfgFee;
import com.jair.entity.constant.ContractTypeEnum;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class SignContractPo extends Validation {
private Integer type = 0;
private Integer vehicleId = 0;
private Integer sourceId = 0;
private Integer driverId = 0;
/** 里程数 */
private Integer odograph = 0;
/** ev里程数 */
private Integer odographEv = 0;
/** 租赁开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
/** 租赁结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
/** 租赁方式 */
private Integer leaseType;
/** 租赁周期,xx周,xx月 */
private Integer leasePeriod;
/** 应付押金 */
private Integer payableDepositAmount;
/** 已付押金 */
private Integer paidDepositAmount;
/** 周期租金 */
private Integer rentAmount = 0;
/** 第一次已付租金 */
private Integer firstPaidAmount = 0;
private List<Integer> files;
private String remark;
private List<CfgFeePo> fees;
@Override
public ValidateResult validate() {
if (!this.getType().equals(ContractTypeEnum.SOURCE_CONTRACT.getKey()) && !this.getType().equals(ContractTypeEnum.DRIVER_CONTRACT.getKey())) {
return ValidateResult.fail("合同类型不正确");
}
if (this.getOdograph() == null || this.getOdograph() < 0) {
return ValidateResult.fail("请输入正确的里程数");
}
if (this.getStartDate() == null) {
return ValidateResult.fail("请选择合同开始日期");
}
// if (this.getStartDate().getTime() - this.getEndDate().getTime() >= 0) {
// return ValidateResult.fail("合约日期选择不正确");
// }
// if (this.getEndDate().getTime() - new Date().getTime() <= 0) {
// return ValidateResult.fail("合约结束日期选择不正确");
// }
if (this.getLeaseType() == null) {
return ValidateResult.fail("请输入正确的出租类型");
}
if (this.getLeasePeriod() == null || this.getLeasePeriod() <= 0) {
return ValidateResult.fail("请输入正确的出租周期");
}
if (this.getPayableDepositAmount() == null || this.getPayableDepositAmount() < 0) {
return ValidateResult.fail("请输入正确的应付押金金额");
}
if (this.getPaidDepositAmount() == null || this.getPaidDepositAmount() < 0) {
return ValidateResult.fail("请输入正确的已付押金金额");
}
if (this.getRentAmount() == null || this.getRentAmount() <= 0) {
return ValidateResult.fail("请输入正确周期租金");
}
if (this.getFirstPaidAmount() == null || this.getFirstPaidAmount() <= 0) {
return ValidateResult.fail("请输入正确首付租金");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SourcePo extends Validation {
private Integer id;
/** 车源名称 */
private String name;
/** 地址 */
private String address;
/** 联系人 */
private String contactName;
/** 电话 */
private String contactPhone;
/** */
private Integer status;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class SysDataPo extends Validation {
/** */
private Integer parentId;
/** 编码 */
private String code;
/** 名称 */
private String name;
/** 扩展 */
private String extend;
/** @DataTypeEnum */
private Integer type;
}
package com.jair.entity.po;
import lombok.Data;
@Data
public class TerminateContractPo extends Validation {
private Integer contractId;
private Integer deletePlanning;
}
package com.jair.entity.po;
import lombok.Data;
import org.springframework.util.StringUtils;
@Data
public class UpdateAccountPo extends Validation {
private Integer id;
/** 姓名 */
private String realName;
/** 电话 */
private String phone;
/** 地址 */
private String address;
@Override
public ValidateResult validate() {
if (this.getId() == null || this.getId() <= 0) {
return ValidateResult.fail("未知帐号");
}
if (StringUtils.isEmpty(this.getRealName()) || this.getRealName().trim().length() < 2) {
return ValidateResult.fail("姓名长度不能小于2位");
}
if (StringUtils.isEmpty(this.getPhone()) || this.getPhone().trim().length() != 11) {
return ValidateResult.fail("电话输入不正确");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
import org.springframework.util.StringUtils;
@Data
public class UpdateAccountStatusPo extends Validation {
private Integer id;
private Integer status;
@Override
public ValidateResult validate() {
if (this.getId() == null || this.getId() <= 0) {
return ValidateResult.fail("未知帐号");
}
if (this.getStatus() != 1 && this.getStatus() != 0) {
return ValidateResult.fail("状态不正确");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class UpdateContractPo extends Validation {
private Integer contractId;
/** 里程数 */
private Integer odograph;
/** ev里程数 */
private Integer odographEv;
/** 租赁开始日期 */
private Date startDate;
/** 租赁结束日期 */
private Date endDate;
/** 租赁方式 */
private Integer leaseType;
/** 押金状态:@DepositStatusEnum */
private Integer depositStatus;
/** 应付押金 */
private Integer payableDepositAmount;
/** 已付押金 */
private Integer paidDepositAmount;
/** 返还押金金额 */
private Integer returnDepositAmount;
/** 月租金 */
private Integer rentAmount;
private String remark;
private List<Integer> files;
@Override
public ValidateResult validate() {
if (this.getOdograph() < 0) {
return ValidateResult.fail("请输入正确的里程数");
}
if (this.getStartDate() == null || this.getEndDate() == null) {
return ValidateResult.fail("请选择合约日期");
}
if (this.getStartDate().getTime() - this.getEndDate().getTime() >= 0) {
return ValidateResult.fail("合约日期选择不正确");
}
if (this.getEndDate().getTime() - new Date().getTime() <= 0) {
return ValidateResult.fail("合约结束日期选择不正确");
}
if (this.getPayableDepositAmount() == null || this.getPayableDepositAmount() < 0) {
return ValidateResult.fail("请输入正确的应付押金金额");
}
if (this.getPaidDepositAmount() == null || this.getPaidDepositAmount() < 0) {
return ValidateResult.fail("请输入正确的已付押金金额");
}
if (this.getRentAmount() == null || this.getRentAmount() <= 0) {
return ValidateResult.fail("请输入正确月租金");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
import org.springframework.util.StringUtils;
@Data
public class UpdatePasswordPo extends Validation {
private Integer id;
/** 密码 */
private String password;
@Override
public ValidateResult validate() {
if (this.getId() == null || this.getId() <= 0) {
return ValidateResult.fail("未知帐号");
}
if (StringUtils.isEmpty(this.getPassword()) || this.getPassword().length() < 6) {
return ValidateResult.fail("密码长度不能小于6位");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data
public class UpdateVehiclePo extends Validation {
private Integer id;
/** 品牌 */
private String brandName;
/** 型号 */
private String model;
/** 排量 */
private String displacement;
/** 颜色 */
private String color;
/** 环保标准 */
private String environmentalStandards;
/** 动力类型 */
private String engineType;
/** 车牌号码 */
private String plateNo;
/** 车辆类型:小型轿车 */
private String type;
/** 所有人 */
private String owner;
/** 住址 */
private String address;
/** 使用性质:非营运 */
private String useCharacter;
/** 型号 */
private String licenseModel;
/** 识别代号 */
private String vin;
/** 发动机号码 */
private String engineNo;
/** 注册日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registerDate;
/** 发证日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date issueDate;
/** 核载人数 */
private String approvedPerson;
/** 总质量 */
private String weight;
/** 尺寸 */
private String outlineSize;
/** 行驶证主页照片 */
private Integer mainFileId;
/** 行驶证副页照片 */
private Integer secondFileId;
private String remark;
@Override
public ValidateResult validate() {
if (this.getId() == null || this.getId() <= 0) {
return ValidateResult.fail("车辆id不正确");
}
if (StringUtils.isEmpty(this.getPlateNo())) {
return ValidateResult.fail("请输入完整车牌号");
}
this.setPlateNo(this.getPlateNo().toUpperCase());
if (!this.getPlateNo().matches("^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$")) {
return ValidateResult.fail("车牌号格式不正确");
}
return ValidateResult.succeed(this);
}
}
package com.jair.entity.po;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@Data
@Slf4j
public class ValidateResult {
private Integer code;
private String data;
public boolean isSucceed() {
return code == 0;
}
public static ValidateResult fail(String data) {
ValidateResult result = new ValidateResult();
result.setCode(1);
result.setData(data);
return result;
}
public static ValidateResult succeed(Object object) {
log.info("数据校验通过:{}", object.toString());
ValidateResult result = new ValidateResult();
result.setCode(0);
result.setData("验证通过");
return result;
}
}
package com.jair.entity.po;
public abstract class Validation {
public ValidateResult validate() {
return null;
}
}
package com.jair.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jair.entity.bo.Account;
import lombok.Data;
import java.util.Date;
@Data
public class CompanyVo {
/**
* 公司id
*/
private Integer id;
/**
* 公司名称
*/
private String name;
/**
* 简称
*/
private String abbr;
/**
* 地址
*/
private String address;
/**
* 联系人
*/
private String contactName;
/**
* 联系电话
*/
private String contactPhone;
/**
* 省
*/
private String province;
/**
* 市
*/
private String city;
/**
* 区
*/
private String district;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date expiredDate;
/**
* 状态
*/
private Integer status;
private Integer level;
private Account account;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jair.entity.bo.AttFile;
import com.jair.entity.bo.Source;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
public class ContractVo implements Serializable {
private Integer id;
/** 合同类型,1车源合同,2司机合同 */
private Integer type;
private String code;
/** 车辆信息 */
private Integer vehicleId;
private VehicleVo vehicleVo;
/** 车源信息 */
private Integer sourceId;
private Source sourceVo;
/** 司机信息 */
private Integer driverId;
private DriverVo driverVo;
/** 里程数 */
private Integer odograph;
/** ev里程数 */
private Integer odographEv;
/** 租赁开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
/** 租赁结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
/** 租赁方式 */
private Integer leaseType;
/** 押金状态:@DepositStatusEnum */
private Integer depositStatus;
/** 应付押金 */
private Integer payableDepositAmount;
/** 已付押金 */
private Integer paidDepositAmount;
/** 返还押金金额 */
private Integer returnDepositAmount;
/** 租金 */
private Integer rentAmount;
/** 状态:1正常有效,0已结束 */
private Integer status;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
/** 是否存在有效(车源或司机)合同 */
private Integer anotherContract = 0;
private List<AttFile> files;
}
package com.jair.entity.vo;
import lombok.Data;
@Data
public class DashboardVo {
/** 全部司机数量 */
private Integer allDriverCount;
/** 签约中司机数量 */
private Integer signedDriverCount;
/** 全部车辆数量 */
private Integer allVehicleCount;
/** 签约中车辆数量 */
private Integer signedVehicleCount;
/** 本月计划 回款 */
private Integer currentMonthPlanAmount;
/** 本月实际 回款 */
private Integer currentMonthActualAmount;
/** 今日计划 回款 */
private Integer todayPlanAmount;
/** 今日实际 回款 */
private Integer todayActualAmount;
/** 总合同数量 */
private Integer allContract;
/** 执行中合同数量 */
private Integer validContract;
/** 本月新租 */
private Integer currentMonthContract;
/** 上月新租 */
private Integer lastMonthContract;
/** 今日新租 */
private Integer todayContract;
/** 昨日新租 */
private Integer yesterdayContract;
}
package com.jair.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jair.entity.bo.AttFile;
import lombok.Data;
import java.util.Date;
@Data
public class DriverVo {
private Integer id;
/** 身份证号码 */
private String identityNumber;
/** 姓名 */
private String name;
/** 性别 */
private String gender;
/** 电话 */
private String phone;
/** 现住址 */
private String address;
/** 紧急联系人 */
private String contactName;
/** 紧急联系人电话 */
private String contactPhone;
/** 是否有网约车执照:0无,1有 */
private Integer serviceLicense;
// 身份证信息
/** 民族 */
private String nation;
/** 出生日期 */
private Date birthday;
/** 身份证地址 */
private String originAddress;
/** 发证机关 */
private String issueOrganization;
/** 身份证 有效期-起 */
private Date identityValidPeriodStart;
/** 身份证 有效期-止 */
private Date identityValidPeriodEnd;
/** 身份证 正面照片 */
private AttFile frontFile;
// private Integer frontFileId;
// private String frontFileUrl;
/** 身份证 反面照片 */
private AttFile backFile;
// private Integer backFileId;
// private String backFileUrl;
// 驾驶证信息
/** 驾驶证号 */
private String credentialNo;
/** 档案编号 */
private String fileNo;
/** 首次发证日期 */
private Date firstIssue;
/** 驾照 准驾车型 */
private String drivingClass;
/** 驾照 有效期-起 */
private Date licenseValidPeriodStart;
/** 驾照 有效期-止 */
private Date licenseValidPeriodEnd;
/** 驾照 主页照片 */
private AttFile mainFile;
// private Integer mainFileId;
// private String mainFileUrl;
/** 驾照 副页照片 */
private AttFile secondFile;
// private Integer secondFileId;
// private String secondFileUrl;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 驾驶证
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DrivingLicenseVo implements Serializable {
private static final long serialVersionUID = 1L;
/** 姓名 */
private String name;
/** 驾驶证号 */
private String credentialNo;
/** 档案编号 */
private String fileNo;
/** 国籍 */
private String country;
/** 住址 */
private String address;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
/** 首次发证日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date firstIssue;
/** 准驾车型 */
@TableField("class")
private String drivingClass;
/** 有效期-起 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date validPeriodStart;
/** 有效期-止 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date validPeriodEnd;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-10-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class FeePlanningVo implements Serializable {
private Integer id;
/** 费用类型 */
private Integer type;
/** 费用名称 */
private String name;
/** 合同ID */
private Integer contractId;
/** 合同类型 */
private Integer contractType;
/** 计划执行日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDate;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date delayDate;
/** 应付金额 */
private Integer payableAmount;
/** 已付金额 */
private Integer paidAmount;
/** 状态:0未付,1已付部分,2已付全部 */
private Integer paymentStatus;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
private Integer status;
private String contractCode;
private Integer driverId;
private String driverName;
private Integer vehicleId;
private String plateNo;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class IdentityCardVo implements Serializable {
private static final long serialVersionUID = 1L;
/** 姓名 */
private String name;
/** 性别 */
private String gender;
/** 民族 */
private String nation;
private String identityNumber;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
/** 身份证地址 */
private String originAddress;
/** 发证机关 */
private String issueOrganization;
/** 有效期-起 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date validPeriodStart;
/** 有效期-止 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date validPeriodEnd;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
@Data
public class ModelVo {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String code;
private String name;
private String extend;
private String type;
private Integer brandId;
private String brandCode;
private String brandName;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Jair
* @since 2020-10-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PlanningOperationLogVo implements Serializable {
private static final long serialVersionUID = 1L;
/** 合同ID */
private Integer contractId;
/** 合同类型 */
private Integer planningId;
/** @PlanningLogActionEnum */
private Integer type;
/** @PlanningLogActionEnum */
private String action;
/** 金额 */
private Integer amount;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private Integer createById;
private String createByName;
private Integer companyId;
private String planName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planDate;
private Integer payableAmount;
private String plateNo;
private String brandName;
private String model;
private String driverName;
private String driverPhone;
private String driverId;
}
package com.jair.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 行驶证
* </p>
*
* @author Jair
* @since 2020-08-25
*/
@Data
public class VehicleLicenseDetectVo implements Serializable {
/** 车牌号 */
private String plateNo;
/** 识别代号 */
private String vin;
/** 发动机号码 */
private String engineNo;
/** 车辆类型:小型轿车 */
private String type;
/** 使用性质:非营运 */
private String useCharacter;
/** 型号 */
private String licenseModel;
/** 所有人 */
private String owner;
/** 住址 */
private String address;
/** 注册日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registerDate;
/** 发证日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date issueDate;
/** 核载人数 */
private String approvedPerson;
/** 总质量 */
private String weight;
/** 尺寸 */
private String outlineSize;
}
package com.jair.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.Data;
import java.util.Date;
@Data
public class VehicleVo {
private Integer id;
private Integer licenseId;
/** 品牌 */
private Integer brandId;
/** 品牌 */
private String brandName;
/** 型号 */
private String model;
/** 排量 */
private String displacement;
/** 颜色 */
private String color;
/** 环保标准 */
private String environmentalStandards;
/** 动力类型 */
private String engineType;
/** 状态 */
private Integer status;
/** 车牌号码 */
private String plateNo;
/** 车辆类型:小型轿车 */
private String type;
/** 所有人 */
private String owner;
/** 住址 */
private String address;
/** 使用性质:非营运 */
private String useCharacter;
/** 型号 */
private String licenseModel;
/** 识别代号 */
private String vin;
/** 发动机号码 */
private String engineNo;
/** 注册日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registerDate;
/** 发证日期 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date issueDate;
/** 核载人数 */
private String approvedPerson;
/** 总质量 */
private String weight;
/** 尺寸 */
private String outlineSize;
/** 行驶证主页照片 */
private Integer mainFileId;
/** 行驶证主页照片 url */
private String mainFileUrl;
/** 行驶证副页照片 */
private Integer secondFileId;
/** 行驶证副页照片 url */
private String secondFileUrl;
private String remark;
private Integer sourceStatus;
private Integer driverStatus;
}
package com.jair.mapper;
import com.jair.entity.bo.Account;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 帐号 Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface AccountMapper extends BaseMapper<Account> {
}
package com.jair.mapper;
import com.jair.entity.bo.AttFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface AttFileMapper extends BaseMapper<AttFile> {
}
package com.jair.mapper;
import com.jair.entity.bo.CfgData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface CfgDataMapper extends BaseMapper<CfgData> {
}
package com.jair.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jair.entity.bo.CfgData;
import com.jair.entity.bo.CfgFee;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface CfgFeeMapper extends BaseMapper<CfgFee> {
}
package com.jair.mapper;
import com.jair.entity.bo.Company;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 企业主体 Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface CompanyMapper extends BaseMapper<Company> {
}
package com.jair.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jair.entity.bo.Contract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jair.entity.po.SearchContractPo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface ContractMapper extends BaseMapper<Contract> {
IPage<Contract> queryDriverContracts(Page page, @Param("searcher") SearchContractPo searcher);
}
package com.jair.mapper;
import com.jair.entity.bo.ContractOperationLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-25
*/
public interface ContractOperationLogMapper extends BaseMapper<ContractOperationLog> {
}
package com.jair.mapper;
import com.jair.entity.bo.ContractReturnVehicleAttachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-31
*/
public interface ContractReturnVehicleAttachmentMapper extends BaseMapper<ContractReturnVehicleAttachment> {
}
package com.jair.mapper;
import com.jair.entity.bo.ContractReturnVehicle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Jair
* @since 2020-08-31
*/
public interface ContractReturnVehicleMapper extends BaseMapper<ContractReturnVehicle> {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment