master
commit
4028ff2c36
|
@ -0,0 +1,199 @@
|
||||||
|
<?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>
|
||||||
|
<groupId>com.jepsoninfo</groupId>
|
||||||
|
<artifactId>regulatoryPlatform</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<name>regulatoryPlatform</name>
|
||||||
|
<description>regulatory Platform</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<aliyun-spring-boot.version>1.0.0</aliyun-spring-boot.version>
|
||||||
|
<spring-boot.version>2.5.5</spring-boot.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
<version>1.3.0</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.tomcat</groupId>
|
||||||
|
<artifactId>tomcat-jdbc</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-core</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.26</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mchange</groupId>
|
||||||
|
<artifactId>c3p0</artifactId>
|
||||||
|
<version>0.9.5.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
<version>1.4.7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.paho</groupId>
|
||||||
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||||
|
<version>1.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.belerweb</groupId>
|
||||||
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
<version>2.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>aliyun-spring-boot-dependencies</artifactId>
|
||||||
|
<version>${aliyun-spring-boot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-dependencies</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/lib/</outputDirectory>
|
||||||
|
<includeScope>compile</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<includes>
|
||||||
|
<include>
|
||||||
|
<groupId>nothing</groupId>
|
||||||
|
<artifactId>nothing</artifactId>
|
||||||
|
</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<classpathPrefix>lib/</classpathPrefix>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>8</source>
|
||||||
|
<target>8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<!-- https://gitee.com/roseboy/classfinal -->
|
||||||
|
<groupId>net.roseboy</groupId>
|
||||||
|
<artifactId>classfinal-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
<configuration>
|
||||||
|
<password>#</password><!--加密打包之后pom.xml会被删除,不用担心在jar包里找到此密码-->
|
||||||
|
<packages>com.jepsoninfo</packages>
|
||||||
|
<!-- <cfgfiles>*.properties</cfgfiles>-->
|
||||||
|
<excludes>org.spring</excludes>
|
||||||
|
<!-- <code>CA5800E403C341E1D2738A951EF553B6D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
|
||||||
|
<!-- <libjars>a.jar,b.jar</libjars>-->
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>classFinal</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.jepsoninfo;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||||
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
|
|
||||||
|
@EnableAsync
|
||||||
|
@EnableAspectJAutoProxy
|
||||||
|
@MapperScan("com.jepsoninfo.*.dao")
|
||||||
|
@ComponentScan("com.jepsoninfo.*")
|
||||||
|
@SpringBootApplication
|
||||||
|
public class RegulatoryPlatformApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(RegulatoryPlatformApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.jepsoninfo.api.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.api.service.ApiService;
|
||||||
|
import com.jepsoninfo.app.entity.ex.AppInfoEx;
|
||||||
|
import com.jepsoninfo.common.entity.ReportUnifyReq;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.user.entity.UserToken;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import jdk.nashorn.internal.ir.annotations.Ignore;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
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.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("api/v1")
|
||||||
|
public class ApiController {
|
||||||
|
@Resource
|
||||||
|
private ApiService apiService;
|
||||||
|
|
||||||
|
@PostMapping("/getToken")
|
||||||
|
public ResultEntity<UserToken> getToken(@RequestBody AppInfoEx carInfo) {
|
||||||
|
UserToken token = apiService.getToken(carInfo);
|
||||||
|
if(token == null){
|
||||||
|
return ResultEntity.fail(ErrorStatus.PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
return ResultEntity.success(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/orderInfo/add")
|
||||||
|
public ResultEntity<Integer> add(@Ignore String appKey,@RequestBody OrderInfoEx carInfo) {
|
||||||
|
Integer token = apiService.add(appKey,carInfo);
|
||||||
|
if(token == 0){
|
||||||
|
return ResultEntity.fail(ErrorStatus.PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
return ResultEntity.success(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/orderInfo/update")
|
||||||
|
public ResultEntity<Integer> update(@Ignore String appKey,@RequestBody OrderInfoEx carInfo) {
|
||||||
|
Integer token = apiService.update(appKey,carInfo);
|
||||||
|
if(token == 0){
|
||||||
|
return ResultEntity.fail(ErrorStatus.PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
return ResultEntity.success(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/orderInfo/delete")
|
||||||
|
public ResultEntity<Integer> delete(@Ignore String appKey,@RequestBody OrderInfoEx carInfo) {
|
||||||
|
Integer token = apiService.delete(appKey,carInfo);
|
||||||
|
if(token == 0){
|
||||||
|
return ResultEntity.fail(ErrorStatus.PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
return ResultEntity.success(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/reportCarPass")
|
||||||
|
public ResultEntity<Integer> reportCarPass(@RequestBody ReportUnifyReq carInfo) {
|
||||||
|
// Integer token = apiService.update(appKey,carInfo);
|
||||||
|
// if(token == 0){
|
||||||
|
// return ResultEntity.fail(ErrorStatus.PARAMETER_ERROR);
|
||||||
|
// }
|
||||||
|
JSONObject jSONObject= JSONObject.fromObject(carInfo);
|
||||||
|
System.out.println(jSONObject.toString());
|
||||||
|
return ResultEntity.success();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,180 @@
|
||||||
|
package com.jepsoninfo.api.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.dao.AppInfoDao;
|
||||||
|
import com.jepsoninfo.app.entity.ex.AppInfoEx;
|
||||||
|
import com.jepsoninfo.company.dao.ClearCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.PropertyCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.TreatmentCompanyDao;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import com.jepsoninfo.order.dao.OrderInfoDao;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.user.dao.UserTokenDao;
|
||||||
|
import com.jepsoninfo.user.entity.UserToken;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserTokenEx;
|
||||||
|
import com.jepsoninfo.util.Md5Util;
|
||||||
|
import com.jepsoninfo.util.MqttUtil;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.RandomUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.*;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (AppInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-05 16:13:19
|
||||||
|
*/
|
||||||
|
@Service("apiService")
|
||||||
|
public class ApiService {
|
||||||
|
@Autowired
|
||||||
|
private AppInfoDao appInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private UserTokenDao userTokenDao;
|
||||||
|
@Autowired
|
||||||
|
private OrderInfoDao orderInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private ClearCompanyDao clearCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private PropertyCompanyDao propertyCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private TreatmentCompanyDao treatmentCompanyDao;
|
||||||
|
|
||||||
|
public UserToken getToken(AppInfoEx req) {
|
||||||
|
AppInfoEx appInfoEx = appInfoDao.selectByCond(req);
|
||||||
|
UserToken strToken = null;
|
||||||
|
String strEncode = appInfoEx.getAppKey() + "&" + appInfoEx.getAppSecret() + "&" + req.getTime();
|
||||||
|
|
||||||
|
String sign = Md5Util.encode(strEncode);
|
||||||
|
|
||||||
|
if(sign.compareTo(req.getSign()) == 0){
|
||||||
|
strToken = createToken(req.getAppKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
return strToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserToken createToken(String appKey) {
|
||||||
|
String tokenStr = RandomUtil.getRandomUuid();
|
||||||
|
UserTokenEx cond = new UserTokenEx();
|
||||||
|
cond.setAppKey(appKey);
|
||||||
|
UserToken record = this.userTokenDao.selectByCond(cond);
|
||||||
|
LocalDateTime today = LocalDateTime.now();
|
||||||
|
LocalDateTime expire = today.plusHours(2);
|
||||||
|
ZonedDateTime zonedDateTime = expire.atZone(ZoneId.systemDefault());
|
||||||
|
// 本地时间线LocalDateTime到即时时间线Instant时间戳
|
||||||
|
Instant instant = zonedDateTime.toInstant();
|
||||||
|
// UTC时间(世界协调时间,UTC + 00:00)转北京(北京,UTC + 8:00)时间
|
||||||
|
Date expireDate = Date.from(instant);
|
||||||
|
if (record == null) {
|
||||||
|
record = new UserToken();
|
||||||
|
record.setToken(tokenStr);
|
||||||
|
record.setAppKey(appKey);
|
||||||
|
record.setExpireTime(expireDate);
|
||||||
|
record.setCreateTime(new Date());
|
||||||
|
record.setUpdateTime(new Date());
|
||||||
|
this.userTokenDao.insertSelective(record);
|
||||||
|
} else {
|
||||||
|
record.setToken(tokenStr);
|
||||||
|
record.setAppKey(appKey);
|
||||||
|
record.setExpireTime(expireDate);
|
||||||
|
record.setUpdateTime(new Date());
|
||||||
|
this.userTokenDao.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer add(String appKey,OrderInfoEx req) {
|
||||||
|
AppInfoEx cond = new AppInfoEx();
|
||||||
|
|
||||||
|
cond.setAppKey(appKey);
|
||||||
|
AppInfoEx appInfoEx = appInfoDao.selectByCond(cond);
|
||||||
|
String companyNo = "";
|
||||||
|
|
||||||
|
if(appInfoEx.getCompanyType().intValue() == 2){
|
||||||
|
ClearCompanyEx clearCompanyEx = clearCompanyDao.selectByPrimaryKey(appInfoEx.getCompanyId());
|
||||||
|
companyNo = clearCompanyEx.getSerialNo();
|
||||||
|
}else if(appInfoEx.getCompanyType().intValue() == 4){
|
||||||
|
TreatmentCompanyEx treatmentCompanyEx = treatmentCompanyDao.selectByPrimaryKey(appInfoEx.getCompanyId());
|
||||||
|
companyNo = treatmentCompanyEx.getSerialNo();
|
||||||
|
}
|
||||||
|
|
||||||
|
OrderInfoEx orderCond = new OrderInfoEx();
|
||||||
|
|
||||||
|
orderCond.setClearOrderNo(req.getClearOrderNo());
|
||||||
|
orderCond.setTreatmentOrderNo(req.getTreatmentOrderNo());
|
||||||
|
OrderInfoEx orderInfoEx = orderInfoDao.selectByCond(orderCond);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
|
||||||
|
req.setNYear(calendar.get(Calendar.YEAR));
|
||||||
|
req.setNMonth(calendar.get(Calendar.MONTH) + 1);
|
||||||
|
req.setNDay(calendar.get(Calendar.DAY_OF_MONTH));
|
||||||
|
|
||||||
|
if(orderInfoEx == null) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
req.setIsDel(0);
|
||||||
|
orderInfoDao.insertSelective(req);
|
||||||
|
req.setOrderNo(appInfoEx.getRegionId() + companyNo + NumberUtil.getNumberString(req.getId(), 10));
|
||||||
|
MqttUtil mqttUtil = new MqttUtil();
|
||||||
|
|
||||||
|
mqttUtil.publish("regulatory/updateOrder","{}");
|
||||||
|
return orderInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer update(String appKey,OrderInfoEx req) {
|
||||||
|
AppInfoEx cond = new AppInfoEx();
|
||||||
|
|
||||||
|
cond.setAppKey(appKey);
|
||||||
|
AppInfoEx appInfoEx = appInfoDao.selectByCond(cond);
|
||||||
|
|
||||||
|
OrderInfoEx orderCond = new OrderInfoEx();
|
||||||
|
|
||||||
|
orderCond.setClearOrderNo(req.getClearOrderNo());
|
||||||
|
orderCond.setTreatmentOrderNo(req.getTreatmentOrderNo());
|
||||||
|
OrderInfoEx orderInfoEx = orderInfoDao.selectByCond(orderCond);
|
||||||
|
|
||||||
|
if(orderInfoEx != null) {
|
||||||
|
req.setId(orderInfoEx.getId());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
MqttUtil mqttUtil = new MqttUtil();
|
||||||
|
|
||||||
|
mqttUtil.publish("regulatory/updateOrder","{}");
|
||||||
|
return orderInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer delete(String appKey, OrderInfoEx req) {
|
||||||
|
AppInfoEx cond = new AppInfoEx();
|
||||||
|
|
||||||
|
cond.setAppKey(appKey);
|
||||||
|
AppInfoEx appInfoEx = appInfoDao.selectByCond(cond);
|
||||||
|
|
||||||
|
OrderInfoEx orderCond = new OrderInfoEx();
|
||||||
|
|
||||||
|
orderCond.setClearOrderNo(req.getClearOrderNo());
|
||||||
|
orderCond.setTreatmentOrderNo(req.getTreatmentOrderNo());
|
||||||
|
OrderInfoEx orderInfoEx = orderInfoDao.selectByCond(orderCond);
|
||||||
|
|
||||||
|
if(orderInfoEx != null) {
|
||||||
|
req.setId(orderInfoEx.getId());
|
||||||
|
req.setIsDel(1);
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return orderInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.app.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.AppInfo;
|
||||||
|
import com.jepsoninfo.app.entity.ex.AppInfoEx;
|
||||||
|
import com.jepsoninfo.app.service.AppInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (AppInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:43:32
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("appInfo")
|
||||||
|
public class AppInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private AppInfoService appInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param appInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<AppInfoEx>> list(@RequestBody AppInfoEx appInfo) {
|
||||||
|
return ResultEntity.success(appInfoService.list(appInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<AppInfoEx> detail(@RequestBody AppInfoEx appInfo) {
|
||||||
|
return ResultEntity.success(this.appInfoService.detail(appInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param appInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<AppInfoEx> add(@RequestBody AppInfoEx appInfo) {
|
||||||
|
return ResultEntity.success(this.appInfoService.add(appInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param appInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody AppInfo appInfo) {
|
||||||
|
return ResultEntity.success(this.appInfoService.update(appInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody AppInfo appInfo) {
|
||||||
|
return ResultEntity.success(this.appInfoService.delete(appInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.app.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.ApplyAccess;
|
||||||
|
import com.jepsoninfo.app.entity.ex.ApplyAccessEx;
|
||||||
|
import com.jepsoninfo.app.service.ApplyAccessService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ApplyAccess)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:44:30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("applyAccess")
|
||||||
|
public class ApplyAccessController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ApplyAccessService applyAccessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param applyAccess 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<ApplyAccessEx>> list(@RequestBody ApplyAccessEx applyAccess) {
|
||||||
|
return ResultEntity.success(applyAccessService.list(applyAccess));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<ApplyAccessEx> detail(@RequestBody ApplyAccessEx applyAccess) {
|
||||||
|
return ResultEntity.success(this.applyAccessService.detail(applyAccess));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param applyAccess 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<ApplyAccessEx> add(@RequestBody ApplyAccessEx applyAccess) {
|
||||||
|
return ResultEntity.success(this.applyAccessService.add(applyAccess));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param applyAccess 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody ApplyAccess applyAccess) {
|
||||||
|
return ResultEntity.success(this.applyAccessService.update(applyAccess));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody ApplyAccess applyAccess) {
|
||||||
|
return ResultEntity.success(this.applyAccessService.delete(applyAccess.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.app.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.AppInfo;
|
||||||
|
import com.jepsoninfo.app.entity.ex.AppInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (AppInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:43:32
|
||||||
|
*/
|
||||||
|
public interface AppInfoDao {
|
||||||
|
|
||||||
|
AppInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(AppInfo appInfo);
|
||||||
|
|
||||||
|
int insertSelective(AppInfo appInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(AppInfo appInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(AppInfo appInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
AppInfoEx selectByCond(@Param("cond") AppInfoEx appInfo);
|
||||||
|
|
||||||
|
List<AppInfoEx> selectListByCond(@Param("cond") AppInfoEx appInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(AppInfo appInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.app.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.ApplyAccess;
|
||||||
|
import com.jepsoninfo.app.entity.ex.ApplyAccessEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ApplyAccess)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:44:30
|
||||||
|
*/
|
||||||
|
public interface ApplyAccessDao {
|
||||||
|
|
||||||
|
ApplyAccessEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(ApplyAccess applyAccess);
|
||||||
|
|
||||||
|
int insertSelective(ApplyAccess applyAccess);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ApplyAccess applyAccess);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ApplyAccess applyAccess);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
ApplyAccessEx selectByCond(@Param("cond") ApplyAccessEx applyAccess);
|
||||||
|
|
||||||
|
List<ApplyAccessEx> selectListByCond(@Param("cond") ApplyAccessEx applyAccess);
|
||||||
|
|
||||||
|
long selectCountByCond(ApplyAccess applyAccess);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.jepsoninfo.app.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (AppInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-20 13:48:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -92697588329957540L;
|
||||||
|
/**
|
||||||
|
* appID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* app名称
|
||||||
|
*/
|
||||||
|
private String appName;
|
||||||
|
/**
|
||||||
|
* 接入ID
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* 接入密钥
|
||||||
|
*/
|
||||||
|
private String appSecret;
|
||||||
|
/**
|
||||||
|
* 平台ID
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 公司类型,2:清运公司,3:物业公司,4:消纳场
|
||||||
|
*/
|
||||||
|
private Integer companyType;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 区域id
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.jepsoninfo.app.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ApplyAccess)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 17:44:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyAccess implements Serializable {
|
||||||
|
private static final long serialVersionUID = -81989327013888134L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 公司类型
|
||||||
|
*/
|
||||||
|
private Integer companyType;
|
||||||
|
/**
|
||||||
|
* 业务名称
|
||||||
|
*/
|
||||||
|
private String appName;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 服务器白名单地址
|
||||||
|
*/
|
||||||
|
private String ipAddr;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.jepsoninfo.app.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.AppInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AppInfoEx extends AppInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private String sign;
|
||||||
|
|
||||||
|
private String time;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.app.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.ApplyAccess;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApplyAccessEx extends ApplyAccess {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.jepsoninfo.app.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.AppInfo;
|
||||||
|
import com.jepsoninfo.app.entity.ex.AppInfoEx;
|
||||||
|
import com.jepsoninfo.app.dao.AppInfoDao;
|
||||||
|
import com.jepsoninfo.app.service.AppInfoService;
|
||||||
|
import com.jepsoninfo.company.dao.ClearCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.PropertyCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.TreatmentCompanyDao;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import com.jepsoninfo.util.RandomUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (AppInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:43:33
|
||||||
|
*/
|
||||||
|
@Service("appInfoService")
|
||||||
|
public class AppInfoService {
|
||||||
|
@Autowired
|
||||||
|
private AppInfoDao appInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private ClearCompanyDao clearCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private PropertyCompanyDao propertyCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private TreatmentCompanyDao treatmentCompanyDao;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public AppInfoEx detail(AppInfoEx req) {
|
||||||
|
return this.appInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<AppInfoEx> list(AppInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<AppInfoEx> list = this.appInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<AppInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public AppInfoEx add(AppInfoEx req) {
|
||||||
|
Long regionId = 0L;
|
||||||
|
Integer companyType = req.getCompanyType();
|
||||||
|
Long companyId = req.getCompanyId();
|
||||||
|
|
||||||
|
if(companyType == 2){
|
||||||
|
ClearCompanyEx companyEx = clearCompanyDao.selectByPrimaryKey(companyId);
|
||||||
|
regionId = companyEx.getRegionId();
|
||||||
|
}else if(companyType == 3){
|
||||||
|
PropertyCompanyEx companyEx = propertyCompanyDao.selectByPrimaryKey(companyId);
|
||||||
|
regionId = companyEx.getRegionId();
|
||||||
|
}else if(companyType == 4){
|
||||||
|
TreatmentCompanyEx companyEx = treatmentCompanyDao.selectByPrimaryKey(companyId);
|
||||||
|
regionId = companyEx.getRegionId();
|
||||||
|
}
|
||||||
|
|
||||||
|
req.setRegionId(regionId);
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
req.setAppKey("SCDZ" + RandomUtil.getRandomNonce(8));
|
||||||
|
req.setAppSecret(RandomUtil.getRandomNonce(10));
|
||||||
|
this.appInfoDao.insertSelective(req);
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(AppInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.appInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.appInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.app.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.app.entity.ApplyAccess;
|
||||||
|
import com.jepsoninfo.app.entity.ex.ApplyAccessEx;
|
||||||
|
import com.jepsoninfo.app.dao.ApplyAccessDao;
|
||||||
|
import com.jepsoninfo.app.service.ApplyAccessService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ApplyAccess)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 14:44:30
|
||||||
|
*/
|
||||||
|
@Service("applyAccessService")
|
||||||
|
public class ApplyAccessService {
|
||||||
|
@Autowired
|
||||||
|
private ApplyAccessDao applyAccessDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ApplyAccessEx detail(ApplyAccessEx req) {
|
||||||
|
return this.applyAccessDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<ApplyAccessEx> list(ApplyAccessEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<ApplyAccessEx> list = this.applyAccessDao.selectListByCond(req);
|
||||||
|
PageInfo<ApplyAccessEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ApplyAccessEx add(ApplyAccessEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.applyAccessDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(ApplyAccess req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.applyAccessDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.applyAccessDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
package com.jepsoninfo.car.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarInfoEx;
|
||||||
|
import com.jepsoninfo.car.service.CarInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("carInfo")
|
||||||
|
public class CarInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private CarInfoService carInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param carInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<CarInfoEx>> list(@RequestBody CarInfoEx carInfo) {
|
||||||
|
return ResultEntity.success(carInfoService.list(carInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<CarInfoEx> detail(@RequestBody CarInfoEx carInfo) {
|
||||||
|
return ResultEntity.success(this.carInfoService.detail(carInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param carInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<CarInfoEx> add(@RequestBody CarInfoEx carInfo) {
|
||||||
|
return ResultEntity.success(this.carInfoService.add(carInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchAdd")
|
||||||
|
public ResultEntity<CarInfoEx> batchAdd(@RequestBody List<CarInfoEx> list) {
|
||||||
|
for(int i = 0;i < list.size();i++){
|
||||||
|
CarInfoEx carInfo = list.get(i);
|
||||||
|
|
||||||
|
this.carInfoService.add(carInfo);
|
||||||
|
}
|
||||||
|
return ResultEntity.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param carInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody CarInfo carInfo) {
|
||||||
|
return ResultEntity.success(this.carInfoService.update(carInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody CarInfo carInfo) {
|
||||||
|
return ResultEntity.success(this.carInfoService.delete(carInfo.getId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.car.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarTrack;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarTrackEx;
|
||||||
|
import com.jepsoninfo.car.service.CarTrackService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarTrack)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:01:07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("carTrack")
|
||||||
|
public class CarTrackController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private CarTrackService carTrackService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param carTrack 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<CarTrackEx>> list(@RequestBody CarTrackEx carTrack) {
|
||||||
|
return ResultEntity.success(carTrackService.list(carTrack));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<CarTrackEx> detail(@RequestBody CarTrackEx carTrack) {
|
||||||
|
return ResultEntity.success(this.carTrackService.detail(carTrack));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param carTrack 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<CarTrackEx> add(@RequestBody CarTrackEx carTrack) {
|
||||||
|
return ResultEntity.success(this.carTrackService.add(carTrack));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param carTrack 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody CarTrack carTrack) {
|
||||||
|
return ResultEntity.success(this.carTrackService.update(carTrack));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody CarTrack carTrack) {
|
||||||
|
return ResultEntity.success(this.carTrackService.delete(carTrack.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
package com.jepsoninfo.car.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.DeviceInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.DeviceInfoEx;
|
||||||
|
import com.jepsoninfo.car.service.DeviceInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (DeviceInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-01 16:21:25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("deviceInfo")
|
||||||
|
public class DeviceInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private DeviceInfoService deviceInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param deviceInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<DeviceInfoEx>> list(@RequestBody DeviceInfoEx deviceInfo) {
|
||||||
|
return ResultEntity.success(deviceInfoService.list(deviceInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<DeviceInfoEx> detail(@RequestBody DeviceInfoEx deviceInfo) {
|
||||||
|
return ResultEntity.success(this.deviceInfoService.detail(deviceInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param deviceInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<DeviceInfoEx> add(@RequestBody DeviceInfoEx deviceInfo) {
|
||||||
|
return ResultEntity.success(this.deviceInfoService.add(deviceInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchAdd")
|
||||||
|
public ResultEntity<DeviceInfoEx> batchAdd(@RequestBody List<DeviceInfoEx> list) {
|
||||||
|
for(int i = 0;i < list.size();i++){
|
||||||
|
DeviceInfoEx deviceInfo = list.get(i);
|
||||||
|
|
||||||
|
this.deviceInfoService.add(deviceInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultEntity.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param deviceInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody DeviceInfo deviceInfo) {
|
||||||
|
return ResultEntity.success(this.deviceInfoService.update(deviceInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody DeviceInfo deviceInfo) {
|
||||||
|
return ResultEntity.success(this.deviceInfoService.delete(deviceInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.car.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:30
|
||||||
|
*/
|
||||||
|
public interface CarInfoDao {
|
||||||
|
|
||||||
|
CarInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(CarInfo carInfo);
|
||||||
|
|
||||||
|
int insertSelective(CarInfo carInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CarInfo carInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CarInfo carInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
CarInfoEx selectByCond(@Param("cond") CarInfoEx carInfo);
|
||||||
|
|
||||||
|
List<CarInfoEx> selectListByCond(@Param("cond") CarInfoEx carInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(CarInfo carInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.car.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarTrack;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarTrackEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarTrack)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:01:07
|
||||||
|
*/
|
||||||
|
public interface CarTrackDao {
|
||||||
|
|
||||||
|
CarTrackEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(CarTrack carTrack);
|
||||||
|
|
||||||
|
int insertSelective(CarTrack carTrack);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CarTrack carTrack);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CarTrack carTrack);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
CarTrackEx selectByCond(@Param("cond") CarTrackEx carTrack);
|
||||||
|
|
||||||
|
List<CarTrackEx> selectListByCond(@Param("cond") CarTrackEx carTrack);
|
||||||
|
|
||||||
|
long selectCountByCond(CarTrack carTrack);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.car.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.DeviceInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.DeviceInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (DeviceInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-01 16:21:25
|
||||||
|
*/
|
||||||
|
public interface DeviceInfoDao {
|
||||||
|
|
||||||
|
DeviceInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(DeviceInfo deviceInfo);
|
||||||
|
|
||||||
|
int insertSelective(DeviceInfo deviceInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(DeviceInfo deviceInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(DeviceInfo deviceInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
DeviceInfoEx selectByCond(@Param("cond") DeviceInfoEx deviceInfo);
|
||||||
|
|
||||||
|
List<DeviceInfoEx> selectListByCond(@Param("cond") DeviceInfoEx deviceInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(DeviceInfo deviceInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
package com.jepsoninfo.car.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-14 13:46:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CarInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -66084610543582190L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String carNo;
|
||||||
|
/**
|
||||||
|
* 型号
|
||||||
|
*/
|
||||||
|
private String model;
|
||||||
|
/**
|
||||||
|
* 车架号
|
||||||
|
*/
|
||||||
|
private String vinCode;
|
||||||
|
/**
|
||||||
|
* gpsid
|
||||||
|
*/
|
||||||
|
private Long gpsId;
|
||||||
|
/**
|
||||||
|
* gps编号
|
||||||
|
*/
|
||||||
|
private String gpsTerminalId;
|
||||||
|
/**
|
||||||
|
* gps卡编号
|
||||||
|
*/
|
||||||
|
private String gpsSimNo;
|
||||||
|
/**
|
||||||
|
* gps状态
|
||||||
|
*/
|
||||||
|
private Integer gpsStatus;
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 车辆检测合格证图片
|
||||||
|
*/
|
||||||
|
private String vehicleAnnualImg;
|
||||||
|
/**
|
||||||
|
* 行驶证图片
|
||||||
|
*/
|
||||||
|
private String drivingLicenseImg;
|
||||||
|
/**
|
||||||
|
* 驾驶证图片
|
||||||
|
*/
|
||||||
|
private String driverLicenseImg;
|
||||||
|
/**
|
||||||
|
* 建筑垃圾车辆运输申请表
|
||||||
|
*/
|
||||||
|
private String transApplicationForm;
|
||||||
|
/**
|
||||||
|
* 车辆所属公司凭证
|
||||||
|
*/
|
||||||
|
private String carCompanyImg;
|
||||||
|
/**
|
||||||
|
* 车辆类型,1:清运公司,2:消纳场
|
||||||
|
*/
|
||||||
|
private Integer carType;
|
||||||
|
/**
|
||||||
|
* 运输车辆经营许可证
|
||||||
|
*/
|
||||||
|
private String transBusiLicImg;
|
||||||
|
/**
|
||||||
|
* gps安装证明材料
|
||||||
|
*/
|
||||||
|
private String gspInstallImg;
|
||||||
|
/**
|
||||||
|
* 限速设置安装证明图片
|
||||||
|
*/
|
||||||
|
private String speedLimitInstallImg;
|
||||||
|
/**
|
||||||
|
* 顶灯安装证明图片
|
||||||
|
*/
|
||||||
|
private String topLightInstallImg;
|
||||||
|
/**
|
||||||
|
* 管理制度图片
|
||||||
|
*/
|
||||||
|
private String regulatoryRegimeImg;
|
||||||
|
/**
|
||||||
|
* 道路运输从业资格证图片
|
||||||
|
*/
|
||||||
|
private String transCertImg;
|
||||||
|
/**
|
||||||
|
* 车辆所有人姓名
|
||||||
|
*/
|
||||||
|
private String holerName;
|
||||||
|
/**
|
||||||
|
* 载重
|
||||||
|
*/
|
||||||
|
private String loadCapacity;
|
||||||
|
/**
|
||||||
|
* 运输车辆经营许可证编号
|
||||||
|
*/
|
||||||
|
private String transBusiLicNo;
|
||||||
|
/**
|
||||||
|
* 行驶证编号
|
||||||
|
*/
|
||||||
|
private String drivingLicNo;
|
||||||
|
/**
|
||||||
|
* gps系统名
|
||||||
|
*/
|
||||||
|
private String gpsName;
|
||||||
|
/**
|
||||||
|
* 限速装置
|
||||||
|
*/
|
||||||
|
private String speedLimitName;
|
||||||
|
/**
|
||||||
|
* 顶灯
|
||||||
|
*/
|
||||||
|
private String topLightName;
|
||||||
|
/**
|
||||||
|
* 状态,0:待提交,1:备案通过,2:备案失败
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.jepsoninfo.car.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarTrack)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-14 17:41:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CarTrack implements Serializable {
|
||||||
|
private static final long serialVersionUID = -56383305113166668L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderNo;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String carNo;
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
/**
|
||||||
|
* 毛重
|
||||||
|
*/
|
||||||
|
private Double grossWeight;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.jepsoninfo.car.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (DeviceInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-01 16:21:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DeviceInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 503935587046187052L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
private Integer count;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer nType;
|
||||||
|
/**
|
||||||
|
* 类型名
|
||||||
|
*/
|
||||||
|
private String nTypeName;
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 公司类型
|
||||||
|
*/
|
||||||
|
private Integer companyType;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.jepsoninfo.car.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CarInfoEx extends CarInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.car.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarTrack;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CarTrackEx extends CarTrack {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.car.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.DeviceInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeviceInfoEx extends DeviceInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.jepsoninfo.car.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarInfoEx;
|
||||||
|
import com.jepsoninfo.car.dao.CarInfoDao;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:31
|
||||||
|
*/
|
||||||
|
@Service("carInfoService")
|
||||||
|
public class CarInfoService {
|
||||||
|
@Autowired
|
||||||
|
private CarInfoDao carInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CarInfoEx detail(CarInfoEx req) {
|
||||||
|
return this.carInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<CarInfoEx> list(CarInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<CarInfoEx> list = this.carInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<CarInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CarInfoEx add(CarInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.carInfoDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(CarInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.carInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.carInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.car.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.CarTrack;
|
||||||
|
import com.jepsoninfo.car.entity.ex.CarTrackEx;
|
||||||
|
import com.jepsoninfo.car.dao.CarTrackDao;
|
||||||
|
import com.jepsoninfo.car.service.CarTrackService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CarTrack)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:01:07
|
||||||
|
*/
|
||||||
|
@Service("carTrackService")
|
||||||
|
public class CarTrackService {
|
||||||
|
@Autowired
|
||||||
|
private CarTrackDao carTrackDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CarTrackEx detail(CarTrackEx req) {
|
||||||
|
return this.carTrackDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<CarTrackEx> list(CarTrackEx req) {
|
||||||
|
List<CarTrackEx> list = this.carTrackDao.selectListByCond(req);
|
||||||
|
PageHelper.startPage(req.getPageNo(), list.size());
|
||||||
|
PageInfo<CarTrackEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CarTrackEx add(CarTrackEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.carTrackDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(CarTrack req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.carTrackDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.carTrackDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.car.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.car.entity.DeviceInfo;
|
||||||
|
import com.jepsoninfo.car.entity.ex.DeviceInfoEx;
|
||||||
|
import com.jepsoninfo.car.dao.DeviceInfoDao;
|
||||||
|
import com.jepsoninfo.car.service.DeviceInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (DeviceInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-01 16:21:26
|
||||||
|
*/
|
||||||
|
@Service("deviceInfoService")
|
||||||
|
public class DeviceInfoService {
|
||||||
|
@Autowired
|
||||||
|
private DeviceInfoDao deviceInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public DeviceInfoEx detail(DeviceInfoEx req) {
|
||||||
|
return this.deviceInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<DeviceInfoEx> list(DeviceInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<DeviceInfoEx> list = this.deviceInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<DeviceInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public DeviceInfoEx add(DeviceInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.deviceInfoDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(DeviceInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.deviceInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.deviceInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.common.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.entity.CommonConfig;
|
||||||
|
import com.jepsoninfo.common.entity.ex.CommonConfigEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app信息配置表(CommonConfig)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 09:45:27
|
||||||
|
*/
|
||||||
|
public interface CommonConfigDao {
|
||||||
|
|
||||||
|
CommonConfigEx selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(CommonConfig commonConfig);
|
||||||
|
|
||||||
|
int insertSelective(CommonConfig commonConfig);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CommonConfig commonConfig);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CommonConfig commonConfig);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
CommonConfigEx selectByCond(@Param("cond") CommonConfigEx commonConfig);
|
||||||
|
|
||||||
|
List<CommonConfigEx> selectListByCond(@Param("cond") CommonConfigEx commonConfig);
|
||||||
|
|
||||||
|
long selectCountByCond(CommonConfig commonConfig);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.jepsoninfo.common.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app信息配置表(CommonConfig)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 09:45:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CommonConfig implements Serializable {
|
||||||
|
private static final long serialVersionUID = 678625389943908056L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 配置类型名
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 配置类型值
|
||||||
|
*/
|
||||||
|
private String cnValue;
|
||||||
|
/**
|
||||||
|
* 配置类型描述
|
||||||
|
*/
|
||||||
|
private String cnDesc;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.jepsoninfo.common.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ReportUnifyReq {
|
||||||
|
private String carNumber; // 车牌号
|
||||||
|
private String carDiscernCode; // 车辆识别一体机编号
|
||||||
|
private String weight; // 磅重
|
||||||
|
private String photoFront; // 进场车头照片
|
||||||
|
private String photoBody; // 进场车身照片
|
||||||
|
private String weighBridgeCode; // 地磅编号
|
||||||
|
private String telephone;
|
||||||
|
private Integer onlyCar;
|
||||||
|
private String orderNo;
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.jepsoninfo.common.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.entity.CommonConfig;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CommonConfigEx extends CommonConfig {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.jepsoninfo.common.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.entity.CommonConfig;
|
||||||
|
import com.jepsoninfo.common.entity.ex.CommonConfigEx;
|
||||||
|
import com.jepsoninfo.common.dao.CommonConfigDao;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app信息配置表(CommonConfig)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 09:45:27
|
||||||
|
*/
|
||||||
|
@Service("commonConfigService")
|
||||||
|
public class CommonConfigService {
|
||||||
|
@Autowired
|
||||||
|
private CommonConfigDao commonConfigDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CommonConfigEx detail(CommonConfigEx req) {
|
||||||
|
return this.commonConfigDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<CommonConfigEx> list(CommonConfigEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<CommonConfigEx> list = this.commonConfigDao.selectListByCond(req);
|
||||||
|
PageInfo<CommonConfigEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CommonConfigEx add(CommonConfigEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.commonConfigDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(CommonConfig req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.commonConfigDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Integer id) {
|
||||||
|
return this.commonConfigDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.jepsoninfo.company.controller;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.UnapprovedEntity;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.service.AuditCompanyService;
|
||||||
|
import com.jepsoninfo.company.service.ClearCompanyService;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
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.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:49
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("auditCompany")
|
||||||
|
public class AuditCompanyController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private AuditCompanyService auditCompanyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/unapprovedCount")
|
||||||
|
public ResultEntity<UnapprovedEntity> count(@RequestBody ClearCompanyEx clearCompany) {
|
||||||
|
return ResultEntity.success(this.auditCompanyService.unapprovedCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.jepsoninfo.company.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.service.ClearCompanyService;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:49
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("clearCompany")
|
||||||
|
public class ClearCompanyController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ClearCompanyService clearCompanyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param clearCompany 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<ClearCompanyEx>> list(@RequestBody ClearCompanyEx clearCompany) {
|
||||||
|
return ResultEntity.success(clearCompanyService.list(clearCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<ClearCompanyEx> detail(@RequestBody ClearCompanyEx clearCompany) {
|
||||||
|
return ResultEntity.success(this.clearCompanyService.detail(clearCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param clearCompany 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/register")
|
||||||
|
public ResultEntity<UserInfoEx> register(@RequestBody ClearCompanyEx clearCompany) {
|
||||||
|
return this.clearCompanyService.register(clearCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param clearCompany 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody ClearCompany clearCompany) {
|
||||||
|
return ResultEntity.success(this.clearCompanyService.update(clearCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody ClearCompany clearCompany) {
|
||||||
|
return ResultEntity.success(this.clearCompanyService.delete(clearCompany.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
package com.jepsoninfo.company.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.CommunityInfo;
|
||||||
|
import com.jepsoninfo.company.entity.ex.CommunityInfoEx;
|
||||||
|
import com.jepsoninfo.company.service.CommunityInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CommunityInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:41:25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("communityInfo")
|
||||||
|
public class CommunityInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private CommunityInfoService communityInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param communityInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<CommunityInfoEx>> list(@RequestBody CommunityInfoEx communityInfo) {
|
||||||
|
return ResultEntity.success(communityInfoService.list(communityInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<CommunityInfoEx> detail(@RequestBody CommunityInfoEx communityInfo) {
|
||||||
|
return ResultEntity.success(this.communityInfoService.detail(communityInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param communityInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<CommunityInfoEx> add(@RequestBody CommunityInfoEx communityInfo) {
|
||||||
|
return ResultEntity.success(this.communityInfoService.add(communityInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchAdd")
|
||||||
|
public ResultEntity<CommunityInfoEx> batchAdd(@RequestBody List<CommunityInfoEx> list) {
|
||||||
|
for(int i = 0;i < list.size();i++) {
|
||||||
|
CommunityInfoEx communityInfo = list.get(i);
|
||||||
|
|
||||||
|
this.communityInfoService.add(communityInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultEntity.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param communityInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody CommunityInfo communityInfo) {
|
||||||
|
return ResultEntity.success(this.communityInfoService.update(communityInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody CommunityInfo communityInfo) {
|
||||||
|
return ResultEntity.success(this.communityInfoService.delete(communityInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.jepsoninfo.company.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.PropertyCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.service.PropertyCompanyService;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业公司(PropertyCompany)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:00:13
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("propertyCompany")
|
||||||
|
public class PropertyCompanyController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private PropertyCompanyService propertyCompanyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param propertyCompany 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<PropertyCompanyEx>> list(@RequestBody PropertyCompanyEx propertyCompany) {
|
||||||
|
return ResultEntity.success(propertyCompanyService.list(propertyCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<PropertyCompanyEx> detail(@RequestBody PropertyCompanyEx propertyCompany) {
|
||||||
|
return ResultEntity.success(this.propertyCompanyService.detail(propertyCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param propertyCompany 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/register")
|
||||||
|
public ResultEntity<UserInfoEx> register(@RequestBody PropertyCompanyEx propertyCompany) {
|
||||||
|
return this.propertyCompanyService.register(propertyCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param propertyCompany 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody PropertyCompany propertyCompany) {
|
||||||
|
return ResultEntity.success(this.propertyCompanyService.update(propertyCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody PropertyCompany propertyCompany) {
|
||||||
|
return ResultEntity.success(this.propertyCompanyService.delete(propertyCompany.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.company.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.TreatmentCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import com.jepsoninfo.company.service.TreatmentCompanyService;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消纳公司(TreatmentCompany)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:30:50
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("treatmentCompany")
|
||||||
|
public class TreatmentCompanyController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private TreatmentCompanyService treatmentCompanyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param treatmentCompany 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<TreatmentCompanyEx>> list(@RequestBody TreatmentCompanyEx treatmentCompany) {
|
||||||
|
return ResultEntity.success(treatmentCompanyService.list(treatmentCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<TreatmentCompanyEx> detail(@RequestBody TreatmentCompanyEx treatmentCompany) {
|
||||||
|
return ResultEntity.success(this.treatmentCompanyService.detail(treatmentCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param treatmentCompany 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/register")
|
||||||
|
public ResultEntity<UserInfoEx> register(@RequestBody TreatmentCompanyEx treatmentCompany) {
|
||||||
|
return this.treatmentCompanyService.register(treatmentCompany);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param treatmentCompany 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody TreatmentCompany treatmentCompany) {
|
||||||
|
return ResultEntity.success(this.treatmentCompanyService.update(treatmentCompany));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody TreatmentCompany treatmentCompany) {
|
||||||
|
return ResultEntity.success(this.treatmentCompanyService.delete(treatmentCompany.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.company.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:49
|
||||||
|
*/
|
||||||
|
public interface ClearCompanyDao {
|
||||||
|
|
||||||
|
ClearCompanyEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(ClearCompany clearCompany);
|
||||||
|
|
||||||
|
int insertSelective(ClearCompany clearCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ClearCompany clearCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ClearCompany clearCompany);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
ClearCompanyEx selectByCond(@Param("cond") ClearCompanyEx clearCompany);
|
||||||
|
|
||||||
|
List<ClearCompanyEx> selectListByCond(@Param("cond") ClearCompanyEx clearCompany);
|
||||||
|
|
||||||
|
long selectCountByCond(ClearCompany clearCompany);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.company.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.CommunityInfo;
|
||||||
|
import com.jepsoninfo.company.entity.ex.CommunityInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CommunityInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:41:25
|
||||||
|
*/
|
||||||
|
public interface CommunityInfoDao {
|
||||||
|
|
||||||
|
CommunityInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(CommunityInfo communityInfo);
|
||||||
|
|
||||||
|
int insertSelective(CommunityInfo communityInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CommunityInfo communityInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CommunityInfo communityInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
CommunityInfoEx selectByCond(@Param("cond") CommunityInfoEx communityInfo);
|
||||||
|
|
||||||
|
List<CommunityInfoEx> selectListByCond(@Param("cond") CommunityInfoEx communityInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(CommunityInfo communityInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.company.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.PropertyCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业公司(PropertyCompany)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:00:13
|
||||||
|
*/
|
||||||
|
public interface PropertyCompanyDao {
|
||||||
|
|
||||||
|
PropertyCompanyEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(PropertyCompany propertyCompany);
|
||||||
|
|
||||||
|
int insertSelective(PropertyCompany propertyCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(PropertyCompany propertyCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(PropertyCompany propertyCompany);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
PropertyCompanyEx selectByCond(@Param("cond") PropertyCompanyEx propertyCompany);
|
||||||
|
|
||||||
|
List<PropertyCompanyEx> selectListByCond(@Param("cond") PropertyCompanyEx propertyCompany);
|
||||||
|
|
||||||
|
long selectCountByCond(PropertyCompany propertyCompany);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.company.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.TreatmentCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消纳公司(TreatmentCompany)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:30:51
|
||||||
|
*/
|
||||||
|
public interface TreatmentCompanyDao {
|
||||||
|
|
||||||
|
TreatmentCompanyEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(TreatmentCompany treatmentCompany);
|
||||||
|
|
||||||
|
int insertSelective(TreatmentCompany treatmentCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(TreatmentCompany treatmentCompany);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(TreatmentCompany treatmentCompany);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
TreatmentCompanyEx selectByCond(@Param("cond") TreatmentCompanyEx treatmentCompany);
|
||||||
|
|
||||||
|
List<TreatmentCompanyEx> selectListByCond(@Param("cond") TreatmentCompanyEx treatmentCompany);
|
||||||
|
|
||||||
|
long selectCountByCond(TreatmentCompany treatmentCompany);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
package com.jepsoninfo.company.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 18:05:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ClearCompany implements Serializable {
|
||||||
|
private static final long serialVersionUID = 997030940238743083L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 公司编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String busiLicense;
|
||||||
|
/**
|
||||||
|
* 省份id
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
/**
|
||||||
|
* 省份名
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
/**
|
||||||
|
* 城市id
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
/**
|
||||||
|
* 城市名
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
/**
|
||||||
|
* 区域id
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
/**
|
||||||
|
* 区域名
|
||||||
|
*/
|
||||||
|
private String regionName;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 法人
|
||||||
|
*/
|
||||||
|
private String legalPerson;
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contactName;
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactTel;
|
||||||
|
/**
|
||||||
|
* 对外服务电话
|
||||||
|
*/
|
||||||
|
private String serviceTel;
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
/**
|
||||||
|
* 法人身份证
|
||||||
|
*/
|
||||||
|
private String legalPersonImg;
|
||||||
|
/**
|
||||||
|
* 公司注册信息
|
||||||
|
*/
|
||||||
|
private String busiLicenseImg;
|
||||||
|
/**
|
||||||
|
* 道路运输许可证号
|
||||||
|
*/
|
||||||
|
private String transportPermitLic;
|
||||||
|
/**
|
||||||
|
* 道路运输许可证
|
||||||
|
*/
|
||||||
|
private String transportPermitImg;
|
||||||
|
/**
|
||||||
|
* 道路运输许可证过期时间
|
||||||
|
*/
|
||||||
|
private Date transportPermitExpire;
|
||||||
|
/**
|
||||||
|
* 清运许可证号
|
||||||
|
*/
|
||||||
|
private String clearancePermitLic;
|
||||||
|
/**
|
||||||
|
* 清运许可证
|
||||||
|
*/
|
||||||
|
private String clearancePermitImg;
|
||||||
|
/**
|
||||||
|
* 清运许可证过期时间
|
||||||
|
*/
|
||||||
|
private Date clearancePermitExpire;
|
||||||
|
/**
|
||||||
|
* 营业执照经营范围
|
||||||
|
*/
|
||||||
|
private String busiScope;
|
||||||
|
/**
|
||||||
|
* 道路运输经营范围
|
||||||
|
*/
|
||||||
|
private String transportScope;
|
||||||
|
/**
|
||||||
|
* 申请理由
|
||||||
|
*/
|
||||||
|
private String applyReason;
|
||||||
|
/**
|
||||||
|
* 办公场所
|
||||||
|
*/
|
||||||
|
private String officeSpace;
|
||||||
|
/**
|
||||||
|
* 人员总数
|
||||||
|
*/
|
||||||
|
private Integer personsNum;
|
||||||
|
/**
|
||||||
|
* 停车场地
|
||||||
|
*/
|
||||||
|
private String parkAddress;
|
||||||
|
/**
|
||||||
|
* 管理制度
|
||||||
|
*/
|
||||||
|
private String regulatoryRegime;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer nType;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.jepsoninfo.company.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CommunityInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-07 11:39:44
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CommunityInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 146840951214973612L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 小区编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 物业id
|
||||||
|
*/
|
||||||
|
private Long propertyId;
|
||||||
|
/**
|
||||||
|
* 物业公司编码
|
||||||
|
*/
|
||||||
|
private String propertySn;
|
||||||
|
/**
|
||||||
|
* 物业名称
|
||||||
|
*/
|
||||||
|
private String propertyName;
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contactName;
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactTel;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 省份id
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
/**
|
||||||
|
* 省份名
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
/**
|
||||||
|
* 城市id
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
/**
|
||||||
|
* 城市名
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
/**
|
||||||
|
* 区域id
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
/**
|
||||||
|
* 区域名
|
||||||
|
*/
|
||||||
|
private String regionName;
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
/**
|
||||||
|
* 物业合同
|
||||||
|
*/
|
||||||
|
private String contractImg;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.jepsoninfo.company.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业公司(PropertyCompany)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 18:05:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PropertyCompany implements Serializable {
|
||||||
|
private static final long serialVersionUID = -95744849954919643L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 公司编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String busiLicense;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contactName;
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactTel;
|
||||||
|
/**
|
||||||
|
* 省份id
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
/**
|
||||||
|
* 省份名
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
/**
|
||||||
|
* 城市id
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
/**
|
||||||
|
* 城市名
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
/**
|
||||||
|
* 区域id
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
/**
|
||||||
|
* 区域名
|
||||||
|
*/
|
||||||
|
private String regionName;
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
/**
|
||||||
|
* 法人
|
||||||
|
*/
|
||||||
|
private String legalPerson;
|
||||||
|
/**
|
||||||
|
* 法人身份证
|
||||||
|
*/
|
||||||
|
private String legalPersonImg;
|
||||||
|
/**
|
||||||
|
* 公司注册信息
|
||||||
|
*/
|
||||||
|
private String busiLicenseImg;
|
||||||
|
/**
|
||||||
|
* 物业资质许可证号
|
||||||
|
*/
|
||||||
|
private String propertyPermitLic;
|
||||||
|
/**
|
||||||
|
* 物业资质许可证
|
||||||
|
*/
|
||||||
|
private String propertyPermitImg;
|
||||||
|
/**
|
||||||
|
* 物业资质许可证过期时间
|
||||||
|
*/
|
||||||
|
private Date propertyPermitExpire;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer nType;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,130 @@
|
||||||
|
package com.jepsoninfo.company.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消纳公司(TreatmentCompany)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 18:05:56
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TreatmentCompany implements Serializable {
|
||||||
|
private static final long serialVersionUID = -73641679340331202L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 公司编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 组织机构代码
|
||||||
|
*/
|
||||||
|
private String busiLicense;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contactName;
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactTel;
|
||||||
|
/**
|
||||||
|
* 省份id
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
/**
|
||||||
|
* 省份名
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
/**
|
||||||
|
* 城市id
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
/**
|
||||||
|
* 城市名
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
/**
|
||||||
|
* 区域id
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
/**
|
||||||
|
* 区域名
|
||||||
|
*/
|
||||||
|
private String regionName;
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
/**
|
||||||
|
* 法人
|
||||||
|
*/
|
||||||
|
private String legalPerson;
|
||||||
|
/**
|
||||||
|
* 法人身份证
|
||||||
|
*/
|
||||||
|
private String legalPersonImg;
|
||||||
|
/**
|
||||||
|
* 公司注册信息
|
||||||
|
*/
|
||||||
|
private String busiLicenseImg;
|
||||||
|
/**
|
||||||
|
* 经营场所证明
|
||||||
|
*/
|
||||||
|
private String addressImg;
|
||||||
|
/**
|
||||||
|
* 消纳许可证号
|
||||||
|
*/
|
||||||
|
private String treatmentPermitLic;
|
||||||
|
/**
|
||||||
|
* 消纳许可证
|
||||||
|
*/
|
||||||
|
private String treatmentPermitImg;
|
||||||
|
/**
|
||||||
|
* 消纳许可证过期时间
|
||||||
|
*/
|
||||||
|
private Date treatmentPermitExpire;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer nType;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.jepsoninfo.company.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UnapprovedEntity {
|
||||||
|
private Integer clearCompanyCount;
|
||||||
|
|
||||||
|
private Integer propertyCompanyCount;
|
||||||
|
|
||||||
|
private Integer treatmentCompanyCount;
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.jepsoninfo.company.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ClearCompanyEx extends ClearCompany {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.company.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.CommunityInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CommunityInfoEx extends CommunityInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.jepsoninfo.company.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.PropertyCompany;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PropertyCompanyEx extends PropertyCompany {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.jepsoninfo.company.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.TreatmentCompany;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TreatmentCompanyEx extends TreatmentCompany {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.jepsoninfo.company.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.jepsoninfo.company.dao.ClearCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.PropertyCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.TreatmentCompanyDao;
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.UnapprovedEntity;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import com.jepsoninfo.user.dao.UserInfoDao;
|
||||||
|
import com.jepsoninfo.user.dao.UserRoleDao;
|
||||||
|
import com.jepsoninfo.user.entity.UserRole;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.user.service.UserLoginService;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:50
|
||||||
|
*/
|
||||||
|
@Service("auditCompanyService")
|
||||||
|
public class AuditCompanyService {
|
||||||
|
@Autowired
|
||||||
|
private ClearCompanyDao clearCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private PropertyCompanyDao propertyCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private TreatmentCompanyDao treatmentCompanyDao;
|
||||||
|
|
||||||
|
public UnapprovedEntity unapprovedCount() {
|
||||||
|
UnapprovedEntity unapprovedEntity = new UnapprovedEntity();
|
||||||
|
|
||||||
|
ClearCompanyEx clearCond = new ClearCompanyEx();
|
||||||
|
|
||||||
|
clearCond.setStatus(0);
|
||||||
|
List<ClearCompanyEx> listClear = clearCompanyDao.selectListByCond(clearCond);
|
||||||
|
|
||||||
|
PropertyCompanyEx propertyCond = new PropertyCompanyEx();
|
||||||
|
|
||||||
|
propertyCond.setStatus(0);
|
||||||
|
List<PropertyCompanyEx> listProperty = propertyCompanyDao.selectListByCond(propertyCond);
|
||||||
|
|
||||||
|
TreatmentCompanyEx treatmentCond = new TreatmentCompanyEx();
|
||||||
|
|
||||||
|
treatmentCond.setStatus(0);
|
||||||
|
List<TreatmentCompanyEx> listTreatment = treatmentCompanyDao.selectListByCond(treatmentCond);
|
||||||
|
|
||||||
|
unapprovedEntity.setClearCompanyCount(listClear.size());
|
||||||
|
unapprovedEntity.setPropertyCompanyCount(listProperty.size());
|
||||||
|
unapprovedEntity.setTreatmentCompanyCount(listTreatment.size());
|
||||||
|
|
||||||
|
return unapprovedEntity;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,153 @@
|
||||||
|
package com.jepsoninfo.company.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.dao.ClearCompanyDao;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.user.dao.UserInfoDao;
|
||||||
|
import com.jepsoninfo.user.dao.UserRoleDao;
|
||||||
|
import com.jepsoninfo.user.entity.UserRole;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.user.service.UserLoginService;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.RandomUtil;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息表(ClearCompany)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 13:54:50
|
||||||
|
*/
|
||||||
|
@Service("clearCompanyService")
|
||||||
|
public class ClearCompanyService {
|
||||||
|
@Autowired
|
||||||
|
private ClearCompanyDao clearCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private UserInfoDao userInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private UserRoleDao userRoleDao;
|
||||||
|
@Autowired
|
||||||
|
private UserLoginService userLoginService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ClearCompanyEx detail(ClearCompanyEx req) {
|
||||||
|
return this.clearCompanyDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<ClearCompanyEx> list(ClearCompanyEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<ClearCompanyEx> list = this.clearCompanyDao.selectListByCond(req);
|
||||||
|
PageInfo<ClearCompanyEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ResultEntity<UserInfoEx> register(ClearCompanyEx req) {
|
||||||
|
ClearCompanyEx cond = new ClearCompanyEx();
|
||||||
|
|
||||||
|
cond.setBusiLicense(req.getBusiLicense());
|
||||||
|
ClearCompanyEx propertyCompanyEx = clearCompanyDao.selectByCond(cond);
|
||||||
|
UserInfoEx userInfoEx = null;
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
if(propertyCompanyEx == null) {
|
||||||
|
UserInfoEx userInfoCond = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoCond.setUserName(req.getUserName());
|
||||||
|
userInfoEx = userInfoDao.selectByCond(userInfoCond);
|
||||||
|
if(userInfoEx != null) {
|
||||||
|
return ResultEntity.fail(ErrorStatus.USER_IS_EXISTED);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return ResultEntity.fail(ErrorStatus.COMPANY_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
req.setStatus(0);
|
||||||
|
this.clearCompanyDao.insertSelective(req);
|
||||||
|
|
||||||
|
req.setSerialNo("10"+ NumberUtil.getNumberString(req.getId(),6));
|
||||||
|
this.clearCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
|
||||||
|
//添加用户信息
|
||||||
|
userInfoEx = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoEx.setCompanyId(req.getId());
|
||||||
|
userInfoEx.setCompanyName(req.getCnName());
|
||||||
|
userInfoEx.setUserName(req.getUserName());
|
||||||
|
userInfoEx.setPassword(req.getPassword());
|
||||||
|
userInfoEx.setNType(2);
|
||||||
|
userInfoEx.setStatus(0);
|
||||||
|
userInfoEx.setCreateTime(new Date());
|
||||||
|
userInfoEx.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userInfoDao.insertSelective(userInfoEx);
|
||||||
|
|
||||||
|
//添加角色信息
|
||||||
|
UserRole userRole = new UserRole();
|
||||||
|
|
||||||
|
userRole.setUserId(userInfoEx.getId());
|
||||||
|
userRole.setRoleId(2L);
|
||||||
|
userRole.setCompanyId(req.getId());
|
||||||
|
userRole.setCreateTime(new Date());
|
||||||
|
userRole.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userRoleDao.insertSelective(userRole);
|
||||||
|
|
||||||
|
//添加令牌
|
||||||
|
String userToken = userLoginService.createToken(userInfoEx.getId());
|
||||||
|
|
||||||
|
userInfoEx.setToken(userToken);
|
||||||
|
|
||||||
|
return ResultEntity.success(userInfoEx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(ClearCompany req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.clearCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.clearCompanyDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.jepsoninfo.company.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.CommunityInfo;
|
||||||
|
import com.jepsoninfo.company.entity.ex.CommunityInfoEx;
|
||||||
|
import com.jepsoninfo.company.dao.CommunityInfoDao;
|
||||||
|
import com.jepsoninfo.company.service.CommunityInfoService;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.PinYinUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CommunityInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:41:25
|
||||||
|
*/
|
||||||
|
@Service("communityInfoService")
|
||||||
|
public class CommunityInfoService {
|
||||||
|
@Autowired
|
||||||
|
private CommunityInfoDao communityInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CommunityInfoEx detail(CommunityInfoEx req) {
|
||||||
|
return this.communityInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<CommunityInfoEx> list(CommunityInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<CommunityInfoEx> list = this.communityInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<CommunityInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CommunityInfoEx add(CommunityInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.communityInfoDao.insertSelective(req);
|
||||||
|
|
||||||
|
req.setSerialNo(NumberUtil.getNumberString(req.getId(), 8));
|
||||||
|
|
||||||
|
communityInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(CommunityInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.communityInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.communityInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
package com.jepsoninfo.company.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.PropertyCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.dao.PropertyCompanyDao;
|
||||||
|
import com.jepsoninfo.user.dao.UserInfoDao;
|
||||||
|
import com.jepsoninfo.user.dao.UserRoleDao;
|
||||||
|
import com.jepsoninfo.user.entity.UserRole;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.user.service.UserLoginService;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业公司(PropertyCompany)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:00:14
|
||||||
|
*/
|
||||||
|
@Service("propertyCompanyService")
|
||||||
|
public class PropertyCompanyService {
|
||||||
|
@Autowired
|
||||||
|
private PropertyCompanyDao propertyCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private UserInfoDao userInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private UserRoleDao userRoleDao;
|
||||||
|
@Autowired
|
||||||
|
private UserLoginService userLoginService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public PropertyCompanyEx detail(PropertyCompanyEx req) {
|
||||||
|
return this.propertyCompanyDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<PropertyCompanyEx> list(PropertyCompanyEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<PropertyCompanyEx> list = this.propertyCompanyDao.selectListByCond(req);
|
||||||
|
PageInfo<PropertyCompanyEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ResultEntity<UserInfoEx> register(PropertyCompanyEx req) {
|
||||||
|
PropertyCompanyEx cond = new PropertyCompanyEx();
|
||||||
|
|
||||||
|
cond.setBusiLicense(req.getBusiLicense());
|
||||||
|
PropertyCompanyEx propertyCompanyEx = propertyCompanyDao.selectByCond(cond);
|
||||||
|
UserInfoEx userInfoEx = null;
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
if(propertyCompanyEx == null) {
|
||||||
|
UserInfoEx userInfoCond = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoCond.setUserName(req.getUserName());
|
||||||
|
userInfoEx = userInfoDao.selectByCond(userInfoCond);
|
||||||
|
if(userInfoEx != null) {
|
||||||
|
return ResultEntity.fail(ErrorStatus.USER_IS_EXISTED);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return ResultEntity.fail(ErrorStatus.COMPANY_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
req.setStatus(0);
|
||||||
|
this.propertyCompanyDao.insertSelective(req);
|
||||||
|
|
||||||
|
req.setSerialNo("11"+ NumberUtil.getNumberString(req.getId(),6));
|
||||||
|
this.propertyCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
|
||||||
|
//添加用户信息
|
||||||
|
userInfoEx = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoEx.setCompanyId(req.getId());
|
||||||
|
userInfoEx.setCompanyName(req.getCnName());
|
||||||
|
userInfoEx.setUserName(req.getUserName());
|
||||||
|
userInfoEx.setPassword(req.getPassword());
|
||||||
|
userInfoEx.setNType(3);
|
||||||
|
userInfoEx.setStatus(0);
|
||||||
|
userInfoEx.setCreateTime(new Date());
|
||||||
|
userInfoEx.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userInfoDao.insertSelective(userInfoEx);
|
||||||
|
|
||||||
|
//添加角色信息
|
||||||
|
UserRole userRole = new UserRole();
|
||||||
|
|
||||||
|
userRole.setUserId(userInfoEx.getId());
|
||||||
|
userRole.setRoleId(3L);
|
||||||
|
userRole.setCompanyId(req.getId());
|
||||||
|
userRole.setCreateTime(new Date());
|
||||||
|
userRole.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userRoleDao.insertSelective(userRole);
|
||||||
|
|
||||||
|
//添加令牌
|
||||||
|
String userToken = userLoginService.createToken(userInfoEx.getId());
|
||||||
|
|
||||||
|
userInfoEx.setToken(userToken);
|
||||||
|
|
||||||
|
return ResultEntity.success(userInfoEx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(PropertyCompany req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.propertyCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.propertyCompanyDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
package com.jepsoninfo.company.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.company.entity.TreatmentCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.ClearCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.PropertyCompanyEx;
|
||||||
|
import com.jepsoninfo.company.entity.ex.TreatmentCompanyEx;
|
||||||
|
import com.jepsoninfo.company.dao.TreatmentCompanyDao;
|
||||||
|
import com.jepsoninfo.company.service.TreatmentCompanyService;
|
||||||
|
import com.jepsoninfo.user.dao.UserInfoDao;
|
||||||
|
import com.jepsoninfo.user.dao.UserRoleDao;
|
||||||
|
import com.jepsoninfo.user.entity.UserRole;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.user.service.UserLoginService;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消纳公司(TreatmentCompany)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-29 15:30:51
|
||||||
|
*/
|
||||||
|
@Service("treatmentCompanyService")
|
||||||
|
public class TreatmentCompanyService {
|
||||||
|
@Autowired
|
||||||
|
private TreatmentCompanyDao treatmentCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private UserInfoDao userInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private UserRoleDao userRoleDao;
|
||||||
|
@Autowired
|
||||||
|
private UserLoginService userLoginService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public TreatmentCompanyEx detail(TreatmentCompanyEx req) {
|
||||||
|
return this.treatmentCompanyDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<TreatmentCompanyEx> list(TreatmentCompanyEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<TreatmentCompanyEx> list = this.treatmentCompanyDao.selectListByCond(req);
|
||||||
|
PageInfo<TreatmentCompanyEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ResultEntity<UserInfoEx> register(TreatmentCompanyEx req) {
|
||||||
|
TreatmentCompanyEx cond = new TreatmentCompanyEx();
|
||||||
|
|
||||||
|
cond.setBusiLicense(req.getBusiLicense());
|
||||||
|
TreatmentCompanyEx propertyCompanyEx = treatmentCompanyDao.selectByCond(cond);
|
||||||
|
UserInfoEx userInfoEx = null;
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
if(propertyCompanyEx == null) {
|
||||||
|
UserInfoEx userInfoCond = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoCond.setUserName(req.getUserName());
|
||||||
|
userInfoEx = userInfoDao.selectByCond(userInfoCond);
|
||||||
|
if(userInfoEx != null) {
|
||||||
|
return ResultEntity.fail(ErrorStatus.USER_IS_EXISTED);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return ResultEntity.fail(ErrorStatus.COMPANY_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加公司信息
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
req.setStatus(0);
|
||||||
|
this.treatmentCompanyDao.insertSelective(req);
|
||||||
|
|
||||||
|
req.setSerialNo("12"+ NumberUtil.getNumberString(req.getId(),6));
|
||||||
|
this.treatmentCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
|
||||||
|
//添加用户信息
|
||||||
|
userInfoEx = new UserInfoEx();
|
||||||
|
|
||||||
|
userInfoEx.setCompanyId(req.getId());
|
||||||
|
userInfoEx.setCompanyName(req.getCnName());
|
||||||
|
userInfoEx.setUserName(req.getUserName());
|
||||||
|
userInfoEx.setPassword(req.getPassword());
|
||||||
|
userInfoEx.setNType(4);
|
||||||
|
userInfoEx.setStatus(0);
|
||||||
|
userInfoEx.setCreateTime(new Date());
|
||||||
|
userInfoEx.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userInfoDao.insertSelective(userInfoEx);
|
||||||
|
|
||||||
|
//添加角色信息
|
||||||
|
UserRole userRole = new UserRole();
|
||||||
|
|
||||||
|
userRole.setUserId(userInfoEx.getId());
|
||||||
|
userRole.setRoleId(4L);
|
||||||
|
userRole.setCompanyId(req.getId());
|
||||||
|
userRole.setCreateTime(new Date());
|
||||||
|
userRole.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
userRoleDao.insertSelective(userRole);
|
||||||
|
|
||||||
|
//添加令牌
|
||||||
|
String userToken = userLoginService.createToken(userInfoEx.getId());
|
||||||
|
|
||||||
|
userInfoEx.setToken(userToken);
|
||||||
|
|
||||||
|
return ResultEntity.success(userInfoEx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(TreatmentCompany req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.treatmentCompanyDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.treatmentCompanyDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
import org.springframework.web.filter.CorsFilter;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
//@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
|
public class CorsConfig {
|
||||||
|
private CorsConfiguration buildConfig() {
|
||||||
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
|
corsConfiguration.addAllowedOrigin("*");
|
||||||
|
corsConfiguration.addAllowedHeader("*");
|
||||||
|
corsConfiguration.addAllowedMethod("*");
|
||||||
|
// corsConfiguration.setAllowCredentials(true);
|
||||||
|
return corsConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public CorsFilter corsFilter() {
|
||||||
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
|
source.registerCorsConfiguration("/**", buildConfig());
|
||||||
|
return new CorsFilter(source);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class DBConfiguration {
|
||||||
|
@Bean(name = "dataSource")
|
||||||
|
@Qualifier(value = "dataSource")
|
||||||
|
@Primary
|
||||||
|
@ConfigurationProperties(prefix = "c3p0")
|
||||||
|
public DataSource dataSource()
|
||||||
|
{
|
||||||
|
return DataSourceBuilder.create().type(com.mchange.v2.c3p0.ComboPooledDataSource.class).build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.MyException;
|
||||||
|
import org.springframework.validation.ObjectError;
|
||||||
|
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* controller 增强器
|
||||||
|
*
|
||||||
|
* @author wb
|
||||||
|
* @since 2017/12/20
|
||||||
|
*/
|
||||||
|
@RestControllerAdvice
|
||||||
|
public class MyControllerAdvice {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全局异常捕捉处理
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@ExceptionHandler(value = Exception.class)
|
||||||
|
public ResultEntity errorHandler(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return ResultEntity.fail(ErrorStatus.SERVER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 拦截捕捉自定义异常 MyException.class
|
||||||
|
// * @param ex
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
@ResponseBody
|
||||||
|
@ExceptionHandler(value = MyException.class)
|
||||||
|
public ResultEntity myErrorHandler(MyException ex) {
|
||||||
|
ResultEntity ret = new ResultEntity();
|
||||||
|
|
||||||
|
ret.setCode(ex.getErrCode());
|
||||||
|
ret.setMsg(ex.getErrMsg());
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 捕获参数验证异常
|
||||||
|
* @author wuxiao
|
||||||
|
* @param ex
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||||
|
@ResponseBody
|
||||||
|
public ResultEntity handleMethodArgumentNotValidException(MethodArgumentNotValidException ex) {
|
||||||
|
ObjectError err = ex.getBindingResult().getAllErrors().get(0);
|
||||||
|
ResultEntity ret = new ResultEntity();
|
||||||
|
|
||||||
|
ret.setCode(ErrorStatus.PARAMETER_FORMAT_ERROR.getErrCode());
|
||||||
|
ret.setMsg(err.getDefaultMessage());
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.dao.CommonConfigDao;
|
||||||
|
import com.jepsoninfo.common.entity.CommonConfig;
|
||||||
|
import com.jepsoninfo.util.ConstUtil;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class OssConfig {
|
||||||
|
@Resource
|
||||||
|
private CommonConfigDao commonConfigDao;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public CommonConfig init(){
|
||||||
|
CommonConfig config;
|
||||||
|
|
||||||
|
//oss
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(15);
|
||||||
|
ConstUtil.OSS_BUCKET = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(16);
|
||||||
|
ConstUtil.OSS_SECRET_ID = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(17);
|
||||||
|
ConstUtil.OSS_SECRET_KEY = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(18);
|
||||||
|
ConstUtil.OSS_ENDPOINT = config.getCnValue();
|
||||||
|
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import com.jepsoninfo.user.dao.UserInfoDao;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserTokenEx;
|
||||||
|
import com.jepsoninfo.user.service.UserLoginService;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.MyException;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.Signature;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.reflect.MethodSignature;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wb
|
||||||
|
* @date 2019/5/9
|
||||||
|
*/
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
@Configuration
|
||||||
|
public class TokenAop {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserInfoDao userInfoDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserLoginService tokenService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private AuthService authService;
|
||||||
|
|
||||||
|
@Around(value = "execution(* com.jepsoninfo.*.controller.*.*(..))", argNames = "joinPoint")
|
||||||
|
public Object token(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||||
|
Signature sig = joinPoint.getSignature();
|
||||||
|
MethodSignature ms = (MethodSignature) sig;
|
||||||
|
Object target = joinPoint.getTarget();
|
||||||
|
Object[] objects = joinPoint.getArgs();
|
||||||
|
Method currentMethod = target.getClass().getMethod(ms.getName(), ms.getParameterTypes());
|
||||||
|
String[] parameterNames = ms.getParameterNames();
|
||||||
|
String authorization = request.getHeader("Authorization");
|
||||||
|
String menuId = request.getHeader("menuId");
|
||||||
|
String roleId = request.getHeader("roleId");
|
||||||
|
String methodName = ms.getName();
|
||||||
|
|
||||||
|
//String url = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest().getRequestURL().toString();
|
||||||
|
String url = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest().getRequestURI();
|
||||||
|
|
||||||
|
System.out.println(authorization);
|
||||||
|
|
||||||
|
if (methodName.contains("login") == false
|
||||||
|
&& methodName.contains("register") == false
|
||||||
|
&& methodName.contains("upload") == false
|
||||||
|
&& methodName.contains("batchAdd") == false
|
||||||
|
&& methodName.contains("report") == false
|
||||||
|
&& methodName.contains("totalDay") == false
|
||||||
|
&& methodName.contains("totalMonth") == false
|
||||||
|
&& methodName.contains("totalYear") == false
|
||||||
|
&& methodName.contains("getToken") == false
|
||||||
|
&& url.contains("carTrack") == false
|
||||||
|
&& url.contains("orderInfo") == false
|
||||||
|
) {
|
||||||
|
if(authorization == null || authorization.length() == 0) {
|
||||||
|
throw new MyException(ErrorStatus.TOKEN_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
UserTokenEx tk = tokenService.resolveToken(authorization);
|
||||||
|
UserInfoEx user = userInfoDao.selectByPrimaryKey(tk.getUserId());
|
||||||
|
|
||||||
|
// if(authService.checkMenuAuth(menuId,roleId) == false){
|
||||||
|
// throw new MyException(ErrorStatus.NOT_PERMISSIONS);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 赋值操作
|
||||||
|
for (int i = 0; i < parameterNames.length; i++) {
|
||||||
|
if ("user".compareTo(parameterNames[i]) == 0) {
|
||||||
|
objects[i] = user;
|
||||||
|
}
|
||||||
|
if ("appKey".compareTo(parameterNames[i]) == 0) {
|
||||||
|
objects[i] = tk.getAppKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return joinPoint.proceed(objects);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.jepsoninfo.config;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.dao.CommonConfigDao;
|
||||||
|
import com.jepsoninfo.common.entity.CommonConfig;
|
||||||
|
import com.jepsoninfo.util.ConstUtil;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class mqttConfig {
|
||||||
|
@Resource
|
||||||
|
private CommonConfigDao commonConfigDao;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public void initMqtt(){
|
||||||
|
CommonConfig config;
|
||||||
|
|
||||||
|
//get config info
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(1);
|
||||||
|
ConstUtil.MQTT_BROKER = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(2);
|
||||||
|
ConstUtil.MQTT_TOPIC = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(3);
|
||||||
|
ConstUtil.MQTT_USER_NAME = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(4);
|
||||||
|
ConstUtil.MQTT_PASSWORD = config.getCnValue();
|
||||||
|
|
||||||
|
config = commonConfigDao.selectByPrimaryKey(5);
|
||||||
|
ConstUtil.MQTT_CLIENTID = config.getCnValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.CateInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.CateInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.CateInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CateInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:01:59
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("cateInfo")
|
||||||
|
public class CateInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private CateInfoService cateInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param cateInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<CateInfoEx>> list(@RequestBody CateInfoEx cateInfo) {
|
||||||
|
return ResultEntity.success(cateInfoService.list(cateInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<CateInfoEx> detail(@RequestBody CateInfoEx cateInfo) {
|
||||||
|
return ResultEntity.success(this.cateInfoService.detail(cateInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param cateInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<CateInfoEx> add(@RequestBody CateInfoEx cateInfo) {
|
||||||
|
return ResultEntity.success(this.cateInfoService.add(cateInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param cateInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody CateInfo cateInfo) {
|
||||||
|
return ResultEntity.success(this.cateInfoService.update(cateInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody CateInfo cateInfo) {
|
||||||
|
return ResultEntity.success(this.cateInfoService.delete(cateInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.ContractInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.ContractInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.ContractInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ContractInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:04:55
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("contractInfo")
|
||||||
|
public class ContractInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ContractInfoService contractInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param contractInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<ContractInfoEx>> list(@RequestBody ContractInfoEx contractInfo) {
|
||||||
|
return ResultEntity.success(contractInfoService.list(contractInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<ContractInfoEx> detail(@RequestBody ContractInfoEx contractInfo) {
|
||||||
|
return ResultEntity.success(this.contractInfoService.detail(contractInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param contractInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<ContractInfoEx> add(@RequestBody ContractInfoEx contractInfo) {
|
||||||
|
return ResultEntity.success(this.contractInfoService.add(contractInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param contractInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody ContractInfo contractInfo) {
|
||||||
|
return ResultEntity.success(this.contractInfoService.update(contractInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody ContractInfo contractInfo) {
|
||||||
|
return ResultEntity.success(this.contractInfoService.delete(contractInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GoodsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GoodsInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.GoodsInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GoodsInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:53
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("goodsInfo")
|
||||||
|
public class GoodsInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private GoodsInfoService goodsInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param goodsInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<GoodsInfoEx>> list(@RequestBody GoodsInfoEx goodsInfo) {
|
||||||
|
return ResultEntity.success(goodsInfoService.list(goodsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<GoodsInfoEx> detail(@RequestBody GoodsInfoEx goodsInfo) {
|
||||||
|
return ResultEntity.success(this.goodsInfoService.detail(goodsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param goodsInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<GoodsInfoEx> add(@RequestBody GoodsInfoEx goodsInfo) {
|
||||||
|
return ResultEntity.success(this.goodsInfoService.add(goodsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param goodsInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody GoodsInfo goodsInfo) {
|
||||||
|
return ResultEntity.success(this.goodsInfoService.update(goodsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody GoodsInfo goodsInfo) {
|
||||||
|
return ResultEntity.success(this.goodsInfoService.delete(goodsInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GpsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GpsInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.GpsInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GpsInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:06
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("gpsInfo")
|
||||||
|
public class GpsInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private GpsInfoService gpsInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param gpsInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<GpsInfoEx>> list(@RequestBody GpsInfoEx gpsInfo) {
|
||||||
|
return ResultEntity.success(gpsInfoService.list(gpsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<GpsInfoEx> detail(@RequestBody GpsInfoEx gpsInfo) {
|
||||||
|
return ResultEntity.success(this.gpsInfoService.detail(gpsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param gpsInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<GpsInfoEx> add(@RequestBody GpsInfoEx gpsInfo) {
|
||||||
|
return ResultEntity.success(this.gpsInfoService.add(gpsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param gpsInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody GpsInfo gpsInfo) {
|
||||||
|
return ResultEntity.success(this.gpsInfoService.update(gpsInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody GpsInfo gpsInfo) {
|
||||||
|
return ResultEntity.success(this.gpsInfoService.delete(gpsInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.OrderInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.OrderInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (OrderInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 11:40:42
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("orderInfo")
|
||||||
|
public class OrderInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private OrderInfoService orderInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param orderInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<OrderInfoEx>> list(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(orderInfoService.list(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<OrderInfoEx> detail(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.orderInfoService.detail(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param orderInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<OrderInfoEx> add(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.orderInfoService.add(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param orderInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody OrderInfo orderInfo) {
|
||||||
|
return ResultEntity.success(this.orderInfoService.update(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody OrderInfo orderInfo) {
|
||||||
|
return ResultEntity.success(this.orderInfoService.delete(orderInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.order.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.TreatmentInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.TreatmentInfoEx;
|
||||||
|
import com.jepsoninfo.order.service.TreatmentInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (TreatmentInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:26:29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("treatmentInfo")
|
||||||
|
public class TreatmentInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private TreatmentInfoService treatmentInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param treatmentInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<TreatmentInfoEx>> list(@RequestBody TreatmentInfoEx treatmentInfo) {
|
||||||
|
return ResultEntity.success(treatmentInfoService.list(treatmentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<TreatmentInfoEx> detail(@RequestBody TreatmentInfoEx treatmentInfo) {
|
||||||
|
return ResultEntity.success(this.treatmentInfoService.detail(treatmentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param treatmentInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<TreatmentInfoEx> add(@RequestBody TreatmentInfoEx treatmentInfo) {
|
||||||
|
return ResultEntity.success(this.treatmentInfoService.add(treatmentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param treatmentInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody TreatmentInfo treatmentInfo) {
|
||||||
|
return ResultEntity.success(this.treatmentInfoService.update(treatmentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody TreatmentInfo treatmentInfo) {
|
||||||
|
return ResultEntity.success(this.treatmentInfoService.delete(treatmentInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.CateInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.CateInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CateInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:01:59
|
||||||
|
*/
|
||||||
|
public interface CateInfoDao {
|
||||||
|
|
||||||
|
CateInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(CateInfo cateInfo);
|
||||||
|
|
||||||
|
int insertSelective(CateInfo cateInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(CateInfo cateInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(CateInfo cateInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
CateInfoEx selectByCond(@Param("cond") CateInfoEx cateInfo);
|
||||||
|
|
||||||
|
List<CateInfoEx> selectListByCond(@Param("cond") CateInfoEx cateInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(CateInfo cateInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.ContractInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.ContractInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ContractInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:04:55
|
||||||
|
*/
|
||||||
|
public interface ContractInfoDao {
|
||||||
|
|
||||||
|
ContractInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(ContractInfo contractInfo);
|
||||||
|
|
||||||
|
int insertSelective(ContractInfo contractInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ContractInfo contractInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ContractInfo contractInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
ContractInfoEx selectByCond(@Param("cond") ContractInfoEx contractInfo);
|
||||||
|
|
||||||
|
List<ContractInfoEx> selectListByCond(@Param("cond") ContractInfoEx contractInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(ContractInfo contractInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GoodsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GoodsInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GoodsInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:53
|
||||||
|
*/
|
||||||
|
public interface GoodsInfoDao {
|
||||||
|
|
||||||
|
GoodsInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(GoodsInfo goodsInfo);
|
||||||
|
|
||||||
|
int insertSelective(GoodsInfo goodsInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(GoodsInfo goodsInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(GoodsInfo goodsInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
GoodsInfoEx selectByCond(@Param("cond") GoodsInfoEx goodsInfo);
|
||||||
|
|
||||||
|
List<GoodsInfoEx> selectListByCond(@Param("cond") GoodsInfoEx goodsInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(GoodsInfo goodsInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GpsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GpsInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GpsInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:06
|
||||||
|
*/
|
||||||
|
public interface GpsInfoDao {
|
||||||
|
|
||||||
|
GpsInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(GpsInfo gpsInfo);
|
||||||
|
|
||||||
|
int insertSelective(GpsInfo gpsInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(GpsInfo gpsInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(GpsInfo gpsInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
GpsInfoEx selectByCond(@Param("cond") GpsInfoEx gpsInfo);
|
||||||
|
|
||||||
|
List<GpsInfoEx> selectListByCond(@Param("cond") GpsInfoEx gpsInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(GpsInfo gpsInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.OrderInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (OrderInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-01 10:33:57
|
||||||
|
*/
|
||||||
|
public interface OrderInfoDao {
|
||||||
|
|
||||||
|
OrderInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(OrderInfo orderInfo);
|
||||||
|
|
||||||
|
int insertSelective(OrderInfo orderInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(OrderInfo orderInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(OrderInfo orderInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
OrderInfoEx selectByCond(@Param("cond") OrderInfoEx orderInfo);
|
||||||
|
|
||||||
|
List<OrderInfoEx> selectListByCond(@Param("cond") OrderInfoEx orderInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(OrderInfo orderInfo);
|
||||||
|
|
||||||
|
List<OrderInfoEx> selectTotalWeight(@Param("cond")OrderInfoEx orderInfo);
|
||||||
|
|
||||||
|
List<OrderInfoEx> selectTotalCar(@Param("cond")OrderInfoEx orderInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.TreatmentInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.TreatmentInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (TreatmentInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:26:29
|
||||||
|
*/
|
||||||
|
public interface TreatmentInfoDao {
|
||||||
|
|
||||||
|
TreatmentInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(TreatmentInfo treatmentInfo);
|
||||||
|
|
||||||
|
int insertSelective(TreatmentInfo treatmentInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(TreatmentInfo treatmentInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(TreatmentInfo treatmentInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
TreatmentInfoEx selectByCond(@Param("cond") TreatmentInfoEx treatmentInfo);
|
||||||
|
|
||||||
|
List<TreatmentInfoEx> selectListByCond(@Param("cond") TreatmentInfoEx treatmentInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(TreatmentInfo treatmentInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CateInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 17:46:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CateInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 234545669999198933L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 父类型
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
/**
|
||||||
|
* 父类型名
|
||||||
|
*/
|
||||||
|
private String parentName;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ContractInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-02 13:34:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ContractInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 635035361662024873L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 合同标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 履行方式
|
||||||
|
*/
|
||||||
|
private String performMethod;
|
||||||
|
/**
|
||||||
|
* 期限
|
||||||
|
*/
|
||||||
|
private String term;
|
||||||
|
/**
|
||||||
|
* 合同源文件
|
||||||
|
*/
|
||||||
|
private String fileImg;
|
||||||
|
/**
|
||||||
|
* 业务订单id
|
||||||
|
*/
|
||||||
|
private Long busiId;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer nType;
|
||||||
|
/**
|
||||||
|
* 类型名
|
||||||
|
*/
|
||||||
|
private String nTypeName;
|
||||||
|
/**
|
||||||
|
* 状态:1:未完结,2:已完结,3:作废
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 甲方id
|
||||||
|
*/
|
||||||
|
private Long companyIdA;
|
||||||
|
/**
|
||||||
|
* 甲方名称
|
||||||
|
*/
|
||||||
|
private String companyNameA;
|
||||||
|
/**
|
||||||
|
* 甲方类型
|
||||||
|
*/
|
||||||
|
private Integer companyTypeA;
|
||||||
|
/**
|
||||||
|
* 甲方类型名
|
||||||
|
*/
|
||||||
|
private String companyTypeNameA;
|
||||||
|
/**
|
||||||
|
* 乙方id
|
||||||
|
*/
|
||||||
|
private Long companyIdB;
|
||||||
|
/**
|
||||||
|
* 乙方名称
|
||||||
|
*/
|
||||||
|
private String companyNameB;
|
||||||
|
/**
|
||||||
|
* 乙方类型
|
||||||
|
*/
|
||||||
|
private Integer companyTypeB;
|
||||||
|
/**
|
||||||
|
* 乙方类型名
|
||||||
|
*/
|
||||||
|
private String companyTypeNameB;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GoodsInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-06 17:46:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GoodsInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 239039104184173558L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 分类id
|
||||||
|
*/
|
||||||
|
private Long cateId;
|
||||||
|
/**
|
||||||
|
* 分类编码
|
||||||
|
*/
|
||||||
|
private String cateSn;
|
||||||
|
/**
|
||||||
|
* 分类名
|
||||||
|
*/
|
||||||
|
private String cateName;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GpsInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GpsInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 618626906463229559L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cnName;
|
||||||
|
/**
|
||||||
|
* 品牌
|
||||||
|
*/
|
||||||
|
private String brand;
|
||||||
|
/**
|
||||||
|
* 序列号
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
/**
|
||||||
|
* 设备编号
|
||||||
|
*/
|
||||||
|
private String devNo;
|
||||||
|
/**
|
||||||
|
* 型号
|
||||||
|
*/
|
||||||
|
private String model;
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 公司名
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String carNo;
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,250 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (OrderInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-08-27 11:26:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -48035053632319328L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderNo;
|
||||||
|
/**
|
||||||
|
* 清运订单号
|
||||||
|
*/
|
||||||
|
private String clearOrderNo;
|
||||||
|
/**
|
||||||
|
* 消纳订单号
|
||||||
|
*/
|
||||||
|
private String treatmentOrderNo;
|
||||||
|
/**
|
||||||
|
* 项目名
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
/**
|
||||||
|
* 订单类型:拉料、送料、消纳、销售
|
||||||
|
*/
|
||||||
|
private Integer orderType;
|
||||||
|
/**
|
||||||
|
* 订单类型名
|
||||||
|
*/
|
||||||
|
private String orderTypeName;
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long goodsId;
|
||||||
|
/**
|
||||||
|
* 商品编码
|
||||||
|
*/
|
||||||
|
private String goodsSn;
|
||||||
|
/**
|
||||||
|
* 商品名
|
||||||
|
*/
|
||||||
|
private String goodsName;
|
||||||
|
/**
|
||||||
|
* 消纳品类型id
|
||||||
|
*/
|
||||||
|
private Long goodsCateId;
|
||||||
|
/**
|
||||||
|
* 商品分类编码
|
||||||
|
*/
|
||||||
|
private String goodsCateSn;
|
||||||
|
/**
|
||||||
|
* 消纳品类型名
|
||||||
|
*/
|
||||||
|
private String goodsCateName;
|
||||||
|
/**
|
||||||
|
* 商品父类型id
|
||||||
|
*/
|
||||||
|
private Long goodsParentCateId;
|
||||||
|
/**
|
||||||
|
* 商品父类型名
|
||||||
|
*/
|
||||||
|
private String goodsParentCateName;
|
||||||
|
/**
|
||||||
|
* 运输车类型,1:消纳公司,2:清运公司
|
||||||
|
*/
|
||||||
|
private Integer carType;
|
||||||
|
/**
|
||||||
|
* 车辆id
|
||||||
|
*/
|
||||||
|
private Long carId;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String carNo;
|
||||||
|
/**
|
||||||
|
* 皮重
|
||||||
|
*/
|
||||||
|
private Double tareWeight;
|
||||||
|
/**
|
||||||
|
* 毛重
|
||||||
|
*/
|
||||||
|
private Double grossWeight;
|
||||||
|
/**
|
||||||
|
* 净重
|
||||||
|
*/
|
||||||
|
private Double netWeight;
|
||||||
|
/**
|
||||||
|
* 物业合同编号
|
||||||
|
*/
|
||||||
|
private String propertyContractSn;
|
||||||
|
/**
|
||||||
|
* 物业合同标题
|
||||||
|
*/
|
||||||
|
private String propertyContractTitle;
|
||||||
|
/**
|
||||||
|
* 消纳合同编号
|
||||||
|
*/
|
||||||
|
private String treatmentContractSn;
|
||||||
|
/**
|
||||||
|
* 消纳合同标题
|
||||||
|
*/
|
||||||
|
private String treatmentContractTitle;
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
/**
|
||||||
|
* 小区id
|
||||||
|
*/
|
||||||
|
private Long communityId;
|
||||||
|
/**
|
||||||
|
* 小区编码
|
||||||
|
*/
|
||||||
|
private String communitySn;
|
||||||
|
/**
|
||||||
|
* 小区名
|
||||||
|
*/
|
||||||
|
private String communityName;
|
||||||
|
/**
|
||||||
|
* 清运公司id
|
||||||
|
*/
|
||||||
|
private Long clearCompanyId;
|
||||||
|
/**
|
||||||
|
* 清运公司名
|
||||||
|
*/
|
||||||
|
private String clearCompanyName;
|
||||||
|
/**
|
||||||
|
* 清运公司编码
|
||||||
|
*/
|
||||||
|
private String clearCompanySn;
|
||||||
|
/**
|
||||||
|
* 物业公司id
|
||||||
|
*/
|
||||||
|
private Long propertyCompanyId;
|
||||||
|
/**
|
||||||
|
* 物业公司编码
|
||||||
|
*/
|
||||||
|
private String propertyCompanySn;
|
||||||
|
/**
|
||||||
|
* 物业公司名
|
||||||
|
*/
|
||||||
|
private String propertyCompanyName;
|
||||||
|
/**
|
||||||
|
* 消纳场id
|
||||||
|
*/
|
||||||
|
private Long treatmentCompanyId;
|
||||||
|
/**
|
||||||
|
* 消纳场编码
|
||||||
|
*/
|
||||||
|
private String treatmentCompanySn;
|
||||||
|
/**
|
||||||
|
* 消纳场名
|
||||||
|
*/
|
||||||
|
private String treatmentCompanyName;
|
||||||
|
/**
|
||||||
|
* 省份id
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
/**
|
||||||
|
* 省份名
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
/**
|
||||||
|
* 城市id
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
/**
|
||||||
|
* 城市名
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
/**
|
||||||
|
* 开始区域id
|
||||||
|
*/
|
||||||
|
private String startRegionId;
|
||||||
|
/**
|
||||||
|
* 开始区域名
|
||||||
|
*/
|
||||||
|
private String startRegionName;
|
||||||
|
/**
|
||||||
|
* 结束区域id
|
||||||
|
*/
|
||||||
|
private String endRegionId;
|
||||||
|
/**
|
||||||
|
* 结束区域名
|
||||||
|
*/
|
||||||
|
private String endRegionName;
|
||||||
|
/**
|
||||||
|
* 起点经度
|
||||||
|
*/
|
||||||
|
private Double startLng;
|
||||||
|
/**
|
||||||
|
* 起点纬度
|
||||||
|
*/
|
||||||
|
private Double startLat;
|
||||||
|
/**
|
||||||
|
* 终点经度
|
||||||
|
*/
|
||||||
|
private Double endLng;
|
||||||
|
/**
|
||||||
|
* 终点纬度
|
||||||
|
*/
|
||||||
|
private Double endLat;
|
||||||
|
/**
|
||||||
|
* 年
|
||||||
|
*/
|
||||||
|
private Integer nYear;
|
||||||
|
/**
|
||||||
|
* 月
|
||||||
|
*/
|
||||||
|
private Integer nMonth;
|
||||||
|
/**
|
||||||
|
* 日
|
||||||
|
*/
|
||||||
|
private Integer nDay;
|
||||||
|
/**
|
||||||
|
* 状态:1:未完结,2:已完结,3:作废,4:预警_订单进行时长超6小时为预警状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 是否删除,0:未删除,1:已删除
|
||||||
|
*/
|
||||||
|
private Integer isDel;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.jepsoninfo.order.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (TreatmentInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:26:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TreatmentInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -32910884039897767L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 公司id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* app_id
|
||||||
|
*/
|
||||||
|
private String appId;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.CateInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CateInfoEx extends CateInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.ContractInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractInfoEx extends ContractInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private List<Integer> nTypeList;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GoodsInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GoodsInfoEx extends GoodsInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GpsInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GpsInfoEx extends GpsInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.OrderInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderInfoEx extends OrderInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
private List<Integer> statusList;
|
||||||
|
|
||||||
|
private String totalTareWeight;
|
||||||
|
|
||||||
|
private String totalGrossWeight;
|
||||||
|
|
||||||
|
private String totalNetWeight;
|
||||||
|
|
||||||
|
private List<String> groupFieldList;
|
||||||
|
|
||||||
|
private Integer byRegionGroup;
|
||||||
|
|
||||||
|
private Integer byDayGroup;
|
||||||
|
|
||||||
|
private Integer byMonthGroup;
|
||||||
|
|
||||||
|
private Integer totalCount;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.jepsoninfo.order.entity.ex;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.TreatmentInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TreatmentInfoEx extends TreatmentInfo {
|
||||||
|
private int pageNo = 1;
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date startUpdateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endUpdateTime;
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.CateInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.CateInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.CateInfoDao;
|
||||||
|
import com.jepsoninfo.order.service.CateInfoService;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.PinYinUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (CateInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:02:00
|
||||||
|
*/
|
||||||
|
@Service("cateInfoService")
|
||||||
|
public class CateInfoService {
|
||||||
|
@Autowired
|
||||||
|
private CateInfoDao cateInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CateInfoEx detail(CateInfoEx req) {
|
||||||
|
return this.cateInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<CateInfoEx> list(CateInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<CateInfoEx> list = this.cateInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<CateInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public CateInfoEx add(CateInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
this.cateInfoDao.insertSelective(req);
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(req.getCnName())) {
|
||||||
|
String pinYin = PinYinUtil.chineseToPinyin(req.getCnName());
|
||||||
|
String letter = PinYinUtil.getFirstLetter(pinYin);
|
||||||
|
|
||||||
|
req.setSerialNo(letter + NumberUtil.getNumberString(req.getId(), 3));
|
||||||
|
this.cateInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(CateInfo req) {
|
||||||
|
if(StringUtils.isNotBlank(req.getCnName())) {
|
||||||
|
String pinYin = PinYinUtil.chineseToPinyin(req.getCnName());
|
||||||
|
String letter = PinYinUtil.getFirstLetter(pinYin);
|
||||||
|
|
||||||
|
req.setSerialNo(letter + NumberUtil.getNumberString(req.getId(), 3));
|
||||||
|
}
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.cateInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.cateInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.ContractInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.ContractInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.ContractInfoDao;
|
||||||
|
import com.jepsoninfo.order.service.ContractInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ContractInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:04:55
|
||||||
|
*/
|
||||||
|
@Service("contractInfoService")
|
||||||
|
public class ContractInfoService {
|
||||||
|
@Autowired
|
||||||
|
private ContractInfoDao contractInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ContractInfoEx detail(ContractInfoEx req) {
|
||||||
|
return this.contractInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<ContractInfoEx> list(ContractInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<ContractInfoEx> list = this.contractInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<ContractInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public ContractInfoEx add(ContractInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.contractInfoDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(ContractInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.contractInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.contractInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GoodsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GoodsInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.GoodsInfoDao;
|
||||||
|
import com.jepsoninfo.order.service.GoodsInfoService;
|
||||||
|
import com.jepsoninfo.util.NumberUtil;
|
||||||
|
import com.jepsoninfo.util.PinYinUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GoodsInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:53
|
||||||
|
*/
|
||||||
|
@Service("goodsInfoService")
|
||||||
|
public class GoodsInfoService {
|
||||||
|
@Autowired
|
||||||
|
private GoodsInfoDao goodsInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public GoodsInfoEx detail(GoodsInfoEx req) {
|
||||||
|
return this.goodsInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<GoodsInfoEx> list(GoodsInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<GoodsInfoEx> list = this.goodsInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<GoodsInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public GoodsInfoEx add(GoodsInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.goodsInfoDao.insertSelective(req);
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(req.getCnName())) {
|
||||||
|
String pinYin = PinYinUtil.chineseToPinyin(req.getCnName());
|
||||||
|
String letter = PinYinUtil.getFirstLetter(pinYin);
|
||||||
|
|
||||||
|
req.setSerialNo(letter + NumberUtil.getNumberString(req.getId(), 3));
|
||||||
|
this.goodsInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(GoodsInfo req) {
|
||||||
|
if(StringUtils.isNotBlank(req.getCnName())) {
|
||||||
|
String pinYin = PinYinUtil.chineseToPinyin(req.getCnName());
|
||||||
|
String letter = PinYinUtil.getFirstLetter(pinYin);
|
||||||
|
|
||||||
|
req.setSerialNo(letter + NumberUtil.getNumberString(req.getId(), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.goodsInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.goodsInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.GpsInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.GpsInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.GpsInfoDao;
|
||||||
|
import com.jepsoninfo.order.service.GpsInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (GpsInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:03:07
|
||||||
|
*/
|
||||||
|
@Service("gpsInfoService")
|
||||||
|
public class GpsInfoService {
|
||||||
|
@Autowired
|
||||||
|
private GpsInfoDao gpsInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public GpsInfoEx detail(GpsInfoEx req) {
|
||||||
|
return this.gpsInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<GpsInfoEx> list(GpsInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<GpsInfoEx> list = this.gpsInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<GpsInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public GpsInfoEx add(GpsInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.gpsInfoDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(GpsInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.gpsInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.gpsInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.jepsoninfo.order.dao.OrderInfoDao;
|
||||||
|
import com.jepsoninfo.order.entity.OrderInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.util.RandomUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (OrderInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 11:40:43
|
||||||
|
*/
|
||||||
|
@Service("orderInfoService")
|
||||||
|
public class OrderInfoService {
|
||||||
|
@Autowired
|
||||||
|
private OrderInfoDao orderInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public OrderInfoEx detail(OrderInfoEx req) {
|
||||||
|
return this.orderInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<OrderInfoEx> list(OrderInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
req.setIsDel(0);
|
||||||
|
List<OrderInfoEx> list = this.orderInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<OrderInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public OrderInfoEx add(OrderInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.orderInfoDao.insertSelective(req);
|
||||||
|
|
||||||
|
String orderSn = "YWDD" + RandomUtil.getRandomNum(10);
|
||||||
|
|
||||||
|
req.setOrderNo(orderSn);
|
||||||
|
this.orderInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(OrderInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.orderInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.orderInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.jepsoninfo.order.service;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.TreatmentInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.TreatmentInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.TreatmentInfoDao;
|
||||||
|
import com.jepsoninfo.order.service.TreatmentInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (TreatmentInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 10:26:29
|
||||||
|
*/
|
||||||
|
@Service("treatmentInfoService")
|
||||||
|
public class TreatmentInfoService {
|
||||||
|
@Autowired
|
||||||
|
private TreatmentInfoDao treatmentInfoDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public TreatmentInfoEx detail(TreatmentInfoEx req) {
|
||||||
|
return this.treatmentInfoDao.selectByCond(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
public PageInfo<TreatmentInfoEx> list(TreatmentInfoEx req) {
|
||||||
|
PageHelper.startPage(req.getPageNo(), req.getPageSize());
|
||||||
|
List<TreatmentInfoEx> list = this.treatmentInfoDao.selectListByCond(req);
|
||||||
|
PageInfo<TreatmentInfoEx> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public TreatmentInfoEx add(TreatmentInfoEx req) {
|
||||||
|
req.setCreateTime(new Date());
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
this.treatmentInfoDao.insertSelective(req);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
public int update(TreatmentInfo req) {
|
||||||
|
req.setUpdateTime(new Date());
|
||||||
|
return this.treatmentInfoDao.updateByPrimaryKeySelective(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public int delete(Long id) {
|
||||||
|
return this.treatmentInfoDao.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.jepsoninfo.statistics.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.statistics.entity.TotalCompanyEntity;
|
||||||
|
import com.jepsoninfo.statistics.service.StatisticsService;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
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 java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("statistics")
|
||||||
|
public class StatisticsController {
|
||||||
|
@Autowired
|
||||||
|
private StatisticsService statisticsService;
|
||||||
|
|
||||||
|
@PostMapping("/totalCompany")
|
||||||
|
public ResultEntity<TotalCompanyEntity> totalCompany(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalCompany());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalCar")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalCar(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalCar(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalDay")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalDay(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalDay(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalWeek")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalWeek(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalWeek(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalMonth")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalMonth(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalMonth(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalLastSixMonth")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalLastSixMonth(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalLastSixMonth(orderInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/totalYear")
|
||||||
|
public ResultEntity<List<OrderInfoEx>> totalYear(@RequestBody OrderInfoEx orderInfo) {
|
||||||
|
return ResultEntity.success(this.statisticsService.totalYear(orderInfo));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.jepsoninfo.statistics.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TotalCompanyEntity {
|
||||||
|
private Long totalCommunityInfo;
|
||||||
|
private Long totalClearCompany;
|
||||||
|
private Long totalPropertyCompany;
|
||||||
|
private Long totalTreatmentCompany;
|
||||||
|
private Long totalBusyCar;
|
||||||
|
private Long totalFreeCar;
|
||||||
|
}
|
|
@ -0,0 +1,233 @@
|
||||||
|
package com.jepsoninfo.statistics.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.jepsoninfo.company.dao.ClearCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.CommunityInfoDao;
|
||||||
|
import com.jepsoninfo.company.dao.PropertyCompanyDao;
|
||||||
|
import com.jepsoninfo.company.dao.TreatmentCompanyDao;
|
||||||
|
import com.jepsoninfo.company.entity.ClearCompany;
|
||||||
|
import com.jepsoninfo.company.entity.CommunityInfo;
|
||||||
|
import com.jepsoninfo.company.entity.PropertyCompany;
|
||||||
|
import com.jepsoninfo.company.entity.TreatmentCompany;
|
||||||
|
import com.jepsoninfo.company.entity.ex.CommunityInfoEx;
|
||||||
|
import com.jepsoninfo.order.dao.OrderInfoDao;
|
||||||
|
import com.jepsoninfo.order.entity.OrderInfo;
|
||||||
|
import com.jepsoninfo.order.entity.ex.OrderInfoEx;
|
||||||
|
import com.jepsoninfo.statistics.entity.TotalCompanyEntity;
|
||||||
|
import com.jepsoninfo.util.RandomUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (OrderInfo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-07-30 11:40:43
|
||||||
|
*/
|
||||||
|
@Service("statisticsService")
|
||||||
|
public class StatisticsService {
|
||||||
|
@Autowired
|
||||||
|
private OrderInfoDao orderInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private CommunityInfoDao communityInfoDao;
|
||||||
|
@Autowired
|
||||||
|
private ClearCompanyDao clearCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private PropertyCompanyDao propertyCompanyDao;
|
||||||
|
@Autowired
|
||||||
|
private TreatmentCompanyDao treatmentCompanyDao;
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalDay(OrderInfoEx req) {
|
||||||
|
Date startCreateTime = new Date();
|
||||||
|
|
||||||
|
startCreateTime.setHours(0);
|
||||||
|
startCreateTime.setMinutes(0);
|
||||||
|
startCreateTime.setSeconds(0);
|
||||||
|
req.setStartCreateTime(startCreateTime);
|
||||||
|
|
||||||
|
Date endCreateTime = new Date();
|
||||||
|
|
||||||
|
endCreateTime.setHours(23);
|
||||||
|
endCreateTime.setMinutes(59);
|
||||||
|
endCreateTime.setSeconds(59);
|
||||||
|
req.setEndCreateTime(endCreateTime);
|
||||||
|
|
||||||
|
req.setIsDel(0);
|
||||||
|
// List<String> groupFieldList = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// groupFieldList.add("start_region_id");
|
||||||
|
// req.setGroupFieldList(groupFieldList);
|
||||||
|
|
||||||
|
List<OrderInfoEx> orderInfoEx = orderInfoDao.selectTotalWeight(req);
|
||||||
|
|
||||||
|
return orderInfoEx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalWeek(OrderInfoEx req) {
|
||||||
|
Date curDateTime = new Date();
|
||||||
|
|
||||||
|
curDateTime.setHours(23);
|
||||||
|
curDateTime.setMinutes(59);
|
||||||
|
curDateTime.setSeconds(59);
|
||||||
|
req.setEndCreateTime(curDateTime);
|
||||||
|
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(new Date());
|
||||||
|
calendar.add(Calendar.DATE, - 7);
|
||||||
|
Date lastWeek = calendar.getTime();
|
||||||
|
|
||||||
|
lastWeek.setHours(0);
|
||||||
|
lastWeek.setMinutes(0);
|
||||||
|
lastWeek.setSeconds(0);
|
||||||
|
req.setStartCreateTime(lastWeek);
|
||||||
|
|
||||||
|
req.setIsDel(0);
|
||||||
|
List<OrderInfoEx> orderInfoEx = orderInfoDao.selectTotalWeight(req);
|
||||||
|
|
||||||
|
return orderInfoEx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalMonth(OrderInfoEx req) {
|
||||||
|
// 获取当前日期
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
|
||||||
|
// 设置日期为本月第一天
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
// 获取本月第一天的日期
|
||||||
|
Date startCreateTime = calendar.getTime();
|
||||||
|
|
||||||
|
req.setStartCreateTime(startCreateTime);
|
||||||
|
|
||||||
|
// 设置日期为下个月第一天
|
||||||
|
calendar.add(Calendar.MONTH, 1);
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
// 获取本月最后一天的日期
|
||||||
|
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
|
Date endCreateTime = calendar.getTime();
|
||||||
|
req.setEndCreateTime(endCreateTime);
|
||||||
|
|
||||||
|
req.setIsDel(0);
|
||||||
|
// List<String> groupFieldList = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// groupFieldList.add("start_region_id");
|
||||||
|
// req.setGroupFieldList(groupFieldList);
|
||||||
|
|
||||||
|
List<OrderInfoEx> orderInfoEx = orderInfoDao.selectTotalWeight(req);
|
||||||
|
|
||||||
|
return orderInfoEx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalYear(OrderInfoEx req) {
|
||||||
|
Date startCreateTime = new Date();
|
||||||
|
|
||||||
|
startCreateTime.setMonth(1);
|
||||||
|
startCreateTime.setDate(1);
|
||||||
|
startCreateTime.setHours(0);
|
||||||
|
startCreateTime.setMinutes(0);
|
||||||
|
startCreateTime.setSeconds(0);
|
||||||
|
req.setStartCreateTime(startCreateTime);
|
||||||
|
|
||||||
|
Date endCreateTime = new Date();
|
||||||
|
|
||||||
|
endCreateTime.setMonth(12);
|
||||||
|
endCreateTime.setDate(31);
|
||||||
|
endCreateTime.setHours(23);
|
||||||
|
endCreateTime.setMinutes(59);
|
||||||
|
endCreateTime.setSeconds(59);
|
||||||
|
req.setEndCreateTime(endCreateTime);
|
||||||
|
|
||||||
|
req.setIsDel(0);
|
||||||
|
// List<String> groupFieldList = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// groupFieldList.add("start_region_id");
|
||||||
|
// req.setGroupFieldList(groupFieldList);
|
||||||
|
|
||||||
|
List<OrderInfoEx> orderInfoEx = orderInfoDao.selectTotalWeight(req);
|
||||||
|
|
||||||
|
return orderInfoEx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalCar(OrderInfoEx req) {
|
||||||
|
Date startCreateTime = new Date();
|
||||||
|
|
||||||
|
startCreateTime.setHours(0);
|
||||||
|
startCreateTime.setMinutes(0);
|
||||||
|
startCreateTime.setSeconds(0);
|
||||||
|
req.setStartCreateTime(startCreateTime);
|
||||||
|
|
||||||
|
Date endCreateTime = new Date();
|
||||||
|
|
||||||
|
endCreateTime.setHours(23);
|
||||||
|
endCreateTime.setMinutes(59);
|
||||||
|
endCreateTime.setSeconds(59);
|
||||||
|
req.setEndCreateTime(endCreateTime);
|
||||||
|
req.setIsDel(0);
|
||||||
|
|
||||||
|
return orderInfoDao.selectTotalCar(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TotalCompanyEntity totalCompany() {
|
||||||
|
TotalCompanyEntity totalCompanyEntity = new TotalCompanyEntity();
|
||||||
|
|
||||||
|
totalCompanyEntity.setTotalCommunityInfo(communityInfoDao.selectCountByCond(new CommunityInfo()));
|
||||||
|
totalCompanyEntity.setTotalClearCompany(clearCompanyDao.selectCountByCond(new ClearCompany()));
|
||||||
|
totalCompanyEntity.setTotalPropertyCompany(propertyCompanyDao.selectCountByCond(new PropertyCompany()));
|
||||||
|
totalCompanyEntity.setTotalTreatmentCompany(treatmentCompanyDao.selectCountByCond(new TreatmentCompany()));
|
||||||
|
|
||||||
|
return totalCompanyEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderInfoEx> totalLastSixMonth(OrderInfoEx req) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
|
||||||
|
//结束时间为今天
|
||||||
|
Date endCreateTime = calendar.getTime();
|
||||||
|
|
||||||
|
endCreateTime.setHours(23);
|
||||||
|
endCreateTime.setMinutes(59);
|
||||||
|
endCreateTime.setSeconds(59);
|
||||||
|
req.setEndCreateTime(endCreateTime);
|
||||||
|
|
||||||
|
// 将当前日期回退六个月
|
||||||
|
calendar.add(Calendar.MONTH, -6);
|
||||||
|
|
||||||
|
// // 获取回退后的年份
|
||||||
|
// int year = calendar.get(Calendar.YEAR);
|
||||||
|
// // 获取回退后的月份,注意:月份是从0开始的
|
||||||
|
// int month = calendar.get(Calendar.MONTH) + 1; // 需要加1因为Calendar.MONTH返回的是实际月份-1
|
||||||
|
// // 获取回退后的日期
|
||||||
|
// int day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||||
|
|
||||||
|
Date startCreateTime = calendar.getTime();
|
||||||
|
|
||||||
|
startCreateTime.setDate(1);
|
||||||
|
startCreateTime.setHours(0);
|
||||||
|
startCreateTime.setMinutes(0);
|
||||||
|
startCreateTime.setSeconds(0);
|
||||||
|
|
||||||
|
req.setStartCreateTime(startCreateTime);
|
||||||
|
|
||||||
|
// List<String> groupFieldList = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// groupFieldList.add("start_region_id");
|
||||||
|
// req.setGroupFieldList(groupFieldList);
|
||||||
|
List<String> groupFieldList = req.getGroupFieldList();
|
||||||
|
if( groupFieldList== null){
|
||||||
|
groupFieldList = new ArrayList<>();
|
||||||
|
groupFieldList.add("n_month");
|
||||||
|
}
|
||||||
|
|
||||||
|
req.setGroupFieldList(groupFieldList);
|
||||||
|
req.setIsDel(0);
|
||||||
|
|
||||||
|
List<OrderInfoEx> orderInfoEx = orderInfoDao.selectTotalWeight(req);
|
||||||
|
|
||||||
|
return orderInfoEx;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.jepsoninfo.upload.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.upload.entity.FileInfo;
|
||||||
|
import com.jepsoninfo.upload.entity.ex.FileInfoEx;
|
||||||
|
import com.jepsoninfo.upload.service.FileInfoService;
|
||||||
|
import com.jepsoninfo.util.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (FileInfo)表控制层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-05-15 12:36:03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("fileInfo")
|
||||||
|
public class FileInfoController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private FileInfoService fileInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param fileInfo 筛选条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultEntity<PageInfo<FileInfoEx>> list(@RequestBody FileInfoEx fileInfo) {
|
||||||
|
return ResultEntity.success(fileInfoService.list(fileInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ResultEntity<FileInfoEx> detail(@RequestBody FileInfoEx fileInfo) {
|
||||||
|
return ResultEntity.success(this.fileInfoService.detail(fileInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param fileInfo 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResultEntity<FileInfoEx> add(@RequestBody FileInfoEx fileInfo) {
|
||||||
|
return ResultEntity.success(this.fileInfoService.add(fileInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param fileInfo 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultEntity<Integer> update(@RequestBody FileInfo fileInfo) {
|
||||||
|
return ResultEntity.success(this.fileInfoService.update(fileInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public ResultEntity<Integer> delete(@RequestBody FileInfo fileInfo) {
|
||||||
|
return ResultEntity.success(this.fileInfoService.delete(fileInfo.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.jepsoninfo.upload.controller;
|
||||||
|
|
||||||
|
import com.jepsoninfo.common.dao.CommonConfigDao;
|
||||||
|
import com.jepsoninfo.common.service.CommonConfigService;
|
||||||
|
import com.jepsoninfo.upload.service.FileUploadService;
|
||||||
|
import com.jepsoninfo.user.entity.ex.UserInfoEx;
|
||||||
|
import com.jepsoninfo.util.ConstUtil;
|
||||||
|
import com.jepsoninfo.util.ErrorStatus;
|
||||||
|
import com.jepsoninfo.util.ResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
@RequestMapping("/upload")
|
||||||
|
@RestController
|
||||||
|
public class FileUploadController {
|
||||||
|
@Autowired
|
||||||
|
private CommonConfigDao commonConfigDao;
|
||||||
|
@Autowired
|
||||||
|
private FileUploadService fileUploadService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/uploadImage", produces = "application/json;charset=UTF-8", method = {
|
||||||
|
RequestMethod.POST})
|
||||||
|
public ResultEntity uploadImage(@ApiIgnore UserInfoEx user, HttpServletRequest request) {
|
||||||
|
ResultEntity status = new ResultEntity();
|
||||||
|
try {
|
||||||
|
Long userId = user.getId();
|
||||||
|
|
||||||
|
String ossDir = commonConfigDao.selectByPrimaryKey(6).getCnValue();
|
||||||
|
|
||||||
|
status = fileUploadService.uploadImage(request, userId, ConstUtil.LOCAL_UPLOAD_PATH, ConstUtil.SUPPORTED_IMAGE_EXT, ConstUtil.OSS_ENDPOINT, ConstUtil.OSS_BUCKET, ossDir, ConstUtil.OSS_SECRET_ID,ConstUtil.OSS_SECRET_KEY);
|
||||||
|
} catch (Exception e) {
|
||||||
|
status.setCode(ErrorStatus.FAILED.getErrCode());
|
||||||
|
status.setMsg(ErrorStatus.FAILED.getErrMsg());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/uploadCsv", produces = "application/json;charset=UTF-8", method = {
|
||||||
|
RequestMethod.POST})
|
||||||
|
public ResultEntity uploadCsv(@ApiIgnore UserInfoEx user, HttpServletRequest request) {
|
||||||
|
ResultEntity status = new ResultEntity();
|
||||||
|
try {
|
||||||
|
status = fileUploadService.uploadCsv(request, ConstUtil.LOCAL_UPLOAD_PATH, ConstUtil.SUPPORTED_IMAGE_EXT);
|
||||||
|
} catch (Exception e) {
|
||||||
|
status.setCode(ErrorStatus.FAILED.getErrCode());
|
||||||
|
status.setMsg(ErrorStatus.FAILED.getErrMsg());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.jepsoninfo.upload.dao;
|
||||||
|
|
||||||
|
import com.jepsoninfo.upload.entity.FileInfo;
|
||||||
|
import com.jepsoninfo.upload.entity.ex.FileInfoEx;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (FileInfo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-05-15 12:36:03
|
||||||
|
*/
|
||||||
|
public interface FileInfoDao {
|
||||||
|
|
||||||
|
FileInfoEx selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(FileInfo fileInfo);
|
||||||
|
|
||||||
|
int insertSelective(FileInfo fileInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(FileInfo fileInfo);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(FileInfo fileInfo);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
FileInfoEx selectByCond(@Param("cond") FileInfo fileInfo);
|
||||||
|
|
||||||
|
List<FileInfoEx> selectListByCond(@Param("cond") FileInfo fileInfo);
|
||||||
|
|
||||||
|
long selectCountByCond(FileInfo fileInfo);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.jepsoninfo.upload.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (FileInfo)实体类
|
||||||
|
*
|
||||||
|
* @author w
|
||||||
|
* @since 2024-05-15 12:36:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FileInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -36541584447971836L;
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String cname;
|
||||||
|
/**
|
||||||
|
* 路径
|
||||||
|
*/
|
||||||
|
private String thumbPath;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer ntype;
|
||||||
|
/**
|
||||||
|
* 关联id
|
||||||
|
*/
|
||||||
|
private Long relId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue