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; ...@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.rule.config.RuleConfig;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
...@@ -28,6 +29,9 @@ public class DataSyncServiceImpl implements IDataSyncService { ...@@ -28,6 +29,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
@Autowired @Autowired
private OrgUsrMapper orgUsrMapper; private OrgUsrMapper orgUsrMapper;
@Value("${emq.orgUsr.sync.switch}")
private Boolean orgUsrSyncSwitch;
@Override @Override
public void OrgUsrSyncDtoDataSync(Long id) { public void OrgUsrSyncDtoDataSync(Long id) {
try { try {
...@@ -39,17 +43,21 @@ public class DataSyncServiceImpl implements IDataSyncService { ...@@ -39,17 +43,21 @@ public class DataSyncServiceImpl implements IDataSyncService {
for (OrgUsrSyncDto x : list) { for (OrgUsrSyncDto x : list) {
String message = buildSyncMessage(DataSyncTopicEnum.ORG_USR.getTopic(), x); 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.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
} }
}
} else { } else {
// 同步删除人员信息 // 同步删除人员信息
OrgUsrSyncDto orgUsrSyncDto = new OrgUsrSyncDto(); OrgUsrSyncDto orgUsrSyncDto = new OrgUsrSyncDto();
orgUsrSyncDto.setSequenceNbr(id); orgUsrSyncDto.setSequenceNbr(id);
String message = buildSyncMessage(DataSyncTopicEnum.ORG_USR.getTopic(), orgUsrSyncDto); 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.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
} }
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("站端与中心级人员数据【OrgUsrSyncDto】同步推送失败-----------" + e.getMessage()); log.error("站端与中心级人员数据【OrgUsrSyncDto】同步推送失败-----------" + e.getMessage());
} }
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.dao.mapper; ...@@ -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.bo.CheckInputSyncBo;
import com.yeejoin.amos.patrol.business.dto.InputCheckDto; import com.yeejoin.amos.patrol.business.dto.InputCheckDto;
import com.yeejoin.amos.patrol.dao.entity.CheckInput;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -15,4 +16,6 @@ public interface CheckInputMapper extends BaseMapper { ...@@ -15,4 +16,6 @@ public interface CheckInputMapper extends BaseMapper {
"itemId") Long itemId, @Param(value = "routePointItemId") Long routePointItemId, @Param(value = "checkInputId") Long checkInputId); "itemId") Long itemId, @Param(value = "routePointItemId") Long routePointItemId, @Param(value = "checkInputId") Long checkInputId);
List<CheckInputSyncBo> getCheckInputSyncBoList(Map<String, Object> map); List<CheckInputSyncBo> getCheckInputSyncBoList(Map<String, Object> map);
List<CheckInput> findByIdIn(Map<String, Object> map);
} }
...@@ -141,6 +141,7 @@ public class AcceptEquipmentRules { ...@@ -141,6 +141,7 @@ public class AcceptEquipmentRules {
map.put("id", checkInput.getId()); map.put("id", checkInput.getId());
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInput);
} }
}); });
log.info(checkInput.getPointClassifyName()+"规则校验返回结果修改成功"); log.info(checkInput.getPointClassifyName()+"规则校验返回结果修改成功");
......
...@@ -448,6 +448,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -448,6 +448,7 @@ public class CheckServiceImpl implements ICheckService {
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList())); map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInputList);
} }
}); });
return new CheckDto(check.getId(), unqualifiedcheckItemList); return new CheckDto(check.getId(), unqualifiedcheckItemList);
...@@ -699,6 +700,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -699,6 +700,7 @@ public class CheckServiceImpl implements ICheckService {
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList())); map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInputList);
} }
}); });
return checkDto; return checkDto;
......
...@@ -399,6 +399,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -399,6 +399,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
map.put("id", id); map.put("id", id);
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
List<CheckInput> checkInputList = checkInputMapper.findByIdIn(map);
patrolDataSyncService.checkInputDataSync(checkInputList);
} }
}); });
} }
......
...@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -36,13 +37,18 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -36,13 +37,18 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
@Autowired @Autowired
private IPlanTaskDetailDao planTaskDetailDao; private IPlanTaskDetailDao planTaskDetailDao;
@Value("${emq.patrol.sync.switch}")
private Boolean patrolSyncSwitch;
@Override @Override
public void checkDataSync(Check check) { public void checkDataSync(Check check) {
if (check != null) { if (check != null) {
try { try {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK.getTopic(), check); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK.getTopic(), check);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK.getTopic(), JSON.toJSONString(check, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK.getTopic(), JSON.toJSONString(check, SerializerFeature.WriteMapNullValue));
}
String isOk = check.getIsOk(); String isOk = check.getIsOk();
long taskId = check.getPlanTaskId(); long taskId = check.getPlanTaskId();
long taskDetailId = check.getPlanTaskDetailId(); long taskDetailId = check.getPlanTaskDetailId();
...@@ -53,7 +59,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -53,7 +59,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
planTaskDetailList.forEach(x -> { planTaskDetailList.forEach(x -> {
String detailMessage = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), x); String detailMessage = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), x);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), detailMessage); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), detailMessage);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue));
}
}); });
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -69,7 +77,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -69,7 +77,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
checkList.forEach(check -> { checkList.forEach(check -> {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK.getTopic(), check); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK.getTopic(), check);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK.getTopic(), JSON.toJSONString(check, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK.getTopic(), JSON.toJSONString(check, SerializerFeature.WriteMapNullValue));
}
String isOk = check.getIsOk(); String isOk = check.getIsOk();
long taskId = check.getPlanTaskId(); long taskId = check.getPlanTaskId();
long taskDetailId = check.getPlanTaskDetailId(); long taskDetailId = check.getPlanTaskDetailId();
...@@ -80,7 +90,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -80,7 +90,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
planTaskDetailList.forEach(x -> { planTaskDetailList.forEach(x -> {
String detailMessage = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), x); String detailMessage = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), x);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), detailMessage); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), detailMessage);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK_DETAIL.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue));
}
}); });
} }
}); });
...@@ -91,13 +103,30 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -91,13 +103,30 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
} }
@Override @Override
public void checkInputDataSync(CheckInput checkInput) {
try {
if (checkInput != null) {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), checkInput);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), JSON.toJSONString(checkInput, SerializerFeature.WriteMapNullValue));
}
}
} catch (Exception e) {
log.error("站端与中心级巡检数据【checkInput】同步推送失败-----------" + e.getMessage());
}
}
@Override
public void checkInputDataSync(List<CheckInput> checkInputList) { public void checkInputDataSync(List<CheckInput> checkInputList) {
try { try {
if (CollectionUtils.isNotEmpty(checkInputList)) { if (CollectionUtils.isNotEmpty(checkInputList)) {
checkInputList.forEach(x -> { checkInputList.forEach(x -> {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), x); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), x);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue));
}
}); });
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -112,7 +141,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -112,7 +141,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
checkShotList.forEach(x -> { checkShotList.forEach(x -> {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_SHOT.getTopic(), x); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_SHOT.getTopic(), x);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_SHOT.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_SHOT.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue));
}
}); });
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -126,8 +157,10 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -126,8 +157,10 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
if (checkInputSyncBo != null) { if (checkInputSyncBo != null) {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), checkInputSyncBo); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), checkInputSyncBo);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), JSON.toJSONString(checkInputSyncBo, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), JSON.toJSONString(checkInputSyncBo, SerializerFeature.WriteMapNullValue));
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("站端与中心级巡检数据【CheckInputSyncBo】同步推送失败-----------" + e.getMessage()); log.error("站端与中心级巡检数据【CheckInputSyncBo】同步推送失败-----------" + e.getMessage());
} }
...@@ -140,7 +173,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -140,7 +173,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
checkInputSyncBoList.forEach(x -> { checkInputSyncBoList.forEach(x -> {
String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), x); String message = buildSyncMessage(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), x);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.CHECK_INPUT_BO.getTopic(), JSON.toJSONString(x, SerializerFeature.WriteMapNullValue));
}
}); });
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -155,8 +190,10 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -155,8 +190,10 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
PlanTaskSyncBo planTaskSyncBo = buildPlanTaskBo(planTask); PlanTaskSyncBo planTaskSyncBo = buildPlanTaskBo(planTask);
String message = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), planTaskSyncBo); String message = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), planTaskSyncBo);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), JSON.toJSONString(planTaskSyncBo, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), JSON.toJSONString(planTaskSyncBo, SerializerFeature.WriteMapNullValue));
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("站端与中心级巡检数据【planTask】同步推送失败-----------" + e.getMessage()); log.error("站端与中心级巡检数据【planTask】同步推送失败-----------" + e.getMessage());
} }
...@@ -170,7 +207,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -170,7 +207,9 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
PlanTaskSyncBo planTaskSyncBo = buildPlanTaskBo(x); PlanTaskSyncBo planTaskSyncBo = buildPlanTaskBo(x);
String message = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), planTaskSyncBo); String message = buildSyncMessage(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), planTaskSyncBo);
webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message); webMqttComponent.publish(PatrolDataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message);
if (patrolSyncSwitch) {
webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), JSON.toJSONString(planTaskSyncBo, SerializerFeature.WriteMapNullValue)); webMqttComponent.publish(PatrolDataSyncTopicEnum.PLAN_TASK.getTopic(), JSON.toJSONString(planTaskSyncBo, SerializerFeature.WriteMapNullValue));
}
}); });
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -21,6 +21,8 @@ public interface IPatrolDataSyncService { ...@@ -21,6 +21,8 @@ public interface IPatrolDataSyncService {
void checkDataSync(List<Check> checkList); void checkDataSync(List<Check> checkList);
void checkInputDataSync(CheckInput checkInput);
void checkInputDataSync(List<CheckInput> checkInputList); void checkInputDataSync(List<CheckInput> checkInputList);
void checkShotDataSync(List<CheckShot> checkShotList); void checkShotDataSync(List<CheckShot> checkShotList);
......
...@@ -388,6 +388,8 @@ public class JobService implements IJobService { ...@@ -388,6 +388,8 @@ public class JobService implements IJobService {
map.put("idList", checkInputIdList); map.put("idList", checkInputIdList);
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
List<CheckInput> checkInputList = checkInputMapper.findByIdIn(map);
patrolDataSyncService.checkInputDataSync(checkInputList);
} }
}); });
} }
......
...@@ -40,9 +40,12 @@ rule.definition.default-agency=jcs ...@@ -40,9 +40,12 @@ rule.definition.default-agency=jcs
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db #spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties: ## 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/ video.url=https://11.11.16.4:443/
ifc.url=http://11.11.16.17/IFCInterface ifc.url=http://11.11.16.17/IFCInterface
ifc.call-back.localIp=11.11.16.1 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.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
...@@ -18,7 +18,7 @@ ribbon.MaxAutoRetries = 1 ...@@ -18,7 +18,7 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business xiy_amos_satety_business
spring.reactor.debug-agent.enabled=true spring.reactor.debug-agent.enabled=true
#DB properties: #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.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2020
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = com.mysql.jdbc.Driver
...@@ -35,9 +35,9 @@ security.appKey=studio_normalapp_3168830 ...@@ -35,9 +35,9 @@ security.appKey=studio_normalapp_3168830
#redis 配置 #redis 配置
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.211 spring.redis.host=172.16.11.201
spring.redis.port=6379 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-active=200
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10 spring.redis.jedis.pool.max-idle=10
...@@ -63,15 +63,18 @@ jobs.cron = 0 0/1 22-23 * * ? ...@@ -63,15 +63,18 @@ jobs.cron = 0 0/1 22-23 * * ?
#jpush 推送配置项 #jpush 推送配置项
params.isPush = false params.isPush = false
#巡检消息同步开关
emq.patrol.sync.switch=true
params.work.flow.normalProcessDefinitionKey=normalHazardManagement params.work.flow.normalProcessDefinitionKey=normalHazardManagement
params.work.flow.processDefinitionKey=hazardManagement 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 params.spc.address=http://172.16.3.89:9001
#websocket #websocket
params.remoteWebsocketUrl=http://172.16.10.211:8080/ params.remoteWebsocketUrl=http://172.16.11.201:8080/
#websocket send message url #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 spring.http.multipart.maxFileSize = 80480000
...@@ -82,9 +85,9 @@ linux.img.path = / ...@@ -82,9 +85,9 @@ linux.img.path = /
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-3578 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-3578
emqx.broker=tcp://172.16.10.211:2883 emqx.broker=tcp://172.16.11.201:1883
emqx.user-name=super emqx.user-name=admin
emqx.password=a123456 emqx.password=public
emqx.max-inflight=1000 emqx.max-inflight=1000
file.url=http://39.98.45.134:9000/ file.url=http://172.16.11.201:9000/
\ No newline at end of file \ No newline at end of file
...@@ -144,4 +144,18 @@ ...@@ -144,4 +144,18 @@
</if> </if>
</where> </where>
</select> </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> </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