Commit 0f88555c authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents b7dc4ef8 32d16d44
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.TabDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.RegionServiceImpl;
......@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TestServiceImpl;
import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javafx.scene.control.Tab;
import org.aspectj.apache.bcel.classfile.Module;
import org.influxdb.dto.QueryResult;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -54,4 +56,11 @@ public class MonitoringMapController extends BaseController {
public ResponseModel<ResultsData> getCompletionOfPowerIndicatorsByProvinceName(@RequestParam(required = true) int current, @RequestParam(required = true) int size, @RequestParam(required = true) String provinceName) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getCompletionOfPowerIndicatorsByProvinceName(current,size,provinceName));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据场站id动态获取tab页签")
@GetMapping("/getTabsByStationBasicId")
public ResponseModel<List<TabDto>> getTabsByStationBasicId(@RequestParam(required = true) String stationBasicId) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getTabsByStationBasicId(stationBasicId));
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
@Data
public class TabDto {
String activeIcon;
String icon;
String text;
String value;
public TabDto(String text,String value){
this.activeIcon="";
this.icon="";
this.text=text;
this.value = value;
}
}
......@@ -65,15 +65,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Autowired
TemporaryDataServiceImpl temporaryDataService;
@Autowired
SjglZsjZsbtzServiceImpl sjglZsjZsbtzServiceImpl;
@Autowired
TpriDmpDatabookServiceImpl tpriDmpDatabookServiceImpl;
@Autowired
StationDataTaskImpl stationDataTask;
@Override
public void UpdateMonitorFanIndicator(List<IndexDto> list) {
......
......@@ -107,10 +107,10 @@ public class MonitoringServiceImpl {
regionNationWideDtoList.add(regionNationWideDto);
}
} else {
if(provinceName.contains("%")){
if (provinceName.contains("%")) {
try {
provinceName = URLDecoder.decode(provinceName,"UTF-8");
}catch (Exception e){
provinceName = URLDecoder.decode(provinceName, "UTF-8");
} catch (Exception e) {
}
}
......@@ -165,19 +165,57 @@ public class MonitoringServiceImpl {
colModels.add(colModelAnnualPower);
//遍历列表
stationBasicList.forEach(stationBasic -> {
CompletionOfPowerIndicatorsDto completionOfPowerIndicatorsDto = new CompletionOfPowerIndicatorsDto();
completionOfPowerIndicatorsDto.setStationName(stationBasic.getStationName());
completionOfPowerIndicatorsDto.setInstallCapactity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(),"30秒平均风速")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"月发电量")));
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"年发电量")));
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
CompletionOfPowerIndicatorsDto completionOfPowerIndicatorsDto = new CompletionOfPowerIndicatorsDto();
completionOfPowerIndicatorsDto.setStationName(stationBasic.getStationName());
completionOfPowerIndicatorsDto.setInstallCapactity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "月发电量")));
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "年发电量")));
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
});
Integer allsize = completionOfPowerIndicatorsDtoList.size();
DataGridMock dataGridMock = new DataGridMock(current, allsize, false, allsize/size+1,completionOfPowerIndicatorsDtoList);
DataGridMock dataGridMock = new DataGridMock(current, allsize, false, allsize / size + 1, completionOfPowerIndicatorsDtoList);
ResultsData resultsData = new ResultsData(dataGridMock, colModels);
return resultsData;
}
public List<TabDto> getTabsByStationBasicId(String stationBasicId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId);
List<TabDto> tabDtoList = new ArrayList<>();
if (stationBasic.getStationType().contains("FDZ")) {
TabDto tab0 = new TabDto("风机布置图", "0");
TabDto tab1 = new TabDto("集电线路图", "1");
TabDto tab2 = new TabDto("运行列表", "2");
TabDto tab3 = new TabDto("升压站监控", "3");
TabDto tab4 = new TabDto("电量表记", "4");
TabDto tab5 = new TabDto("故障信息", "5");
tabDtoList.add(tab0);
tabDtoList.add(tab1);
tabDtoList.add(tab2);
tabDtoList.add(tab3);
tabDtoList.add(tab4);
tabDtoList.add(tab5);
} else {
TabDto tab6 = new TabDto("光伏区布置图", "6");
TabDto tab7 = new TabDto("集电线路图", "7");
TabDto tab8 = new TabDto("运行列表", "8");
TabDto tab9 = new TabDto("升压站监控", "9");
TabDto tab10 = new TabDto("电量表记", "10");
TabDto tab11 = new TabDto("故障信息", "11");
TabDto tab12 = new TabDto("集中式-离散率", "12");
TabDto tab13 = new TabDto("组串式-离散率", "13");
tabDtoList.add(tab6);
tabDtoList.add(tab7);
tabDtoList.add(tab8);
tabDtoList.add(tab9);
tabDtoList.add(tab10);
tabDtoList.add(tab11);
tabDtoList.add(tab12);
tabDtoList.add(tab13);
}
return tabDtoList;
}
}
......@@ -31,8 +31,7 @@ public class StationDataTaskImpl {
@Autowired
TpriDmpDatabookServiceImpl tpriDmpDatabookServiceImpl;
@Autowired
InfluxDbConnection influxDbConnection;
@Autowired
MonitorFanIndicatorImpl monitorFanIndicatorImpl;
@Value("${station.section}")
......
......@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
......@@ -40,7 +39,6 @@ import com.yeejoin.amos.boot.module.tzs.api.service.IDispatchTaskService;
import com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService;
import com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService;
import com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService;
import com.yeejoin.amos.boot.module.tzs.biz.controller.WechatController;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
......@@ -55,12 +53,11 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
......@@ -187,7 +184,12 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 电梯数据
Elevator elevator = elevatorServiceImpl.selectByAlertId(alertId);
String address = elevator.getAddress() == null ? "" : elevator.getAddress();
String useSiteCategory = elevator.getUseSiteCategory() == null ? "" : elevator.getUseSiteCategory() ;
String useSiteCategory = "";
if (!ValidationUtil.isEmpty(elevator.getUseSiteCategory())) {
String categoryCode = elevator.getUseSiteCategory();
DataDictionary categoryDict = iDataDictionaryService.getByCode(categoryCode, "USE_SITE_CATEGORY");
useSiteCategory = categoryDict.getName();
}
String useUnit = elevator.getUseUnit();
content = content.replace("$call_time",createTime).replace("$address",address).replace("$rescue_code",rescueCode).replace("$use_site_category",useSiteCategory);
String typeCode = "";
......@@ -921,9 +923,8 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
}
if(infoCode.indexOf("1") != -1 && StringUtils.isNotBlank(dispatchTaskDto.getResponseUserTel())) { // 下发了短信
HashMap<String, String> params = new HashMap<>();
params.put("smsCode","SMS_JCS_0001");
params.put("mobile",dispatchTaskDto.getResponseUserTel());
params.put("address","测试传参短信通知");
params.put("smsCode","SMS_TZS_0006");
params.put("content",dispatchTaskDto.getDispatchContext());
FeignClientResult<SmsRecordModel> result = Systemctl.smsClient.sendCommonSms(params);
}
// mqtt 通知新派遣
......
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