Commit ee8dbb8c authored by tianyiming's avatar tianyiming

Revert "修改bug"

This reverts commit fd8b4cc6.
parent fd8b4cc6
......@@ -3409,13 +3409,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsrAgencyUser orgUsrAgencyUser = orgUsrAgencyUserMapper.selectOne(new QueryWrapper<OrgUsrAgencyUser>().eq("org_usr_id", id));
if (!ObjectUtils.isEmpty(orgUsrAgencyUser)) {
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 陈召 结束 */
try {
eSOrgUsrService.deleteById(id);
......
......@@ -268,15 +268,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
}
String nowStrLong = DateUtils.getNowStrLong();
Date mounthDate = null;
try {
mounthDate = DateUtils.getCurrentMonthStartTime(new Date());
} catch (Exception e) {
throw new RuntimeException(e);
}
Date mounthDate = DateUtils.dateAddMonths(null, -1);
Date halfHour = DateUtils.dateAddMinutes(null, -30);
Date twoHour = DateUtils.dateAddHours(null, -2);
Date fourHour = DateUtils.dateAddHours(null, -4);
Date fourHour = DateUtils.dateAddHours(null, -3);
String startDateStr = DateUtils.convertDateToString(mounthDate, DateUtils.DATE_TIME_PATTERN);
String half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN);
String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN);
......@@ -299,22 +294,19 @@ 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());
int num = collect.size();
item.put("monthStartNum", num);
}
if (200 == halfHourEntity.getStatus()) {
} else if (200 == halfHourEntity.getStatus()) {
String json1 = JSON.toJSONString(halfHourEntity.getResult());
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());
int num = collect.size();
item.put("halfHourStartNum", num);
}
if (200 == twoHourEntity.getStatus()) {
} else if (200 == twoHourEntity.getStatus()) {
String json1 = JSON.toJSONString(twoHourEntity.getResult());
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());
int num = collect.size();
item.put("twoHourStartNum", num);
}
if (200 == fourHourEntity.getStatus()) {
} else if (200 == fourHourEntity.getStatus()) {
String json1 = JSON.toJSONString(fourHourEntity.getResult());
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());
......@@ -344,7 +336,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
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;
}).collect(Collectors.toList());
List<Map<String, Object>> stateMap = fireFightingSystemMapper.queryStartAndStopBySpecificId(ids);
......
......@@ -8,7 +8,6 @@ import com.yeejoin.equipmanage.mapper.SupervisionVideoMapper;
import com.yeejoin.equipmanage.service.ISupervisionVideoService;
import com.yeejoin.equipmanage.service.IVideoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -47,14 +46,12 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
supervisionVideoMapper.delete(new QueryWrapper<SupervisionVideo>().eq("biz_org_code",bizOrgCode));
List<SupervisionVideo> list = new ArrayList<>();
String ids = map.get("ids");
if(StringUtils.isNotEmpty(ids)){
for (String s : ids.split(",")) {
SupervisionVideo supervisionVideo = new SupervisionVideo();
supervisionVideo.setCameraId(s);
supervisionVideo.setBizOrgCode(bizOrgCode);
supervisionVideo.setId(Long.valueOf(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "")));
list.add(supervisionVideo);
}
for (String s : ids.split(",")) {
SupervisionVideo supervisionVideo = new SupervisionVideo();
supervisionVideo.setCameraId(s);
supervisionVideo.setBizOrgCode(bizOrgCode);
supervisionVideo.setId(Long.valueOf(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "")));
list.add(supervisionVideo);
}
return saveBatch(list);
}
......
......@@ -4844,7 +4844,6 @@
GROUP BY
r.sequence_nbr
) a
ORDER BY levelStatus DESC
</select>
<select id="getPipeNetworkBySuper" resultType="java.util.Map">
......@@ -4941,7 +4940,7 @@
<select id="queryStartAndStopBySpecificId" resultType="java.util.Map">
SELECT
i.equipment_specific_id,
DATE_FORMAT(i.update_date ,'%Y-%m-%d %H:%i:%S') update_date,
i.update_date,
i.equipment_index_name
FROM
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