Commit 95956f4c authored by litengwei's avatar litengwei

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

parents 000026e5 256a2bb9
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.rule.config.RuleConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -28,6 +29,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
@Autowired
private OrgUsrMapper orgUsrMapper;
@Value("${emq.orgUsr.sync.switch}")
private Boolean orgUsrSyncSwitch;
@Override
public void OrgUsrSyncDtoDataSync(Long id) {
try {
......@@ -39,7 +43,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
for (OrgUsrSyncDto x : list) {
String message = buildSyncMessage(DataSyncTopicEnum.ORG_USR.getTopic(), x);
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
}
} else {
// 同步删除人员信息
......@@ -47,7 +53,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
orgUsrSyncDto.setSequenceNbr(id);
String message = buildSyncMessage(DataSyncTopicEnum.ORG_USR.getTopic(), orgUsrSyncDto);
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
}
}
} catch (Exception e) {
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.dao.mapper;
import com.yeejoin.amos.patrol.business.bo.CheckInputSyncBo;
import com.yeejoin.amos.patrol.business.dto.InputCheckDto;
import com.yeejoin.amos.patrol.dao.entity.CheckInput;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -15,4 +16,6 @@ public interface CheckInputMapper extends BaseMapper {
"itemId") Long itemId, @Param(value = "routePointItemId") Long routePointItemId, @Param(value = "checkInputId") Long checkInputId);
List<CheckInputSyncBo> getCheckInputSyncBoList(Map<String, Object> map);
List<CheckInput> findByIdIn(Map<String, Object> map);
}
......@@ -141,6 +141,7 @@ public class AcceptEquipmentRules {
map.put("id", checkInput.getId());
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInput);
}
});
log.info(checkInput.getPointClassifyName()+"规则校验返回结果修改成功");
......
......@@ -448,6 +448,7 @@ public class CheckServiceImpl implements ICheckService {
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInputList);
}
});
return new CheckDto(check.getId(), unqualifiedcheckItemList);
......@@ -699,6 +700,7 @@ public class CheckServiceImpl implements ICheckService {
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInputList);
}
});
return checkDto;
......
......@@ -399,6 +399,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
map.put("id", id);
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
List<CheckInput> checkInputList = checkInputMapper.findByIdIn(map);
patrolDataSyncService.checkInputDataSync(checkInputList);
}
});
}
......
......@@ -21,6 +21,8 @@ public interface IPatrolDataSyncService {
void checkDataSync(List<Check> checkList);
void checkInputDataSync(CheckInput checkInput);
void checkInputDataSync(List<CheckInput> checkInputList);
void checkShotDataSync(List<CheckShot> checkShotList);
......
......@@ -388,6 +388,8 @@ public class JobService implements IJobService {
map.put("idList", checkInputIdList);
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
List<CheckInput> checkInputList = checkInputMapper.findByIdIn(map);
patrolDataSyncService.checkInputDataSync(checkInputList);
}
});
}
......
......@@ -40,9 +40,12 @@ rule.definition.default-agency=jcs
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties:
file.url=http://39.98.45.134:9000/
file.url=http://172.16.11.201:9000/
video.url=https://11.11.16.4:443/
ifc.url=http://11.11.16.17/IFCInterface
ifc.call-back.localIp=11.11.16.1
#人员消息同步开关
emq.orgUsr.sync.switch=true
eureka.client.serviceUrl.defaultZone=http://172.16.10.211:10001/eureka/
eureka.client.serviceUrl.defaultZone=http://172.16.11.201:10001/eureka/
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
......@@ -18,7 +18,7 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business
spring.reactor.debug-agent.enabled=true
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.10.211:3306/xiy_safety_business_v3.0.1_20100712?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url=jdbc:mysql://172.16.11.201:3306/dl_business_v3.0.1.3?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
......@@ -35,9 +35,9 @@ security.appKey=studio_normalapp_3168830
#redis 配置
spring.redis.database=1
spring.redis.host=172.16.10.211
spring.redis.host=172.16.11.201
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
......@@ -63,15 +63,18 @@ jobs.cron = 0 0/1 22-23 * * ?
#jpush 推送配置项
params.isPush = false
#巡检消息同步开关
emq.patrol.sync.switch=true
params.work.flow.normalProcessDefinitionKey=normalHazardManagement
params.work.flow.processDefinitionKey=hazardManagement
params.work.flow.address=http://172.16.10.211:30040
params.work.flow.address=http://172.16.11.201:30040
params.spc.address=http://172.16.3.89:9001
#websocket
params.remoteWebsocketUrl=http://172.16.10.211:8080/
params.remoteWebsocketUrl=http://172.16.11.201:8080/
#websocket send message url
params.remoteWebSocketSendMsgUrl=http://172.16.10.211:10601/
params.remoteWebSocketSendMsgUrl=http://172.16.11.201:10601/
#上传文件配置
spring.http.multipart.maxFileSize = 80480000
......@@ -82,9 +85,9 @@ linux.img.path = /
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-3578
emqx.broker=tcp://172.16.10.211:2883
emqx.user-name=super
emqx.password=a123456
emqx.broker=tcp://172.16.11.201:1883
emqx.user-name=admin
emqx.password=public
emqx.max-inflight=1000
file.url=http://39.98.45.134:9000/
\ No newline at end of file
file.url=http://172.16.11.201:9000/
\ No newline at end of file
......@@ -144,4 +144,18 @@
</if>
</where>
</select>
<select id="findByIdIn" resultType="com.yeejoin.amos.patrol.dao.entity.CheckInput">
select * from p_check_input
<where>
<if test="id != null">
id = #{id}
</if>
<if test="idList != null and idList.size() >0">
AND id IN
<foreach collection="idList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ 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