新建工单项目
This commit is contained in:
parent
840aeee7f9
commit
0b9703d521
35
xhpc-modules/xhpc-workorder/.gitignore
vendored
Normal file
35
xhpc-modules/xhpc-workorder/.gitignore
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
HELP.md
|
||||
target/
|
||||
.mvn/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
161
xhpc-modules/xhpc-workorder/pom.xml
Normal file
161
xhpc-modules/xhpc-workorder/pom.xml
Normal file
@ -0,0 +1,161 @@
|
||||
<?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">
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>xhpc-modules</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>xhpc-workorder</artifactId>
|
||||
|
||||
<description>
|
||||
工单服务
|
||||
</description>
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.5.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Core -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>xhpc-common</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.websocket</groupId>
|
||||
<artifactId>javax.websocket-api</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 支付宝支付 通用版 -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
<version>4.15.14.ALL</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 微信支付 -->
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-pay</artifactId>
|
||||
<version>4.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.10.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.10.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,26 @@
|
||||
package com.xhpc.workorder;
|
||||
|
||||
import com.xhpc.common.security.annotation.EnableCustomConfig;
|
||||
import com.xhpc.common.security.annotation.EnableRyFeignClients;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
|
||||
@EnableConfigurationProperties
|
||||
@ConfigurationPropertiesScan(basePackages = {"com.xhpc.workorder.config"})
|
||||
@EnableCustomConfig
|
||||
@SpringBootApplication
|
||||
@EnableRyFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@MapperScan("com.xhpc.workorder.mapper")
|
||||
public class XhpcWorkOrderApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(XhpcWorkOrderApplication.class, args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.xhpc.workorder.config;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
|
||||
/**
|
||||
* 支付宝支付配置类
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "oss")
|
||||
public class AliOSSProperties {
|
||||
|
||||
private boolean enabled;
|
||||
private String name;
|
||||
private boolean tenantMode;
|
||||
private String endpoint;
|
||||
private String accessKey;
|
||||
private String secretKey;
|
||||
private String bucketName;
|
||||
private String region;
|
||||
private String domain;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xhpc.workorder.controller;
|
||||
|
||||
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.workorder.service.WorkOrderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/workorder")
|
||||
public class WorkOrderController extends BaseController {
|
||||
|
||||
@Resource
|
||||
WorkOrderService workOrderService;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,355 @@
|
||||
package com.xhpc.workorder.domain;
|
||||
|
||||
import com.xhpc.common.core.annotation.Excel;
|
||||
import com.xhpc.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 电站对象 xhpc_charging_station
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
public class XhpcChargingStationDomain extends BaseEntity {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 电站id */
|
||||
private Long chargingStationId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 运营商id */
|
||||
@Excel(name = "运营商id")
|
||||
private Long operatorId;
|
||||
|
||||
/** 电站位置 */
|
||||
@Excel(name = "电站位置")
|
||||
private Integer type;
|
||||
|
||||
/** 建设场所 */
|
||||
@Excel(name = "建设场所")
|
||||
private Integer constructionSite;
|
||||
|
||||
/** 电站类型 */
|
||||
@Excel(name = "电站类型")
|
||||
private Integer stationType;
|
||||
|
||||
/** 服务设施 */
|
||||
@Excel(name = "服务设施")
|
||||
private String serviceFacilities;
|
||||
|
||||
/** 周边设施 */
|
||||
@Excel(name = "周边设施")
|
||||
private String peripheryFacilities;
|
||||
|
||||
/** 地址code */
|
||||
@Excel(name = "地址code")
|
||||
private Integer areaCode;
|
||||
|
||||
/** 地址 */
|
||||
@Excel(name = "地址")
|
||||
private String address;
|
||||
|
||||
/** 详细地址 */
|
||||
@Excel(name = "详细地址")
|
||||
private String detailedAddress;
|
||||
|
||||
/** 经度 */
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
/** 维度 */
|
||||
@Excel(name = "维度")
|
||||
private String latitude;
|
||||
|
||||
/** 停车说明 */
|
||||
@Excel(name = "停车说明")
|
||||
private String parkingInstructions;
|
||||
|
||||
/** 编号 */
|
||||
@Excel(name = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 客户端可见类型 */
|
||||
@Excel(name = "客户端可见类型")
|
||||
private String clientVisible;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private Integer status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 当前计费模型id */
|
||||
@Excel(name = "当前计费模型id")
|
||||
private Long rateModelId;
|
||||
|
||||
/** 图片id */
|
||||
@Excel(name = "图片id")
|
||||
private String imgId;
|
||||
|
||||
/** 营业说明 */
|
||||
@Excel(name = "营业说明")
|
||||
private String businessInstructions;
|
||||
|
||||
/** 温馨提示说明 */
|
||||
@Excel(name = "温馨提示说明")
|
||||
private String reminderInstructions;
|
||||
|
||||
/**
|
||||
* 对接第三方平台及监管平台的operatorId
|
||||
*/
|
||||
private String operatorIdEvcs;
|
||||
|
||||
/**
|
||||
* 站点电话
|
||||
*/
|
||||
private String serviceTel;
|
||||
|
||||
|
||||
/**
|
||||
*侧位数量
|
||||
*/
|
||||
private Integer parkNums;
|
||||
|
||||
|
||||
public String getOperatorIdEvcs() {
|
||||
|
||||
return operatorIdEvcs;
|
||||
}
|
||||
|
||||
public void setOperatorIdEvcs(String operatorIdEvcs) {
|
||||
|
||||
this.operatorIdEvcs = operatorIdEvcs;
|
||||
}
|
||||
|
||||
public void setChargingStationId(Long chargingStationId)
|
||||
{
|
||||
this.chargingStationId = chargingStationId;
|
||||
}
|
||||
|
||||
public Long getChargingStationId()
|
||||
{
|
||||
return chargingStationId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setType(Integer type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getServiceFacilities()
|
||||
{
|
||||
return serviceFacilities;
|
||||
}
|
||||
public void setPeripheryFacilities(String peripheryFacilities)
|
||||
{
|
||||
this.peripheryFacilities = peripheryFacilities;
|
||||
}
|
||||
|
||||
public String getPeripheryFacilities()
|
||||
{
|
||||
return peripheryFacilities;
|
||||
}
|
||||
public void setAreaCode(Integer areaCode)
|
||||
{
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public Integer getAreaCode()
|
||||
{
|
||||
return areaCode;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setDetailedAddress(String detailedAddress)
|
||||
{
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getDetailedAddress()
|
||||
{
|
||||
return detailedAddress;
|
||||
}
|
||||
public void setLongitude(String longitude)
|
||||
{
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getLongitude()
|
||||
{
|
||||
return longitude;
|
||||
}
|
||||
public void setLatitude(String latitude)
|
||||
{
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLatitude()
|
||||
{
|
||||
return latitude;
|
||||
}
|
||||
public void setParkingInstructions(String parkingInstructions)
|
||||
{
|
||||
this.parkingInstructions = parkingInstructions;
|
||||
}
|
||||
|
||||
public String getParkingInstructions()
|
||||
{
|
||||
return parkingInstructions;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setClientVisible(String clientVisible)
|
||||
{
|
||||
this.clientVisible = clientVisible;
|
||||
}
|
||||
|
||||
public String getClientVisible()
|
||||
{
|
||||
return clientVisible;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setRateModelId(Long rateModelId)
|
||||
{
|
||||
this.rateModelId = rateModelId;
|
||||
}
|
||||
|
||||
public Long getRateModelId()
|
||||
{
|
||||
return rateModelId;
|
||||
}
|
||||
|
||||
public String getImgId() {
|
||||
|
||||
return imgId;
|
||||
}
|
||||
|
||||
public void setImgId(String imgId) {
|
||||
|
||||
this.imgId = imgId;
|
||||
}
|
||||
|
||||
public String getBusinessInstructions() {
|
||||
|
||||
return businessInstructions;
|
||||
}
|
||||
|
||||
public void setBusinessInstructions(String businessInstructions) {
|
||||
|
||||
this.businessInstructions = businessInstructions;
|
||||
}
|
||||
|
||||
public String getReminderInstructions() {
|
||||
|
||||
return reminderInstructions;
|
||||
}
|
||||
|
||||
public void setReminderInstructions(String reminderInstructions) {
|
||||
|
||||
this.reminderInstructions = reminderInstructions;
|
||||
}
|
||||
|
||||
public Integer getConstructionSite() {
|
||||
|
||||
return constructionSite;
|
||||
}
|
||||
|
||||
public void setConstructionSite(Integer constructionSite) {
|
||||
|
||||
this.constructionSite = constructionSite;
|
||||
}
|
||||
|
||||
public Integer getStationType() {
|
||||
|
||||
return stationType;
|
||||
}
|
||||
|
||||
public void setStationType(Integer stationType) {
|
||||
|
||||
this.stationType = stationType;
|
||||
}
|
||||
|
||||
public void setServiceFacilities(String serviceFacilities) {
|
||||
|
||||
this.serviceFacilities = serviceFacilities;
|
||||
}
|
||||
|
||||
public String getServiceTel() {
|
||||
|
||||
return serviceTel;
|
||||
}
|
||||
|
||||
public void setServiceTel(String serviceTel) {
|
||||
|
||||
this.serviceTel = serviceTel;
|
||||
}
|
||||
|
||||
public Integer getParkNums() {
|
||||
|
||||
return parkNums;
|
||||
}
|
||||
|
||||
public void setParkNums(Integer parkNums) {
|
||||
|
||||
this.parkNums = parkNums;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xhpc.workorder.domain;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table(name = "xhpc_station_device")
|
||||
public class XhpcStationDeviceDomain {
|
||||
|
||||
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 所属场站ID
|
||||
*/
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 上级设备ID(如有)
|
||||
*/
|
||||
private Long parentDeviceId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String brandModel;
|
||||
|
||||
/** 桩类型 */
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 设备状态(0-未启用,1-正常,2-异常,3-维修中,4-待检测)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.xhpc.workorder.domain;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table(name = "xhpc_work_order")
|
||||
public class XhpcWorkOrderDomain {
|
||||
|
||||
@Id
|
||||
private Long workOrderId;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 工单标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 工单内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 设备编码或者订单编码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 工单状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.xhpc.workorder.mapper;
|
||||
|
||||
|
||||
import com.xhpc.workorder.domain.XhpcWorkOrderDomain;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface XhpcWorkOrderMapper {
|
||||
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.xhpc.workorder.service;
|
||||
|
||||
|
||||
public interface WorkOrderService {
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.xhpc.workorder.service.impl;
|
||||
|
||||
import com.xhpc.workorder.service.WorkOrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.xhpc.workorder.utils;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.xhpc.common.core.utils.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class DownloadUtil {
|
||||
|
||||
public static File downloadFile(String fileUrl) throws Exception {
|
||||
|
||||
if (StringUtils.isEmpty(fileUrl)) {
|
||||
throw new Exception("文件地址为空");
|
||||
}
|
||||
String suffix = fileUrl.substring(fileUrl.lastIndexOf("."));
|
||||
return HttpUtil.downloadFileFromUrl(fileUrl, File.createTempFile("temp_", suffix));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
|
||||
,--.
|
||||
,--. ,--. | ,---. ,---. ,---.
|
||||
\ `' / | .-. | | .-. | | .--'
|
||||
/ /. \ | | | | | '-' ' \ `--.
|
||||
'--' '--' `--' `--' | |-' `---'
|
||||
`--'
|
||||
37
xhpc-modules/xhpc-workorder/src/main/resources/bootstrap.yml
Normal file
37
xhpc-modules/xhpc-workorder/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
# Tomcat
|
||||
server:
|
||||
port: 8909
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: xhpc-workorder
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com.xhpc.workorder.mapper: debug
|
||||
|
||||
file:
|
||||
path: "d:\\logs"
|
||||
|
||||
pattern:
|
||||
console: '%d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n'
|
||||
file: '%d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n'
|
||||
75
xhpc-modules/xhpc-workorder/src/main/resources/logback.xml
Normal file
75
xhpc-modules/xhpc-workorder/src/main/resources/logback.xml
Normal file
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/xhpc-order"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern"
|
||||
value="%d{MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.xhpc" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.workorder.mapper.XhpcWorkOrderMapper">
|
||||
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user