|
@@ -388,11 +388,6 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
//设置事件状态为确认事件
|
|
|
eventInfoBO.setEventStatus(EVENT_STATUS_2);
|
|
|
|
|
|
- //如果确认的是火情事件, 需要设置事件类型;
|
|
|
- if (StringUtils.isNotEmpty(eventInfo.getNewEventType())) {
|
|
|
- eventInfoBO.setEventType(eventInfo.getNewEventType());
|
|
|
- }
|
|
|
-
|
|
|
//将事件主体移动到确认表
|
|
|
eventInfoBO.setTableName("event_process");
|
|
|
eventProcessMapper.insertEventInfo(eventInfoBO);
|
|
@@ -517,6 +512,7 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
|
|
|
//更新主表状态
|
|
|
eventInfo.setEventStatus(EVENT_STATUS_3);
|
|
|
+
|
|
|
eventProcessMapper.updateEventProcess(eventInfo);
|
|
|
|
|
|
} catch (Exception e) {
|
|
@@ -772,6 +768,52 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @DataScopeMutiDept(deptAlias = "d")
|
|
|
+ public AjaxResult getCountFromMenuIdAndEventType(EventInfo eventInfo) {
|
|
|
+ setSookaDataBase(eventInfo);
|
|
|
+ // 查询每个菜单配置的事件类型数量
|
|
|
+ List<Map<String, Object>> eventTypeCount = eventProcessMapper.getCountFromMenuIdAndEventType(eventInfo);
|
|
|
+
|
|
|
+ Set<String> menuIdSet = new HashSet<>();
|
|
|
+ eventTypeCount.forEach(map->{
|
|
|
+ menuIdSet.add(MapUtils.getString(map, "menuId"));
|
|
|
+ });
|
|
|
+
|
|
|
+ //格式化处理
|
|
|
+ List<Map<String, Object>> resultData = new ArrayList<>();
|
|
|
+ menuIdSet.forEach(menuId->{
|
|
|
+ //菜单总数
|
|
|
+ Long menuCount = 0L;
|
|
|
+ //子集统计
|
|
|
+ List<Map<String, Object>> childrenData = new ArrayList<>();
|
|
|
+ StringBuilder menuName = new StringBuilder();
|
|
|
+
|
|
|
+ // 使用迭代器遍历 eventTypeCount
|
|
|
+ Iterator<Map<String, Object>> iterator = eventTypeCount.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ Map<String, Object> map = iterator.next();
|
|
|
+ if (menuId.equals(MapUtils.getString(map, "menuId"))) {
|
|
|
+ if(menuName.length() <= 0){
|
|
|
+ menuName.append(MapUtils.getString(map, "menuName"));
|
|
|
+ }
|
|
|
+ Long typeSum = MapUtils.getLong(map, "typeSum");
|
|
|
+ menuCount += typeSum;
|
|
|
+ childrenData.add(map);
|
|
|
+ // 移除当前元素
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ HashMap<String, Object> menuMap = new HashMap<>();
|
|
|
+ menuMap.put("menuName", menuName.toString());
|
|
|
+ menuMap.put("typeSum", menuCount);
|
|
|
+ menuMap.put("children", childrenData);
|
|
|
+ resultData.add(menuMap);
|
|
|
+ });
|
|
|
+ return AjaxResult.success(resultData);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 列表设置附件路径
|
|
|
*
|