Commit fd8b4cc6 authored by tianyiming's avatar tianyiming

修改bug

parent f5d00acf
...@@ -3409,13 +3409,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3409,13 +3409,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsrAgencyUser orgUsrAgencyUser = orgUsrAgencyUserMapper.selectOne(new QueryWrapper<OrgUsrAgencyUser>().eq("org_usr_id", id)); OrgUsrAgencyUser orgUsrAgencyUser = orgUsrAgencyUserMapper.selectOne(new QueryWrapper<OrgUsrAgencyUser>().eq("org_usr_id", id));
if (!ObjectUtils.isEmpty(orgUsrAgencyUser)) { if (!ObjectUtils.isEmpty(orgUsrAgencyUser)) {
orgUsrAgencyUserMapper.delete(new QueryWrapper<OrgUsrAgencyUser>().eq("org_usr_id", id)); orgUsrAgencyUserMapper.delete(new QueryWrapper<OrgUsrAgencyUser>().eq("org_usr_id", id));
//同步平台删除用户
AgencyUserModel amosUser = Privilege.agencyUserClient.queryByUserId(orgUsrAgencyUser.getAmosUserId()).getResult();
if (!ObjectUtils.isEmpty(amosUser)) {
Privilege.agencyUserClient.multDeleteUser(orgUsrAgencyUser.getAmosUserId());
}
} }
//同步平台删除用户
AgencyUserModel amosUser = Privilege.agencyUserClient.queryByUserId(orgUsrAgencyUser.getAmosUserId()).getResult();
if (!ObjectUtils.isEmpty(amosUser)) {
Privilege.agencyUserClient.multDeleteUser(orgUsrAgencyUser.getAmosUserId());
}
/* bug 2812 一次删除多条数据 传入类型修改为string 问题解决 2021-09-09 陈召 结束 */ /* bug 2812 一次删除多条数据 传入类型修改为string 问题解决 2021-09-09 陈召 结束 */
try { try {
eSOrgUsrService.deleteById(id); eSOrgUsrService.deleteById(id);
......
...@@ -268,10 +268,15 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -268,10 +268,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
} }
String nowStrLong = DateUtils.getNowStrLong(); String nowStrLong = DateUtils.getNowStrLong();
Date mounthDate = DateUtils.dateAddMonths(null, -1); Date mounthDate = null;
try {
mounthDate = DateUtils.getCurrentMonthStartTime(new Date());
} catch (Exception e) {
throw new RuntimeException(e);
}
Date halfHour = DateUtils.dateAddMinutes(null, -30); Date halfHour = DateUtils.dateAddMinutes(null, -30);
Date twoHour = DateUtils.dateAddHours(null, -2); Date twoHour = DateUtils.dateAddHours(null, -2);
Date fourHour = DateUtils.dateAddHours(null, -3); Date fourHour = DateUtils.dateAddHours(null, -4);
String startDateStr = DateUtils.convertDateToString(mounthDate, DateUtils.DATE_TIME_PATTERN); String startDateStr = DateUtils.convertDateToString(mounthDate, DateUtils.DATE_TIME_PATTERN);
String half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN); String half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN);
String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN); String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN);
...@@ -294,19 +299,22 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -294,19 +299,22 @@ public class SupervisionConfigureController extends AbstractBaseController {
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList()); List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList());
int num = collect.size(); int num = collect.size();
item.put("monthStartNum", num); item.put("monthStartNum", num);
} else if (200 == halfHourEntity.getStatus()) { }
if (200 == halfHourEntity.getStatus()) {
String json1 = JSON.toJSONString(halfHourEntity.getResult()); String json1 = JSON.toJSONString(halfHourEntity.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList()); List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList());
int num = collect.size(); int num = collect.size();
item.put("halfHourStartNum", num); item.put("halfHourStartNum", num);
} else if (200 == twoHourEntity.getStatus()) { }
if (200 == twoHourEntity.getStatus()) {
String json1 = JSON.toJSONString(twoHourEntity.getResult()); String json1 = JSON.toJSONString(twoHourEntity.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList()); List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList());
int num = collect.size(); int num = collect.size();
item.put("twoHourStartNum", num); item.put("twoHourStartNum", num);
} else if (200 == fourHourEntity.getStatus()) { }
if (200 == fourHourEntity.getStatus()) {
String json1 = JSON.toJSONString(fourHourEntity.getResult()); String json1 = JSON.toJSONString(fourHourEntity.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList()); List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true"))).collect(Collectors.toList());
...@@ -336,7 +344,7 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -336,7 +344,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
item.put("upTime", diffMinute); item.put("upTime", diffMinute);
} }
} }
item.put("stateDesc", Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 && time ? "正常" : "异常"); item.put("stateDesc", Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 || time ? "正常" : "异常");
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
List<Map<String, Object>> stateMap = fireFightingSystemMapper.queryStartAndStopBySpecificId(ids); List<Map<String, Object>> stateMap = fireFightingSystemMapper.queryStartAndStopBySpecificId(ids);
......
...@@ -8,6 +8,7 @@ import com.yeejoin.equipmanage.mapper.SupervisionVideoMapper; ...@@ -8,6 +8,7 @@ import com.yeejoin.equipmanage.mapper.SupervisionVideoMapper;
import com.yeejoin.equipmanage.service.ISupervisionVideoService; import com.yeejoin.equipmanage.service.ISupervisionVideoService;
import com.yeejoin.equipmanage.service.IVideoService; import com.yeejoin.equipmanage.service.IVideoService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -46,12 +47,14 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap ...@@ -46,12 +47,14 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
supervisionVideoMapper.delete(new QueryWrapper<SupervisionVideo>().eq("biz_org_code",bizOrgCode)); supervisionVideoMapper.delete(new QueryWrapper<SupervisionVideo>().eq("biz_org_code",bizOrgCode));
List<SupervisionVideo> list = new ArrayList<>(); List<SupervisionVideo> list = new ArrayList<>();
String ids = map.get("ids"); String ids = map.get("ids");
for (String s : ids.split(",")) { if(StringUtils.isNotEmpty(ids)){
SupervisionVideo supervisionVideo = new SupervisionVideo(); for (String s : ids.split(",")) {
supervisionVideo.setCameraId(s); SupervisionVideo supervisionVideo = new SupervisionVideo();
supervisionVideo.setBizOrgCode(bizOrgCode); supervisionVideo.setCameraId(s);
supervisionVideo.setId(Long.valueOf(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", ""))); supervisionVideo.setBizOrgCode(bizOrgCode);
list.add(supervisionVideo); supervisionVideo.setId(Long.valueOf(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "")));
list.add(supervisionVideo);
}
} }
return saveBatch(list); return saveBatch(list);
} }
......
...@@ -4844,6 +4844,7 @@ ...@@ -4844,6 +4844,7 @@
GROUP BY GROUP BY
r.sequence_nbr r.sequence_nbr
) a ) a
ORDER BY levelStatus DESC
</select> </select>
<select id="getPipeNetworkBySuper" resultType="java.util.Map"> <select id="getPipeNetworkBySuper" resultType="java.util.Map">
...@@ -4940,7 +4941,7 @@ ...@@ -4940,7 +4941,7 @@
<select id="queryStartAndStopBySpecificId" resultType="java.util.Map"> <select id="queryStartAndStopBySpecificId" resultType="java.util.Map">
SELECT SELECT
i.equipment_specific_id, i.equipment_specific_id,
i.update_date, DATE_FORMAT(i.update_date ,'%Y-%m-%d %H:%i:%S') update_date,
i.equipment_index_name i.equipment_index_name
FROM FROM
wl_equipment_specific_index i wl_equipment_specific_index i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment