Commit 79dad210 authored by zhangsen's avatar zhangsen

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

# Conflicts: # amos-boot-system-jcs/src/main/resources/application-dev.properties
parents 167be39b bc9bdd36
......@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.enums;
public enum DataSyncTopicEnum {
EQM_PATROL_CREATED("user", "emq.user.created"),
ORG_USR_DEL("userDel", "user/sync/orgUsrDel"),
ORG_USR("orgUsr", "user/sync/orgUsr");
ORG_USR("orgUsr", "user/sync/orgUsr"),
STATION_USER_UPDATE("sattionUserUpdate", "station/user/update"),
STATION_USER_DELETE("sattionUserDelete", "station/user/delete");
private String type;
private String topic;
......
......@@ -666,7 +666,7 @@ GROUP BY
cb_data_dictionary
WHERE
CODE = b.peopleType
AND type = 'DWRYLX'
AND type = 'DLRYLX'
) AS peopleType,
(
SELECT
......
......@@ -29,9 +29,6 @@ public class DataSyncServiceImpl implements IDataSyncService {
@Autowired
private OrgUsrMapper orgUsrMapper;
@Value("${emq.orgUsr.sync.switch}")
private Boolean orgUsrSyncSwitch;
@Override
public void OrgUsrSyncDtoDataSync(Long id) {
try {
......@@ -43,9 +40,10 @@ 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);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
//站端人员信息同步
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_UPDATE.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
}
}
......@@ -63,9 +61,10 @@ public class DataSyncServiceImpl implements IDataSyncService {
orgUsrSyncDto.setSequenceNbr(id);
String message = buildSyncMessage(DataSyncTopicEnum.ORG_USR_DEL.getTopic(), orgUsrSyncDto);
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
if (orgUsrSyncSwitch) {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.ORG_USR_DEL.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
//站端人员信息删除同步
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_DELETE.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
}
} catch (Exception e) {
log.error("站端与中心级人员数据【OrgUsrSyncDto】同步推送失败-----------" + e.getMessage());
......
......@@ -283,7 +283,7 @@ public class DocLibraryService {
commonFiltersMap.put("createTimeLeft", DateUtil.formatStringToDate(createTimeLeft, null));
}
if (!ValidationUtil.isEmpty(createTimeRight)) {
commonFiltersMap.put("createTimeLeft", DateUtil.formatStringToDate(createTimeRight, null));
commonFiltersMap.put("createTimeRight", DateUtil.formatStringToDate(createTimeRight, null));
}
} catch (Exception e) {
throw new BadRequest("时间范围参数格式有误");
......
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