Commit 3b5c64de authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.修改极短期间开预测定时任务逻辑,解决优化后部分优化结果时间段过短问题;
2.修改心知天气气象数据获取及接收定时任务,解决天气数据通过邮件下载后,部分数据精度丢失问题;
3.修改首页各个接口逻辑,对小数类型字段进行处理,修改首页接口,增加小时保留两位四舍五入逻辑,同时解决线路详情接口部分查询逻辑报错问题;
4.能耗分析模块,能耗概览接口修改,修改查询逻辑,修改数据获取逻辑及绿电占比计算逻辑;
5.能耗分析模块,消纳曲线用电趋势接口修改,修改查询逻辑,修改数据获取逻辑及绿电占比计算逻辑;
6.能耗分析模块,用电详情接口修改,修改查询逻辑,修改数据获取逻辑及绿电占比计算逻辑;
7.修改首页先导实验井间开制度模块接口查询逻辑,解决极短期间开优化修改后没有第一次开井时间标识导致数据查询不出来问题;
8.基础间开制度新增修改接口逻辑修改,删除防冻堵对井口处理逻辑;
9.极短期间开优化算法修改,增加防冻堵井开井时间优化逻辑;
10.提供长庆通过日期获取当日间开优化结果接口开发,完成接口冒烟测试并添加线上接口文档;
11.提供长庆1天光伏出力预测结果接口开发,完成接口冒烟测试并添加线上接口文档;
12.提供长庆15天光伏出力预测结果接口开发,完成接口冒烟测试并添加线上接口文档;
13.修改极短期间开优化算法,优化防冻堵策略;
14.开发第三方历史天气导入功能;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 9cfd20c4
......@@ -114,7 +114,7 @@ public class LoginService {
@XText("账号密码登录")
@XApiPost(anonymous = true)
public XSingleResult<LoginByAccountOutput> loginByAccount(XContext context, LoginByAccountInput input) {
long startTime = new Date().getTime();
long startTime = System.currentTimeMillis();
Long count = getErrorTimes(context, input.getLoginName(), null);
if (count >= 5) {
return XSingleResult.error(context, LoginError.ISLOCKED);
......
package pps.core.system.service;
import xstartup.annotation.XService;
@XService
public class MessageProcParamService {
// @XApiAnonymous
// @XApiPost
// public XServiceResult createMessageProcParam(XContext context, CreateMessageProcParamInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// MessageProcParamEnt entity = new MessageProcParamEnt();
// XCopyUtils.copyObject(input, entity);
// mapper.insert(entity);
// return XServiceResult.OK;
// }
//
// @XApiAnonymous
// @XApiPost
// public XServiceResult updateMessageProcParam(XContext context, UpdateMessageProcParamInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// QueryWrapper<MessageProcParamEnt> queryWrapper = new QueryWrapper<>();
// queryWrapper.lambda().eq(MessageProcParamEnt::getId, input.getId());
// MessageProcParamEnt entity = mapper.selectOne(queryWrapper);
// if(entity == null) {
// return XServiceResult.error(context, XError.NotFound);
// }
// XCopyUtils.copyObject(input, entity);
// mapper.updateById(entity);
// return XServiceResult.OK;
// }
//
// @XApiAnonymous
// @XApiPost
// public XServiceResult deleteMessageProcParam(XContext context, DeleteMessageProcParamInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// QueryWrapper<MessageProcParamEnt> queryWrapper = new QueryWrapper<>();
// queryWrapper.lambda().eq(MessageProcParamEnt::getId, input.getId());
// MessageProcParamEnt entity = mapper.selectOne(queryWrapper);
// if(entity == null) {
// return XServiceResult.error(context, XError.NotFound);
// }
// mapper.deleteById(entity);
// return XServiceResult.OK;
// }
//
// @XApiAnonymous
// @XApiGet
// public XSingleResult<GetMessageProcParamOutput> getMessageProcParam(XContext context, GetMessageProcParamInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// QueryWrapper<MessageProcParamEnt> queryWrapper = new QueryWrapper<>();
// queryWrapper.lambda().eq(MessageProcParamEnt::getId, input.getId());
// MessageProcParamEnt entity = mapper.selectOne(queryWrapper);
// if(entity == null) {
// return XSingleResult.error(context, XError.NotFound);
// }
// GetMessageProcParamOutput output = new GetMessageProcParamOutput();
// XCopyUtils.copyObject(entity, output);
// return XSingleResult.success(output);
// }
//
// @XApiAnonymous
// @XApiGet
// public XPageResult<QueryMessageProcParamOutput> queryMessageProcParam(XContext context, QueryMessageProcParamInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// QueryWrapper<MessageProcParamEnt> queryWrapper = new QueryWrapper<>();
// queryWrapper.lambda().like(MessageProcParamEnt::getId, input.getId())
// .like(MessageProcParamEnt::getProcId, input.getProcId())
// .like(MessageProcParamEnt::getParamName, input.getParamName())
// .like(MessageProcParamEnt::getParamDes, input.getParamDes())
// .like(MessageProcParamEnt::getParamType, input.getParamType())
// .like(MessageProcParamEnt::getInOut, input.getInOut())
// .like(MessageProcParamEnt::getCreateByName, input.getCreateByName())
// .eq(MessageProcParamEnt::getSort, input.getSort());
// return MapperHelper.query(mapper, input, queryWrapper, QueryMessageProcParamOutput.class);
// }
//
// @XApiAnonymous
// @XApiGet
// public XPageResult<QueryMessageProcParamOutput> dynamicQueryMessageProcParam(XContext context, CustomQueryInput input){
// MessageProcParamMapper mapper = context.getBean(MessageProcParamMapper.class);
// return MapperHelper.query(mapper, input, MessageProcParamEnt.class, QueryMessageProcParamOutput.class);
// }
//
// @XApiAnonymous
// @XApiGet
// public XSingleResult<GetMessageProcParamViewOutput> getMessageProcParamView(XContext context, GetMessageProcParamViewInput input){
// MessageProcParamViewMapper mapper = context.getBean(MessageProcParamViewMapper.class);
// MessageProcParamView record = new MessageProcParamView();
// XCopyUtils.copyObject(input, record);
// MessageProcParamView view = mapper.selectOne(record);
// if(view == null) {
// return XSingleResult.error(context, XError.NotFound);
// }
// GetMessageProcParamViewOutput output = new GetMessageProcParamViewOutput();
// XCopyUtils.copyObject(view, output);
// return XSingleResult.success(output);
// }
//
// @XApiAnonymous
// @XApiGet
// public XPageResult<QueryMessageProcParamViewOutput> queryMessageProcParamView(XContext context, QueryMessageProcParamViewInput input){
// MessageProcParamViewMapper mapper = context.getBean(MessageProcParamViewMapper.class);
// MessageProcParamView record = new MessageProcParamView();
// XCopyUtils.copyObject(input, record);
// PageHelper.startPage(input.getPage(), input.getLimit());
// List<MessageProcParamView> list = mapper.selectList(record);
// PageInfo<MessageProcParamView> pageInfo = new PageInfo<>(list);
// List<QueryMessageProcParamViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryMessageProcParamViewOutput.class);
// return XPageResult.success(outputs, input, pageInfo.getTotal());
// }
}
......@@ -154,5 +154,4 @@ public class OperationMaintenanceUserInformationService {
List<QueryOperationMaintenanceUserInformationViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryOperationMaintenanceUserInformationViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -46,7 +46,6 @@ public class SysAreaService {
if (!CollectionUtils.isEmpty(ent.getChildren())) {
items.addAll(ent.getChildren());
}
}
sysAreaCaches = items;
}
......@@ -76,7 +75,6 @@ public class SysAreaService {
List<SysAreaView> areaViews = mapper.selectListAll(record);
List<GetSysAreaViewOutputTree> list = XCopyUtils.copyNewList(areaViews, GetSysAreaViewOutputTree.class);
List<GetSysAreaViewOutputTree> trees = new ArrayList<>();
for (GetSysAreaViewOutputTree tree : list) {
if (tree.getLev().equals(0)) {
trees.add(tree);
......@@ -197,5 +195,4 @@ public class SysAreaService {
List<QuerySysAreaViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysAreaViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -40,7 +40,6 @@ public class SysAuthOuScopeService {
@XText("创建用户和菜单、组织机构关系表")
@XApiPost
public XServiceResult createSysAuthOuScope(XContext context, CreateSysAuthOuScopeInput input) throws XServiceException {
return XTransactionHelper.begin(context, () -> {
SysAuthOuScopeMapper sysAuthOuScopeMapper = context.getBean(SysAuthOuScopeMapper.class);
SysAuthOuScopeViewMapper sysAuthOuScopeViewMapper = context.getBean(SysAuthOuScopeViewMapper.class);
......@@ -69,7 +68,6 @@ public class SysAuthOuScopeService {
List<String> collect = deleteList.stream().map(SysAuthOuScopeEnt::getId).collect(Collectors.toList());
sysAuthOuScopeMapper.deleteBatchIds(collect);
}
//创建新关系
List<SysAuthOuScopeView> viewList = new ArrayList<>();
List<String> ouIds = input.getOuIds();
......@@ -94,21 +92,7 @@ public class SysAuthOuScopeService {
//返回执行成功的结果,事务提交
return XServiceResult.OK;
});
}
/* @XApiAnonymous
@XApiPost
public XServiceResult createSysAuthOuScope(XContext context, CreateSysAuthOuScopeInput input){
SysAuthOuScopeMapper mapper = context.getBean(SysAuthOuScopeMapper.class);
SysAuthOuScopeEnt entity = new SysAuthOuScopeEnt();
XCopyUtils.copyObject(input, entity);
// entity.setCreateById(context.getUser().getId());
entity.setCreateByName(context.getUser().getName());
entity.setCreateTime(new Date());
mapper.insert(entity);
return XServiceResult.OK;
}*/
@XText("批量删除")
@XApiPost
......@@ -126,7 +110,6 @@ public class SysAuthOuScopeService {
return XServiceResult.OK;
}
@XText("查询管理授权")
@XApiPost
public XPageResult<QuerySysAuthOuScopeViewOutput> querySysAuthOuScopeView(XContext context, QuerySysAuthOuScopeViewInput input) {
......@@ -140,7 +123,6 @@ public class SysAuthOuScopeService {
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
@XText("根据用户组id查询")
@XApiAnonymous
@XApiPost
......@@ -154,5 +136,4 @@ public class SysAuthOuScopeService {
List<QuerySysAuthOuScopeViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysAuthOuScopeViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ import xstartup.feature.mybatis.helper.XMapperHelper;
@XService
public class SysBaseInfoSysncConfigService {
@XApiPost
public XServiceResult createSysBaseInfoSysncConfig(XContext context, CreateSysBaseInfoSysncConfigInput input) {
SysBaseInfoSysncConfigMapper mapper = context.getBean(SysBaseInfoSysncConfigMapper.class);
......@@ -41,7 +42,6 @@ public class SysBaseInfoSysncConfigService {
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
QueryWrapper<SysBaseInfoSysncConfigEnt> wrapper = new QueryWrapper();
wrapper.lambda().eq(SysBaseInfoSysncConfigEnt::getTableName, input.getTableName())
.eq(SysBaseInfoSysncConfigEnt::getTargetDb, input.getTargetDb());
......@@ -49,7 +49,6 @@ public class SysBaseInfoSysncConfigService {
if (sysBaseInfoSysncConfigEnt != null && !sysBaseInfoSysncConfigEnt.getId().equals(input.getId())) {
return XServiceResult.error(1000, "配置已存在");
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
......@@ -91,5 +90,4 @@ public class SysBaseInfoSysncConfigService {
.eq(SysBaseInfoSysncConfigEnt::getIsEnable, input.getIsEnable());
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysBaseInfoSysncConfigOutput.class);
}
}
\ No newline at end of file
......@@ -128,7 +128,7 @@ public class SysDictionaryService {
mapper.insert(entity);
//更新字典缓存
if (entity.getEndTime() != null) {
long l = entity.getEndTime().getTime() - new Date().getTime();
long l = entity.getEndTime().getTime() - System.currentTimeMillis();
if (l > 0) {
/*List<SysDictionaryCache> list = SysDictionaryCache.list(context, alias);
SysDictionaryCache sysDictionaryCache = new SysDictionaryCache();
......@@ -182,7 +182,7 @@ public class SysDictionaryService {
public XServiceResult updateSysDictionary(XContext context, UpdateSysDictionaryInput input) {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
//如果输入的alias为空,查询新增项的上级alias
String alias = "";
String alias;
if (StringUtils.isNotBlank(input.getAlias())) {
alias = input.getAlias();
List<SysDictionaryCache> list1 = SysDictionaryCache.list(context, alias);
......@@ -215,7 +215,6 @@ public class SysDictionaryService {
}
}
}
//查询需要修改的
QueryWrapper<SysDictionaryEnt> queryEntity = new QueryWrapper<>();
queryEntity.lambda().eq(SysDictionaryEnt::getId, input.getId());
......@@ -227,7 +226,6 @@ public class SysDictionaryService {
entity.setModifyName(context.getUser().getName());
entity.setModifyTime(new Date());
mapper.updateById(entity);
//更新字典缓存
List<SysDictionaryCache> list = SysDictionaryCache.list(context, alias);
List<SysDictionaryCache> items = new ArrayList<>();
......@@ -476,9 +474,9 @@ public class SysDictionaryService {
XPageResult<QuerySysDictionaryOutput> query = XMapperHelper.query(mapper, input, queryWrapper, QuerySysDictionaryOutput.class);
List<QuerySysDictionaryOutput> items = query.getResult().getItems();
if (items != null && items.size() > 0) {
List<String> ids = items.stream().map(p -> {
return p.getId();
}).distinct().collect(Collectors.toList());
List<String> ids = items.stream().map(p ->
p.getId()
).distinct().collect(Collectors.toList());
SysDictionaryView sysDictionaryView = new SysDictionaryView();
StringBuffer idsStr = new StringBuffer();
for (int i = 0; i < ids.size(); i++) {
......@@ -663,15 +661,12 @@ public class SysDictionaryService {
list.add(cache);
}
}
Collections.sort(sysDictionaryList, new Comparator<SysDictionaryEnt>() {
@Override
public int compare(SysDictionaryEnt o1, SysDictionaryEnt o2) {
Collections.sort(sysDictionaryList, (o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort();
} else {
return 0;
}
}
});
List<QuerySysDictionaryViewOutput> outputs = XCopyUtils.copyNewList(sysDictionaryList, QuerySysDictionaryViewOutput.class);
return XListResult.success(outputs);
......@@ -703,23 +698,18 @@ public class SysDictionaryService {
}).collect(Collectors.toList());
list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList());
}
}
Collections.sort(list, new Comparator<SysDictionaryCache>() {
@Override
public int compare(SysDictionaryCache o1, SysDictionaryCache o2) {
Collections.sort(list, (o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort();
} else {
return 0;
}
}
});
List<QuerySysDictionaryViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysDictionaryViewOutput.class);
return XListResult.success(outputs);
}
@XText("获取字典地区树")
@XApiPost
public XListResult<QuerySysDictionaryViewOutput> querySysDictionaryTree(XContext context, GetSysDictionaryViewInput input) {
......@@ -729,7 +719,6 @@ public class SysDictionaryService {
List<SysDictionaryView> list = mapper.selectSysDictionaryTree(record);
List<QuerySysDictionaryViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysDictionaryViewOutput.class);
List<QuerySysDictionaryViewOutput> trees = new ArrayList<>();
for (QuerySysDictionaryViewOutput tree : outputs) {
if (tree.getParentSysDictionaryId().equals("30")) {
trees.add(tree);
......@@ -743,10 +732,8 @@ public class SysDictionaryService {
tree.getChildren().add(it);
}
}
}
trees.stream().sorted(Comparator.comparing(QuerySysDictionaryViewOutput::getSort)).collect(Collectors.toList());
return XListResult.success(trees);
}
......@@ -768,9 +755,9 @@ public class SysDictionaryService {
public XServiceResult updateBasePipelineParentPath(XContext context, List<SysDictionaryEnt> dics) {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
List<String> list = dics.stream().map(p -> {
return p.getId();
}).distinct().collect(Collectors.toList());
List<String> list = dics.stream().map(p ->
p.getId()
).distinct().collect(Collectors.toList());
while (ObjectUtils.isNotEmpty(list)) {
//更新二级字典parentPath
QueryWrapper<SysDictionaryEnt> wrapper = new QueryWrapper<>();
......@@ -786,9 +773,9 @@ public class SysDictionaryService {
entity.setDicPath(parentPath);
mapper.updateById(entity);
}
list = sysDictionaryEnts.stream().map(p -> {
return p.getId();
}).distinct().collect(Collectors.toList());
list = sysDictionaryEnts.stream().map(p ->
p.getId()
).distinct().collect(Collectors.toList());
} else {
list = null;
}
......@@ -799,7 +786,6 @@ public class SysDictionaryService {
@XText("修改字典排序")
@XApiPost
public XServiceResult updateDictionarySortById(XContext context, QuerySysDictionaryOutput input) {
SysDictionaryViewMapper viewMapper = context.getBean(SysDictionaryViewMapper.class);
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper();
//查询当前字典项
......@@ -816,7 +802,7 @@ public class SysDictionaryService {
.orderByAsc(SysDictionaryEnt::getSort);
}
List<SysDictionaryEnt> sysDictionaryEnts = mapper.selectList(query);
Integer sort = 0;
Integer sort;
if (ObjectUtils.isNotEmpty(sysDictionaryEnts)) {
SysDictionaryEnt sysDictionaryEnt1 = sysDictionaryEnts.get(0);
//交换排序值
......@@ -862,9 +848,9 @@ public class SysDictionaryService {
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, RULE_NUMBER_ALIAS)
.eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionary.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> {
return p.getDicCode();
}).collect(Collectors.toList());
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p ->
p.getDicCode()
).collect(Collectors.toList());
queryItems.lambda().in(SysDictionaryEnt::getId, dicIds);
}
queryItems.lambda().eq(SysDictionaryEnt::getPid, sysDictionaryCache.getId()).gt(SysDictionaryEnt::getEndTime, new Date());
......@@ -877,15 +863,12 @@ public class SysDictionaryService {
list.add(cache);
}
}
Collections.sort(list, new Comparator<SysDictionaryCache>() {
@Override
public int compare(SysDictionaryCache o1, SysDictionaryCache o2) {
Collections.sort(list, (o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort();
} else {
return o1.getId().compareTo(o2.getId());
}
}
});
List<QueryRuleNumberOutput> outputs = XCopyUtils.copyNewList(sysDictionaryList, QueryRuleNumberOutput.class);
PageInfo<QueryRuleNumberOutput> pageInfo = new PageInfo<>(outputs);
......@@ -898,20 +881,17 @@ public class SysDictionaryService {
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, sysDictionaryEnt.getId())
.eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionaryEnt.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> {
return p.getDicCode();
}).collect(Collectors.toList());
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p ->
p.getDicCode()
).collect(Collectors.toList());
list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList());
}
Collections.sort(list, new Comparator<SysDictionaryCache>() {
@Override
public int compare(SysDictionaryCache o1, SysDictionaryCache o2) {
Collections.sort(list, (o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort();
} else {
return 0;
}
}
});
List<QueryRuleNumberOutput> outputs = new ArrayList<>();
//XCopyUtils.copyNewList(list, QuerySysDictionaryViewOutput.class);
......@@ -919,7 +899,6 @@ public class SysDictionaryService {
QueryRuleNumberOutput querySysDictionaryViewOutput = XCopyUtils.copyNewObject(sysDictionaryCache, QueryRuleNumberOutput.class);
outputs.add(querySysDictionaryViewOutput);
}
PageInfo<QueryRuleNumberOutput> pageInfo = new PageInfo<>(outputs);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
......@@ -940,9 +919,7 @@ public class SysDictionaryService {
newEnt.setDicKey(PinyinUtil.getPinyin(input.getDicName(), "_"));
newEnt.updateCreateInfo(context);
mapper.insert(newEnt);
SysDictionaryCache.deleteCache(context, "rule_number");
return XServiceResult.OK;
}
......
......@@ -164,7 +164,6 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
}).collect(Collectors.toList());
list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList());
}
}
Collections.sort(list, new Comparator<SysDictionaryCache>() {
@Override
......@@ -269,12 +268,10 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
if (list.isEmpty()) {
return XListResult.success(resultList);
}
SysDictionaryEnt parentDictionaryEnt = list.get(0);
list = sysDictionaryMapper.selectList(Builder.create(QueryWrapper.class).build(queryWrapper -> {
queryWrapper.eq("pid", parentDictionaryEnt.getId());
}));
resultList = XCopyUtils.copyNewList(list, QuerySysDictionaryViewOutput.class);
return XListResult.success(resultList);
}
......@@ -285,7 +282,7 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
return XTransactionHelper.begin(context, () -> {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
//如果输入的alias为空,查询新增项的上级alias
String alias = "";
String alias;
if (StringUtils.isNotBlank(input.getAlias())) {
alias = input.getAlias();
List<SysDictionaryCache> list1 = SysDictionaryCache.list(context, alias);
......@@ -380,7 +377,7 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
return XTransactionHelper.begin(context, () -> {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
//如果输入的alias为空,查询新增项的上级alias
String alias = "";
String alias;
if (StringUtils.isNotBlank(input.getAlias())) {
alias = input.getAlias();
List<SysDictionaryCache> list1 = SysDictionaryCache.list(context, alias);
......@@ -495,7 +492,6 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
@XText("修改字典排序")
@Override
public XServiceResult updateDictionarySortById(XContext context, QuerySysDictionaryOutput input) {
SysDictionaryViewMapper viewMapper = context.getBean(SysDictionaryViewMapper.class);
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper();
//查询当前字典项
......@@ -512,7 +508,7 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
.orderByAsc(SysDictionaryEnt::getSort);
}
List<SysDictionaryEnt> sysDictionaryEnts = mapper.selectList(query);
Integer sort = 0;
Integer sort;
if (ObjectUtils.isNotEmpty(sysDictionaryEnts)) {
SysDictionaryEnt sysDictionaryEnt1 = sysDictionaryEnts.get(0);
//交换排序值
......
......@@ -362,7 +362,6 @@ public class SysInformService {
outputs.add(output);
}
}
return XListResult.success(outputs);
}
......
......@@ -77,7 +77,6 @@ public class SysInformTemplateReceiveTypeDetailService {
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetSysInformTemplateReceiveTypeDetailViewOutput> getSysInformTemplateReceiveTypeDetailView(XContext context, GetSysInformTemplateReceiveTypeDetailViewInput input) {
......@@ -105,5 +104,4 @@ public class SysInformTemplateReceiveTypeDetailService {
List<QuerySysInformTemplateReceiveTypeDetailViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysInformTemplateReceiveTypeDetailViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -104,5 +104,4 @@ public class SysInformTemplateReceiveTypeService {
List<QuerySysInformTemplateReceiveTypeViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysInformTemplateReceiveTypeViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -40,7 +40,6 @@ import java.util.stream.Collectors;
@XService
public class SysMenuService {
@XText("角色列表使用的菜单树")
@XApiPost
public XListResult<QuerySysMenuOutputTree> getSysMenuTreeRole(XContext context, GetSysMenuInput input) {
......@@ -63,11 +62,9 @@ public class SysMenuService {
CreateSysDictionaryInput mediaTypesInput = new CreateSysDictionaryInput();
mediaTypesInput.setAlias("MEDIUM_TYPE");
XListResult<QuerySysDictionaryViewOutput> mediaTypes = dictService.querySysDictionarysByAlias(context, mediaTypesInput);
CreateSysDictionaryInput businessTypeInput = new CreateSysDictionaryInput();
businessTypeInput.setAlias("business_type");
XListResult<QuerySysDictionaryViewOutput> businessTypes = dictService.querySysDictionarysByAlias(context, businessTypeInput);
for (QuerySysMenuOutputTree tree : list) {
//业务类型
if (XStringUtils.isNotEmpty(tree.getMenuType())) {
......@@ -81,7 +78,6 @@ public class SysMenuService {
tree.setBusinessTypeName(tree.getMenuType());
}
}
//介质类型
if (XStringUtils.isNotEmpty(tree.getMediaType())) {
if (mediaTypes.getResult() != null) {
......@@ -100,16 +96,13 @@ public class SysMenuService {
String mediaTypeName = buffer.substring(1);
tree.setMediaTypeName(mediaTypeName);
}
}
if (tree.getMediaTypeName() == null) {
tree.setMediaTypeName(tree.getMediaType());
}
}
}
List<QuerySysMenuOutputTree> trees = new ArrayList<>();
for (QuerySysMenuOutputTree tree : list) {
if (tree.getParentMenuId() == null || "".equals(tree.getParentMenuId())) {
trees.add(tree);
......@@ -129,13 +122,10 @@ public class SysMenuService {
tree.setChildren(children);
}
}
trees = trees.stream().sorted(Comparator.comparing(QuerySysMenuOutputTree::getSort)).collect(Collectors.toList());
return XListResult.success(trees);
}
@XText("根据当前用户查询菜单列表树")
@XApiPost
public XListResult<QuerySysMenuOutputTree> getSysMenuTreeByUserId(XContext context, GetSysMenuInput input) {
......@@ -154,11 +144,9 @@ public class SysMenuService {
CreateSysDictionaryInput mediaTypesInput = new CreateSysDictionaryInput();
mediaTypesInput.setAlias("MEDIUM_TYPE");
XListResult<QuerySysDictionaryViewOutput> mediaTypes = dictService.querySysDictionarysByAlias(context, mediaTypesInput);
CreateSysDictionaryInput businessTypeInput = new CreateSysDictionaryInput();
businessTypeInput.setAlias("business_type");
XListResult<QuerySysDictionaryViewOutput> businessTypes = dictService.querySysDictionarysByAlias(context, businessTypeInput);
for (QuerySysMenuOutputTree tree : list) {
//业务类型
if (XStringUtils.isNotEmpty(tree.getMenuType())) {
......@@ -172,7 +160,6 @@ public class SysMenuService {
tree.setBusinessTypeName(tree.getMenuType());
}
}
//介质类型
if (XStringUtils.isNotEmpty(tree.getMediaType())) {
if (mediaTypes.getResult() != null) {
......@@ -191,16 +178,13 @@ public class SysMenuService {
String mediaTypeName = buffer.substring(1);
tree.setMediaTypeName(mediaTypeName);
}
}
if (tree.getMediaTypeName() == null) {
tree.setMediaTypeName(tree.getMediaType());
}
}
}
List<QuerySysMenuOutputTree> trees = new ArrayList<>();
for (QuerySysMenuOutputTree tree : list) {
if (tree.getParentMenuId() == null || "".equals(tree.getParentMenuId())) {
trees.add(tree);
......@@ -220,9 +204,7 @@ public class SysMenuService {
tree.setChildren(children);
}
}
trees = trees.stream().sorted(Comparator.comparing(QuerySysMenuOutputTree::getSort)).collect(Collectors.toList());
return XListResult.success(trees);
}
......@@ -244,11 +226,9 @@ public class SysMenuService {
CreateSysDictionaryInput mediaTypesInput = new CreateSysDictionaryInput();
mediaTypesInput.setAlias("MEDIUM_TYPE");
XListResult<QuerySysDictionaryViewOutput> mediaTypes = dictService.querySysDictionarysByAlias(context, mediaTypesInput);
CreateSysDictionaryInput businessTypeInput = new CreateSysDictionaryInput();
businessTypeInput.setAlias("business_type");
XListResult<QuerySysDictionaryViewOutput> businessTypes = dictService.querySysDictionarysByAlias(context, businessTypeInput);
for (QuerySysMenuOutputTree tree : list) {
//业务类型
if (XStringUtils.isNotEmpty(tree.getMenuType())) {
......@@ -262,7 +242,6 @@ public class SysMenuService {
tree.setBusinessTypeName(tree.getMenuType());
}
}
//介质类型
if (XStringUtils.isNotEmpty(tree.getMediaType())) {
if (mediaTypes.getResult() != null) {
......@@ -281,16 +260,13 @@ public class SysMenuService {
String mediaTypeName = buffer.substring(1);
tree.setMediaTypeName(mediaTypeName);
}
}
if (tree.getMediaTypeName() == null) {
tree.setMediaTypeName(tree.getMediaType());
}
}
}
List<QuerySysMenuOutputTree> trees = new ArrayList<>();
for (QuerySysMenuOutputTree tree : list) {
if (tree.getParentMenuId() == null || "".equals(tree.getParentMenuId())) {
trees.add(tree);
......@@ -310,9 +286,7 @@ public class SysMenuService {
tree.setChildren(children);
}
}
trees = trees.stream().sorted(Comparator.comparing(QuerySysMenuOutputTree::getSort)).collect(Collectors.toList());
return XListResult.success(trees);
}
......@@ -340,11 +314,9 @@ public class SysMenuService {
CreateSysDictionaryInput mediaTypesInput = new CreateSysDictionaryInput();
mediaTypesInput.setAlias("MEDIUM_TYPE");
XListResult<QuerySysDictionaryViewOutput> mediaTypes = dictService.querySysDictionarysByAlias(context, mediaTypesInput);
CreateSysDictionaryInput businessTypeInput = new CreateSysDictionaryInput();
businessTypeInput.setAlias("business_type");
XListResult<QuerySysDictionaryViewOutput> businessTypes = dictService.querySysDictionarysByAlias(context, businessTypeInput);
for (QuerySysMenuOutputTree tree : list) {
//业务类型
if (XStringUtils.isNotEmpty(tree.getMenuType())) {
......@@ -358,7 +330,6 @@ public class SysMenuService {
tree.setBusinessTypeName(tree.getMenuType());
}
}
//介质类型
if (XStringUtils.isNotEmpty(tree.getMediaType())) {
if (mediaTypes.getResult() != null) {
......@@ -377,13 +348,11 @@ public class SysMenuService {
String mediaTypeName = buffer.substring(1);
tree.setMediaTypeName(mediaTypeName);
}
}
if (tree.getMediaTypeName() == null) {
tree.setMediaTypeName(tree.getMediaType());
}
}
}
//判断是否有子集
List<String> parentIds = list.stream().map(QuerySysMenuOutputTree::getId).collect(Collectors.toList());
......@@ -397,7 +366,6 @@ public class SysMenuService {
}
});
list = list.stream().sorted(Comparator.comparing(QuerySysMenuOutputTree::getSort)).collect(Collectors.toList());
return XListResult.success(list);
}
......@@ -412,11 +380,9 @@ public class SysMenuService {
CreateSysDictionaryInput mediaTypesInput = new CreateSysDictionaryInput();
mediaTypesInput.setAlias("MEDIUM_TYPE");
XListResult<QuerySysDictionaryViewOutput> mediaTypes = dictService.querySysDictionarysByAlias(context, mediaTypesInput);
CreateSysDictionaryInput businessTypeInput = new CreateSysDictionaryInput();
businessTypeInput.setAlias("business_type");
XListResult<QuerySysDictionaryViewOutput> businessTypes = dictService.querySysDictionarysByAlias(context, businessTypeInput);
for (QuerySysMenuOutputTree tree : list) {
//业务类型
if (XStringUtils.isNotEmpty(tree.getMenuType())) {
......@@ -430,7 +396,6 @@ public class SysMenuService {
tree.setBusinessTypeName(tree.getMenuType());
}
}
//介质类型
if (XStringUtils.isNotEmpty(tree.getMediaType())) {
if (mediaTypes.getResult() != null) {
......@@ -449,16 +414,13 @@ public class SysMenuService {
String mediaTypeName = buffer.substring(1);
tree.setMediaTypeName(mediaTypeName);
}
}
if (tree.getMediaTypeName() == null) {
tree.setMediaTypeName(tree.getMediaType());
}
}
}
List<QuerySysMenuOutputTree> trees = new ArrayList<>();
for (QuerySysMenuOutputTree tree : list) {
if (tree.getParentMenuId() == null || "".equals(tree.getParentMenuId())) {
trees.add(tree);
......@@ -478,16 +440,13 @@ public class SysMenuService {
tree.setChildren(children);
}
}
trees = trees.stream().sorted(Comparator.comparing(QuerySysMenuOutputTree::getSort)).collect(Collectors.toList());
return XListResult.success(trees);
}
@XText("菜单排序")
@XApiPost
public XServiceResult updateSysMenuSort(XContext context, UpdateSysMenuInput input) throws XServiceException {
return XTransactionHelper.begin(context, () -> {
SysMenuMapper mapper = context.getBean(SysMenuMapper.class);
QueryWrapper<SysMenuEnt> queryWrapper = new QueryWrapper<>();
......@@ -496,7 +455,6 @@ public class SysMenuService {
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
Integer entitySort = entity.getSort();
QueryWrapper<SysMenuEnt> neighborQueryWrapper = new QueryWrapper<>();
neighborQueryWrapper.lambda().eq(SysMenuEnt::getParentMenuId, entity.getParentMenuId());
......@@ -510,7 +468,6 @@ public class SysMenuService {
neighborQueryWrapper.lambda().ge(SysMenuEnt::getSort, entitySort);
neighborQueryWrapper.lambda().orderByAsc(SysMenuEnt::getSort);
}
List<SysMenuEnt> sysMenuEnts = mapper.selectList(neighborQueryWrapper);
PpsUserSession session = context.getSession(PpsUserSession.class);
if (!CollectionUtils.isEmpty(sysMenuEnts) && sysMenuEnts.size() > 1) {
......@@ -525,14 +482,12 @@ public class SysMenuService {
neighborEntSort += 1;
}
}
//上方或下方有数据进行交换序号
neighborEnt.setSort(entitySort);
neighborEnt.setModifyTime(new Date());
neighborEnt.setModifyById(session.getId());
neighborEnt.setModifyByName(session.getUserName());
mapper.updateById(neighborEnt);
entity.setSort(neighborEntSort);
}
entity.setModifyTime(new Date());
......@@ -553,17 +508,14 @@ public class SysMenuService {
});
}
@XText("新增菜单")
@XApiPost
public XServiceResult createSysMenu(XContext context, CreateSysMenuInput input) throws XServiceException {
return XTransactionHelper.begin(context, () -> {
SysMenuMapper mapper = context.getBean(SysMenuMapper.class);
SysMenuViewMapper viewMapper = context.getBean(SysMenuViewMapper.class);
SysMenuEnt entity = new SysMenuEnt();
XCopyUtils.copyObject(input, entity);
if (entity.getSort() == null) {
SysMenuView relView = viewMapper.selectMaxSort(entity.getParentMenuId());
if (relView != null) {
......@@ -585,7 +537,6 @@ public class SysMenuService {
});
}
}
if (entity.getParentMenuId() == null || "".equals(entity.getParentMenuId())) {
entity.setLevel("1");
}
......@@ -594,12 +545,10 @@ public class SysMenuService {
if (session != null) {
entity.setCreateById(session.getId());
entity.setCreateByName(session.getUserName());
}
entity.setMediaType("ALL");
entity.setShowChildren(false);
mapper.insert(entity);
//返回执行成功的结果,事务提交
return XServiceResult.OK;
});
......@@ -623,7 +572,6 @@ public class SysMenuService {
@XText("修改菜单信息")
@XApiPost
public XServiceResult updateSysMenu(XContext context, UpdateSysMenuInput input) throws XServiceException {
return XTransactionHelper.begin(context, () -> {
SysMenuMapper mapper = context.getBean(SysMenuMapper.class);
SysMenuViewMapper viewMapper = context.getBean(SysMenuViewMapper.class);
......@@ -652,13 +600,11 @@ public class SysMenuService {
//返回执行成功的结果,事务提交
return XServiceResult.OK;
});
}
@XText("删除菜单")
@XApiPost
public XServiceResult deleteSysMenu(XContext context, DeleteSysMenuInput input) throws XServiceException {
return XTransactionHelper.begin(context, () -> {
SysMenuMapper mapper = context.getBean(SysMenuMapper.class);
QueryWrapper<SysMenuEnt> queryWrapper = new QueryWrapper<>();
......@@ -675,7 +621,6 @@ public class SysMenuService {
} else {
return XServiceResult.error(context, MenuError.NotDelete);
}
//返回执行成功的结果,事务提交
return XServiceResult.OK;
});
......
......@@ -20,7 +20,6 @@ public class SysMenuUserCloudServiceImpl implements SysMenuUserCloudService {
@Override
public XListResult<GetSysMenuUserViewOutput> selectMenuListByUserId(XContext context, GetSysMenuUserViewInput input) {
SysMenuViewMapper menuViewMapper = context.getBean(SysMenuViewMapper.class);
PpsUserSession session = context.getSession(PpsUserSession.class);
SysMenuView menuView = new SysMenuView();
......
......@@ -35,7 +35,6 @@ import static pps.core.system.error.OrganizationError.PARAM_EMPTY;
@XService
public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudService {
@Override
public XSingleResult<GetSysOrganizationViewOutput> getSysOrganizationById(XContext context, GetSysOrganizationViewInput input) {
SysOrganizationMapper mapper = context.getBean(SysOrganizationMapper.class);
......@@ -52,7 +51,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
SysOrganizationMapper mapper = context.getBean(SysOrganizationMapper.class);
List<SysOrganizationEnt> list = mapper.selectBatchIds(input.getIds());
List<GetSysOrganizationViewOutput> outputs = XCopyUtils.copyNewList(list, GetSysOrganizationViewOutput.class);
return XListResult.success(outputs);
}
......@@ -71,7 +69,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
@Override
public XSingleResult<GetSysOrganizationViewOutput> getSysOrganizationByOuLevelAndOuId(XContext context, GetSysOrganizationViewInput input) {
SysOrganizationViewMapper viewMapper = context.getBean(SysOrganizationViewMapper.class);
SysOrganizationView view = new SysOrganizationView();
XCopyUtils.copyObject(input, view);
......@@ -88,7 +85,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
@Override
public XSingleResult<GetSysOrganizationViewOutput> getSysOrganizationByOuLevelAndUserId(XContext context, GetSysOrganizationViewInput input) {
SysOrganizationViewMapper viewMapper = context.getBean(SysOrganizationViewMapper.class);
SysOrganizationView view = new SysOrganizationView();
XCopyUtils.copyObject(input, view);
......@@ -99,10 +95,8 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
return XSingleResult.success(output);
}
@Override
public XListResult<GetSysOrganizationViewOutput> getSysOrganizationListByOuLevelAndUserId(XContext context, GetSysOrganizationViewInput input) {
SysOrganizationViewMapper viewMapper = context.getBean(SysOrganizationViewMapper.class);
SysOrganizationView view = new SysOrganizationView();
XCopyUtils.copyObject(input, view);
......@@ -133,8 +127,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
SysUserOrganizationRelMapper mapper = context.getBean(SysUserOrganizationRelMapper.class);
SysOrganizationMapper sysOrganizationMapper = context.getBean(SysOrganizationMapper.class);
SysOrganizationRelMapper sysOrganizationRelMapper = context.getBean(SysOrganizationRelMapper.class);
QueryWrapper<SysUserOrganizationRelEnt> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(SysUserOrganizationRelEnt::getUserId, input.getUserId())
.le(SysUserOrganizationRelEnt::getEffectTime, new Date())
......@@ -149,7 +141,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
SysOrganizationEnt sysOrganizationEnt = sysOrganizationMapper.selectOne(queryWrapper);
XCopyUtils.copyObject(sysOrganizationEnt, output);
output.setOuId(relEnts.get(0).getOuId());
QueryWrapper<SysOrganizationRelEnt> qw = new QueryWrapper<>();
qw.lambda().eq(SysOrganizationRelEnt::getOuId, relEnts.get(0).getOuId())
.le(SysOrganizationRelEnt::getEffectTime, new Date())
......@@ -197,10 +188,8 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
queryWrapper.lambda().lt(SysOrganizationRelEnt::getEffectTime, new Date());
queryWrapper.lambda().gt(SysOrganizationRelEnt::getEndTime, new Date());
SysOrganizationRelEnt relEnt = mapper.selectOne(queryWrapper);
SysOrganizationMapper orgMapper = context.getBean(SysOrganizationMapper.class);
SysOrganizationEnt sysOrganizationEnt = orgMapper.selectById(relEnt.getParentOuId());
GetSysOrganizationViewOutput output = new GetSysOrganizationViewOutput();
XCopyUtils.copyObject(sysOrganizationEnt, output);
return XSingleResult.success(output);
......@@ -240,7 +229,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
return XListResult.success(list);
}
@XText("根据用户id获取用户组织机构")
public XListResult<OuIdAndOutNameOutput> getOrgListByUserId(XContext context, QueryUserIdInput input) {
SysUserOrganizationRelViewMapper mapper = context.getBean(SysUserOrganizationRelViewMapper.class);
......@@ -364,7 +352,6 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
@Override
public XListResult<GetSysOrganizationViewOutput> queryOuInfoOrStationByParentOuId(XContext context) {
PpsUserSession session = context.getSession(PpsUserSession.class);
SysOrganizationService organizationService = context.getBean(SysOrganizationService.class);
GetSysOrganizationRelInput organizationRelInput = new GetSysOrganizationRelInput();
organizationRelInput.setParentOuId(session.getOuId());
......
......@@ -113,7 +113,6 @@ public class SysOrganizationDictionaryService {
}
}
}
return XServiceResult.OK;
});
}
......@@ -143,9 +142,9 @@ public class SysOrganizationDictionaryService {
SysDictionaryView view = new SysDictionaryView();
view.setDicPath(input.getId());
List<SysDictionaryView> sysDictionaryViews = dicViewMapper.selectListsByDicPathIncludeSelf(view);
List<String> dicIds = sysDictionaryViews.stream().map(p -> {
return p.getId();
}).distinct().collect(Collectors.toList());
List<String> dicIds = sysDictionaryViews.stream().map(p ->
p.getId()
).distinct().collect(Collectors.toList());
QueryWrapper<SysOrganizationDictionaryEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(SysOrganizationDictionaryEnt::getDicCode, dicIds);
if (StringUtils.isNotBlank(input.getOuId())) {
......@@ -242,9 +241,8 @@ public class SysOrganizationDictionaryService {
SysDictionaryMapper dictionaryMapper = context.getBean(SysDictionaryMapper.class);
SysOrganizationCloudService orgService = context.getBean(SysOrganizationCloudService.class);
SysDictionaryViewMapper dictionaryViewMapper = context.getBean(SysDictionaryViewMapper.class);
SysOrganizationDictionaryMapper orgDictionaryMapper = context.getBean(SysOrganizationDictionaryMapper.class);
List<QuerySysDictionaryViewOutput> outputs = new ArrayList<>();
List<SysDictionaryView> dictionaryViews = new ArrayList<>();
List<SysDictionaryView> dictionaryViews;
Integer dictionaryItems = 0;
PageInfo<SysDictionaryView> pageInfo = new PageInfo<>();
pageInfo.setPageNum(input.getPage());
......@@ -307,9 +305,9 @@ public class SysOrganizationDictionaryService {
dictionaryViews = dictionaryViewMapper.selectChildListByCondition(recordView);
}
if (ObjectUtils.isNotEmpty(dictionaryViews)) {
List<String> pidList = dictionaryViews.stream().map(p -> {
return p.getId();
}).distinct().collect(Collectors.toList());
List<String> pidList = dictionaryViews.stream().map(p ->
p.getId()
).distinct().collect(Collectors.toList());
QueryWrapper<SysDictionaryEnt> queryDict = new QueryWrapper();
queryDict.lambda().in(SysDictionaryEnt::getPid, pidList);
List<SysDictionaryEnt> sysDictionaryList = dictionaryMapper.selectList(queryDict);
......
......@@ -54,7 +54,6 @@ public class SysOrganizationPropertyService {
.le(true, SysOrganizationPropertyEnt::getEffectTime, date)
.ge(true, SysOrganizationPropertyEnt::getEndTime, date);
} else {
List<GetSysOrganizationPropertyOutput> list = new ArrayList<>();
for (QuerySysDictionaryViewOutput viewOutput : mediaTypesResult) {
GetSysOrganizationPropertyOutput output = new GetSysOrganizationPropertyOutput();
......@@ -81,7 +80,6 @@ public class SysOrganizationPropertyService {
return XListResult.success(outputs);
}
@XApiPost
public XListResult<QuerySysOrganizationPropertyOutput> query(XContext context, QuerySysOrganizationPropertyInput input) {
//普通角色只查询所属企业的介质类型
......@@ -133,7 +131,6 @@ public class SysOrganizationPropertyService {
return XServiceResult.OK;
}
@XApiGet
public XPageResult<QuerySysOrganizationPropertyOutput> querySysOrganizationProperty(XContext context, QuerySysOrganizationPropertyInput input) {
SysOrganizationPropertyMapper mapper = context.getBean(SysOrganizationPropertyMapper.class);
......@@ -159,7 +156,6 @@ public class SysOrganizationPropertyService {
return XMapperHelper.query(mapper, input, SysOrganizationPropertyEnt.class, QuerySysOrganizationPropertyOutput.class);
}
@XApiGet
public XPageResult<QuerySysOrganizationPropertyViewOutput> querySysOrganizationPropertyView(XContext context, QuerySysOrganizationPropertyViewInput input) {
SysOrganizationPropertyViewMapper mapper = context.getBean(SysOrganizationPropertyViewMapper.class);
......@@ -171,5 +167,4 @@ public class SysOrganizationPropertyService {
List<QuerySysOrganizationPropertyViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysOrganizationPropertyViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ import java.util.List;
@XService
public class SysOrganizationRelService {
@XApiAnonymous
@XApiPost
public XServiceResult createSysOrganizationRel(XContext context, CreateSysOrganizationRelInput input) {
......@@ -35,7 +36,6 @@ public class SysOrganizationRelService {
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult deleteSysOrganizationRel(XContext context, DeleteSysOrganizationRelInput input) {
......@@ -122,5 +122,4 @@ public class SysOrganizationRelService {
List<QuerySysOrganizationRelViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysOrganizationRelViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
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