Commit efa0c03c authored by maoying's avatar maoying

Merge branch 'dev_upgrade' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into upgrade

parents a5757709 f34a5d86
package com.yeejoin.amos.fas.dao.entity;
import java.util.Date;
import com.yeejoin.amos.fas.core.common.request.DateUtil;
/**
*
* <pre>
* RO基础信息
* </pre>
*
* @author amos
* @version $Id: BasicsRo.java, v 0.1 2019年5月22日 上午10:44:22 amos Exp $
*/
public class MessageRo extends BusinessEntity
{
//TODO 添加批次号字段
/**
* 批次号,标记规则执行批次
*/
private String batchNo;
/**
* 所要执行的规则包id
*/
private String packageId;
/**
* <pre>
*
* </pre>
*/
private static final long serialVersionUID = -2678718393223476996L;
/**
* id
*/
private String id;
/**
* 当前时间
*/
private Date dateTime = DateUtil.getNow();
/**
* 当前时间
*/
private String currTime;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public Date getDateTime()
{
if (dateTime == null)
{
return DateUtil.getNow();
}
return dateTime;
}
public void setDateTime(Date dateTime)
{
this.dateTime = dateTime;
}
public String getCurrTime()
{
if (currTime == null)
{
return DateUtil.getDateTimeFormat(dateTime);
}
return currTime;
}
public void setCurrTime(String currTime)
{
this.currTime = currTime;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getPackageId() {
return packageId;
}
public void setPackageId(String packageId) {
this.packageId = packageId;
}
}
\ No newline at end of file
...@@ -23,7 +23,7 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse; ...@@ -23,7 +23,7 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse;
@Component @Component
public class BubbleTipAction implements CustomerAction public class BubbleTipAction implements CustomerAction
{ {
private static String PACKAGEURL = "com.yeejoin.amos.rule.map.action.result.message."; private static String PACKAGEURL = "com.yeejoin.amos.fas.business.action.result.message.";
//@ExposeAction("气泡提示") //@ExposeAction("气泡提示")
public void sendBubbleTip(Object bizobj, Boolean showInfo, Object title, String type) public void sendBubbleTip(Object bizobj, Boolean showInfo, Object title, String type)
......
...@@ -22,7 +22,7 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse; ...@@ -22,7 +22,7 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse;
@Component @Component
public class RiskSituationAction implements CustomerAction public class RiskSituationAction implements CustomerAction
{ {
private static String PACKAGEURL = "com.yeejoin.amos.rule.map.action.result.message."; private static String PACKAGEURL = "com.yeejoin.amos.fas.business.action.result.message.";
//@ExposeAction("气泡提示") //@ExposeAction("气泡提示")
public void sendBubbleTip(Object bizobj, Boolean showInfo, String title) public void sendBubbleTip(Object bizobj, Boolean showInfo, String title)
......
...@@ -14,10 +14,11 @@ import com.yeejoin.amos.fas.business.action.result.ActionResult; ...@@ -14,10 +14,11 @@ import com.yeejoin.amos.fas.business.action.result.ActionResult;
import com.yeejoin.amos.fas.business.action.result.TipResult; import com.yeejoin.amos.fas.business.action.result.TipResult;
import com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage; import com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage;
import com.yeejoin.amos.fas.business.action.util.DataItemUtil; import com.yeejoin.amos.fas.business.action.util.DataItemUtil;
import com.yeejoin.amos.fas.business.service.model.BasicsRo; import com.yeejoin.amos.fas.business.service.intfc.IMessageService;
import com.yeejoin.amos.fas.business.service.model.ToipResponse; import com.yeejoin.amos.fas.business.service.model.ToipResponse;
import com.yeejoin.amos.fas.dao.entity.BusinessEntity; import com.yeejoin.amos.fas.dao.entity.BusinessEntity;
import com.yeejoin.amos.fas.dao.entity.Message; import com.yeejoin.amos.fas.dao.entity.Message;
import com.yeejoin.amos.fas.dao.entity.MessageRo;
/** /**
* *
* <pre> * <pre>
...@@ -30,71 +31,72 @@ import com.yeejoin.amos.fas.dao.entity.Message; ...@@ -30,71 +31,72 @@ import com.yeejoin.amos.fas.dao.entity.Message;
@Component @Component
public class SimpleTipAction implements CustomerAction public class SimpleTipAction implements CustomerAction
{ {
private static String PACKAGEURL = "com.yeejoin.amos.rule.map.action.result.message."; private static String PACKAGEURL = "com.yeejoin.amos.fas.business.action.result.message.";
// @Autowired
// private IMessageService messageService; @Autowired
private IMessageService messageService;
//@ExposeAction("消息提示") //@ExposeAction("消息提示")
// public void sendMessageTip(Object bizobj, String title, String content,String type) public void sendMessageTip(Object bizobj, String title, String content,String type)
// { {
//
// try try
// { {
//
// ELEvaluationContext.setVariable("bizobj",bizobj); ELEvaluationContext.setVariable("bizobj",bizobj);
// TipResult result = new TipResult(); TipResult result = new TipResult();
// result.add(bizobj); result.add(bizobj);
// Map<String, Object> tempmap1 = new HashMap<>(); Map<String, Object> tempmap1 = new HashMap<>();
// tempmap1.put("title", title); tempmap1.put("title", title);
// result.add(tempmap1); result.add(tempmap1);
// Map<String, Object> tempmap2 = new HashMap<>(); Map<String, Object> tempmap2 = new HashMap<>();
// content =DataItemUtil.getNative(content); content =DataItemUtil.getNative(content);
// tempmap2.put("content", content); tempmap2.put("content", content);
// result.add(tempmap2); result.add(tempmap2);
//
//
// Constructor<?> constructor; Constructor<?> constructor;
//
// constructor = Class.forName( constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message") PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class); .getConstructor(ActionResult.class);
// ActionResultMessage<?> action = (ActionResultMessage<?>) constructor.newInstance(result); ActionResultMessage<?> action = (ActionResultMessage<?>) constructor.newInstance(result);
// String firstStr = "fromws"; String firstStr = "fromws";
// String secondStr = "global"; String secondStr = "global";
// String thirdStr = "msg"; String thirdStr = "msg";
// result.setBizObj((BusinessEntity)bizobj); result.setBizObj((BusinessEntity)bizobj);
// Object obj = action.execute(firstStr, secondStr, thirdStr); Object obj = action.execute(firstStr, secondStr, thirdStr);
// result.setToipResponse((ToipResponse) obj); result.setToipResponse((ToipResponse) obj);
// saveMessageAction(result,type); saveMessageAction(result,type);
// } }
// catch (Exception e) catch (Exception e)
// { {
// // TODO Auto-generated catch block // TODO Auto-generated catch block
// e.printStackTrace(); e.printStackTrace();
// } }
// } }
// @SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// private void saveMessageAction(AbstractActionResult abstractActionResult,String type) private void saveMessageAction(AbstractActionResult abstractActionResult,String type)
// { {
// Message message = new Message(); Message message = new Message();
// List<Map<String, Object>> list = (List<Map<String, Object>>) abstractActionResult.getData(); List<Map<String, Object>> list = (List<Map<String, Object>>) abstractActionResult.getData();
// for(Map<String, Object> map : list) { for(Map<String, Object> map : list) {
// for(String str: map.keySet()) { for(String str: map.keySet()) {
// if(str.equals("content")) { if(str.equals("content")) {
// message.setContent(map.get("content").toString()); message.setContent(map.get("content").toString());
// }else }else
// if (str.equals("title")) if (str.equals("title"))
// { {
// message.setTitle(map.get("title").toString()); message.setTitle(map.get("title").toString());
// } }
// } }
// BasicsRo basicsRo = (BasicsRo)abstractActionResult.getToipResponse().getBizObj(); MessageRo messageRo = (MessageRo)abstractActionResult.getToipResponse().getBizObj();
// message.setTime(basicsRo.getDateTime()); message.setTime(messageRo.getDateTime());
// message.setBizId(basicsRo.getId()); message.setBizId(messageRo.getId());
// message.setBizclassName(abstractActionResult.getToipResponse().getBizObj().getClass().toString()); message.setBizclassName(abstractActionResult.getToipResponse().getBizObj().getClass().toString());
// message.setType(type); message.setType(type);
// messageService.save(message); messageService.save(message);
// } }
// } }
} }
package com.yeejoin.amos.fas.business.controller;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/5/27 15:26
*/
@RestController
@RequestMapping("/api/login")
@Api("免密登录api")
public class AvoidLoginController extends BaseController{
@Value("${oauth2.accessToken}")
private String checkAccessToken;
@Value("${oauth2.password}")
private String password;
@Autowired
private RemoteSecurityService remoteSecurityService;
@ApiOperation(httpMethod = "GET",value = "免密登录获取token", notes = "免密登录获取token")
@RequestMapping(value = "/avoid/{loginId}/{accessToken}/{expireTime}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse avoidLogin(@PathVariable String loginId, @PathVariable String accessToken, @PathVariable Integer expireTime) {
if (accessToken.equals(checkAccessToken)){
Toke toke = remoteSecurityService.avoidLogin(loginId, password, expireTime);
return CommonResponseUtil.success(toke);
}
return CommonResponseUtil.failure("令牌不正确");
}
}
...@@ -174,4 +174,6 @@ public class CommonController extends BaseController { ...@@ -174,4 +174,6 @@ public class CommonController extends BaseController {
List<AgencyUserModel> users = commonService.getAllUser(getToken(),getProduct(),getAppKey(), compCode); List<AgencyUserModel> users = commonService.getAllUser(getToken(),getProduct(),getAppKey(), compCode);
return CommonResponseUtil.success(users); return CommonResponseUtil.success(users);
} }
} }
...@@ -24,9 +24,6 @@ public class CurCompanyController extends BaseController { ...@@ -24,9 +24,6 @@ public class CurCompanyController extends BaseController {
map.put("company", getSelectedOrgInfo().getCompany()); map.put("company", getSelectedOrgInfo().getCompany());
map.put("department", getSelectedOrgInfo().getDepartment()); map.put("department", getSelectedOrgInfo().getDepartment());
return CommonResponseUtil.success(map); return CommonResponseUtil.success(map);
} }
} }
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam;
import com.yeejoin.amos.fas.business.param.WaterResourceParam; import com.yeejoin.amos.fas.business.param.WaterResourceParam;
import com.yeejoin.amos.fas.business.service.intfc.IExcelService; import com.yeejoin.amos.fas.business.service.intfc.IExcelService;
import com.yeejoin.amos.fas.business.util.FileHelper; import com.yeejoin.amos.fas.business.util.FileHelper;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil; import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -57,7 +58,9 @@ public class ExcelController extends BaseController { ...@@ -57,7 +58,9 @@ public class ExcelController extends BaseController {
if (fileName.endsWith(".xls") || fileName.endsWith(".xlsx")) { if (fileName.endsWith(".xls") || fileName.endsWith(".xlsx")) {
try { try {
List<FireEquipmentPointParam> list = FileHelper.importExcel(file, 1, 1, FireEquipmentPointParam.class); List<FireEquipmentPointParam> list = FileHelper.importExcel(file, 1, 1, FireEquipmentPointParam.class);
iExcelService.importFireEquipmentPoint(list); ReginParams reginParams =getSelectedOrgInfo();
String orgCode=getOrgCode(reginParams);
iExcelService.importFireEquipmentPoint(list, orgCode,getUserId());
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} catch (Exception e) { } catch (Exception e) {
logger.info("导入装备监测点数据", e); logger.info("导入装备监测点数据", e);
......
package com.yeejoin.amos.fas.business.controller; package com.yeejoin.amos.fas.business.controller;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper;
import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity; import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity;
import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService; import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
import com.yeejoin.amos.fas.business.vo.ReginParams; import com.yeejoin.amos.fas.business.vo.ReginParams;
...@@ -38,7 +39,8 @@ public class FireEquimtPointController extends BaseController { ...@@ -38,7 +39,8 @@ public class FireEquimtPointController extends BaseController {
@Autowired @Autowired
private IFireEquipPontService fireEquipPontService; private IFireEquipPontService fireEquipPontService;
@Autowired
private FireEquipPointMapper fireEquipPointMapper;
@ApiOperation(httpMethod = "POST", value = "添加风险点", notes = "添加风险点") @ApiOperation(httpMethod = "POST", value = "添加风险点", notes = "添加风险点")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
...@@ -55,6 +57,14 @@ public class FireEquimtPointController extends BaseController { ...@@ -55,6 +57,14 @@ public class FireEquimtPointController extends BaseController {
fireEquipmentPoint.setOrgCode(compCode); fireEquipmentPoint.setOrgCode(compCode);
fireEquipmentPoint.setCreateBy(getUserId()); fireEquipmentPoint.setCreateBy(getUserId());
fireEquipmentPoint.setCreateDate(new Date()); fireEquipmentPoint.setCreateDate(new Date());
//根据编号查询监测点
FireEquipmentPointEntity pointEntity = fireEquipPointMapper.getByCode(fireEquipmentPoint.getCode());
if (pointEntity != null) {
return CommonResponseUtil.failure("监测点编号已经存在");
}
return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint)); return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint));
} }
...@@ -143,6 +153,10 @@ public class FireEquimtPointController extends BaseController { ...@@ -143,6 +153,10 @@ public class FireEquimtPointController extends BaseController {
if (fireEquipmentPointEntity.getFireEquipmentId() == null) { if (fireEquipmentPointEntity.getFireEquipmentId() == null) {
fireEquipmentPointEntity.setFireEquipmentId(0L); fireEquipmentPointEntity.setFireEquipmentId(0L);
} }
return fireEquipPontService.save(fireEquipmentPointEntity); return fireEquipPontService.save(fireEquipmentPointEntity);
} }
......
package com.yeejoin.amos.fas.business.dao.mapper;
import java.util.List;
import com.yeejoin.amos.fas.dao.entity.Message;
public interface MessageMapper extends BaseMapper {
void save(Message msg);
List<Message> findMessageByBizId(String bizId);
}
...@@ -27,4 +27,10 @@ public interface IContingencyOriginalDataDao extends BaseDao<ContingencyOrigina ...@@ -27,4 +27,10 @@ public interface IContingencyOriginalDataDao extends BaseDao<ContingencyOrigina
int updateByButton(String confirm,Boolean runstep,String stepState,String batchNo); int updateByButton(String confirm,Boolean runstep,String stepState,String batchNo);
@Transactional
@Modifying(clearAutomatically = true)
@Query(value = "update contingency_original_data c set c.step = ?1 where c.batch_No = ?2",nativeQuery = true)
int updateByButtonStep(String step,String batchNo);
} }
package com.yeejoin.amos.fas.business.dao.repository;
import com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData;
public interface IMessageDao extends BaseDao<ContingencyOriginalData, String> {
}
...@@ -164,11 +164,33 @@ public class RemoteSecurityService { ...@@ -164,11 +164,33 @@ public class RemoteSecurityService {
} }
/**
* 免密登录
* @return
*/
public Toke avoidLogin(String loginId, String password, Integer expireTime){
StationAuthModel stationAuthModel=new StationAuthModel();
stationAuthModel.setLoginId(loginId);
stationAuthModel.setPassword(password);
stationAuthModel.setExpireTime(expireTime);
Map map=null;
FeignClientResult feignClientResult;
Toke oked=new Toke();
try {
RequestContext.setProduct(productWeb);
feignClientResult = Privilege.authClient.idpasswordStation(stationAuthModel);
//Privilege.authClient.idpasswordStation();
map = (Map) feignClientResult.getResult();
if(map!=null){
oked.setToke(map.get("token").toString());
oked.setProduct(productWeb);
oked.setAppKey(appKeyWeb);
}
} catch (InnerInvokException e) {
e.printStackTrace();
}
return oked;
}
/* public List<UserModel> listUserByRoleIds(String roleIds) { /* public List<UserModel> listUserByRoleIds(String roleIds) {
CommonResponse commonResponse = iAmosSecurityServer.listUserByRoleIds(roleIds); CommonResponse commonResponse = iAmosSecurityServer.listUserByRoleIds(roleIds);
......
package com.yeejoin.amos.fas.business.param; package com.yeejoin.amos.fas.business.param;
import java.util.Date;
import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.Excel;
public class FireEquipmentPointParam { public class FireEquipmentPointParam {
...@@ -32,6 +34,51 @@ public class FireEquipmentPointParam { ...@@ -32,6 +34,51 @@ public class FireEquipmentPointParam {
@Excel(name = "告警类型", replace = {"火灾告警_1", "电源开关_2", "换流变_6", "液位_3", "流量_4", "容量_5", "故障告警_7"}, orderNum = "8") @Excel(name = "告警类型", replace = {"火灾告警_1", "电源开关_2", "换流变_6", "液位_3", "流量_4", "容量_5", "故障告警_7"}, orderNum = "8")
private Long alarmType; private Long alarmType;
//增加所属公司orgcode
private String orgCode;
private String createBy ;
private Date createDate =new Date();
private String remark ;
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public Long getId() { public Long getId() {
return id; return id;
} }
......
...@@ -71,7 +71,7 @@ public class ExcelServiceImpl implements IExcelService { ...@@ -71,7 +71,7 @@ public class ExcelServiceImpl implements IExcelService {
@Transactional @Transactional
@Override @Override
public void importFireEquipmentPoint(List<FireEquipmentPointParam> list) { public void importFireEquipmentPoint(List<FireEquipmentPointParam> list,String orgCode,String userid) {
Set<String> equipmentCodeSet = Sets.newHashSet(Lists.transform(list, FireEquipmentPointParam::getFireEquipmentCode)); Set<String> equipmentCodeSet = Sets.newHashSet(Lists.transform(list, FireEquipmentPointParam::getFireEquipmentCode));
List<FireEquipmentEntity> equipments = fireEquipMapper.listByCodes(equipmentCodeSet); List<FireEquipmentEntity> equipments = fireEquipMapper.listByCodes(equipmentCodeSet);
Map<String, FireEquipmentEntity> equipmentMap = Maps.uniqueIndex(equipments, FireEquipmentEntity::getCode); Map<String, FireEquipmentEntity> equipmentMap = Maps.uniqueIndex(equipments, FireEquipmentEntity::getCode);
...@@ -90,6 +90,11 @@ public class ExcelServiceImpl implements IExcelService { ...@@ -90,6 +90,11 @@ public class ExcelServiceImpl implements IExcelService {
} else { } else {
point.setFireEquipmentId(0L); point.setFireEquipmentId(0L);
} }
//设置orgcode
point.setOrgCode(orgCode);
point.setCreateBy(userid);
if (pointEntity == null) { if (pointEntity == null) {
saveList.add(point); saveList.add(point);
} else { } else {
......
package com.yeejoin.amos.fas.business.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.fas.business.dao.mapper.MessageMapper;
import com.yeejoin.amos.fas.business.service.intfc.IMessageService;
import com.yeejoin.amos.fas.dao.entity.Message;
@Service
public class MessageServiceImpl implements IMessageService {
@Autowired
MessageMapper messageMapper;
@Override
public List<Message> findMessageByBizId(String bizId) {
return messageMapper.findMessageByBizId(bizId);
}
@Override
public void save(Message msg) {
messageMapper.save(msg);
}
}
...@@ -7,6 +7,7 @@ import com.google.common.base.Joiner; ...@@ -7,6 +7,7 @@ import com.google.common.base.Joiner;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.fas.business.bo.*; import com.yeejoin.amos.fas.business.bo.*;
import com.yeejoin.amos.fas.business.constants.FasConstant; import com.yeejoin.amos.fas.business.constants.FasConstant;
import com.yeejoin.amos.fas.business.dao.mapper.*; import com.yeejoin.amos.fas.business.dao.mapper.*;
...@@ -40,6 +41,8 @@ import com.yeejoin.amos.fas.dao.entity.*; ...@@ -40,6 +41,8 @@ import com.yeejoin.amos.fas.dao.entity.*;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel; import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -53,6 +56,7 @@ import org.springframework.stereotype.Service; ...@@ -53,6 +56,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.component.cache.Redis; import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.component.cache.enumeration.CacheType; import org.typroject.tyboot.component.cache.enumeration.CacheType;
...@@ -149,6 +153,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -149,6 +153,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Autowired @Autowired
private RuleTrigger ruleTrigger;
@Autowired
private FmeaEquipmentPointMapper fmeaEquipmentPointMapper; private FmeaEquipmentPointMapper fmeaEquipmentPointMapper;
@Autowired @Autowired
...@@ -485,7 +492,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -485,7 +492,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(), equipment.getName()); //Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(), equipment.getName());
// ruleTrigger.publish(contingencyRo, equipment.getReservePlan()); ruleTrigger.publish(contingencyRo, equipment.getReservePlan(),ArrayUtils.toArray( equipment.getName()));
ContingencyOriginalData contingencyOriginalData = new ContingencyOriginalData(); ContingencyOriginalData contingencyOriginalData = new ContingencyOriginalData();
BeanUtils.copyProperties(contingencyRo, contingencyOriginalData); BeanUtils.copyProperties(contingencyRo, contingencyOriginalData);
iContingencyOriginalDataDao.save(contingencyOriginalData); iContingencyOriginalDataDao.save(contingencyOriginalData);
...@@ -534,17 +541,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -534,17 +541,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
content = fmeaPointInputitemMapper.listByFmeaId(fmeaId, pageNumber, pageSize); content = fmeaPointInputitemMapper.listByFmeaId(fmeaId, pageNumber, pageSize);
if(!CollectionUtils.isEmpty(content)){ if(!CollectionUtils.isEmpty(content)){
Set<String> userIds = new HashSet<>(); Set<Object> userIds = content.stream().filter(x -> !StringUtils.isEmpty(x.get("userId"))).map(arg0 -> arg0.get("userId")).collect(Collectors.toSet());
Set<String> deptIds = new HashSet<>(); Set<Object> deptIds = content.stream().filter(x -> !StringUtils.isEmpty(x.get("deptId"))).map(arg0 -> arg0.get("deptId")).collect(Collectors.toSet());
for(Map<String, Object> map : content)
{
String userId = String.valueOf(map.get("userId"));
String deptId = String.valueOf(map.get("deptId"));
userIds.add(userId);
deptIds.add(deptId);
}
userIds.remove(null);
deptIds.remove(null);
List<AgencyUserModel> users = new ArrayList<>(); List<AgencyUserModel> users = new ArrayList<>();
if(!CollectionUtils.isEmpty(userIds)){ if(!CollectionUtils.isEmpty(userIds)){
users = remoteSecurityService.listUserByUserIds(toke, product, appKey, Joiner.on(",").join(userIds)); users = remoteSecurityService.listUserByUserIds(toke, product, appKey, Joiner.on(",").join(userIds));
......
...@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON; ...@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.gson.JsonObject;
import com.yeejoin.amos.fas.business.bo.BindPointBo; import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.bo.CheckErrorBo; import com.yeejoin.amos.fas.business.bo.CheckErrorBo;
import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo; import com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo;
...@@ -44,6 +45,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable; ...@@ -44,6 +45,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.business.vo.*; import com.yeejoin.amos.fas.business.vo.*;
import com.yeejoin.amos.fas.common.enums.*; import com.yeejoin.amos.fas.common.enums.*;
import com.yeejoin.amos.fas.core.common.request.DateUtil; import com.yeejoin.amos.fas.core.common.request.DateUtil;
import com.yeejoin.amos.fas.core.common.response.CoordDTO;
import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse; import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse; import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
...@@ -581,14 +583,21 @@ public class View3dServiceImpl implements IView3dService { ...@@ -581,14 +583,21 @@ public class View3dServiceImpl implements IView3dService {
List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName); List<HashMap<String, Object>> retrieveAll = view3dMapper.retrieveAll(type, inputText,pageable.getOffset(),pageable.getPageSize(),orgCode,dataLevel,protectObjName);
retrieveAll.stream().forEach(e->{ retrieveAll.stream().forEach(e->{
String person = (String)e.get("person"); String person = (String)e.get("person");
String positionDTO = (String)e.get("positionDTO");
JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location"))); JSONArray ue4Location = this.getInitJSONArray(String.valueOf(e.get("ue4Location")));
JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation"))); JSONArray ue4Rotation = this.getInitJSONArray(String.valueOf(e.get("ue4Rotation")));
if(person != null && !person.equals("")) { if(person != null && !person.equals("")) {
AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person); AgencyUserModel user = remoteSecurityService.getUserById(token, product, appKey, person);
e.put("person", user != null ? user.getRealName() : ""); e.put("person", user != null ? user.getRealName() : "");
} }
CoordDTO position = null;
if(positionDTO != null && !positionDTO.equals("")) {
position = JSONObject.parseObject(positionDTO, CoordDTO.class);
}
e.put("position",position);
e.put("ue4Location",ue4Location); e.put("ue4Location",ue4Location);
e.put("ue4Rotation",ue4Rotation); e.put("ue4Rotation",ue4Rotation);
e.put("showInfo",true);
}); });
Page result = new PageImpl(retrieveAll,pageable,count); Page result = new PageImpl(retrieveAll,pageable,count);
return CommonResponseUtil.success(result); return CommonResponseUtil.success(result);
......
package com.yeejoin.amos.fas.business.service.intfc; package com.yeejoin.amos.fas.business.service.intfc;
import java.util.List;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
public interface IContingencyInstance { public interface IContingencyInstance {
//
// ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon); ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon);
//
//
//
// List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) throws Exception; List<ContingencyPlanInstance> queryForTimeLine(String instanceNo,String recordType) throws Exception;
//
//
// void setButtonExecuted(String batchNo,String contingencyPlanId,String code,String buttonState) throws Exception; void setButtonExecuted(String batchNo,String contingencyPlanId,String code,String buttonState) throws Exception;
// void setButtonWait(String batchNo,String contingencyPlanId,String buttonState) throws Exception; void setButtonWait(String batchNo,String contingencyPlanId,String buttonState) throws Exception;
//
//
// void fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception; void fire(String batchNo,String stepCode, String contingencyPlanId, String buttonCode,String buttonState,String stepStateOnbutton) throws Exception;
//
// void updateStep(String step, String batchNo); void updateStep(String step, String batchNo);
} }
...@@ -11,7 +11,7 @@ public interface IExcelService { ...@@ -11,7 +11,7 @@ public interface IExcelService {
void importFireEquipment(List<FireEquipmentParam> list); void importFireEquipment(List<FireEquipmentParam> list);
void importFireEquipmentPoint(List<FireEquipmentPointParam> list); void importFireEquipmentPoint(List<FireEquipmentPointParam> list,String orgcode,String uid);
List<?> exportPointData(Map<String, Object> paramsMap); List<?> exportPointData(Map<String, Object> paramsMap);
......
package com.yeejoin.amos.fas.business.service.intfc;
import java.util.List;
import com.yeejoin.amos.fas.dao.entity.Message;
public interface IMessageService
{
List<Message> findMessageByBizId(String bizId);
void save(Message msg);
}
...@@ -3,6 +3,9 @@ security.loginId=tw3 ...@@ -3,6 +3,9 @@ security.loginId=tw3
security.productWeb=CONVERTER_STATION_WEB security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION security.appKeyWeb=CONVERTER_STATION
oauth2.accessToken=my
oauth2.password=a123456
#environment #environment
#spring.profiles.active = dev #spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.3.75:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.3.75:10001/eureka/
......
...@@ -3,6 +3,9 @@ security.loginId=tw3 ...@@ -3,6 +3,9 @@ security.loginId=tw3
security.productWeb=CONVERTER_STATION_WEB security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION security.appKeyWeb=CONVERTER_STATION
oauth2.accessToken=my
oauth2.password=a123456
#environment #environment
#spring.profiles.active = dev #spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/
......
...@@ -3,6 +3,9 @@ security.loginId=tw3 ...@@ -3,6 +3,9 @@ security.loginId=tw3
security.productWeb=CONVERTER_STATION_WEB security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION security.appKeyWeb=CONVERTER_STATION
oauth2.accessToken=my
oauth2.password=a123456
#environment #environment
#spring.profiles.active = dev #spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
......
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
fire_equipment_id, fire_equipment_id,
type, type,
unit, unit,
alarm_type alarm_type,
org_code,
create_by
) )
values values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
...@@ -113,7 +115,9 @@ ...@@ -113,7 +115,9 @@
#{item.fireEquipmentId}, #{item.fireEquipmentId},
#{item.type}, #{item.type},
#{item.unit}, #{item.unit},
#{item.alarmType} #{item.alarmType},
#{item.orgCode},
#{item.createBy}
) )
</foreach> </foreach>
</insert> </insert>
......
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.MessageMapper">
<select id="findMessageByBizId" resultType="com.yeejoin.amos.fas.dao.entity.Message" >
SELECT
id,
time,
title,
content,
type,
sender,
receiver,
reader,
biz_id AS bizId,
bizclass_name AS bizclassName,
create_date AS createDate,
create_user AS createUser,
update_date AS updateDate,
update_user AS updateUser,
is_delete AS isDelete
FROM toip_sys_message WHERE biz_id=#{bizId}
</select>
<insert id="save" >
INSERT INTO toip_sys_message (id,time,title,content,type,sender,receiver,reader,biz_id,bizclass_name)
VALUES(#{id},#{time},#{title},#{content},#{type},#{sender},#{receiver},#{reader},#{bizId},#{bizclassName})
</insert>
</mapper>
\ No newline at end of file
...@@ -375,12 +375,13 @@ ...@@ -375,12 +375,13 @@
frcl.create_date = #{date} frcl.create_date = #{date}
</select> </select>
<select id="countCheckException" resultType="long"> <select id="countCheckException" resultType="long">
select count(1) from select count(distinct pt.point_id) from
( (
SELECT SELECT
a.id, a.id,
DATE_FORMAT(b.begin_time,'%Y-%m-%d') as begin_date, DATE_FORMAT(b.begin_time,'%Y-%m-%d') as begin_date,
DATE_FORMAT(b.end_time,'%Y-%m-%d') as end_date DATE_FORMAT(b.end_time,'%Y-%m-%d') as end_date,
a.point_id
FROM `p_plan_task_detail` a , p_plan_task b FROM `p_plan_task_detail` a , p_plan_task b
where where
a.task_no = b.id a.task_no = b.id
...@@ -1018,8 +1019,8 @@ ...@@ -1018,8 +1019,8 @@
<select id="retrieveAll" resultType="java.util.HashMap"> <select id="retrieveAll" resultType="java.util.HashMap">
select *,'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,'{ "x": 1, "y": 1, "z": 1 }' scaleDTO select *,'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,'{ "x": 1, "y": 1, "z": 1 }' scaleDTO
from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode, from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
rl.name as level,CONCAT('level_',rl.level) as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode, rl.level as level,rl.name as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
CASE CASE
WHEN ( WHEN (
ISNULL(r.position3d) || LENGTH(trim(r.position3d)) <![CDATA[ <]]> 1 ISNULL(r.position3d) || LENGTH(trim(r.position3d)) <![CDATA[ <]]> 1
...@@ -1044,7 +1045,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1044,7 +1045,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title r.rpn as title,
CONCAT('riskSource-',r.id) as `key`
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'
...@@ -1052,7 +1054,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1052,7 +1054,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND rl.level = #{dataLevel} AND rl.level = #{dataLevel}
</if> </if>
UNION all UNION all
select p.id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode, select concat('patrol-',p.id) as id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode, p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1083,11 +1085,12 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1083,11 +1085,12 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
when p.status = '1' then '合格' when p.status = '1' then '合格'
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`
from p_point p from p_point p
WHERE is_delete = FALSE WHERE is_delete = FALSE
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode, select concat('impEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode, 0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1113,10 +1116,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1113,10 +1116,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('impEquipment-',e.id) as `key`
from f_equipment e from f_equipment e
UNION all UNION all
select m.id,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.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode, m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1142,7 +1146,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1142,7 +1146,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName, f.name as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title m.name as title,
concat('monitorEquipment-',m.id) as `key`
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
...@@ -1151,7 +1156,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1151,7 +1156,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND f.name = #{protectObjName} AND f.name = #{protectObjName}
</if> </if>
UNION all UNION all
select m.id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode, select concat('video-',m.id) as id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'摄像头' as typeName,'video' as typeCode, m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'摄像头' as typeName,'video' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1177,14 +1182,15 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1177,14 +1182,15 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName, f.name as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title m.name as title,
concat('video-',m.id) as `key`
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
where m.equip_classify = 2 where m.equip_classify = 2
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode, select concat('hydrant-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1210,10 +1216,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1210,10 +1216,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('hydrant-',id) as `key`
from f_water_resource where type = 1 from f_water_resource where type = 1
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode, select concat('pool-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1239,10 +1246,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1239,10 +1246,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('pool-',id) as `key`
from f_water_resource where type = 2 from f_water_resource where type = 2
UNION all UNION all
select id,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,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1268,10 +1276,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1268,10 +1276,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireCar-',id) as `key`
from f_fire_car from f_fire_car
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode, select concat('fireEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
equip_status as level , concat('level_',equip_status) as levelStr,is_indoor as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode, equip_status as level , concat('level_',equip_status) as levelStr,is_indoor as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1297,10 +1306,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1297,10 +1306,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireEquipment-',id) as `key`
from f_fire_equipment where equip_classify = 3 from f_fire_equipment where equip_classify = 3
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode, select concat('fireChamber-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1326,10 +1336,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1326,10 +1336,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireChamber-',id) as `key`
from f_fire_station where type = 2 from f_fire_station where type = 2
UNION all UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode, select concat('fireFoamRoom-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode, 0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode,
CASE CASE
WHEN ( WHEN (
...@@ -1355,7 +1366,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ...@@ -1355,7 +1366,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName, '' as protectObjName,
'' as routeName, '' as routeName,
'' as person, '' as person,
'' as title name as title,
concat('fireFoamRoom-',id) as `key`
from f_fire_station where type = 1 from f_fire_station where type = 1
) as tmp ) as tmp
where 1=1 where 1=1
......
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