Commit 43f0dd0a authored by zhuxiang's avatar zhuxiang
Browse files

联调优化

parent 6335b95e
package com.example.operation_platform.model.vo; package com.example.operation_platform.model.vo;
import com.example.operation_platform.model.entity.OperationJob; import com.example.operation_platform.model.entity.OperationJob;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data; import lombok.Data;
...@@ -11,6 +12,7 @@ import java.time.LocalDate; ...@@ -11,6 +12,7 @@ import java.time.LocalDate;
public class OperationJobVO extends OperationJob { public class OperationJobVO extends OperationJob {
private String robotName; private String robotName;
private String stationName; private String stationName;
private String address;
private String operationType; private String operationType;
private String workerName; private String workerName;
private Integer id; private Integer id;
......
...@@ -15,6 +15,7 @@ public class PeopleMessageVO { ...@@ -15,6 +15,7 @@ public class PeopleMessageVO {
private Long operationNumber; private Long operationNumber;
private Integer id; private Integer id;
private String stationName; private String stationName;
private String address;
private String robotName; private String robotName;
private String lon; private String lon;
......
...@@ -34,8 +34,12 @@ public class AliOSSUtils { ...@@ -34,8 +34,12 @@ public class AliOSSUtils {
// 避免文件覆盖 // 避免文件覆盖
String originalFilename = multipartFile.getOriginalFilename(); String originalFilename = multipartFile.getOriginalFilename();
String fileName = dir +UUID.randomUUID().toString() + originalFilename.substring(originalFilename.lastIndexOf(".")); String fileName;
try {
fileName = dir + UUID.randomUUID() + originalFilename.substring(originalFilename.lastIndexOf("."));
}catch (StringIndexOutOfBoundsException e){
fileName = UUID.randomUUID() + originalFilename;
}
//上传文件到 OSS //上传文件到 OSS
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
ossClient.putObject(bucketName, fileName, inputStream); ossClient.putObject(bucketName, fileName, inputStream);
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
SELECT SELECT
tm.id id, tm.id id,
tor.name stationName, tor.name stationName,
tor.address,
COALESCE(br.name, dr.name) robotName, COALESCE(br.name, dr.name) robotName,
tor.contact_phone phoneNumber, tor.contact_phone phoneNumber,
tp.worker_name softwareWorker, tp.worker_name softwareWorker,
......
...@@ -173,6 +173,7 @@ ...@@ -173,6 +173,7 @@
<select id="queryRunLogJobList" resultType="com.example.operation_platform.model.vo.OperationJobVO"> <select id="queryRunLogJobList" resultType="com.example.operation_platform.model.vo.OperationJobVO">
SELECT SELECT
top.id, top.id,
top.operation_id operationId,
tp.operation_type AS operationType, tp.operation_type AS operationType,
bs.name AS stationName, bs.name AS stationName,
-- 合并 robot 和 drone 的 name 到 robotName(优先取 robot) -- 合并 robot 和 drone 的 name 到 robotName(优先取 robot)
...@@ -190,7 +191,8 @@ ...@@ -190,7 +191,8 @@
tp.tb_run_log_id AS runLogId, tp.tb_run_log_id AS runLogId,
tp.station_id AS stationId, tp.station_id AS stationId,
bs.lon lon, bs.lon lon,
bs.lat lat bs.lat lat,
bs.address
-- 保留操作人员名称 -- 保留操作人员名称
FROM FROM
tb_operation_job top tb_operation_job top
...@@ -308,8 +310,10 @@ ...@@ -308,8 +310,10 @@
<select id="queryJobAndOperationTypeList" resultType="com.example.operation_platform.model.vo.OperationJobVO"> <select id="queryJobAndOperationTypeList" resultType="com.example.operation_platform.model.vo.OperationJobVO">
SELECT SELECT
top.id, top.id,
top.operation_id operationId,
tp.operation_type AS operationType, tp.operation_type AS operationType,
bs.name AS stationName, bs.name AS stationName,
bs.address address,
bs.lon, bs.lon,
bs.lat, bs.lat,
-- 合并 robot 和 drone 的 name 到 robotName(优先取 robot) -- 合并 robot 和 drone 的 name 到 robotName(优先取 robot)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment