Kaynağa Gözat

Merge branch 'master' into usky-zyj

james 4 ay önce
ebeveyn
işleme
5806bf9fc3

+ 1 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionEventServiceImpl.java

@@ -136,6 +136,7 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
         jsonObject.addProperty("infoTitle", patrolInspectionEvent.getEventName());
         jsonObject.addProperty("infoContent",eventTypeName);
         jsonObject.addProperty("infoType",2);
+        jsonObject.addProperty("userName",SecurityUtils.getUsername());
         jsonObject.addProperty("id",patrolInspectionEvent.getId());
         remoteMceService.addMce(jsonObject.toString());
 

+ 9 - 6
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/PmWorkReportServiceImpl.java

@@ -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)) {