|
@@ -23,6 +23,10 @@ import org.springframework.stereotype.Service;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyContent.OBSERVATION_CONTENT;
|
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.OBSERVATION_TITLE;
|
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.OBSERVATION_AUDIT;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @author :sc
|
|
* @author :sc
|
|
* @since :2023/12/7
|
|
* @since :2023/12/7
|
|
@@ -112,6 +116,31 @@ public class AspSafetyProductObjectiveServiceImpl extends ServiceImpl<AspSafetyP
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void reportObservationConfig(List<String> list) {
|
|
|
|
+ if(!list.isEmpty()){
|
|
|
|
+ // {"ad8106741bf547778d01d556e371ac98/34d64aaae0344b109ad8909f3afa4d40/69"}
|
|
|
|
+ for (String str : list) {
|
|
|
|
+ String[] split = str.split("/");
|
|
|
|
+ if(split.length<3){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ String value = split[0];
|
|
|
|
+ String userId = split[1];
|
|
|
|
+ String count = split[2];
|
|
|
|
+ //系统通知(移动端和PC端个人工作台)
|
|
|
|
+ CXCommonUtils.sendNotify(OBSERVATION_TITLE,
|
|
|
|
+ String.format(OBSERVATION_CONTENT, count),
|
|
|
|
+ null,
|
|
|
|
+ Collections.singletonList(userId),
|
|
|
|
+ value,
|
|
|
|
+ OBSERVATION_AUDIT,
|
|
|
|
+ false);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void sendMessage(List<AspSafetyProductObjectiveResult> mainResList) {
|
|
private void sendMessage(List<AspSafetyProductObjectiveResult> mainResList) {
|
|
//维护指标级别对应的角色ID
|
|
//维护指标级别对应的角色ID
|
|
//objectivelevel:指标级别。
|
|
//objectivelevel:指标级别。
|