Commit 5b8f9a9f authored by zhengjiangtao's avatar zhengjiangtao

优化mqtt推送及3维屏搜索添加riskSourceId参数

parent 8e11b9c9
...@@ -622,7 +622,9 @@ public class RiskSourceController extends BaseController { ...@@ -622,7 +622,9 @@ public class RiskSourceController extends BaseController {
@RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse postPatrolData(@RequestBody ProtalDataRo protalData) throws Exception { public CommonResponse postPatrolData(@RequestBody ProtalDataRo protalData) throws Exception {
log.info("上传巡检数据" + JSONObject.toJSONString(protalData)); log.info("上传巡检数据" + JSONObject.toJSONString(protalData));
riskSourceService.processProtalData(getToken(),getProduct(),getAppKey(),protalData); ReginParams reginParams =getSelectedOrgInfo();
String compCode=getOrgCode(reginParams);
riskSourceService.processProtalData(getToken(),getProduct(),getAppKey(),protalData, compCode);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
......
...@@ -254,6 +254,7 @@ public class View3dController extends BaseController { ...@@ -254,6 +254,7 @@ public class View3dController extends BaseController {
String product = this.getProduct(); String product = this.getProduct();
return view3dService.retrieveAll(params.getType(), return view3dService.retrieveAll(params.getType(),
params.getRiskSourceId(),
params.getInputText(), params.getInputText(),
params.getCurrent(), params.getCurrent(),
params.getPageSize(), params.getPageSize(),
......
...@@ -145,9 +145,9 @@ public interface View3dMapper extends BaseMapper{ ...@@ -145,9 +145,9 @@ public interface View3dMapper extends BaseMapper{
List<Node3DVoResponse> findViewDataByType(@Param("type")String type,@Param("riskSourceId")Long riskSourceId,@Param("orgCode")String orgCode,@Param("abnormalStatus")Boolean abnormalStatus); List<Node3DVoResponse> findViewDataByType(@Param("type")String type,@Param("riskSourceId")Long riskSourceId,@Param("orgCode")String orgCode,@Param("abnormalStatus")Boolean abnormalStatus);
Long retrieveAllCount(String type, String inputText,String orgCode,String dataLevel,String protectObjName); Long retrieveAllCount(String type, Long riskSourceId, String inputText,String orgCode,String dataLevel,String protectObjName);
List<HashMap<String, Object>> retrieveAll(String type, String inputText, long start, int length,String orgCode,String dataLevel,String protectObjName); List<HashMap<String, Object>> retrieveAll(String type, Long riskSourceId, String inputText, long start, int length,String orgCode,String dataLevel,String protectObjName);
/** /**
* 查询区域下点 * 查询区域下点
......
...@@ -8,6 +8,16 @@ public class RetrieveParams { ...@@ -8,6 +8,16 @@ public class RetrieveParams {
private Integer pageSize; private Integer pageSize;
private String dataLevel; private String dataLevel;
private String protectObjName; private String protectObjName;
private String riskSourceId;
public String getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(String riskSourceId) {
this.riskSourceId = riskSourceId;
}
public String getType() { public String getType() {
return type; return type;
} }
......
...@@ -22,7 +22,7 @@ public class BizMessageServiceImpl implements IBizMessageService { ...@@ -22,7 +22,7 @@ public class BizMessageServiceImpl implements IBizMessageService {
public Page queryForPage(String time, String type, String title, String orgCode, CommonPageable pageable) public Page queryForPage(String time, String type, String title, String orgCode, CommonPageable pageable)
{ {
Long total = bizMessageMapper.queryCountForPage(time, type, title, orgCode); Long total = bizMessageMapper.queryCountForPage(time, type, title, orgCode);
List<NodeMessageView> content = bizMessageMapper.queryForPage(time, type, title, orgCode,pageable.getOffset(),pageable.getPageSize()); List<NodeMessageView> content = bizMessageMapper.queryForPage(time, type, title, orgCode,pageable.getOffset(),pageable.getPageSize());
......
...@@ -20,7 +20,14 @@ import java.util.concurrent.LinkedBlockingQueue; ...@@ -20,7 +20,14 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.fas.business.controller.BaseController;
import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.feign.privilege.Privilege;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -55,7 +62,6 @@ import com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo; ...@@ -55,7 +62,6 @@ import com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo;
import com.yeejoin.amos.fas.business.action.model.ProtalDataRo; import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
import com.yeejoin.amos.fas.business.action.model.RiskSourceRuleRo; import com.yeejoin.amos.fas.business.action.model.RiskSourceRuleRo;
import com.yeejoin.amos.fas.business.action.model.SetpEnum; import com.yeejoin.amos.fas.business.action.model.SetpEnum;
import com.yeejoin.amos.fas.business.action.mq.StationEnum;
import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent; import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent;
import com.yeejoin.amos.fas.business.bo.BindRegionBo; import com.yeejoin.amos.fas.business.bo.BindRegionBo;
import com.yeejoin.amos.fas.business.bo.JpushMsgBo; import com.yeejoin.amos.fas.business.bo.JpushMsgBo;
...@@ -184,6 +190,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -184,6 +190,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private FireEquipPointMapper fireEquipPointMapper; private FireEquipPointMapper fireEquipPointMapper;
@Autowired @Autowired
private IView3dService view3dService;
@Autowired
private IRiskLevelDao iRiskLevelDao; private IRiskLevelDao iRiskLevelDao;
...@@ -234,6 +243,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -234,6 +243,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired @Autowired
private IRiskFactorDao iRiskFactorDao; private IRiskFactorDao iRiskFactorDao;
@Autowired
protected HttpServletRequest request;
public static String cacheKeyForCanBeRunning() { public static String cacheKeyForCanBeRunning() {
return Redis.genKey(CacheType.ERASABLE.name(), "CONTINGENCYRUNING"); return Redis.genKey(CacheType.ERASABLE.name(), "CONTINGENCYRUNING");
...@@ -278,7 +290,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -278,7 +290,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
int count = iRiskSourceDao.countByParentId(rId); int count = iRiskSourceDao.countByParentId(rId);
Optional<RiskSource> rs = iRiskSourceDao.findById(rId); Optional<RiskSource> rs = iRiskSourceDao.findById(rId);
rs.ifPresent(riskSource -> parentIds.add(riskSource.getParentId())); rs.ifPresent(riskSource -> parentIds.add(riskSource.getParentId()));
if (parentIds.contains(0l)) { if (parentIds.contains(0L)) {
throw new YeeException("公司节点不能删除"); throw new YeeException("公司节点不能删除");
} }
if (count > 0) { if (count > 0) {
...@@ -680,7 +692,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -680,7 +692,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override @Override
@Async @Async
public void processProtalData(String toke, String product, String appKey, ProtalDataRo protalData) { public void processProtalData(String toke, String product, String appKey, ProtalDataRo protalData, String orgCode) {
//巡检消息规则推送 //巡检消息规则推送
protalRuleMessagePush(protalData, toke, product, appKey); protalRuleMessagePush(protalData, toke, product, appKey);
if (!CollectionUtils.isEmpty(protalData.getPointInputitems())) { if (!CollectionUtils.isEmpty(protalData.getPointInputitems())) {
...@@ -716,6 +728,27 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -716,6 +728,27 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
rsDataQueue.addPatrolMessage(fmeaId, protalData.getCheckUser(), protalData.getName(), protalData.getNodeState())); rsDataQueue.addPatrolMessage(fmeaId, protalData.getCheckUser(), protalData.getName(), protalData.getNodeState()));
} }
iDataRefreshService.refreshViewData(DataRefreshTypeEum.check.getCode()); iDataRefreshService.refreshViewData(DataRefreshTypeEum.check.getCode());
/**
* 推送巡检数据
* 影响区域:今日安全,消防安全=>巡检异常,一周安全趋势
*/
// 今日安全
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String dateString = formatter.format(new Date());
String topicOne = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","todaySafetyIndex");
webMqttComponent.publish(topicOne, JSON.toJSONString(view3dService.getSafetyIndexInfoByDate(orgCode, dateString)));
// 巡检异常
String topicTwo = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","fireSafety");
webMqttComponent.publish(topicTwo, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("check", orgCode)));
// 一周安全趋势
String topicThree = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","weekSafetyIndex");
webMqttComponent.publish(topicThree, JSON.toJSONString(view3dService.getSafetyIndexWeek(orgCode)));
// 今日巡检
String topicFour = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","todayCheckStatus");
webMqttComponent.publish(topicThree, JSON.toJSONString(view3dService.getStatisticsCheck(orgCode)));
} }
/** /**
...@@ -869,7 +902,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -869,7 +902,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* @param deviceData * @param deviceData
* @param equipment * @param equipment
* @param fireEquipment * @param fireEquipment
* @param fireEquipmentPointType * @param toke
*/ */
@Async @Async
void dynamicPlan(AlarmParam deviceData, Equipment equipment, FireEquipment fireEquipment, Toke toke) { void dynamicPlan(AlarmParam deviceData, Equipment equipment, FireEquipment fireEquipment, Toke toke) {
...@@ -930,6 +963,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -930,6 +963,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSourceMap.put("equipments", map); riskSourceMap.put("equipments", map);
remoteWebSocketServer.sendMessage("equipmentMode", JSON.toJSONString(riskSourceMap)); remoteWebSocketServer.sendMessage("equipmentMode", JSON.toJSONString(riskSourceMap));
// 推送设备状态信息
Alarm alarm = iAlarmDao.findByStatusTrueAndFireEquipmentPointCode(param.getPointCode());
String topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/monitorData");
webMqttComponent.publish(topic, JSON.toJSONString(view3dService.getEquipStatusList(alarm.getOrgCode())));
} catch (Exception e) { } catch (Exception e) {
log.error("推送前端数据失败-->"+JSON.toJSONString(param)); log.error("推送前端数据失败-->"+JSON.toJSONString(param));
} }
...@@ -971,6 +1009,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -971,6 +1009,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} else { } else {
//通知刷新3d页面告警数据 //通知刷新3d页面告警数据
iDataRefreshService.refreshViewData(DataRefreshTypeEum.alarm.getCode()); iDataRefreshService.refreshViewData(DataRefreshTypeEum.alarm.getCode());
/**
* 推送告警数据
* 影响区域:消防安全=>火灾告警
*/
String topic = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","fireSafety");
webMqttComponent.publish(topic, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("fire", fireEquipmentPoint.getOrgCode())));
} }
} }
} else { } else {
...@@ -995,9 +1040,16 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -995,9 +1040,16 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
content.put("orgCode", fireEquipment.getOrgCode()); content.put("orgCode", fireEquipment.getOrgCode());
content.put("status", deviceData.getSoe()); content.put("status", deviceData.getSoe());
iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content); iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content);
/**
* 推送设备状态
* 影响区域:设备状态
*/
String topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/monitorData");
webMqttComponent.publish(topic, JSON.toJSONString(view3dService.getEquipStatusList(fireEquipment.getOrgCode())));
} }
} }
// String topic = String.format("/%s/%s/%s", serviceName, StationEnum.YINAN.getCode(),"telesignaling"); // String topic = String.format("/%s/%s/%s", serviceName, "yinan","telesignaling");S
// webMqttComponent.publish(topic, JSON.toJSONString(deviceData)); // webMqttComponent.publish(topic, JSON.toJSONString(deviceData));
List<AlarmParam> list = new ArrayList<>(); List<AlarmParam> list = new ArrayList<>();
...@@ -1107,7 +1159,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1107,7 +1159,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
try { try {
redisTemplate.opsForHash().put("Analogue", data.getPointCode(), data); redisTemplate.opsForHash().put("Analogue", data.getPointCode(), data);
// remoteWebSocketServer.sendMessage("plan", JSON.toJSONString(data)); // remoteWebSocketServer.sendMessage("plan", JSON.toJSONString(data));
String topic = String.format("/%s/%s/%s", serviceName, StationEnum.YINAN.getCode(),"analogue"); String topic = String.format("/%s/%s/%s", serviceName, "yinan","analogue");
webMqttComponent.publish(topic, JSON.toJSONString(data)); webMqttComponent.publish(topic, JSON.toJSONString(data));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -1292,8 +1344,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1292,8 +1344,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
//1.3更新fmea //1.3更新fmea
fmeaMapper.updateRpn(fmea); fmeaMapper.updateRpn(fmea);
//2.计算上级风险值(风险点及父节点) //2.计算上级风险值(风险点及父节点)
this.notifyRiskSource(fmeaId, fmea.getRiskSourceId(), nofityType, jpushMsgBo); this.notifyRiskSource(newLevel.getOrgCode(), fmeaId, fmea.getRiskSourceId(), nofityType, jpushMsgBo);
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix"); String topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix())); webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
} }
} }
...@@ -1398,10 +1450,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1398,10 +1450,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
//1.3.更新fmea的rpn、风险等级及newOid //1.3.更新fmea的rpn、风险等级及newOid
fmeaMapper.updateRpn(fmea); fmeaMapper.updateRpn(fmea);
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix"); String topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix())); webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
//2.计算风险点rpn、rpni、riskLevelId //2.计算风险点rpn、rpni、riskLevelId
this.notifyRiskSource(fmeaId, fmea.getRiskSourceId(), notifyType, jpushMsgBo); this.notifyRiskSource(newLevel.getOrgCode(), fmeaId, fmea.getRiskSourceId(), notifyType, jpushMsgBo);
} }
} }
} }
...@@ -1434,7 +1486,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1434,7 +1486,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* fmea的更新导致rpn、rpni的值改变 * fmea的更新导致rpn、rpni的值改变
*/ */
@Override @Override
public void notifyRiskSource(Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo) { public void notifyRiskSource(String orgCode, Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo) {
Optional<RiskSource> riskSource1 = iRiskSourceDao.findById(riskSourceId); Optional<RiskSource> riskSource1 = iRiskSourceDao.findById(riskSourceId);
RiskSource riskSource = null; RiskSource riskSource = null;
if (riskSource1.isPresent()) { if (riskSource1.isPresent()) {
...@@ -1500,18 +1552,37 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1500,18 +1552,37 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
//6.通知全景监控屏幕数据刷新 //6.通知全景监控屏幕数据刷新
iDataRefreshService.refreshViewData(DataRefreshTypeEum.rpn.getCode()); iDataRefreshService.refreshViewData(DataRefreshTypeEum.rpn.getCode());
} }
} }
try { try {
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/situationMap"); String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn())); webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreeHistogram"); topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport())); webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreePie"); topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/riskDegreePie");
webMqttComponent.publish(topic, JSON.toJSONString(queryForRiseUp())); webMqttComponent.publish(topic, JSON.toJSONString(queryForRiseUp()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix"); topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix())); webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
// 今日安全
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String dateString = formatter.format(new Date());
if(StringUtils.isEmpty(orgCode)){
orgCode = riskSource.getOrgCode();
}
String topicOne = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/todaySafetyIndex");
webMqttComponent.publish(topicOne, JSON.toJSONString(view3dService.getSafetyIndexInfoByDate(orgCode, dateString)));
// 消防安全
String topicTow = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/fireSafety");
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("risk", orgCode)));
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("check", orgCode)));
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("fire", orgCode)));
// 一周安全趋势
String topicThree = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","weekSafetyIndex");
webMqttComponent.publish(topicThree, JSON.toJSONString(view3dService.getSafetyIndexWeek(orgCode)));
} catch (Exception e) { } catch (Exception e) {
log.error("数据获取失败", e); log.error("数据获取失败", e);
} }
...@@ -1521,15 +1592,60 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1521,15 +1592,60 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override @Override
public void notifyFmeaFromDelete(Long riskSourceId, String from) { public void notifyFmeaFromDelete(Long riskSourceId, String from) {
//1.计算风险点风险值信息 //1.计算风险点风险值信息
this.notifyRiskSource(0L, riskSourceId, from, null); this.notifyRiskSource(null, 0L, riskSourceId, from, null);
} }
@Override @Override
public void notifyRiskSourceDelete(Long parentId) { public void notifyRiskSourceDelete(Long parentId) {
Optional<RiskSource> riskSource1 = iRiskSourceDao.findById(parentId);
RiskSource riskSource = null;
if (riskSource1.isPresent()) {
riskSource = riskSource1.get();
} else {
return;
}
//1.风险点删除触发更新父节点rpn、rpni、风险等级 //1.风险点删除触发更新父节点rpn、rpni、风险等级
this.updateParentRpn(parentId); this.updateParentRpn(parentId);
//2.通知全景监控屏幕数据刷新 //2.通知全景监控屏幕数据刷新
iDataRefreshService.refreshViewData(DataRefreshTypeEum.rpn.getCode()); iDataRefreshService.refreshViewData(DataRefreshTypeEum.rpn.getCode());
try{
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn()));
topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/riskDegreePie");
webMqttComponent.publish(topic, JSON.toJSONString(queryForRiseUp()));
topic = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
// 今日安全
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String dateString = formatter.format(new Date());
String orgCode = riskSource.getOrgCode();
if(StringUtils.isEmpty(orgCode)){
orgCode = riskSource.getOrgCode();
}
String topicOne = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/todaySafetyIndex");
webMqttComponent.publish(topicOne, JSON.toJSONString(view3dService.getSafetyIndexInfoByDate(orgCode, dateString)));
// 消防安全
String topicTow = String.format("/%s/%s/%s", serviceName, "yinan","data/refresh/fireSafety");
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("risk", orgCode)));
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("check", orgCode)));
webMqttComponent.publish(topicTow, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("fire", orgCode)));
// 一周安全趋势
String topicThree = String.format("/%s/%s/%s/%s", serviceName, "yinan","data/refresh","weekSafetyIndex");
webMqttComponent.publish(topicThree, JSON.toJSONString(view3dService.getSafetyIndexWeek(orgCode)));
}catch (Exception e) {
log.error("数据获取失败", e);
}
} }
private void updateParentRpn(long parentId) { private void updateParentRpn(long parentId) {
...@@ -1704,6 +1820,5 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1704,6 +1820,5 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
return null; return null;
} }
} }
...@@ -570,10 +570,11 @@ public class View3dServiceImpl implements IView3dService { ...@@ -570,10 +570,11 @@ public class View3dServiceImpl implements IView3dService {
} }
@Override @Override
public CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product) { public CommonResponse retrieveAll(String type, String riskSourceId, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product) {
CommonPageable pageable = new CommonPageable( current, pageSize); CommonPageable pageable = new CommonPageable( current, pageSize);
Long count = view3dMapper.retrieveAllCount(type,inputText,orgCode,dataLevel,protectObjName); Long riskSource = StringUtils.isEmpty(riskSourceId) ? null : Long.parseLong(riskSourceId);
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName); Long count = view3dMapper.retrieveAllCount(type,riskSource,inputText,orgCode,dataLevel,protectObjName);
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, riskSource,inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName);
Set<Object> userIds = new HashSet<>(); Set<Object> userIds = new HashSet<>();
retrieveAll.forEach(action->{ retrieveAll.forEach(action->{
if(!ObjectUtils.isEmpty(action.get("person"))){ if(!ObjectUtils.isEmpty(action.get("person"))){
......
...@@ -76,7 +76,7 @@ public interface IRiskSourceService { ...@@ -76,7 +76,7 @@ public interface IRiskSourceService {
boolean processTaskData(ProtalDataRo taskData) throws Exception; boolean processTaskData(ProtalDataRo taskData) throws Exception;
void processProtalData(String toke,String product,String appKey,ProtalDataRo protalData) throws Exception; void processProtalData(String toke,String product,String appKey,ProtalDataRo protalData, String orgCode) throws Exception;
RiskSourceTreeResponse queryRiskSourceDetailById(Long id); RiskSourceTreeResponse queryRiskSourceDetailById(Long id);
...@@ -134,7 +134,7 @@ public interface IRiskSourceService { ...@@ -134,7 +134,7 @@ public interface IRiskSourceService {
*/ */
void batchSaveRegionUe4(List<BindRegionBo> regionBoList); void batchSaveRegionUe4(List<BindRegionBo> regionBoList);
void notifyRiskSource(Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo); void notifyRiskSource(String orgCode, Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo);
void notifyFmeaFromDelete(Long handId, String from); void notifyFmeaFromDelete(Long handId, String from);
......
...@@ -148,6 +148,7 @@ public interface IView3dService { ...@@ -148,6 +148,7 @@ public interface IView3dService {
/** /**
* 检索 * 检索
* @param type类型 * @param type类型
* @param riskRourceId
* @param inputText关键字 * @param inputText关键字
* @param dataLevel风险等级 * @param dataLevel风险等级
* @param protectObjName设备名称 * @param protectObjName设备名称
...@@ -156,7 +157,7 @@ public interface IView3dService { ...@@ -156,7 +157,7 @@ public interface IView3dService {
* @param orgCode * @param orgCode
* @return * @return
*/ */
CommonResponse retrieveAll(String type, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product); CommonResponse retrieveAll(String type, String riskRourceId, String inputText, int current, int pageSize,String orgCode,String dataLevel,String protectObjName,String token,String appKey,String product);
/** /**
* 等级查询 * 等级查询
......
...@@ -6,7 +6,9 @@ import javax.servlet.http.HttpServletRequest; ...@@ -6,7 +6,9 @@ import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.component.feign.config.InnerInvokException; import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService; import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.vo.DepartmentBo; import com.yeejoin.amos.fas.business.vo.DepartmentBo;
import com.yeejoin.amos.fas.business.vo.RoleBo;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel; import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Before;
...@@ -86,6 +88,14 @@ public class PermissionAspect { ...@@ -86,6 +88,14 @@ public class PermissionAspect {
ReginParams regionParam = new ReginParams(); ReginParams regionParam = new ReginParams();
if(userModel != null){ if(userModel != null){
userId = userModel.getUserId(); userId = userModel.getUserId();
Map<Long, List<RoleModel>> orgRoles = userModel.getOrgRoles();
List<RoleModel> roleModels = null;
if(!ObjectUtils.isEmpty(orgRoles)) {
for (Map.Entry<Long, List<RoleModel>> entry : orgRoles.entrySet()) {
roleModels = entry.getValue();
break;
}
}
ReginParams reginParams = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(userModel.getUserId(), token)), ReginParams.class); ReginParams reginParams = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(userModel.getUserId(), token)), ReginParams.class);
if(reginParams == null && userModel.getCompanys().size() > 0){ if(reginParams == null && userModel.getCompanys().size() > 0){
CompanyModel companyModel = userModel.getCompanys().get(0); CompanyModel companyModel = userModel.getCompanys().get(0);
...@@ -96,7 +106,9 @@ public class PermissionAspect { ...@@ -96,7 +106,9 @@ public class PermissionAspect {
DepartmentBo departmentBo = convertDepartmentModelToBo(deptList.get(0)); DepartmentBo departmentBo = convertDepartmentModelToBo(deptList.get(0));
regionParam.setCompany(companyBo); regionParam.setCompany(companyBo);
regionParam.setDepartment(departmentBo); regionParam.setDepartment(departmentBo);
regionParam.setRole(null); if(!ObjectUtils.isEmpty(roleModels)){
regionParam.setRole(convertRoleModelToBo(roleModels.get(0)));
}
} }
redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam)); redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam));
} }
...@@ -140,6 +152,16 @@ public class PermissionAspect { ...@@ -140,6 +152,16 @@ public class PermissionAspect {
return companyBo; return companyBo;
} }
private RoleBo convertRoleModelToBo(RoleModel roleModel) {
RoleBo roleBo = new RoleBo();
if(roleModel != null){
roleBo.setRoleName(roleModel.getRoleName());
roleBo.setRoleType(roleModel.getRoleType());
roleBo.setSequenceNbr(roleModel.getSequenceNbr().toString());
}
return roleBo;
}
//redi缓存选择的用户信息 //redi缓存选择的用户信息
private String buildKey(String userId, String token) { private String buildKey(String userId, String token) {
return "region_" + userId + "_" + token; return "region_" + userId + "_" + token;
......
...@@ -1178,7 +1178,7 @@ ...@@ -1178,7 +1178,7 @@
<select id="retrieveAllCount" resultType="long"> <select id="retrieveAllCount" resultType="long">
select count(1) select count(1)
from ( from (
select r.name,r.code,'riskSource' as typeCode,r.org_code as orgCode select r.name,r.code,'riskSource' as typeCode,r.org_code as orgCode, r.id as riskSourceId
from f_risk_source r from f_risk_source r
left join f_risk_level rl ON rl.id = r.risk_level_id left join f_risk_level rl ON rl.id = r.risk_level_id
where r.is_region = 'FALSE' where r.is_region = 'FALSE'
...@@ -1186,14 +1186,14 @@ ...@@ -1186,14 +1186,14 @@
AND rl.level = #{dataLevel} AND rl.level = #{dataLevel}
</if> </if>
UNION all UNION all
select p.name,p.point_no as code,'patrol' as typeCode,p.org_code as orgCode select p.name,p.point_no as code,'patrol' as typeCode,p.org_code as orgCode, p.risk_source_id as riskSourceId
from p_point p from p_point p
WHERE is_delete = FALSE WHERE is_delete = FALSE
UNION all UNION all
select name,code,'impEquipment' as typeCode,org_code as orgCode select name,code,'impEquipment' as typeCode,org_code as orgCode, e.risk_source_id as riskSourceId
from f_equipment e from f_equipment e
UNION all UNION all
select m.name,m.code,'monitorEquipment' as typeCode,m.org_code as orgCode select m.name,m.code,'monitorEquipment' as typeCode,m.org_code as orgCode, m.risk_source_id as riskSourceId
from f_fire_equipment m from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id left join f_equipment f on f.id = fe.equipment_id
...@@ -1202,29 +1202,29 @@ ...@@ -1202,29 +1202,29 @@
AND f.name = #{protectObjName} AND f.name = #{protectObjName}
</if> </if>
UNION all UNION all
select name,code,'video' as typeCode,org_code as orgCode select name,code,'video' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_fire_equipment where equip_classify = 2 from f_fire_equipment where equip_classify = 2
UNION all UNION all
select name,code,'fireEquipment' as typeCode,org_code as orgCode select name,code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_water_resource where type = 1 from f_water_resource where type = 1
UNION all UNION all
select name,code,'fireEquipment' as typeCode,org_code as orgCode select name,code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_water_resource where type = 2 from f_water_resource where type = 2
UNION all UNION all
select name,car_num as code,'fireEquipment' as typeCode,org_code as orgCode select name,car_num as code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_fire_car from f_fire_car
UNION all UNION all
select name,code,'fireEquipment' as typeCode,org_code as orgCode select name,code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_fire_equipment where equip_classify = 3 from f_fire_equipment where equip_classify = 3
UNION all UNION all
select name,code,'fireEquipment' as typeCode,org_code as orgCode select name,code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_fire_station where type = 2 from f_fire_station where type = 2
UNION all UNION all
select name,code,'fireEquipment' as typeCode,org_code as orgCode select name,code,'fireEquipment' as typeCode,org_code as orgCode, risk_source_id as riskSourceId
from f_fire_station where type = 1 from f_fire_station where type = 1
) as tmp ) as tmp
where 1=1 where 1=1
<if test="inputText!=null" > <if test="inputText!=null and inputText != ''" >
AND ( AND (
tmp.code LIKE '%${inputText}%' tmp.code LIKE '%${inputText}%'
OR tmp.name LIKE '%${inputText}%' OR tmp.name LIKE '%${inputText}%'
...@@ -1233,6 +1233,9 @@ ...@@ -1233,6 +1233,9 @@
<if test="type!=null and type!=''"> <if test="type!=null and type!=''">
AND tmp.typeCode = #{type} AND tmp.typeCode = #{type}
</if> </if>
<if test="riskSourceId != null">
AND tmp.riskSourceId = #{riskSourceId}
</if>
<if test="orgCode!=null"> <if test="orgCode!=null">
AND (tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') ) AND (tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') )
</if> </if>
...@@ -1267,7 +1270,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1267,7 +1270,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
r.rpn as title, r.rpn as title,
CONCAT('riskSource-',r.id) as `key` CONCAT('riskSource-',r.id) as `key`,
r.id as riskSourceId
from f_risk_source r from f_risk_source r
left join f_risk_level rl ON rl.id = r.risk_level_id left join f_risk_level rl ON rl.id = r.risk_level_id
where r.is_region = 'FALSE' where r.is_region = 'FALSE'
...@@ -1307,7 +1311,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1307,7 +1311,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
when p.status = '2' then '不合格' when p.status = '2' then '不合格'
when p.status = '3' then '漏检' when p.status = '3' then '漏检'
end as title, end as title,
concat('patrol-',p.id) as `key` concat('patrol-',p.id) as `key`,
p.risk_source_id as riskSourceId
from p_point p from p_point p
WHERE is_delete = FALSE WHERE is_delete = FALSE
UNION all UNION all
...@@ -1338,7 +1343,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1338,7 +1343,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('impEquipment-',e.id) as `key` concat('impEquipment-',e.id) as `key`,
e.risk_source_id as riskSourceId
from f_equipment e from f_equipment e
UNION all UNION all
select concat('monitorEquipment-',m.id) as id,m.id as originId,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode, select concat('monitorEquipment-',m.id) as id,m.id as originId,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
...@@ -1368,7 +1374,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1368,7 +1374,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
m.name as title, m.name as title,
concat('monitorEquipment-',m.id) as `key` concat('monitorEquipment-',m.id) as `key`,
m.risk_source_id as riskSourceId
from f_fire_equipment m from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id left join f_equipment f on f.id = fe.equipment_id
...@@ -1405,7 +1412,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1405,7 +1412,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
m.name as title, m.name as title,
concat('video-',m.id) as `key` concat('video-',m.id) as `key`,
m.risk_source_id as riskSourceId
from f_fire_equipment m from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id left join f_equipment f on f.id = fe.equipment_id
...@@ -1439,7 +1447,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1439,7 +1447,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('hydrant-',id) as `key` concat('hydrant-',id) as `key`,
risk_source_id as riskSourceId
from f_water_resource where type = 1 from f_water_resource where type = 1
UNION all UNION all
select concat('pool-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode, select concat('pool-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
...@@ -1469,7 +1478,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1469,7 +1478,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('pool-',id) as `key` concat('pool-',id) as `key`,
risk_source_id as riskSourceId
from f_water_resource where type = 2 from f_water_resource where type = 2
UNION all UNION all
select concat('fireCar-',id) as id,id as originId,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode, select concat('fireCar-',id) as id,id as originId,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
...@@ -1499,7 +1509,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1499,7 +1509,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('fireCar-',id) as `key` concat('fireCar-',id) as `key`,
risk_source_id as riskSourceId
from f_fire_car from f_fire_car
UNION all UNION all
select concat('fireEquipment-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode, select concat('fireEquipment-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
...@@ -1529,7 +1540,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1529,7 +1540,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('fireEquipment-',id) as `key` concat('fireEquipment-',id) as `key`,
risk_source_id as riskSourceId
from f_fire_equipment where equip_classify = 3 from f_fire_equipment where equip_classify = 3
UNION all UNION all
select concat('fireChamber-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode, select concat('fireChamber-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
...@@ -1559,7 +1571,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1559,7 +1571,8 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('fireChamber-',id) as `key` concat('fireChamber-',id) as `key`,
risk_source_id as riskSourceId
from f_fire_station where type = 2 from f_fire_station where type = 2
UNION all UNION all
select concat('fireFoamRoom-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode, select concat('fireFoamRoom-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
...@@ -1589,11 +1602,12 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1589,11 +1602,12 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
'' as routeName, '' as routeName,
'' as person, '' as person,
name as title, name as title,
concat('fireFoamRoom-',id) as `key` concat('fireFoamRoom-',id) as `key`,
risk_source_id as riskSourceId
from f_fire_station where type = 1 from f_fire_station where type = 1
) as tmp ) as tmp
<where> <where>
<if test="inputText!=null" > <if test="inputText!=null and inputText != ''" >
AND ( AND (
tmp.code LIKE '%${inputText}%' tmp.code LIKE '%${inputText}%'
OR tmp.name LIKE '%${inputText}%' OR tmp.name LIKE '%${inputText}%'
...@@ -1602,6 +1616,9 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue ...@@ -1602,6 +1616,9 @@ from (select concat('riskSource',r.id) as id,r.id as originId,r.name,r.code,r.ue
<if test="type!=null and type!=''"> <if test="type!=null and type!=''">
AND tmp.typeCode = #{type} AND tmp.typeCode = #{type}
</if> </if>
<if test="riskSourceId != null">
AND tmp.riskSourceId = #{riskSourceId}
</if>
<if test="orgCode!=null"> <if test="orgCode!=null">
AND (tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') ) AND (tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') )
</if> </if>
......
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