Commit 11fe317d authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6

parents 35b867f0 fd8b4cc6
......@@ -3034,7 +3034,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
String roleNameString = String.join(",", roleNameList);
List<RoleModel> userRoleList = allRoleList.stream().filter(r -> roleNameString.contains(r.getRoleName()))
.collect(Collectors.toList());
String appCode = "";
List<String> collect = peopleInfoDto.getOrgUsrAgencyUser().getDataDictionaryList().stream().map(DataDictionary::getTypeDesc).collect(Collectors.toList());
String appCode = String.join(",", collect);
String[] appCodes = appCode.split(",");
Collections.addAll(appCodesSet, appCodes);
userRoleList.forEach(r -> {
......@@ -3408,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,10 +268,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
}
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 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 half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN);
String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN);
......@@ -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());
int num = collect.size();
item.put("monthStartNum", num);
} else if (200 == halfHourEntity.getStatus()) {
}
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);
} else if (200 == twoHourEntity.getStatus()) {
}
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);
} else if (200 == fourHourEntity.getStatus()) {
}
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());
......@@ -336,7 +344,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,6 +8,7 @@ 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;
......@@ -46,12 +47,14 @@ 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");
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);
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);
}
}
return saveBatch(list);
}
......
......@@ -516,8 +516,9 @@ public class FirefightersController extends BaseController {
List<Map<String,Object>> list = new ArrayList<>();
QueryWrapper<Firefighters> firefightersQueryWrapper1 = new QueryWrapper<>();
firefightersQueryWrapper1.eq("biz_org_code", bizOrgCode);
firefightersQueryWrapper1.like("biz_org_code", bizOrgCode);
firefightersQueryWrapper1.eq("people_type", "1601");
firefightersQueryWrapper1.eq("is_delete", "0");
List<Firefighters> firefighters = iFirefightersService.getBaseMapper().selectList(firefightersQueryWrapper1);
firefighters.stream().forEach(e -> {
Map<String, Object> map = new HashMap<>();
......
......@@ -2494,7 +2494,7 @@
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(select
avg(IFNULL(ei.`value`,0))
FORMAT(avg(IFNULL(ei.`value`,0)), 2)
from
wl_equipment_specific_index ei
where
......@@ -2976,7 +2976,7 @@
ifnull( `rp`.`min_water_level`, 0 ) AS `minLevel`,
ifnull( `rp`.`max_water_level`, 0 ) AS `maxLevel`,
(select
avg(IFNULL(ei.`value`,0))
FORMAT(avg(IFNULL(ei.`value`,0)), 2)
from
wl_equipment_specific_index ei
where
......@@ -4666,7 +4666,7 @@
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(select
avg(IFNULL(ei.`value`,0))
FORMAT(avg(IFNULL(ei.`value`,0)), 2)
from
wl_equipment_specific_index ei
where
......@@ -4824,7 +4824,7 @@
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(select
avg(IFNULL(ei.`value`,0))
FORMAT(avg(IFNULL(ei.`value`,0)), 2)
from
wl_equipment_specific_index ei
where
......@@ -4844,6 +4844,7 @@
GROUP BY
r.sequence_nbr
) a
ORDER BY levelStatus DESC
</select>
<select id="getPipeNetworkBySuper" resultType="java.util.Map">
......@@ -4940,7 +4941,7 @@
<select id="queryStartAndStopBySpecificId" resultType="java.util.Map">
SELECT
i.equipment_specific_id,
i.update_date,
DATE_FORMAT(i.update_date ,'%Y-%m-%d %H:%i:%S') update_date,
i.equipment_index_name
FROM
wl_equipment_specific_index i
......
......@@ -3481,5 +3481,28 @@
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `extend`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1802, '1580479144087552002', '专职消防队', 'CB_USER_GROUP', '治理人,验证人,延期治理审批人,延迟治理人,隐患填报人,default', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
<changeSet author="ky" id="1666078784">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<not>
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</not>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1803, 'waterTank', '消防水箱', 'XFSYLX', NULL, NULL, NULL, NULL, NULL, 0, 1);
</sql>
</changeSet>
<changeSet author="zs" id="202210191455-01">
<comment>修改字典值 </comment>
<sql>
update cb_data_dictionary set type_desc = 'studio_normalapp_3056965,AMOS_ADMIN' where sequence_nbr = 1800;
update cb_data_dictionary set type_desc = 'studio_normalapp_3056965' where sequence_nbr = 1801;
update cb_data_dictionary set type_desc = 'studio_normalapp_3056965' where sequence_nbr = 1802;
</sql>
</changeSet>
</databaseChangeLog>
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