Commit b77ef8a8 authored by tangwei's avatar tangwei

拉取

parents 68b668fa 35692258
...@@ -66,6 +66,9 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn ...@@ -66,6 +66,9 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Autowired @Autowired
CommerceInfoServiceImpl commerceInfoService; CommerceInfoServiceImpl commerceInfoService;
@Value("${hygf.user.group.id}")
private long userGroupId;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -252,9 +255,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn ...@@ -252,9 +255,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
if (userResult == null || userResult.getResult() == null) { if (userResult == null || userResult.getResult() == null) {
throw new BadRequest("单位注册失败"); throw new BadRequest("单位注册失败");
} }
String[] userIds = { userResult.getResult().getUserId() }; // String[] userIds = { userResult.getResult().getUserId() };
regUnitInfo.setAdminUserId(userResult.getResult().getUserId()); regUnitInfo.setAdminUserId(userResult.getResult().getUserId());
regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr()); regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr());
List<String> userId = new ArrayList<>();
userId.add(userResult.getResult().getUserId());
// 将创建用户加入用户组
Privilege.groupUserClient.create(userGroupId, userId);
} catch (Exception e) { } catch (Exception e) {
// 删除已经创建的 企业信息 // 删除已经创建的 企业信息
if (companyInfo != null && companyInfo.getSequenceNbr() != null) { if (companyInfo != null && companyInfo.getSequenceNbr() != null) {
......
...@@ -104,6 +104,8 @@ sms.huawei.sender=1069368924410006092 ...@@ -104,6 +104,8 @@ sms.huawei.sender=1069368924410006092
sms.huawei.signature=华为云短信测试 sms.huawei.signature=华为云短信测试
# 电站审核pageId # 电站审核pageId
power.station.examine.pageId=1679778420550037506 power.station.examine.pageId=1680853427061551106
# 电站审核计划id # 电站审核计划id
power.station.examine.planId=c4ed1873-0dc6-4518-a7a9-dbc588ef35e5 power.station.examine.planId=c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
\ No newline at end of file # 用户组userGroupId
hygf.user.group.id=1679755750924120066
\ No newline at end of file
package com.yeejoin.amos.boot.module.jxiop.api.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum KGName {
DLQ("断路器","dlq"),
DAZ("刀闸","daz"),
DCK("低测控","dck"),
GCK("高测控","gck"),
CK("测控","ck"),
MXDZ("母线PT刀闸","mxdc"),
BTCK("本体测控","btck");
private String name;
private String code;
public static String getCode(String name) {
for (KGName electricQuantity : KGName.values())
{
if (electricQuantity.getName().equals(name))
{
return electricQuantity.getCode();
}
}
return null;
}
}
...@@ -302,6 +302,37 @@ public class MonitorFanIdxController extends BaseController { ...@@ -302,6 +302,37 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "升压站光字牌/压板状态API-通用")
@GetMapping("/getStatusGzpAndYb")
public ResponseModel getStatusGzp(@RequestParam(value = "stationId") String stationId,
@RequestParam(value = "frontModule") String frontModule) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getBoosterGatewayId();
Map<String, String> map = monitorFanIndicatorMapper.getMajorBoosterStationInfoBySort(gatewayId, frontModule);
String name = map.get("text").contains("主变")?map.get("text").substring(0,3):map.get("text");
HashMap<String, String> stringStringHashMap = new HashMap<>();
stringStringHashMap.put("gzp", "光字牌");
stringStringHashMap.put("ybzt", "压板状态");
stringStringHashMap.put("agzp", "A套保护光字牌");
stringStringHashMap.put("bgzp", "B套保护光字牌");
for (Map.Entry<String, String> stringStringEntry : stringStringHashMap.entrySet()) {
List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getStatusGzp(gatewayId ,stringStringEntry.getValue(), name);
IPage<Map<String,Object>> result = new Page<>();
result.setRecords(statusMonitoring);
result.setCurrent(1);
result.setTotal(statusMonitoring.size());
try {
emqKeeper.getMqttClient().publish(String.format("%s/%s/%s", stationId, frontModule, stringStringEntry.getKey()), JSON.toJSONString(result).getBytes(),0,false);
} catch (MqttException e) {
e.printStackTrace();
}
}
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "集电线路图左侧 集电线列表") @ApiOperation(value = "集电线路图左侧 集电线列表")
@GetMapping("/jdTree") @GetMapping("/jdTree")
public ResponseModel<IPage<Map<String, Object>>> getStatusJDX(@RequestParam(value = "stationId")String stationId) { public ResponseModel<IPage<Map<String, Object>>> getStatusJDX(@RequestParam(value = "stationId")String stationId) {
...@@ -452,11 +483,11 @@ public class MonitorFanIdxController extends BaseController { ...@@ -452,11 +483,11 @@ public class MonitorFanIdxController extends BaseController {
String gatewayId = stationBasic.getBoosterGatewayId(); String gatewayId = stationBasic.getBoosterGatewayId();
Map<String, String> map = monitorFanIndicatorMapper.getMajorBoosterStationInfoBySort(stationId, equipName); Map<String, String> map = monitorFanIndicatorMapper.getMajorBoosterStationInfoBySort(gatewayId, equipName);
String name = map.get("text").contains("主变")?map.get("text").substring(0,3):map.get("text"); String name = map.get("text").contains("主变")?map.get("text").substring(0,3):map.get("text");
Map<String, Object> switchUrl = monitorFanIndicatorImpl.getSwitchUrl(stationId, name); Map<String, Object> switchUrl = monitorFanIndicatorImpl.getSwitchUrl(gatewayId, name);
List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getStatusGzp(gatewayId ,"光字牌",name); List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getStatusGzp(gatewayId ,"光字牌",name);
IPage<Map<String, Object>> result = new Page<>(); IPage<Map<String, Object>> result = new Page<>();
switchUrl.put("records",statusMonitoring); switchUrl.put("records",statusMonitoring);
......
...@@ -28,6 +28,7 @@ public class IndicatorsDto { ...@@ -28,6 +28,7 @@ public class IndicatorsDto {
private String displayName; private String displayName;
private String pictureName; private String pictureName;
private String title; private String title;
private String state;
public String getTime() { public String getTime() {
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.ElectricQuantity; import com.yeejoin.amos.boot.module.jxiop.api.Enum.ElectricQuantity;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.KGName;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
...@@ -32,6 +33,7 @@ import org.apache.commons.io.IOUtils; ...@@ -32,6 +33,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.elasticsearch.common.recycler.Recycler; import org.elasticsearch.common.recycler.Recycler;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
...@@ -669,10 +671,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -669,10 +671,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List<Map<String,Object>> statusMaps = new ArrayList<>(); List<Map<String,Object>> statusMaps = new ArrayList<>();
for (IndicatorsDto listDatum : listData) { for (IndicatorsDto listDatum : listData) {
Map<String, Object> statusMap = new HashMap<>(); Map<String, Object> statusMap = new HashMap<>();
statusMap.put("data",statusMap.get("displayName")); statusMap.put("data",listDatum.getDisplayName());
statusMap.put("title",statusMap.get("displayName")); statusMap.put("state",listDatum.getState().equals("true")? 1:0);
statusMap.put("state",statusMap.get("state").equals("true")? 1:0); statusMap.put("title",listDatum.getState().equals("true")?"断":"通");
statusMap.put("title",statusMap.get("state").equals("true")?"断":"通");
statusMaps.add(statusMap); statusMaps.add(statusMap);
} }
return statusMaps; return statusMaps;
...@@ -1020,6 +1021,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1020,6 +1021,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
resultMap.put("records", resultList); resultMap.put("records", resultList);
resultMap.put("current", 1); resultMap.put("current", 1);
resultMap.put("size", resultList.size()); resultMap.put("size", resultList.size());
// 开关信息
Map<String, Object> switchUrl = getSwitchUrl(gatewayId, null);
BeanUtils.copyProperties(switchUrl, resultMap);
List<Map<String, Object>> finallyResultList = Collections.singletonList(resultMap); List<Map<String, Object>> finallyResultList = Collections.singletonList(resultMap);
// 主屏下方重复列表数据 // 主屏下方重复列表数据
IPage<Map<String, Object>> resultPage = new Page<>(); IPage<Map<String, Object>> resultPage = new Page<>();
...@@ -1077,8 +1083,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1077,8 +1083,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
url =pictureUrl+ urls[1];; url =pictureUrl+ urls[1];;
} }
photoUrls.put(datass.getDisplayName().split("_")[0]+"jddwz",url); photoUrls.put(datass.getDisplayName().split("_")[0]+"jddwz",url);
} }
for (IndicatorsDto data : listDatas) { for (IndicatorsDto data : listDatas) {
String url = ""; String url = "";
String[] urls = data.getPictureName().split(","); String[] urls = data.getPictureName().split(",");
...@@ -1087,7 +1093,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1087,7 +1093,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}else { }else {
url =pictureUrl+ urls[1];; url =pictureUrl+ urls[1];;
} }
photoUrls.put(data.getDisplayName().split("_")[0]+"yfjdkgurl",url); if (data.getDisplayName().split("_").length > 2){
photoUrls.put(KGName.getCode(data.getDisplayName().split("_")[1]),url);
}else {
photoUrls.put(data.getDisplayName().split("_")[0]+"yfjdkgurl",url);
}
} }
for (IndicatorsDto listDatum : listData) { for (IndicatorsDto listDatum : listData) {
......
...@@ -103,4 +103,4 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness ...@@ -103,4 +103,4 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
# ????????? # ?????????
fan.statuts.stattuspath=upload/jxiop/device_status fan.statuts.stattuspath=upload/jxiop/device_status
pictureUrl= pictureUrl=upload/jxiop/syz/
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