|
@@ -331,11 +331,11 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
rp.setTotalHours(totalWorkTime);
|
|
rp.setTotalHours(totalWorkTime);
|
|
rp.setIsRegularlySend(pmWorkReport.getIsRegularlySend());
|
|
rp.setIsRegularlySend(pmWorkReport.getIsRegularlySend());
|
|
if (pmWorkReport.getReportStatus().equals(0) && pmWorkReport.getIsRegularlySend().equals(1)) {
|
|
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 && timingTime.isAfter(currentTimePlusMinutes)) {
|
|
|
|
+ rp.setTimingTime(timingTime);
|
|
|
|
+ } else {
|
|
|
|
+ throw new BusinessException("定时发送支持选中5分钟后的时间,请重新选择时间!");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
rp.setSendDingTalk(pmWorkReport.getSendDingTalk());
|
|
rp.setSendDingTalk(pmWorkReport.getSendDingTalk());
|
|
pmWorkReportMapper.updateById(rp);
|
|
pmWorkReportMapper.updateById(rp);
|
|
@@ -360,10 +360,11 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
pmWorkContentMapper.insert(e);
|
|
pmWorkContentMapper.insert(e);
|
|
contentsList.add(e);
|
|
contentsList.add(e);
|
|
}
|
|
}
|
|
- if (pmWorkReport.getSendDingTalk().equals(1) && pmWorkReport.getIsRegularlySend() == 0) {
|
|
|
|
|
|
+ if (pmWorkReport.getSendDingTalk().equals(1) && pmWorkReport.getReportStatus().equals(1)) {
|
|
dingTalkAndMessage.sendDingTalkDailyReport(rp, contentsList);
|
|
dingTalkAndMessage.sendDingTalkDailyReport(rp, contentsList);
|
|
|
|
+
|
|
}
|
|
}
|
|
- if (pmWorkReport.getIsRegularlySend() == 0){
|
|
|
|
|
|
+ if (pmWorkReport.getIsRegularlySend() == 0) {
|
|
receiveMessages(ccTo, rid);
|
|
receiveMessages(ccTo, rid);
|
|
rp.setTimingTime(null);
|
|
rp.setTimingTime(null);
|
|
rp.setReportStatus(1);
|
|
rp.setReportStatus(1);
|
|
@@ -373,7 +374,7 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
|
|
}
|
|
}
|
|
|
|
|
|
private void receiveMessages(String ids, Integer reportId) {
|
|
private void receiveMessages(String ids, Integer reportId) {
|
|
- if (StringUtils.isBlank(ids)){
|
|
|
|
|
|
+ if (StringUtils.isBlank(ids)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
List<Long> longList = Arrays.stream(ids.split(","))
|
|
List<Long> longList = Arrays.stream(ids.split(","))
|