Commit d64614ae by 赵剑炜

添加ws仓库设备

parent 05ca141f
package com.junmp.jyzb.api.util;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
@Data
public class WsWarehouseReq {
@JsonProperty("deviceId")
private String deviceId;
@JsonProperty("onlineState")
private String onlineState;
@JsonProperty("orgId")
private String orgId;
@JsonProperty("warehouseId")
private String warehouseId;
@JsonProperty("boxList")
private List<warehouseDevs> warehouseDevs;
@Data
// 内部类表示box
public static class warehouseDevs {
@JsonProperty("devId")
private String devId;
@JsonProperty("devIP")
private int devIP;
@JsonProperty("devName")
private String devName;
@JsonProperty("devState")
private String devState;
@JsonProperty("devType")
private String devType;
}
}
\ No newline at end of file
package com.junmp.jyzb.cache;
import com.junmp.jyzb.api.constant.JYZBConstant;
import com.junmp.v2.cache.AbstractRedisCache;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
@Component
public class DeviceRedisCache extends AbstractRedisCache<String> {
public DeviceRedisCache(RedisTemplate<String, String> redisTemplate) {
super(redisTemplate);
}
@Override
public String getCommonKeyPrefix() {
return JYZBConstant.JYZB_CACHE_PREFIX;
}
}
......@@ -44,35 +44,10 @@ public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> impl
private PubOrgService pubOrgService;
@Resource
private CabinetBoxService cabinetBoxService;
@Resource
private PolicemanService policemanService;
@Resource
private CabinetBoxPoliceService cabinetBoxPoliceService;
@Resource
private CabinetBoxPoliceMapper cabinetBoxPoliceMapper;
@Autowired
private RabbitMQSendMsg MQ;
private List<Long> getAllOrgId(CabinetReq req, String includeLowerLevel) {
List<Long> allOrg = new ArrayList<>();
if (includeLowerLevel.equals("false")) {
allOrg.add(req.getOrgId());
} else if (includeLowerLevel.equals("true")) {
//查询某组织机构的本级及下级
allOrg = pubOrgService.getLowerOrg(req.getOrgId());
}
return allOrg;
}
private List<Cabinet> getAllCabinetByOrg( List<Long> allOrgId) {
List<Cabinet> allCabinet = new ArrayList<>();
allCabinet = cabinetMapper.getAllCabinetByOrgList(allOrgId);
return allCabinet;
}
/**
* 添加单警柜
*
......
package com.junmp.police.test;
import org.apache.tomcat.util.digester.DocumentProperties;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
public class Base64Test {
public static void main(String args[]){
// String str = "abc";
// byte[] val = str.getBytes(StandardCharsets.UTF_8);
// String base64EncodedChunk = Base64.getEncoder().encodeToString(val);
// System.out.println(base64EncodedChunk);
}
}
......@@ -10,7 +10,7 @@ thing:
server:
websocket:
start: true
port: 10040
# 配置第三方请求
junmp:
swagger:
......
......@@ -6,7 +6,11 @@ easy-es:
address: 192.168.3.121:9200
username:
password:
thing:
server:
websocket:
start: true
port: 10030
# 配置第三方请求
junmp:
swagger:
......
......@@ -210,6 +210,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
String objJson= redisCache.get(processInstanceId);
redisCache.remove(processInstanceId);
List<MessageSendReq> msgs= JSONObject.parseArray(objJson,MessageSendReq.class);
if (CollectionUtil.isNotEmpty(msgs)){
msgs.forEach(msg->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论