服务指令bug
This commit is contained in:
parent
a0a25fff10
commit
74b3b93a01
|
@ -137,14 +137,14 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
}
|
}
|
||||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
customeRuleMap.put("categoryId", QueryRuleEnum.EQ);
|
customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("typeId", QueryRuleEnum.EQ);
|
customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("instructionTagId", QueryRuleEnum.EQ);
|
customeRuleMap.put("instructionTagId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("izReimbursement", QueryRuleEnum.EQ);
|
customeRuleMap.put("izReimbursement", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("izPreferential", QueryRuleEnum.EQ);
|
customeRuleMap.put("izPreferential", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("cycleType", QueryRuleEnum.EQ);
|
customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("izEnabled", QueryRuleEnum.EQ);
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
||||||
queryWrapper.select("id");
|
queryWrapper.select("id");
|
||||||
//如果有服务指令需要提前查询下对应的服务指令id
|
//如果有服务指令需要提前查询下对应的服务指令id
|
||||||
|
|
|
@ -23,8 +23,9 @@ public class TreeNode {
|
||||||
private List<TreeNode> children = new ArrayList<>();
|
private List<TreeNode> children = new ArrayList<>();
|
||||||
private List<DirectiveBodyTag> bodyTagList;
|
private List<DirectiveBodyTag> bodyTagList;
|
||||||
private List<DirectiveEmotionTag> emotionTagList;
|
private List<DirectiveEmotionTag> emotionTagList;
|
||||||
|
private boolean parentLevelEnabled;//父级及往上是否启用
|
||||||
|
|
||||||
public TreeNode(String instructionId,String categoryId,String typeId,String key, String title,int level,String cycleTypeName,String izEnabled,Integer sort,boolean canAdd) {
|
public TreeNode(String instructionId,String categoryId,String typeId,String key, String title,int level,String cycleTypeName,String izEnabled,Integer sort,boolean canAdd,boolean parentLevelEnabled) {
|
||||||
this.instructionId = instructionId;
|
this.instructionId = instructionId;
|
||||||
this.categoryId = categoryId;
|
this.categoryId = categoryId;
|
||||||
this.typeId = typeId;
|
this.typeId = typeId;
|
||||||
|
@ -35,6 +36,7 @@ public class TreeNode {
|
||||||
this.izEnabled = izEnabled;
|
this.izEnabled = izEnabled;
|
||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
this.canAdd = canAdd;
|
this.canAdd = canAdd;
|
||||||
|
this.parentLevelEnabled = parentLevelEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addChild(TreeNode node) { children.add(node); }
|
public void addChild(TreeNode node) { children.add(node); }
|
||||||
|
|
|
@ -479,7 +479,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
if ("enabled".equals(filterIzEnabled) && !insUsing) {
|
if ("enabled".equals(filterIzEnabled) && !insUsing) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing);
|
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing,true);
|
||||||
List<ConfigServiceCategory> catList = catMap.get(inst.getId());
|
List<ConfigServiceCategory> catList = catMap.get(inst.getId());
|
||||||
if (catList != null) {
|
if (catList != null) {
|
||||||
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
|
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
|
||||||
|
@ -488,7 +488,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
if ("enabled".equals(filterIzEnabled) && !catUsing) {
|
if ("enabled".equals(filterIzEnabled) && !catUsing) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing);
|
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing,insUsing);
|
||||||
List<ConfigServiceType> typeList = typeMap.get(cat.getId());
|
List<ConfigServiceType> typeList = typeMap.get(cat.getId());
|
||||||
if (typeList != null) {
|
if (typeList != null) {
|
||||||
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
|
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
|
||||||
|
@ -497,7 +497,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
if ("enabled".equals(filterIzEnabled) && !typUsing) {
|
if ("enabled".equals(filterIzEnabled) && !typUsing) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing);
|
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing,insUsing && catUsing );
|
||||||
List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
|
List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
|
||||||
if (dirList != null) {
|
if (dirList != null) {
|
||||||
dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
|
dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
|
||||||
|
@ -505,8 +505,8 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
if ("enabled".equals(filterIzEnabled) && "1".equals(dir.getIzEnabled())) {
|
if ("enabled".equals(filterIzEnabled) && "1".equals(dir.getIzEnabled())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing,insUsing && catUsing && typUsing);
|
||||||
TreeNode tagNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), IdUtil.simpleUUID(), "标签", 5, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
TreeNode tagNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), IdUtil.simpleUUID(), "标签", 5, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing,insUsing && catUsing && typUsing);
|
||||||
tagNode.setBodyTagList(dir.getBodyTagList());
|
tagNode.setBodyTagList(dir.getBodyTagList());
|
||||||
tagNode.setEmotionTagList(dir.getEmotionTagList());
|
tagNode.setEmotionTagList(dir.getEmotionTagList());
|
||||||
typeNode.addChild(dirNode);
|
typeNode.addChild(dirNode);
|
||||||
|
|
Loading…
Reference in New Issue