From 2d4afbbcfda71f826ed532d01de860395c4da2b6 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期四, 26 五月 2022 14:40:36 +0800
Subject: [PATCH] 角色等级FIX
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java
index a63ca7b..022c9c3 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java
@@ -121,8 +121,29 @@
playPlan.setEndTime(playPlanParam.getEndTime());
// BeanUtils.copyProperties(playPlanParam, playPlan);
+ /**
+ * 璇虹摝瀹氭椂浠诲姟/鎾斁璁″垝鏂板鏃ュ織璁板綍寮�濮�
+ */
+ boolean save = save(playPlan);
+ String content = "{鎾斁璁″垝锛�" + playPlan.getId()
+ + "锛� 鑺傜洰鍚嶇О锛�" + byId.getName()
+ + "锛� 鎾斁璁″垝璁″垝鍚嶇О锛�"
+ + playPlan.getName()
+ + "锛� 鎾斁璁″垝璁″垝鍐呭锛�"
+ + JSON.toJSONString(playPlan)
+ + "锛� 瀹氭椂浠诲姟鍐呭锛�" + playPlan.getSchedules()
+ + "}," + " 鎺ㄩ�佺粨鏋滐細" + save
+ + " }";
+ if (playPlanParam.getId() == null) {
+ StoreOperationRecordsUtils.storeOperationData(null, null, "璇虹摝瀹氭椂浠诲姟/鎾斁璁″垝鏂板", content);
+ } else {
+ StoreOperationRecordsUtils.storeOperationData(null, null, "璇虹摝瀹氭椂浠诲姟/鎾斁璁″垝淇敼", content);
+ }
+ /**
+ * 璇虹摝瀹氭椂浠诲姟/鎾斁璁″垝鏂板鏃ュ織璁板綍缁撴潫
+ */
- return save(playPlan);
+ return save;
}
@@ -132,6 +153,7 @@
throw new BusinessException("鎿嶄綔瀵硅薄涓嶅瓨鍦�");
}
if (removeById(id)) {
+ playPlanParam.setId(id);
return addPlan(playPlanParam);
}
@@ -151,6 +173,7 @@
public Map<String, Object> pushToLed(Long planId, List<NovaPushResultVO> nova) {
PushToLed pushToLed = playPlanMapper.pushToLed(planId);
+ PlayPlanNv byId = getById(planId);
if (pushToLed == null) {
throw new BusinessException("鏈壘鍒拌鎾斁璁″垝");
}
@@ -207,6 +230,25 @@
result.put("success", successList);
result.put("fail", faileList);
+
+ /**
+ * 璇虹摝鎺ㄩ�佽妭鐩棩蹇楄褰曞紑濮�
+ */
+ List<LedPlayerEntity> list = SpringContextHolder.getBean(LedPlayerEntityService.class)
+ .list(Wrappers.lambdaQuery(LedPlayerEntity.class).in(LedPlayerEntity::getId, nova.stream().map(NovaPushResultVO::getPlayerId).toArray()));
+ List<String> listCode = new ArrayList<>();
+ for (LedPlayerEntity temp : list) {
+ listCode.add(temp.getSn());
+ }
+
+ String content = "{鑺傜洰ID锛�" + planId
+ + "锛� 鑺傜洰鍚嶇О锛�" + byId.getName()
+ + "}," + " 鎺ㄩ�佺粨鏋滐細" + result
+ + " }";
+ StoreOperationRecordsUtils.storeOperationData(listCode, null, "璇虹摝鎺ㄩ�佹挱鏀捐鍒�", content);
+ /**
+ * 璇虹摝鎺ㄩ�佽妭鐩棩蹇楄褰曠粨鏉�
+ */
return result;
}
@@ -271,7 +313,7 @@
+ "锛� 鑺傜洰鍚嶇О锛�" + one.getName()
+ "}," + " 鎺ㄩ�佺粨鏋滐細" + result
+ " }";
- StoreOperationRecordsUtils.storeOperationData(listCode, null, "璇虹摝鎺ㄩ�佸畾鏃朵换鍔�", content);
+ StoreOperationRecordsUtils.storeOperationData(listCode, null, "璇虹摝鎺ㄩ�佸畾鏃跺紑鍏冲睆", content);
/**
* 璇虹摝鎺ㄩ�佸畾鏃舵棩蹇楄褰曠粨鏉�
*/
--
Gitblit v1.9.3