bug: 78317政策课题修改记录修改
This commit is contained in:
@@ -58,7 +58,7 @@ public class SarLawsTopic implements Serializable {
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@ApiModelProperty(value = "启动时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@TableField(value = "START_TIME")
|
||||
private Date startTime;
|
||||
|
||||
+21
-5
@@ -414,14 +414,16 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
|
||||
if (!ignoreFieldList.contains(field.getName())) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
String oldValue = String.valueOf(field.get(oldLawsTopic));
|
||||
String newValue = String.valueOf(field.get(newLawsTopic));
|
||||
Object oldValue = field.get(oldLawsTopic);
|
||||
Object newValue = field.get(newLawsTopic);
|
||||
if (!Objects.equals(oldValue, newValue)) {
|
||||
// 对比文件字段
|
||||
if (fileAttIdFieldList.contains(field.getName())) {
|
||||
String oldValueStr = String.valueOf(oldValue);
|
||||
String newValueStr = String.valueOf(newValue);
|
||||
List<String> fileNameList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(newValue)) {
|
||||
String[] split = newValue.split(",");
|
||||
if (StringUtils.isNotBlank(newValueStr)) {
|
||||
String[] split = newValueStr.split(",");
|
||||
for (String attId : split) {
|
||||
AttFileEO fileInfo = attFileEOService.getFileInfo(attId);
|
||||
fileNameList.add(fileInfo.getOldFileName());
|
||||
@@ -447,7 +449,21 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
|
||||
|| "insideContactInformationList".equals(field.getName())) {
|
||||
ApiModelProperty annotationsByType = field.getAnnotationsByType(ApiModelProperty.class)[0];
|
||||
changes.add(annotationsByType.value() + "被变更");
|
||||
} else {
|
||||
} else if ("startTime".equals(field.getName()) || "closeTime".equals(field.getName())) {
|
||||
ApiModelProperty annotationsByType = field.getAnnotationsByType(ApiModelProperty.class)[0];
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String oldDateStr = null;
|
||||
String newDateStr = null;
|
||||
if (newValue != null) {
|
||||
Date oldDate = (Date) newValue;
|
||||
oldDateStr = sdf.format(oldDate);
|
||||
}
|
||||
if (oldValue!= null) {
|
||||
Date newDate = (Date) oldValue;
|
||||
newDateStr = sdf.format(newDate);
|
||||
}
|
||||
changes.add(annotationsByType.value() + "由\"" + oldDateStr + "\"改为\"" + newDateStr + "\"");
|
||||
}else {
|
||||
// 对比其他字段
|
||||
ApiModelProperty annotationsByType = field.getAnnotationsByType(ApiModelProperty.class)[0];
|
||||
changes.add(annotationsByType.value() + "由\"" + oldValue + "\"改为\"" + newValue + "\"");
|
||||
|
||||
Reference in New Issue
Block a user