Commit a6c70e60c8bf6788d641482bcd15c730cd1bd655
1 parent
7dace73f
fix: fix report record setOrganizationId bug
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -115,7 +115,7 @@ public class YtReportGenerateRecordServiceImpl | @@ -115,7 +115,7 @@ public class YtReportGenerateRecordServiceImpl | ||
115 | } else { | 115 | } else { |
116 | ReportGenerateRecord record = baseMapper.selectById(recordDTO.getId()); | 116 | ReportGenerateRecord record = baseMapper.selectById(recordDTO.getId()); |
117 | Optional.ofNullable(record) | 117 | Optional.ofNullable(record) |
118 | - .map(obj -> baseMapper.updateById(reportGenerateRecord)) | 118 | + .map(obj -> baseMapper.updateById(obj)) |
119 | .orElseThrow( | 119 | .orElseThrow( |
120 | () -> { | 120 | () -> { |
121 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | 121 | throw new YtDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
@@ -157,7 +157,7 @@ public class YtReportGenerateRecordServiceImpl | @@ -157,7 +157,7 @@ public class YtReportGenerateRecordServiceImpl | ||
157 | dto.setJobId(jobId); | 157 | dto.setJobId(jobId); |
158 | dto.setReportConfigName(reportFormConfigDTO.getName()); | 158 | dto.setReportConfigName(reportFormConfigDTO.getName()); |
159 | dto.setOrganizationName(null != organizationDTO ? organizationDTO.getName() : null); | 159 | dto.setOrganizationName(null != organizationDTO ? organizationDTO.getName() : null); |
160 | - dto.setOrganizationId(null != organizationDTO ? organizationDTO.getId() : null); | 160 | + dto.setOrganizationId(reportFormConfigDTO.getOrganizationId()); |
161 | dto.setDataCompare(reportFormConfigDTO.getDataType()); | 161 | dto.setDataCompare(reportFormConfigDTO.getDataType()); |
162 | dto.setExecuteTime(time); | 162 | dto.setExecuteTime(time); |
163 | dto.setCreateTime(time); | 163 | dto.setCreateTime(time); |
@@ -344,6 +344,7 @@ public class YtReportGenerateRecordServiceImpl | @@ -344,6 +344,7 @@ public class YtReportGenerateRecordServiceImpl | ||
344 | if (surplus == FastIotConstants.MagicNumber.ONE) { | 344 | if (surplus == FastIotConstants.MagicNumber.ONE) { |
345 | recordDTO.setExecuteStatus(status); | 345 | recordDTO.setExecuteStatus(status); |
346 | } | 346 | } |
347 | + recordDTO.setUpdateTime(LocalDateTime.now()); | ||
347 | recordDTO.setExecuteCondition(executeCondition); | 348 | recordDTO.setExecuteCondition(executeCondition); |
348 | saveOrUpdateReportGenerateRecord(recordDTO); | 349 | saveOrUpdateReportGenerateRecord(recordDTO); |
349 | } | 350 | } |