Commit 829e7bcd authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents 7fc8aecc a00a73d7
......@@ -58,7 +58,7 @@ public class MyBatisPlusConfig {
};
}
@ConditionalOnProperty(name = "mybatis.interceptor.enabled",havingValue = "true")
@ConditionalOnProperty(name = "mybatis.interceptor.enabled",havingValue = "true", matchIfMissing = true)
@Bean
public PermissionInterceptor permissionInterceptor() {
return new PermissionInterceptor();
......
......@@ -114,4 +114,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<OrgUsr> listByOrgTypes(@Param("orgTypeList") List<String> orgTypeList,@Param("bizOrgCode") String bizOrgCode);
String getParentList(@Param("id") String id);
List<OrgUsr> selectPersonListByCompanyIdList(@Param("companyIdList") List<String> companyIdList);
}
......@@ -824,7 +824,18 @@ LEFT JOIN (
<select id="getParentList" resultType="java.lang.String">
select getParentList(#{id}) as id;
</select>
<select id="selectPersonListByCompanyIdList"
resultType="com.yeejoin.amos.boot.module.common.api.entity.OrgUsr">
select *
from cb_org_usr
where biz_org_type = 'PERSON'
and is_delete = 0
and biz_org_code regexp
(select GROUP_CONCAT(biz_org_code SEPARATOR '|') from cb_org_usr where sequence_nbr in
<foreach collection="companyIdList" item="companyId" open="(" close=")" separator=",">
#{companyId}
</foreach>);
</select>
</mapper>
......@@ -34,4 +34,7 @@ public class VideoSource {
@TableField(exist = false)
private Date createDate;
@ApiModelProperty(value = "本级及父级建筑ids,冗余树形搜索")
private String parentSourceIds;
}
......@@ -264,6 +264,7 @@ public class KeySiteController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "重点部位分页查询", notes = "重点部位分页查询")
......@@ -281,7 +282,6 @@ public class KeySiteController extends BaseController {
page.setSize(size);
return ResponseHelper.buildResponse(keySiteServiceImpl.getPageList(page, name, buildingId, fireEnduranceRate,
useNature, fireFacilitiesInfo, bizOrgCode));
}
......
......@@ -178,12 +178,10 @@ public class OrgPersonController {
*
* @return
*/
@PersonIdentify
@TycloudOperation( ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(@RequestParam Map<String, Object> requestBody) {
PermissionInterceptorContext.setDataAuthRule(authKey);
return ResponseHelper.buildResponse(iOrgUsrService.pagePerson(
requestBody.containsKey("pageNum") ? requestBody.get("pageNum").toString() : null ,
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
......@@ -31,6 +32,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -706,5 +708,21 @@ public class OrgUsrController extends BaseController {
return ResponseHelper.buildResponse(menus);
}
/**
* 查询多个组织机构下面的所有人员列表信息
*
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询多个组织机构下面的所有人员列表信息", notes = "查询多个组织机构下面的所有人员列表信息")
@GetMapping(value = "/company/person/list")
public ResponseModel<List<OrgUsr>> getPersonListByCompanyIdList(@RequestParam String companyIds) {
List<OrgUsr> orgUserList = Lists.newArrayList();
if (!ValidationUtil.isEmpty(companyIds)) {
List<String> companyIdList = Lists.newArrayList(companyIds.split(","));
orgUserList = iOrgUsrService.getPersonListByCompanyIdList(companyIdList);
}
return ResponseHelper.buildResponse(orgUserList);
}
}
\ No newline at end of file
......@@ -2174,4 +2174,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
})).start();
}
/**
* 查询多个组织机构下面的所有人员列表信息
*
* @param companyIdList
* @return
*/
public List<OrgUsr> getPersonListByCompanyIdList(List<String> companyIdList) {
if (ValidationUtil.isEmpty(companyIdList)) {
return Lists.newArrayList();
}
return this.baseMapper.selectPersonListByCompanyIdList(companyIdList);
}
}
......@@ -87,4 +87,6 @@ public interface VideoMapper extends BaseMapper<Video> {
List<Video>listByCode(@Param("code")String code);
List<Video> selectListBySourceId(Long floorId);
String getParentSourceIds(String childrenId);
}
......@@ -157,6 +157,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value("${firefightingsystem.equip.alarms.url}")
private String ffsEquipAlarmsUrl;
final String ALL_BUILDING = "allBuilding";
/**
* @param groupCode
* @Description 根据groupCode查询allowOperation对应的操作菜单
......@@ -768,19 +770,17 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
public Page<BuildingVideoVO> buildingVideoList(Page page, BuildingVideoListVO dto) {
Page<BuildingVideoVO> pages = videoService.pageBuildingVideo(page, dto);
if (0 < pages.getRecords().size()) {
pages.getRecords().forEach(x -> {
if (StringUtil.isNotEmpty(x.getLocation()) && StringUtil.isNotEmpty(x.getAddress())) {
x.setLocation(x.getLocation() + '-' + x.getAddress());
} else {
if (!StringUtil.isNotEmpty(x.getLocation())) {
x.setLocation(x.getAddress());
}
pages.getRecords().forEach(x -> {
if (StringUtil.isNotEmpty(x.getLocation()) && StringUtil.isNotEmpty(x.getAddress())) {
x.setLocation(x.getLocation() + '-' + x.getAddress());
} else {
if (!StringUtil.isNotEmpty(x.getLocation())) {
x.setLocation(x.getAddress());
}
x.setVedioFormat(vedioFormat);
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
}
}
x.setVedioFormat(vedioFormat);
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
return pages;
}
......@@ -1160,6 +1160,15 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
List<BuildingTreeVo> companyBuildingList = buildBuildingAndCompanyListVos(buildVideoAuthKey);
List<Map<String, Long>> countList = iFormInstanceService.getBuildVideoCount();
Map<Long, Long> countMap = countList.stream().collect(Collectors.toMap(p -> p.get("buildId"), p -> p.get("total")));
companyBuildingList.forEach(c-> {
// 建筑类型数据,填充本级及子级包含的摄像头数量
if(!ALL_BUILDING.equals(c.getGroupType())){
c.setTotal(countMap.get(c.getInstanceId()) == null ? 0L : countMap.get(c.getInstanceId()));
} else {
// 方法 复用,覆盖掉不需要的数据
c.setTotal(0L);
}
});
//2.list to tree
return companyBuildingList.stream()
.filter(a -> companyBuildingList.stream().noneMatch(c -> c.getId().toString().equals(a.getParentId())))
......@@ -1169,11 +1178,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}).collect(Collectors.toList());
}
private List<BuildingTreeVo> getCompanyBuildingChildrenWithCount(String
parentId, List<BuildingTreeVo> companyBuildingList) {
private List<BuildingTreeVo> getCompanyBuildingChildrenWithCount(String parentId, List<BuildingTreeVo> companyBuildingList) {
return companyBuildingList.stream().filter(a -> parentId.equals(a.getParentId())).peek(a -> {
a.setChildren(getCompanyBuildingChildrenWithCount(a.getId().toString(), companyBuildingList));
a.setTotal(a.getChildren().stream().filter(c -> c.getTotal() != null).mapToLong(BuildingTreeVo::getTotal).sum());
//单位类型节点才需要设置摄像头总数,建筑的下摄像头总数已经在sql计算出来
if(ALL_BUILDING.equals(a.getGroupType())){
a.setTotal(a.getChildren().stream().filter(c -> c.getTotal() != null).mapToLong(BuildingTreeVo::getTotal).sum());
}
}).collect(Collectors.toList());
}
......
......@@ -100,15 +100,16 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
List<VideoSource> videoSources = new ArrayList<>();
if (videoSave.getIds() != null && videoSave.getIds().size() > 0) {
videoSave.getIds().forEach(x -> {
if (x != null && x.indexOf("equip") != -1) {
if (x != null && x.contains("equip")) {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setEquipmentSpecificId(Long.valueOf(x.substring(5)));
videoEquipmentSpecific.setVideoId(videoSave.getVideo().getId());
videoEquipmentSpecifics.add(videoEquipmentSpecific);
} else if (x != null && x.indexOf("region") != -1) {
} else if (x != null && x.contains("region")) {
VideoSource videoSource = new VideoSource();
videoSource.setVideoId(videoSave.getVideo().getId());
videoSource.setSourceId(Long.valueOf(x.substring(6)));
videoSource.setParentSourceIds(getParentSourceIds(videoSource.getSourceId().toString()));
videoSources.add(videoSource);
}
});
......@@ -130,6 +131,10 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
return videoSave.getVideo();
}
private String getParentSourceIds(String childrenId){
return this.videoMapper.getParentSourceIds(childrenId);
}
@Transactional
@Override
public Boolean delVideo(List<Long> ids) {
......@@ -173,15 +178,16 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
List<VideoSource> videoSources = new ArrayList<>();
if (videoSave.getIds() != null && videoSave.getIds().size() > 0) {
videoSave.getIds().forEach(x -> {
if (x != null && x.indexOf("equip") != -1) {
if (x != null && x.contains("equip")) {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setEquipmentSpecificId(Long.valueOf(x.substring(5)));
videoEquipmentSpecific.setVideoId(videoSave.getVideo().getId());
videoEquipmentSpecifics.add(videoEquipmentSpecific);
} else if (x != null && x.indexOf("region") != -1) {
} else if (x != null && x.contains("region")) {
VideoSource videoSource = new VideoSource();
videoSource.setVideoId(videoSave.getVideo().getId());
videoSource.setSourceId(Long.valueOf(x.substring(6)));
videoSource.setParentSourceIds(getParentSourceIds(videoSource.getSourceId().toString()));
videoSources.add(videoSource);
}
});
......
......@@ -75,4 +75,13 @@ public interface JCSFeignClient {
**/
@RequestMapping(value = "jcs/org-usr/amos/{orgUserId}", method = RequestMethod.GET)
ResponseModel<AgencyUserModel> getAmosIdByUserId(@PathVariable String orgUserId);
/**
* 根据机场单位id获取单位人员列表
*
* @param companyIds 机场单位ids
* @return
*/
@RequestMapping(value = "jcs/org-usr/company/person/list", method = RequestMethod.GET)
FeignClientResult<List<OrgUsrFormDto>> getPersonListByCompanyIdList(@RequestParam("companyIds") String companyIds);
}
......@@ -8,18 +8,23 @@ import com.google.common.base.Joiner;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import com.yeejoin.amos.supervision.business.constants.XJConstant;
import com.yeejoin.amos.supervision.business.dao.mapper.PlanMapper;
import com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper;
import com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper;
import com.yeejoin.amos.supervision.business.dao.mapper.PointMapper;
import com.yeejoin.amos.supervision.business.dao.mapper.RoutePointItemMapper;
import com.yeejoin.amos.supervision.business.dao.repository.*;
import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckChkExListBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo;
import com.yeejoin.amos.supervision.business.feign.Business;
import com.yeejoin.amos.supervision.business.feign.EquipFeign;
import com.yeejoin.amos.supervision.business.feign.JCSFeignClient;
import com.yeejoin.amos.supervision.business.param.CheckPtListPageParam;
import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam;
import com.yeejoin.amos.supervision.business.service.intfc.ICheckService;
......@@ -43,15 +48,16 @@ import com.yeejoin.amos.supervision.dao.entity.Check;
import com.yeejoin.amos.supervision.dao.entity.Plan;
import com.yeejoin.amos.supervision.dao.entity.PlanTask;
import com.yeejoin.amos.supervision.dao.entity.PlanTaskDetail;
import com.yeejoin.amos.supervision.dao.entity.Point;
import com.yeejoin.amos.supervision.exception.YeeException;
import com.yeejoin.amos.supervision.feign.RemoteSecurityService;
import com.yeejoin.amos.supervision.quartz.IJobService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.assertj.core.util.Lists;
import com.google.common.collect.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;
......@@ -113,6 +119,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired
RedisUtils redisUtils;
@Autowired
PointMapper pointMapper;
@Autowired
private JCSFeignClient jcsFeignClient;
// 防火监督检查负责人角色名称
@Value("${supervision.person.charger.role:Person_charge_unit_fire_protection_supervision_inspection}")
private String supervisionPersonChargerRole;
@Override
public Page<HashMap<String, Object>> getPlanTaskInfo(PlanTaskPageParam params) {
long total = planTaskMapper.countPlanTask(params);
......@@ -537,9 +553,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// 2.保存执行数据明细表
planTaskDetail.saveAndFlush(planTaskDetailInstance);
// 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.计划生成, pointId.longValue());
}
sendMessage(plan);
// 定时任务监控
jobService.planTaskAddJob(planTask);
}
......@@ -570,6 +585,34 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
public void sendMessage(Plan plan) throws Exception {
// 查询检查对象对应防火监督负责人id
List<String> extraUserIds = Lists.newArrayList();
List<Point> pointList = pointMapper.getPointByPlanId(String.valueOf(plan.getId()));
if (!ValidationUtil.isEmpty(pointList)) {
List<String> originalIdList = Lists.transform(pointList, Point::getOriginalId);
List<OrgUsrFormDto> personList =
jcsFeignClient.getPersonListByCompanyIdList(Joiner.on(",").join(originalIdList)).getResult();
List<String> personIdList = Lists.transform(personList, OrgUsrFormDto::getAmosOrgId);
List<RoleModel> roleList =
Privilege.roleClient.queryRoleList(supervisionPersonChargerRole, null).getResult();
if (!ValidationUtil.isEmpty(roleList)) {
List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId(
String.valueOf(roleList.get(0).getSequenceNbr()), null).getResult();
if (!ValidationUtil.isEmpty(agencyUserModelList)) {
agencyUserModelList.forEach(userModel -> {
if (personIdList.contains(userModel.getUserId())) {
extraUserIds.add(userModel.getUserId());
}
});
}
}
}
log.info(String.format("计划对象:%s", JSON.toJSON(plan)));
// 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.计划生成, extraUserIds);
}
@Override
public List<PlanTask> getPlanTaskByRouteId(Long routeId) {
List<PlanTask> planTaskList = planTaskMapper.getPlanTaskByRouteId(routeId);
......
......@@ -1211,10 +1211,10 @@ public class PointServiceImpl implements IPointService {
if (!ObjectUtils.isEmpty(hiddenDangerList)) {
String ids = Joiner.on(",").join(hiddenDangerList.stream().map(HiddenDanger::getLatentDangerId).collect(Collectors.toList()));
Map<String, String> map = new HashMap<>();
map.put("ids", ids);
map.put("dangerIds", ids);
FeignClientResult<List<DangerDto>> listFeignClientResult = dangerFeignClient.listAll(map);
if (ObjectUtils.isEmpty(listFeignClientResult.getResult()) || listFeignClientResult.getStatus() != HTTP_OK_STATUS) {
throw new RuntimeException(listFeignClientResult.getDevMessage());
if (listFeignClientResult.getStatus() != HTTP_OK_STATUS) {
throw new RuntimeException("服务调用异常");
}
List<DangerDto> dangerDtoList = listFeignClientResult.getResult();
if (!ObjectUtils.isEmpty(dangerDtoList)) {
......
......@@ -43,23 +43,14 @@ public class RulePlanService {
private final String packageId = "消息/addPlanRule";
private final String msgType = "supervision";
@Value("${supervision.person.charger.role:Person_charge_unit_fire_protection_supervision_inspection}")
private String supervisionPersonChargerRole;
@Autowired
private RuleTrigger ruleTrigger;
@Autowired
private JCSFeignClient jcsFeignClient;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Autowired
private PointServiceImpl pointService;
public Boolean addPlanRule(Plan plan, List<String> userIds, RuleTypeEnum ruleType, Long pointId) throws Exception {
PlanRo planRo = buildPlanRo(plan, userIds, ruleType, pointId);
public Boolean addPlanRule(Plan plan, List<String> userIds, RuleTypeEnum ruleType, List<String> extraUserIds) throws Exception {
PlanRo planRo = buildPlanRo(plan, userIds, ruleType, extraUserIds);
//触发规则
ruleTrigger.publish(planRo, packageId, new String[0]);
return true;
......@@ -73,7 +64,7 @@ public class RulePlanService {
return true;
}
private PlanRo buildPlanRo(Plan plan, List<String> userIds, RuleTypeEnum ruleType, Long pointId) {
private PlanRo buildPlanRo(Plan plan, List<String> userIds, RuleTypeEnum ruleType, List<String> extraUserIds) {
// 设置token
// if (ValidationUtil.isEmpty(RequestContext.getToken())) {
// Toke tokenObj = remoteSecurityService.getServerToken();
......@@ -112,28 +103,15 @@ public class RulePlanService {
leadPeopleIds += "," + plan.getUserId();
}
userIds = (List<String>) jcsFeignClient.getAmosIdListByUserIds(leadPeopleIds).getResult();
// pointId是被检查单位id
if (!ValidationUtil.isEmpty(pointId)) {
Point point = pointService.queryPointById(pointId);
List<OrgUsrFormDto> personList =
jcsFeignClient.getPersonListByCompanyId(point.getOriginalId()).getResult();
List<String> personIdList = Lists.transform(personList, OrgUsrFormDto::getAmosOrgId);
List<RoleModel> roleList =
Privilege.roleClient.queryRoleList(supervisionPersonChargerRole, null).getResult();
if (!ValidationUtil.isEmpty(roleList)) {
List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId(
String.valueOf(roleList.get(0).getSequenceNbr()), null).getResult();
if (!ValidationUtil.isEmpty(agencyUserModelList)) {
List<String> finalUserIds = userIds;
agencyUserModelList.forEach(userModel -> {
if (personIdList.contains(userModel.getUserId()) && !finalUserIds.contains(userModel.getUserId())) {
finalUserIds.add(userModel.getUserId());
}
});
userIds = finalUserIds;
}
}
if (!ValidationUtil.isEmpty(extraUserIds)) {
List<String> finalUserIds = userIds;
extraUserIds.forEach(id -> {
if (!finalUserIds.contains(id)) {
finalUserIds.add(id);
}
}
});
userIds = finalUserIds;
}
planRo.setSendTime(DateUtil.date2LongStr(new Date()));
planRo.setRecivers(userIds);
......
......@@ -2385,4 +2385,46 @@
alter table `wl_equipment_specific` modify column `team_id` varchar(32) DEFAULT NULL COMMENT '所属队伍id(来源于平台)';
</sql>
</changeSet>
<changeSet author="shg" id="1644459872903-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_video_source" columnName="parent_source_ids"/>
</not>
</preConditions>
<comment>wl_video_source add column parent_source_ids 本级及父级建筑ids,冗余树形搜索</comment>
<sql>
alter table `wl_video_source` add column `parent_source_ids` text COMMENT '本级及父级建筑ids,冗余树形搜索';
</sql>
</changeSet>
<changeSet author="shg" id="1644459872903-1" runAlways="true">
<comment>`getBuildingParentIds` 存在前后顺序依赖关系所以放在这里</comment>
<sql endDelimiter="#">
DROP FUNCTION IF EXISTS `getBuildingParentIds`#
CREATE DEFINER=`root`@`%` FUNCTION `getBuildingParentIds`(`childrenId` VARCHAR(32)) RETURNS varchar(1000) CHARSET utf8
BEGIN
DECLARE ptemp VARCHAR(1000);
DECLARE ctemp VARCHAR(1000);
DECLARE ctempName VARCHAR(1000);
SET ptemp ='';
SET ctemp = childrenId;
WHILE ctemp != '0' DO
SET ptemp = concat(ptemp,',',ctemp);
SELECT IFNULL((SELECT parentId
FROM get_building_tree
WHERE instanceId = ctemp),'0') INTO ctemp;
END WHILE;
SET ptemp = SUBSTR(ptemp,2);
RETURN ptemp;
END#
</sql>
</changeSet>
<changeSet author="shg" id="1644459872903-3">
<preConditions onFail="MARK_RAN">
<columnExists tableName="wl_video_source" columnName="parent_source_ids"/>
</preConditions>
<comment>wl_video_source 存量数据修改parent_source_ids</comment>
<sql>
update wl_video_source s set s.parent_source_ids = (SELECT getBuildingParentIds(s.source_id)) ;
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -61,14 +61,15 @@
v.token AS token,
v.url AS url,
v.code AS code,
getBuildingNames(vc.source_id) as location,
ws.full_name as location,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
left join wl_warehouse_structure ws on ws.id = vc.source_id
<where>
<if test="dto.buildingId!=null and dto.buildingId!=''">
FIND_IN_SET(vc.source_id, getBuildChildIdsByRootId(#{dto.buildingId}))
FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
......@@ -377,4 +378,7 @@
where vs.source_id = #{floorId}
and vs.video_id = v.id
</select>
<select id="getParentSourceIds" resultType="java.lang.String">
select getBuildingParentIds(#{childrenId})
</select>
</mapper>
......@@ -2770,7 +2770,5 @@
END#
</sql>
</changeSet>
</databaseChangeLog>
......@@ -4,7 +4,7 @@ spring.datasource.url = jdbc:mysql://172.16.6.60:3306/amos_supervision_v1\
spring.datasource.username= root
spring.datasource.password= root_123
## eureka properties:
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.serviceUrl.defaultZone=http://172.16.3.135:10001/eureka/
security.password=a1234560
security.loginId=jc_wjk006
......@@ -13,10 +13,10 @@ security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830
#redis 配置
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.database=1
spring.redis.host=172.16.6.60
spring.redis.port=6379
spring.redis.password=amos2019Redis
spring.redis.password=yeejoin@2020
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
......@@ -29,7 +29,7 @@ params.isPush = false
params.work.flow.normalProcessDefinitionKey=normalHazardManagement
params.work.flow.processDefinitionKey=hazardManagement
params.work.flow.address=http://172.16.10.80:30040
params.work.flow.address=http://172.16.11.30:30040
params.spc.address=http://172.16.3.89:9001
#websocket
......@@ -46,10 +46,11 @@ linux.img.path = /
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
emqx.broker=tcp://172.16.10.85:1883
emqx.broker=tcp://39.98.45.134:1883
emqx.user-name=super
emqx.password=a123456
emqx.max-inflight=1000
rule.definition.localIp=172.16.3.121
file.url=http://39.98.45.134:9000/
\ No newline at end of file
rule.definition.localIp=172.16.3.89
file.url=http://39.98.45.134:9000/
supervision.person.charger.role=Person_charge_unit_fire_protection_supervision_inspection
\ No newline at end of file
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