|
@@ -1,5 +1,6 @@
|
|
|
package com.rongwei.sfcommon.sys.service.impl;
|
|
|
|
|
|
+import com.rongwe.scentity.domian.HiddenDangerTrackDo;
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
import com.rongwei.safecommon.utils.CXCommonUtils;
|
|
|
import com.rongwei.sfcommon.sys.dao.DangerousDao;
|
|
@@ -14,8 +15,8 @@ import java.util.Map;
|
|
|
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.DEFAULT_SEPARATOR;
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyContent.DANGEROUS_CONTENT;
|
|
|
-import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.DANGEROUS_TITLE;
|
|
|
-import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.INSPECTION_TASKS_TITLE;
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyContent.DANGER_TASKS_CONTENT;
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.*;
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.DANGEROUS;
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.INSPECTIONTASKS;
|
|
|
|
|
@@ -23,7 +24,7 @@ import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.INSPECTIONTAS
|
|
|
* SafeCheckSendNotifyServiceImpl class
|
|
|
*
|
|
|
* @author XH
|
|
|
- * @date 2023/12/19
|
|
|
+ * @since 2023/12/19
|
|
|
*/
|
|
|
@Service
|
|
|
public class SafeCheckSendNotifyServiceImpl implements SafeCheckSendNotifyService {
|
|
@@ -35,18 +36,6 @@ public class SafeCheckSendNotifyServiceImpl implements SafeCheckSendNotifyServic
|
|
|
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 检查任务提醒
|
|
|
- * @param sendNotifyMap
|
|
|
- */
|
|
|
- public void sendInspectionTasksNotify( Map<String, HashSet<String>> sendNotifyMap) {
|
|
|
- sendNotifyMap.forEach((k, v) -> {
|
|
|
- CXCommonUtils.sendNotify(INSPECTION_TASKS_TITLE, k.split(DEFAULT_SEPARATOR)[0], "",
|
|
|
- new ArrayList<>(v), k.split(DEFAULT_SEPARATOR)[1], INSPECTIONTASKS);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 危险作业每日处罚提醒
|
|
|
*/
|
|
@@ -80,8 +69,27 @@ public class SafeCheckSendNotifyServiceImpl implements SafeCheckSendNotifyServic
|
|
|
dangerous.get("PENALTYAMOUNT"), dangerous.get("MODIFYDATE")),
|
|
|
"", personnelIdList, null, DANGEROUS);
|
|
|
}
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 检查任务提醒
|
|
|
+ */
|
|
|
+ public void sendInspectionTasksNotify(Map<String, HashSet<String>> sendNotifyMap) {
|
|
|
+ sendNotifyMap.forEach((k, v) -> CXCommonUtils.sendNotify(INSPECTION_TASKS_TITLE, k.split(DEFAULT_SEPARATOR)[0], "",
|
|
|
+ new ArrayList<>(v), k.split(DEFAULT_SEPARATOR)[1], INSPECTIONTASKS));
|
|
|
+ }
|
|
|
|
|
|
- return R.ok();
|
|
|
+ /**
|
|
|
+ * 隐患任务提醒
|
|
|
+ */
|
|
|
+ public void sendDangerTasksNotify(List<HiddenDangerTrackDo> hiddenDangerTrackDos) {
|
|
|
+ hiddenDangerTrackDos.forEach((k) -> CXCommonUtils.sendNotify(DANGER_TASKS_TITLE,
|
|
|
+ String.format(DANGER_TASKS_CONTENT,k.getWorkshop(),k.getRectificationdate())
|
|
|
+ , "",
|
|
|
+ new ArrayList<String>() {{
|
|
|
+ add(k.getTrackuserid());
|
|
|
+ }}, k.getId(), INSPECTIONTASKS));
|
|
|
}
|
|
|
+
|
|
|
}
|