Commit 08112388 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.添加easy excel配置,增加转换器,增加全局excel导出样式,增加场站下拉选解析器;
2.开发光伏电站模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
3.间开制度管理模块新增设为基础制度开关接口,添加线上接口文档并完成接口冒烟测试;
4.开发井口配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
5.开发第三方有功功率历史数据导入接口,增加模板配置类,添加线上接口文档并完成接口冒烟测试;
6.开发给长庆使用的获取第三方认证token接口,验证获取token后是否能正常跳转指定页面,创建长庆用演示用户及角色;
7.开发柴发设备配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
8.开发储能设备配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
9.开发柴发设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
10.开发井口设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
11.开发光伏电站设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
12.开发储能设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
13.基础信息配置模块,修改光伏电站分页查询列表接口,增加排序逻辑,按照组织机构名称和电站名称升序排序;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 05ee7728
...@@ -11,12 +11,12 @@ import pps.cloud.prediction.service.data.plant_train_power_task.GetPlantTrainPow ...@@ -11,12 +11,12 @@ import pps.cloud.prediction.service.data.plant_train_power_task.GetPlantTrainPow
import pps.cloud.system.service.SystemAreaService; import pps.cloud.system.service.SystemAreaService;
import pps.cloud.system.service.SystemDictionaryService; import pps.cloud.system.service.SystemDictionaryService;
import pps.cloud.system.service.SystemUserRoleRelService; import pps.cloud.system.service.SystemUserRoleRelService;
import pps.cloud.system.service.data.sys_area.GetSysAreaInput;
import pps.cloud.system.service.data.sys_area.GetSysAreaOutput;
import pps.cloud.system.service.data.sys_dictionary.CreateSysDictionaryInput; import pps.cloud.system.service.data.sys_dictionary.CreateSysDictionaryInput;
import pps.cloud.system.service.data.sys_dictionary.QuerySysDictionaryViewOutput;
import pps.cloud.system.service.data.user_role.GetSysUserRoleRelInput; import pps.cloud.system.service.data.user_role.GetSysUserRoleRelInput;
import pps.cloud.system.service.data.user_role.GetSysUserRoleRelOutput; import pps.cloud.system.service.data.user_role.GetSysUserRoleRelOutput;
import pps.cloud.system.service.data.sys_dictionary.QuerySysDictionaryViewOutput;
import pps.cloud.system.service.data.sys_area.GetSysAreaInput;
import pps.cloud.system.service.data.sys_area.GetSysAreaOutput;
import pps.core.base.constant.MapeConstant; import pps.core.base.constant.MapeConstant;
import pps.core.base.entity.BasePhotovoltaicPlantEnt; import pps.core.base.entity.BasePhotovoltaicPlantEnt;
import pps.core.base.entity.BasePhotovoltaicPlantMapeAdjView; import pps.core.base.entity.BasePhotovoltaicPlantMapeAdjView;
...@@ -215,10 +215,10 @@ public class BasePhotovoltaicPlantService { ...@@ -215,10 +215,10 @@ public class BasePhotovoltaicPlantService {
record.setPlantId(input.getId()); record.setPlantId(input.getId());
record.setMapeType(input.getMapeType()); record.setMapeType(input.getMapeType());
BasePhotovoltaicPlantMapeAdjView view = mapeAdjMapper.selectOne(record); BasePhotovoltaicPlantMapeAdjView view = mapeAdjMapper.selectOne(record);
if(view != null && view.getMapePlusVal() !=null) { if (view != null && view.getMapePlusVal() != null) {
mape = relMape.add(view.getMapePlusVal()); mape = relMape.add(view.getMapePlusVal());
if(mape.compareTo(BigDecimal.valueOf(100))>0) mape = BigDecimal.valueOf(100); if (mape.compareTo(BigDecimal.valueOf(100)) > 0) mape = BigDecimal.valueOf(100);
}else{ } else {
mape = relMape; mape = relMape;
} }
//output.setRelMape(relMape.setScale(2, BigDecimal.ROUND_UP).toPlainString() + "%"); //output.setRelMape(relMape.setScale(2, BigDecimal.ROUND_UP).toPlainString() + "%");
...@@ -267,7 +267,7 @@ public class BasePhotovoltaicPlantService { ...@@ -267,7 +267,7 @@ public class BasePhotovoltaicPlantService {
queryWrapper.lambda() queryWrapper.lambda()
.like(CharSequenceUtil.isNotEmpty(stationName), BasePhotovoltaicPlantEnt::getStationName, stationName) .like(CharSequenceUtil.isNotEmpty(stationName), BasePhotovoltaicPlantEnt::getStationName, stationName)
.eq(BasePhotovoltaicPlantEnt::getIsDeleted, BusinessConstant.ONE) .eq(BasePhotovoltaicPlantEnt::getIsDeleted, BusinessConstant.ONE)
.orderByDesc(BasePhotovoltaicPlantEnt::getModifyTime); .orderByDesc(BasePhotovoltaicPlantEnt::getOuName, BasePhotovoltaicPlantEnt::getStationName);
return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePhotovoltaicPlantOutput.class); return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePhotovoltaicPlantOutput.class);
} }
...@@ -375,13 +375,13 @@ public class BasePhotovoltaicPlantService { ...@@ -375,13 +375,13 @@ public class BasePhotovoltaicPlantService {
} }
/** /**
* 校验当前用户是否有调整光伏预测准确率的权限 * 校验当前用户是否有调整光伏预测准确率的权限
*
* @param context * @param context
* @return * @return
*/ */
private boolean checkUserMapeAdjPower(XContext context){ private boolean checkUserMapeAdjPower(XContext context) {
boolean result = false; boolean result = false;
try { try {
//获取字典配置的角色 //获取字典配置的角色
...@@ -389,12 +389,12 @@ public class BasePhotovoltaicPlantService { ...@@ -389,12 +389,12 @@ public class BasePhotovoltaicPlantService {
CreateSysDictionaryInput createSysDictionaryInput = new CreateSysDictionaryInput(); CreateSysDictionaryInput createSysDictionaryInput = new CreateSysDictionaryInput();
createSysDictionaryInput.setAlias(MapeConstant.MAPE_ADJ_ROLE_DIC_ALIAS); createSysDictionaryInput.setAlias(MapeConstant.MAPE_ADJ_ROLE_DIC_ALIAS);
XListResult<QuerySysDictionaryViewOutput> dicResult = dictionaryService.querySysDictionarysByAlias(context, createSysDictionaryInput); XListResult<QuerySysDictionaryViewOutput> dicResult = dictionaryService.querySysDictionarysByAlias(context, createSysDictionaryInput);
if(!dicResult.isSuccess()){ if (!dicResult.isSuccess()) {
context.getLogger().error("=======get dic error: alias="+MapeConstant.MAPE_ADJ_ROLE_DIC_ALIAS+" errorMsg:"+XJsonUtils.toJson(dicResult.getError())); context.getLogger().error("=======get dic error: alias=" + MapeConstant.MAPE_ADJ_ROLE_DIC_ALIAS + " errorMsg:" + XJsonUtils.toJson(dicResult.getError()));
return result; return result;
} }
List<QuerySysDictionaryViewOutput> roleDicList = dicResult.getResult(); List<QuerySysDictionaryViewOutput> roleDicList = dicResult.getResult();
if(roleDicList.isEmpty()) return result; if (roleDicList.isEmpty()) return result;
List<String> roleIds = roleDicList.stream().map(QuerySysDictionaryViewOutput::getDicKey).collect(Collectors.toList()); List<String> roleIds = roleDicList.stream().map(QuerySysDictionaryViewOutput::getDicKey).collect(Collectors.toList());
//获取当前用户角色 //获取当前用户角色
...@@ -402,19 +402,19 @@ public class BasePhotovoltaicPlantService { ...@@ -402,19 +402,19 @@ public class BasePhotovoltaicPlantService {
GetSysUserRoleRelInput getSysUserRoleRelInput = new GetSysUserRoleRelInput(); GetSysUserRoleRelInput getSysUserRoleRelInput = new GetSysUserRoleRelInput();
getSysUserRoleRelInput.setUserId(context.getSession(PpsUserSession.class).getId()); getSysUserRoleRelInput.setUserId(context.getSession(PpsUserSession.class).getId());
XListResult<GetSysUserRoleRelOutput> roleResult = roleRelService.getSysRoleByUserId(context, getSysUserRoleRelInput); XListResult<GetSysUserRoleRelOutput> roleResult = roleRelService.getSysRoleByUserId(context, getSysUserRoleRelInput);
if(!roleResult.isSuccess()){ if (!roleResult.isSuccess()) {
context.getLogger().error("=======get user role error:"+XJsonUtils.toJson(roleResult.getError())); context.getLogger().error("=======get user role error:" + XJsonUtils.toJson(roleResult.getError()));
return result; return result;
} }
for(GetSysUserRoleRelOutput item:roleResult.getResult()){ for (GetSysUserRoleRelOutput item : roleResult.getResult()) {
if (roleIds.contains(item.getRoleId())){ if (roleIds.contains(item.getRoleId())) {
result = true; result = true;
break; break;
} }
} }
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
TraceHelper.appendTraceLog(context,e.toString()); TraceHelper.appendTraceLog(context, e.toString());
} }
return result; return result;
} }
......
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