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

联调优化

parent 6335b95e
package com.example.operation_platform.model.vo;
import com.example.operation_platform.model.entity.OperationJob;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
......@@ -11,6 +12,7 @@ import java.time.LocalDate;
public class OperationJobVO extends OperationJob {
private String robotName;
private String stationName;
private String address;
private String operationType;
private String workerName;
private Integer id;
......
......@@ -15,6 +15,7 @@ public class PeopleMessageVO {
private Long operationNumber;
private Integer id;
private String stationName;
private String address;
private String robotName;
private String lon;
......
......@@ -34,8 +34,12 @@ public class AliOSSUtils {
// 避免文件覆盖
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 ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
ossClient.putObject(bucketName, fileName, inputStream);
......
......@@ -81,6 +81,7 @@
SELECT
tm.id id,
tor.name stationName,
tor.address,
COALESCE(br.name, dr.name) robotName,
tor.contact_phone phoneNumber,
tp.worker_name softwareWorker,
......
......@@ -173,6 +173,7 @@
<select id="queryRunLogJobList" resultType="com.example.operation_platform.model.vo.OperationJobVO">
SELECT
top.id,
top.operation_id operationId,
tp.operation_type AS operationType,
bs.name AS stationName,
-- 合并 robot 和 drone 的 name 到 robotName(优先取 robot)
......@@ -190,7 +191,8 @@
tp.tb_run_log_id AS runLogId,
tp.station_id AS stationId,
bs.lon lon,
bs.lat lat
bs.lat lat,
bs.address
-- 保留操作人员名称
FROM
tb_operation_job top
......@@ -308,8 +310,10 @@
<select id="queryJobAndOperationTypeList" resultType="com.example.operation_platform.model.vo.OperationJobVO">
SELECT
top.id,
top.operation_id operationId,
tp.operation_type AS operationType,
bs.name AS stationName,
bs.address address,
bs.lon,
bs.lat,
-- 合并 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