|
|
|
@ -24,7 +24,10 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@ -49,6 +52,8 @@ public class TransitHuntersUserModelRecordController extends BaseController {
|
|
|
|
|
|
|
|
|
|
QueryWrapper<TransitHuntersUserModelRecord> queryWrapper = new QueryWrapper<>(transitHuntersUserModelRecord);
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
if (transitHuntersUserModelRecord.getFirstTime() != null && transitHuntersUserModelRecord.getEndTime() != null) {
|
|
|
|
|
queryWrapper.between("partition_field", transitHuntersUserModelRecord.getFirstTime(), transitHuntersUserModelRecord.getEndTime());
|
|
|
|
|
}
|
|
|
|
@ -57,6 +62,15 @@ public class TransitHuntersUserModelRecordController extends BaseController {
|
|
|
|
|
.map(record -> {
|
|
|
|
|
TransitHuntersUserModelRecordVo modelRecordVo = new TransitHuntersUserModelRecordVo();
|
|
|
|
|
BeanUtils.copyProperties(record,modelRecordVo);
|
|
|
|
|
String warningTime = modelRecordVo.getWarningTime();
|
|
|
|
|
Date parse = null;
|
|
|
|
|
try {
|
|
|
|
|
parse = outputSdf.parse(warningTime);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
String format = dateFormat.format(parse);
|
|
|
|
|
modelRecordVo.setWarningTime(format);
|
|
|
|
|
Long firstTime = modelRecordVo.getFirstPassTime();
|
|
|
|
|
Long endTime = modelRecordVo.getEndPassTime();
|
|
|
|
|
if( !"".equals(StringKit.toString(firstTime)) && !"".equals(StringKit.toString(endTime)) ){
|
|
|
|
|