bug: 体系搜索国内标准实施日期处理

This commit is contained in:
wxyclub
2023-11-29 19:26:16 +08:00
parent 9cfbafe2af
commit 4be04ee92a
2 changed files with 34 additions and 5 deletions
@@ -85,6 +85,11 @@ public class StandSystemDTO {
@ApiModelProperty(value = "开始实施日期")
private Date startImplementDate;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始实施日期")
private String startImplementDateString;
@Excel(name = "实施日期", width = 25, orderNum = "5", exportFormat = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@@ -96,6 +101,11 @@ public class StandSystemDTO {
@ApiModelProperty(value = "结束实施日期")
private Date endImplementDate;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "结束实施日期")
private String endImplementDateString;
@Excel(name = "代替标准", width = 25, orderNum = "5")
@ApiModelProperty(value = "代替标准")
private String replaceStandardNo;
@@ -167,6 +177,22 @@ public class StandSystemDTO {
}
}
public void setStartImplementDate(Date startImplementDate) {
this.startImplementDate = startImplementDate;
if (startImplementDate != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
this.startImplementDateString = sdf.format(startImplementDate);
}
}
public void setEndImplementDate(Date endImplementDate) {
this.endImplementDate = endImplementDate;
if (endImplementDate != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
this.endImplementDateString = sdf.format(endImplementDate);
}
}
public void setStandSystemId(String standSystemId) {
this.standSystemId = standSystemId;
if (StrUtil.isNotBlank(standSystemId)) {