|
@@ -356,12 +356,12 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
|
rp.setIsRegularlySend(pmWorkReport.getIsRegularlySend());
|
|
|
rp.setReportFile(pmWorkReport.getReportFile());
|
|
|
rp.setReportImage(pmWorkReport.getReportImage());
|
|
|
- if (pmWorkReport.getReportStatus().equals(0) && pmWorkReport.getIsRegularlySend().equals(1)) {
|
|
|
- if (timingTime != null && timingTime.isAfter(currentTimePlusMinutes)) {
|
|
|
- rp.setTimingTime(timingTime);
|
|
|
- } else {
|
|
|
- throw new BusinessException("定时发送支持选中5分钟后的时间,请重新选择时间!");
|
|
|
- }
|
|
|
+ if (timingTime == null) {
|
|
|
+ rp.setTimingTime(timingTime);
|
|
|
+ } else if (timingTime.isAfter(currentTimePlusMinutes)) {
|
|
|
+ rp.setTimingTime(timingTime);
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("定时发送支持选中5分钟后的时间,请重新选择时间!");
|
|
|
}
|
|
|
rp.setSendDingTalk(pmWorkReport.getSendDingTalk());
|
|
|
pmWorkReportMapper.updateById(rp);
|
|
@@ -388,6 +388,9 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
|
}
|
|
|
if (pmWorkReport.getIsRegularlySend().equals(0)) {
|
|
|
rp.setTimingTime(null);
|
|
|
+ if (rp.getReportStatus() == null){
|
|
|
+ dingTalkAndMessage.sendDingTalkDailyReport(rp, contents);
|
|
|
+ }
|
|
|
rp.setReportStatus(1);
|
|
|
pmWorkReportMapper.updateById(rp);
|
|
|
if (StringUtils.isNotBlank(ccTo)) {
|