预警导出 发布时间
This commit is contained in:
+4
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@@ -151,6 +152,9 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
|||||||
// List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
// List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||||
List<WarningExportVO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
List<WarningExportVO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||||
for (WarningExportVO warningExportVO : exportExcel){
|
for (WarningExportVO warningExportVO : exportExcel){
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String format = simpleDateFormat.format(warningExportVO.getPutTime());
|
||||||
|
warningExportVO.setPutTimeStr(format);
|
||||||
String condition = warningExportVO.getTermsConditions();
|
String condition = warningExportVO.getTermsConditions();
|
||||||
if (condition != null && condition.length() > 32001){
|
if (condition != null && condition.length() > 32001){
|
||||||
condition = condition.substring(0,32000);
|
condition = condition.substring(0,32000);
|
||||||
|
|||||||
+2
-2
@@ -60,8 +60,8 @@ public class EarlyWarningEO extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String standName;
|
private String standName;
|
||||||
|
|
||||||
@ExcelProperty(value = "发布日期",index = 6)
|
// @ExcelProperty(value = "发布日期",index = 6)
|
||||||
@ColumnWidth(20)
|
// @ColumnWidth(20)
|
||||||
@ApiModelProperty("发布日期")
|
@ApiModelProperty("发布日期")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class WarningExportVO extends EarlyWarningEO {
|
public class WarningExportVO extends EarlyWarningEO {
|
||||||
@@ -36,5 +39,12 @@ public class WarningExportVO extends EarlyWarningEO {
|
|||||||
@ApiModelProperty("适用车型展示")
|
@ApiModelProperty("适用车型展示")
|
||||||
private String applyTypeShow;
|
private String applyTypeShow;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "发布日期",index = 6)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ApiModelProperty("发布日期")
|
||||||
|
@TableField(exist = false)
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private String putTimeStr;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,7 @@
|
|||||||
POWER,
|
POWER,
|
||||||
attr.XCXSSRQ AS XCXSSRQ ,
|
attr.XCXSSRQ AS XCXSSRQ ,
|
||||||
attr.ZCCSSRQ AS ZCCSSRQ
|
attr.ZCCSSRQ AS ZCCSSRQ
|
||||||
|
,sarInfo.ISSUE_TIME As putTime
|
||||||
FROM sar_stand_warning AS warning
|
FROM sar_stand_warning AS warning
|
||||||
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
||||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||||
@@ -147,6 +148,7 @@
|
|||||||
POWER,
|
POWER,
|
||||||
items.XCXSSRQ AS XCXSSRQ ,
|
items.XCXSSRQ AS XCXSSRQ ,
|
||||||
items.ZCCSSRQ AS ZCCSSRQ
|
items.ZCCSSRQ AS ZCCSSRQ
|
||||||
|
,sarInfo.ISSUE_TIME As putTime
|
||||||
FROM
|
FROM
|
||||||
sar_stand_warning AS warning
|
sar_stand_warning AS warning
|
||||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||||
|
|||||||
Reference in New Issue
Block a user