Commit 02e54929 authored by chenzhao's avatar chenzhao

修改装备二维码颜色及状态

parent 41879898
...@@ -91,6 +91,7 @@ public class EquipmentSpecificController extends AbstractBaseController { ...@@ -91,6 +91,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
return equipmentSpecificSerivce.getSourceNameByEquipSpeId(id); return equipmentSpecificSerivce.getSourceNameByEquipSpeId(id);
} }
/** /**
* 通过id获取设备区域建筑等信息 * 通过id获取设备区域建筑等信息
* *
...@@ -405,6 +406,14 @@ public class EquipmentSpecificController extends AbstractBaseController { ...@@ -405,6 +406,14 @@ public class EquipmentSpecificController extends AbstractBaseController {
return CommonResponseUtil.success(equipmentSpecificSerivce.getFireAutoSysInfo(startDate, endDate)); return CommonResponseUtil.success(equipmentSpecificSerivce.getFireAutoSysInfo(startDate, endDate));
} }
@GetMapping(value = "/status/equip")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "修改装备二维码状态", notes = "修改装备二维码状态")
public ResponseModel updateEquipSpecificStatus( String status, String id){
equipmentSpecificSerivce.updateEquipSpecificStatus(status, id);
return CommonResponseUtil.success();
}
@GetMapping(value = "/info/paomo") @GetMapping(value = "/info/paomo")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询泡沫系统指标", notes = "查询泡沫系统指标") @ApiOperation(httpMethod = "GET", value = "查询泡沫系统指标", notes = "查询泡沫系统指标")
......
...@@ -260,4 +260,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -260,4 +260,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Map<String, Object> getStationCode(@Param("id")Long id); Map<String, Object> getStationCode(@Param("id")Long id);
void updateEquipSpecificStatus(String status,String id);
} }
...@@ -285,4 +285,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> { ...@@ -285,4 +285,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
Map<String,Object> getStationCode(Long id); Map<String,Object> getStationCode(Long id);
void updateEquipSpecificStatus(String status, String id);
} }
...@@ -2094,4 +2094,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -2094,4 +2094,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return equipmentSpecificMapper.getStationCode(id); return equipmentSpecificMapper.getStationCode(id);
} }
@Override
public void updateEquipSpecificStatus(String status, String id){
equipmentSpecificMapper.updateEquipSpecificStatus(status,id);
}
} }
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.patrol.business.constants.XJConstant; import com.yeejoin.amos.patrol.business.constants.XJConstant;
import com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper; import com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper;
import com.yeejoin.amos.patrol.business.dto.*; import com.yeejoin.amos.patrol.business.dto.*;
import com.yeejoin.amos.patrol.business.feign.EquipFeign;
import com.yeejoin.amos.patrol.business.param.CheckInfoPageParam; import com.yeejoin.amos.patrol.business.param.CheckInfoPageParam;
import com.yeejoin.amos.patrol.business.param.CheckRecordParam; import com.yeejoin.amos.patrol.business.param.CheckRecordParam;
import com.yeejoin.amos.patrol.business.param.CheckStatisticalParam; import com.yeejoin.amos.patrol.business.param.CheckStatisticalParam;
...@@ -71,6 +72,9 @@ public class CheckController extends AbstractBaseController { ...@@ -71,6 +72,9 @@ public class CheckController extends AbstractBaseController {
private AsyncTask asyncTask; private AsyncTask asyncTask;
@Autowired @Autowired
private EquipFeign equipFeign;
@Autowired
private IPlanTaskService planTaskService; private IPlanTaskService planTaskService;
@Autowired @Autowired
...@@ -280,6 +284,9 @@ public class CheckController extends AbstractBaseController { ...@@ -280,6 +284,9 @@ public class CheckController extends AbstractBaseController {
*/ */
public void publishDataToMessage(List<Map<String, Object>> checkInputItems) { public void publishDataToMessage(List<Map<String, Object>> checkInputItems) {
for (Map<String, Object> map : checkInputItems) { for (Map<String, Object> map : checkInputItems) {
if (map.containsKey("equipId")){
equipFeign.updateEquipSpecificStatus(String.valueOf(map.get("input_value")).equals("合格")? "0":"1",map.get("equipId").toString());
}
SendToMsgRiskDetailVo detailVo = new SendToMsgRiskDetailVo(); SendToMsgRiskDetailVo detailVo = new SendToMsgRiskDetailVo();
SendToMsgRiskEquipInfoVo equipInfoVo = new SendToMsgRiskEquipInfoVo(); SendToMsgRiskEquipInfoVo equipInfoVo = new SendToMsgRiskEquipInfoVo();
SendToMsgRiskAlarmInfoVo alarmInfoVo = new SendToMsgRiskAlarmInfoVo(); SendToMsgRiskAlarmInfoVo alarmInfoVo = new SendToMsgRiskAlarmInfoVo();
...@@ -288,7 +295,9 @@ public class CheckController extends AbstractBaseController { ...@@ -288,7 +295,9 @@ public class CheckController extends AbstractBaseController {
equipInfoVo.setCode(String.valueOf(map.get("item_no"))); equipInfoVo.setCode(String.valueOf(map.get("item_no")));
equipInfoVo.setBizOrgCode(String.valueOf(map.get("biz_org_code"))); equipInfoVo.setBizOrgCode(String.valueOf(map.get("biz_org_code")));
equipInfoVo.setBizOrgName(String.valueOf(map.get("biz_org_name"))); equipInfoVo.setBizOrgName(String.valueOf(map.get("biz_org_name")));
if (map.containsKey("equipId")){
equipInfoVo.setEquipId(map.get("equipId").toString());
}
alarmInfoVo.setKey(String.valueOf(map.get("inputItem"))); alarmInfoVo.setKey(String.valueOf(map.get("inputItem")));
alarmInfoVo.setValue(String.valueOf(map.get("input_value"))); alarmInfoVo.setValue(String.valueOf(map.get("input_value")));
......
...@@ -46,5 +46,8 @@ public interface EquipFeign { ...@@ -46,5 +46,8 @@ public interface EquipFeign {
@RequestMapping(value = "${equip.fegin.prefix}"+"/building/getOne", method = RequestMethod.GET ,consumes="application/json") @RequestMapping(value = "${equip.fegin.prefix}"+"/building/getOne", method = RequestMethod.GET ,consumes="application/json")
FeignClientResult getBuildingTreeOne(@RequestParam(value = "instanceId", required = true) String instanceId); FeignClientResult getBuildingTreeOne(@RequestParam(value = "instanceId", required = true) String instanceId);
@RequestMapping(value = "${equip.fegin.prefix}"+"/equipSpecific/status/equip", method = RequestMethod.GET ,consumes="application/json")
FeignClientResult updateEquipSpecificStatus(String status, String id);
} }
...@@ -2323,4 +2323,8 @@ ...@@ -2323,4 +2323,8 @@
</select> </select>
<update id="updateEquipSpecificStatus">
update wl_equipment_specific set equip_status = #{} where id = #{id}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -2194,11 +2194,13 @@ ...@@ -2194,11 +2194,13 @@
END AS is_ok, END AS is_ok,
ii.biz_org_code, ii.biz_org_code,
ii.biz_org_name, ii.biz_org_name,
ci.score ci.score,
ppc.equipment_id
FROM FROM
p_check c, p_check c,
p_check_input ci, p_check_input ci,
p_input_item ii p_input_item ii,
p_point_classify ppc
WHERE WHERE
c.id = ci.check_id c.id = ci.check_id
AND ii.id = ci.input_id AND ii.id = ci.input_id
......
...@@ -71,6 +71,7 @@ public class EmqMessageService extends EmqxListener { ...@@ -71,6 +71,7 @@ public class EmqMessageService extends EmqxListener {
@Override @Override
public void processMessage(String topic, MqttMessage message) throws Exception { public void processMessage(String topic, MqttMessage message) throws Exception {
log.info(topic+"进来了,内容:"+message);
JSONObject result = JSONObject.fromObject(new String(message.getPayload())); JSONObject result = JSONObject.fromObject(new String(message.getPayload()));
JSONObject messageResult = new JSONObject(); JSONObject messageResult = new JSONObject();
messageResult.put("result", result); messageResult.put("result", result);
......
#注册中心地址 #注册中心地址
eureka.client.service-url.defaultZone =http://172.16.10.215:10001/eureka/ eureka.client.service-url.defaultZone =http://172.16.11.201:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health eureka.instance.health-check-url-path=/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html eureka.instance.metadata-map.management.api-docs=http://172.16.11.201:${server.port}${server.servlet.context-path}/swagger-ui.html
# kafka集群信息 # kafka集群信息
spring.kafka.bootstrap-servers=172.16.3.100:9092 spring.kafka.bootstrap-servers=172.16.10.215:9092
# 生产者配置 # 生产者配置
# 设置大于0的值,则客户端会将发送失败的记录重新发送 # 重试次数 # 设置大于0的值,则客户端会将发送失败的记录重新发送 # 重试次数
spring.kafka.producer.retries=1 spring.kafka.producer.retries=1
...@@ -74,7 +74,7 @@ management.health.redis.enabled=false ...@@ -74,7 +74,7 @@ management.health.redis.enabled=false
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.215:1883 emqx.broker=tcp://172.16.11.201:1883
emqx.client-user-name=admin emqx.client-user-name=admin
emqx.client-password=public emqx.client-password=public
emqx.max-inflight=1000 emqx.max-inflight=1000
...@@ -86,7 +86,7 @@ emqx.max-inflight=1000 ...@@ -86,7 +86,7 @@ emqx.max-inflight=1000
kafka.topics=null kafka.topics=null
#需要监听得eqm消息主题 根据是否是中心极和站端选择需要监听得主题进行配置 emq.iot.created, #需要监听得eqm消息主题 根据是否是中心极和站端选择需要监听得主题进行配置 emq.iot.created,
emq.topic=emq.xf.created,emq.iot.created,emq.patrol.created,emq.sign.created,emq.bussSign.created,emq.user.created emq.topic=emq.xf.created,emq.iot.created,emq.patrol.created,emq.sign.created,emq.bussSign.created,emq.user.created,emq.risk.created
##中心级配置配置 ##中心级配置配置
##需要监听得kafka消息主题 根据是否是中心极和站端选择需要监听得主题进行配置 ##需要监听得kafka消息主题 根据是否是中心极和站端选择需要监听得主题进行配置
......
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