parent
c726a33b9f
commit
d37a342d6b
|
@ -1,7 +1,6 @@
|
||||||
package com.chint.manage.entity;
|
package com.chint.manage.entity;
|
||||||
|
|
||||||
import com.chint.manage.entity.query.OrderPageQuery;
|
import com.chint.manage.entity.query.OrderPageQuery;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -29,10 +28,8 @@ public class OrderDownloadRecord implements Serializable {
|
||||||
//查询条件
|
//查询条件
|
||||||
private OrderPageQuery queryCriteria;
|
private OrderPageQuery queryCriteria;
|
||||||
//执行时间
|
//执行时间
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
//过期时间
|
//过期时间
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private LocalDateTime expireTime;
|
private LocalDateTime expireTime;
|
||||||
//员工ID
|
//员工ID
|
||||||
private String employeeNo;
|
private String employeeNo;
|
||||||
|
|
|
@ -9,5 +9,5 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface JdbcOrderDownloadRecordRepository extends CrudRepository<OrderDownloadRecord, Long> {
|
public interface JdbcOrderDownloadRecordRepository extends CrudRepository<OrderDownloadRecord, Long> {
|
||||||
|
|
||||||
List<OrderDownloadRecord> findAllByEmployeeNoOrderByCreateTimeDesc(String employeeNo);
|
List<OrderDownloadRecord> findAllByEmployeeNoOrderByIdDesc(String employeeNo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
private Page<TrainOrderDetailExcel> trainPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
private Page<TrainOrderDetailExcel> trainPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
||||||
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
||||||
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
||||||
"WHERE tod.order_status IS NOT NULL ";
|
"WHERE 1=1 ";
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
|
@ -127,7 +127,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
private Page<FlightOrderDetailExcel> flightPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
private Page<FlightOrderDetailExcel> flightPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
||||||
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
||||||
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
||||||
"WHERE tod.order_status IS NOT NULL ";
|
"WHERE 1=1 ";
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
|
@ -146,7 +146,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
private Page<HotelOrderDetailExcel> hotelPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
private Page<HotelOrderDetailExcel> hotelPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
||||||
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
||||||
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
||||||
"WHERE tod.order_status IS NOT NULL ";
|
"WHERE 1=1 ";
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
|
@ -165,7 +165,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
private Page<CarOrderDetailExcel> carPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
private Page<CarOrderDetailExcel> carPageConsumptionDetail(ConsumptionDetailQuery dto) {
|
||||||
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
|
||||||
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
|
||||||
"WHERE tod.order_status IS NOT NULL ";
|
"WHERE 1=1 ";
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
|
|
|
@ -11,8 +11,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -38,8 +36,7 @@ public class MinioService {
|
||||||
minioClient.makeBucket(MakeBucketArgs.builder().bucket(bucketName).build());
|
minioClient.makeBucket(MakeBucketArgs.builder().bucket(bucketName).build());
|
||||||
}
|
}
|
||||||
//上传文件到MinIO
|
//上传文件到MinIO
|
||||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
String fileName = UUID.randomUUID().toString();
|
||||||
String fileName =sdf.format(new Date())+"-"+UUID.randomUUID().toString();
|
|
||||||
InputStream inputStream = file.getInputStream();
|
InputStream inputStream = file.getInputStream();
|
||||||
ObjectWriteResponse objectWriteResponse = minioClient.putObject(PutObjectArgs.builder()
|
ObjectWriteResponse objectWriteResponse = minioClient.putObject(PutObjectArgs.builder()
|
||||||
.object(fileName.concat(".").concat(FileUtil.extName(file.getOriginalFilename())))
|
.object(fileName.concat(".").concat(FileUtil.extName(file.getOriginalFilename())))
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class ManageServiceImpl implements ManageService {
|
||||||
@Override
|
@Override
|
||||||
public List<OrderDownloadRecord> orderDownloadRecordQuery() {
|
public List<OrderDownloadRecord> orderDownloadRecordQuery() {
|
||||||
User user=BaseContext.getCurrentUser();
|
User user=BaseContext.getCurrentUser();
|
||||||
return jdbcOrderDownloadRecordRepository.findAllByEmployeeNoOrderByCreateTimeDesc(user.getEmployeeNo());
|
return jdbcOrderDownloadRecordRepository.findAllByEmployeeNoOrderByIdDesc(user.getEmployeeNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue